You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
bfkg
changed the title
infxswgt incorrectly exported to restart file
[BUG] infxswgt incorrectly exported to restart file
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.
The text was updated successfully, but these errors were encountered: