I am having a strange error while running ROMS.
When I turn off USE_DEBUG in coawst.bash, the compile goes well, but I get the following error while ROMS tries to create a restart file.
Code: Select all
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 14610 00:00:00 8.331972E-03 7.785941E+03 7.785949E+03 1.202318E+14
(547,028,30) 4.212970E-02 5.095988E-02 0.000000E+00 1.303715E+00
DEF_STATION - creating stations file, Grid 01: /scratch/user/d.kobashi/projects/hindcasts/projects/txla2/outputs/2010/ocean_sta.nc
DEF_VAR - unable to define variable: h
in NetCDF file: /scratch/user/d.kobashi/projects/hindcasts/projects/txla2/outputs/2010/ocean_rst.nc
Elapsed CPU time (seconds):
Node # 0 CPU: 5.184
ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in STATION file = 00000001
Analytical header files used:
/home/d.kobashi/forecasts/src/Functionals/ana_btflux.h
/home/d.kobashi/forecasts/src/Functionals/ana_sponge.h
/home/d.kobashi/forecasts/src/Functionals/ana_nudgcoef.h
/home/d.kobashi/forecasts/src/Functionals/ana_stflux.h
ROMS/TOMS - Output error ............ exit_flag: 3
Node # 1 CPU: 68.800
Node # 2 CPU: 68.799
Node # 3 CPU: 68.799
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: NetCDF: Invalid dimension ID or name
The error message indicates that the model cannot define h (bathymetry) while trying to create a restart file due to invalid dimension ID or name. Thus, the model failed to create restart file.
However, when I turn on USE_DEBUG, the model creates restart file without any errors.
I have never had this problem before.
It is strange because the error is nothing to do with computation (e.g. floating point error etc.).
I assume the difference between USE_DEBUG off and USE_DEBUG on is the optimization of the compiler.
I use intel fortran/intel mpi to run my model.
My FFLAGS without USE_DEBUG is
Code: Select all
FFLAGS += -ip -O2
Code: Select all
FFLAGS += -g -check uninit -ftrapuv -traceback
Code: Select all
FFLAGS := -heap-arrays -fp-model fast -mt_mpi
Code: Select all
1245 !
1246 ! Bathymetry.
1247 !
1248 Vinfo( 1)='h'
1249 Vinfo( 2)='bathymetry at RHO-points'
1250 Vinfo( 3)='meter'
1251 Vinfo(14)='bath, scalar'
1252 Vinfo(22)='coordinates'
1253 Aval(5)=REAL(r2dvar,r8)
1254 IF (ncid.eq.STA(ng)%ncid) THEN
1255 status=def_var(ng, model, ncid, varid, NF_TYPE, &
1256 & 1, (/stadim/), Aval, Vinfo, ncname)
1257 IF (exit_flag.ne.NoError) RETURN
1258 ELSE
1259 status=def_var(ng, model, ncid, varid, NF_TYPE, &
1260 & 2, t2dgrd, Aval, Vinfo, ncname)
1261 IF (exit_flag.ne.NoError) RETURN
1262 END IF
I've recently added additional variables to history files and that might be something to do with the error. Did the addition mess up netCDF id or name? The addition is to do with history file and is nothing to do with restart file, though.
I can still run the model with USE_DEBUG, but this issue is bugging me.
The model I use is COAWST and revision is 960.
Any suggestions and/or comments would be appreciated.
Thanks in advance.
-DJ