Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] infxswgt incorrectly exported to restart file #616

Open
bfkg opened this issue May 8, 2018 · 1 comment
Open

[BUG] infxswgt incorrectly exported to restart file #616

bfkg opened this issue May 8, 2018 · 1 comment
Assignees

Comments

@bfkg
Copy link
Contributor

bfkg commented May 8, 2018

I found, on our Intel based system (compiler and hardware), that what is written to the restart netcdf file is not always identical with what's in the memory.
Thus, values in the surface routing weighting grid infxswgt become orders of magnitude larger than they should be.
I attached a netcdf file for illustration.
infxswgt.zip
It seems that at some point in the computations, the variable changes precision, although everywhere only REAL*4 is defined. When writing the field to the nc file, the values are not correctly converted to float (as required in the netcdf file). Reading the field subsequently imports the wrong values into the simulation, leading to much too high surface head.
Adding a cast to real() in
module_HYDRO_io.F
call w_rst_rt_nc2(ncid,rt_domain(did)%ixrt,rt_domain(did)%jxrt,real(rt_domain(did)%INFXSWGT), "infxswgt" )
solves the problem, at least on our system.
If the conversion is done later in the calling sequence, just before the netcdf variable is put into the file, the values are already corrupted. The problem seems to be connected with the MPI collection of the distributed infxswgt field into the global field.

@bfkg bfkg changed the title infxswgt incorrectly exported to restart file [BUG] infxswgt incorrectly exported to restart file May 8, 2018
@rcabell rcabell transferred this issue from another repository May 6, 2022
@rcabell rcabell transferred this issue from another repository May 6, 2022
@rcabell
Copy link
Collaborator

rcabell commented May 6, 2022

This was addressed (indirectly) in recent versions of netCDF -- should check if this is still an issue

@rcabell rcabell self-assigned this May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants