Hi All,
I'm trying to generate the grid specific file for MOM4 test2 case. I've got to generate the grid_specific file but with very large numbers for the variable hu. I've got the following error message on my screen:
FATAL: NETCDF ERROR: Numeric conversion not representable
^B
Abort
Beginning of Traceback:
Interrupt at address 413007a in routine '_lwp_killm'.
Called from line 32 (address 407476a) in routine 'raise'.
Called from line 127 (address 325127d) in routine 'abort'.
Called from line 59 (address 665004a) in routine 'ABORT'.
Called from line 2672 (address 114617d) in routine
'MPP_ERROR_BASIC_in_MPP_MOD'.
Called from line 3564 (address 50052a) in routine
'NETCDF_ERR_in_MPP_IO_MOD'.
Called from line 2203 (address 25426c) in routine
'WRITE_RECORD_in_MPP_IO_MOD'.
Called from line 7 (address 23405c) in routine
'MPP_WRITE_R2D_in_MPP_IO_MOD'.
Called from line 255 (address 170706b) in routine
'WRITE_GRID_FILE_in_GRID_IO_MOD'.
Called from line 26 (address 171233d) in routine 'GRID_GEN'.
Called from line 350 (address 346755c) in routine '$START$'.
End of Traceback.
Abort (core dumped)
I discovered that error occurred when the script try to write (call mpp_write(hu....) the hu variable (sea floor topography). The error was accused by the netcdf function NF_PUT_VARA_DOUBLE that is on mpp_io.F90.
if( field%pack.LE.2 )then
if( KIND(data).EQ.DOUBLE_KIND )then
error = NF_PUT_VARA_DOUBLE( mpp_file(unit)%ncid, field%id, start, axsiz, data )
...
...
...
end if
I printed the numeric result of the error:
if(error.ne.NF_NOERR)print*,'NETCDF ERROR:',error
and obtained:
NETCDF ERROR: -60
the error message for error code -60:
#define NC_ERANGE (-60) /* Math result not representable */
So it looks like that numbers are out of range (somehow).
It seems that the script reads the input file (OCCAM_1degree.nc) and get this problem when it is going to write the grid_spec_test2.nc. Below I'm showing the very large values that I obtain in my grid_spec_tes2.nc file.
hu =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
...
-4.80087380174768e+242, 4197.27189457955, 4197.27374205372,
...
-1.79769313486232e+308
...
-5.95210664162498e+240, -6.37638669064104e+240,
-6.37638669064104e+240,
-6.34742765105198e+273, -6.34742765105198e+273 ;
I'm using a cray SV1 and version 3.5.0 of netcdf library. I'm using the original configuration of the code (generate_grid.csh) for the test2 case.
Does anyone have an idea of what it's happening and how can I solve this problem?
Thanks for the help,
Luiz Paulo
