Hi,
I want to run my own case which is the model of the current in the indian ocean. I did my input netcdf files (climatology, initial, grid and forcing) with roms_tools of ROMS_AGRIF. But when I want to run my ocean.in, I have the following error:
NLM: GET_STATE - Read state initial conditions, t = 0 00:00:00
(Iter=0001, File: ocean_ini.nc, Rec=0001, Index=1)
- free-surface
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- vertically integrated u-momentum component
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- vertically integrated v-momentum component
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- u-momentum component
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- v-momentum component
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- potential temperature
(Min = 6.93651514E-01 Max = 2.89146335E+01)
- salinity
(Min = 3.43970036E+01 Max = 3.56843590E+01)
GET_2DFLD - surface u-momentum stress, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = -5.50269882E-05 Max = -1.41151370E-05)
GET_2DFLD - surface v-momentum stress, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = -2.35145152E-05 Max = 1.49515765E-05)
GET_2DFLD - solar shortwave radiation flux, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = 6.14985729E-05 Max = 7.13645323E-05)
GET_2DFLD - surface net heat flux, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = 8.38117555E-06 Max = 2.98405323E-05)
GET_2DFLD - sea surface temperature climatology, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = 2.56027308E+01 Max = 2.76990578E+01)
GET_2DFLD - surface net heat flux sensitivity to SST, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = -9.96278342E-06 Max = -7.92796849E-06)
GET_2DFLD - surface net freswater flux, (E-P), t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = -9.41953614E-08 Max = 4.27060185E-08)
GET_2DFLD - sea surface salinity climatology, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_frc.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = 3.49273722E+01 Max = 3.52855328E+01)
GET_2DFLD - sea surface height climatology, t = 345 00:00:00
(Rec=0012, Index=1, File: ocean_clm.nc)
(Tmin= 15.0000 Tmax= 345.0000)
(Min = -1.41000506E-01 Max = 9.31726205E-02)
At line 180 of file get_cycle.f90
Fortran runtime error: Array reference out of bounds for array 'tval', lower bou
nd of dimension 1 exceeded (0 < 1)
Backtrace for this error:
unable to produce a backtrace, sorry!
I tried to check in the forum if there is a solution, but I don't find.
So if someone can help me, please.
Thanks,
Antoine
Fortran runtime error
Re: Fortran runtime error
This can be solved by looking at the "ncdump -h" of the input files and comparing them to the files in Data/ROMS/CDL. You can also look at the $SCRATCH_DIR/get_data.f90 file to see what it's trying to read after reading the ssh climatology (what is that being used for?). The error says there are no time records for the field in question. Do you see why it would say that?
Re: Fortran runtime error
Thanks Kate for the reply,
I check with the command ncdump -h, and I have seen there was some problem whith the variable definitions which are not all the same (So I have changed them), but dimensions are good, and I have always the same error.
I check also the get_data.f90, and the fields which follow the ssh climatology are:
CALL get_2dfld (ng, iNLM, idUbcl, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
& GRID(ng) % umask(LBi,LBj), &
& CLIMA(ng) % ubarclmG(LBi,LBj,1))
CALL get_2dfld (ng, iNLM, idVbcl, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
& GRID(ng) % vmask(LBi,LBj), &
& CLIMA(ng) % vbarclmG(LBi,LBj,1))
DO i=1,NAT
CALL get_3dfld (ng, iNLM, idTclm(i), ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % rmask(LBi,LBj), &
& CLIMA(ng) % tclmG(LBi,LBj,1,1,i))
END DO
CALL get_3dfld (ng, iNLM, idUclm, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % umask(LBi,LBj), &
& CLIMA(ng) % uclmG(LBi,LBj,1,1))
CALL get_3dfld (ng, iNLM, idVclm, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % vmask(LBi,LBj), &
& CLIMA(ng) % vclmG(LBi,LBj,1,1))
!
I go in the get_cycle.f90, and I have replaced manualy Tend=Tval(i) by Tend=12, which is the number of timestep, and now it works, but I have some doubts about what I have done.
I check with the command ncdump -h, and I have seen there was some problem whith the variable definitions which are not all the same (So I have changed them), but dimensions are good, and I have always the same error.
I check also the get_data.f90, and the fields which follow the ssh climatology are:
CALL get_2dfld (ng, iNLM, idUbcl, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
& GRID(ng) % umask(LBi,LBj), &
& CLIMA(ng) % ubarclmG(LBi,LBj,1))
CALL get_2dfld (ng, iNLM, idVbcl, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
& GRID(ng) % vmask(LBi,LBj), &
& CLIMA(ng) % vbarclmG(LBi,LBj,1))
DO i=1,NAT
CALL get_3dfld (ng, iNLM, idTclm(i), ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % rmask(LBi,LBj), &
& CLIMA(ng) % tclmG(LBi,LBj,1,1,i))
END DO
CALL get_3dfld (ng, iNLM, idUclm, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % umask(LBi,LBj), &
& CLIMA(ng) % uclmG(LBi,LBj,1,1))
CALL get_3dfld (ng, iNLM, idVclm, ncCLMid(ng), 1, &
& CLMname(ng), update(1), &
& LBi, UBi, LBj, UBj, 1, N(ng), 2, 1, &
& GRID(ng) % vmask(LBi,LBj), &
& CLIMA(ng) % vclmG(LBi,LBj,1,1))
!
I go in the get_cycle.f90, and I have replaced manualy Tend=Tval(i) by Tend=12, which is the number of timestep, and now it works, but I have some doubts about what I have done.
Re: Fortran runtime error
So you have 12 monthly climatology values? Did you set the cycle_length attribute on the time variable for the climatology? You shouldn't have to change the ROMS code for this.
Re: Fortran runtime error
Eventually, you're right, it works without changing the get_cycle file . So, it was just a problem of name's variable, for instance, for the salt field, the name of the time variable was sclm_time, instead of salt_time.
Thanks a lot Kate for your advice
Thanks a lot Kate for your advice