NaN values and TIME-STEP error

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
mashinde
Posts: 135
Joined: Mon Jun 22, 2009 3:46 pm
Location: Indian Institute of Tropical Meteorology, Pune, INDIA

NaN values and TIME-STEP error

#1 Unread post by mashinde »

Dear friend,

I am trying ROMS with era-interim monthly forcings from 1990-2010.

I have following errors.

(1) In log file it always shows the NaN values in forcing file(log file attached here).
(2) Model starts at STEP=864 and writing the NaN values and model blows up at 1st step.

for details please see the log file.

thanking you
Attachments
r16_eraint_mn.log
(43.4 KiB) Downloaded 386 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NaN values and TIME-STEP error

#2 Unread post by kate »

The report from GET_STATE shows that your initial condition is one day into the run. That is why you start after one day from your time origin.

You need to find out why you get NaN from reading the forcing files. Can you look at them with ncview to see what's what in there?

mashinde
Posts: 135
Joined: Mon Jun 22, 2009 3:46 pm
Location: Indian Institute of Tropical Meteorology, Pune, INDIA

Re: NaN values and TIME-STEP error

#3 Unread post by mashinde »

Hi Kate,

Thanks for your kind suggestions. The problem solved and problem is running, but it blowing-up at 56 day. I am forcing the model with ERA-Interim monthly data from 1990-2010.

if restart file save the records for latest 2 records why it is giving the error as ....

Blowing-up: Saving latest model state into RESTART file
WRT_RST - wrote re-start fields (Index=1,1) into time record = 0000003

I am attaching here log file. Please suggest some hints/solution.

Thanking you
Attachments
r16_eraint_mn.log
(3.87 MiB) Downloaded 291 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NaN values and TIME-STEP error

#4 Unread post by kate »

This is considered a feature. ROMS writes alternately to records 1 and 2 as long as things are fine, then writes into record 3 if it sees a problem. I would check that record with ncview to see which field went bad and where. Sometimes tracers go bad first, sometimes it's velocity. I've seen trouble first at the top, bottom, and in the middle, depending.

If you attempt a restart from the restart file, be sure to specify NRREC as 1 or 2, not the generic latest record (-1), as that will pick up the bad record 3. Sometimes a restart with a shorter timestep will do the trick.

mashinde
Posts: 135
Joined: Mon Jun 22, 2009 3:46 pm
Location: Indian Institute of Tropical Meteorology, Pune, INDIA

Re: NaN values and TIME-STEP error

#5 Unread post by mashinde »

Hi kate,

Thanks for the kind help. now model is running.

But I have following doubts about "cycle_length"

(1) I am using era40 monthly data from 1990 to 2010(total 252 months). Following are my ncdump -h of Tair.
ncdump -h eraint_tair_mn_1990_2010.nc
netcdf eraint_tair_mn_1990_2010 {
dimensions:
xi_rho = 940 ;
eta_rho = 370 ;
xi_psi = 939 ;
eta_psi = 369 ;
xi_u = 939 ;
eta_u = 370 ;
xi_v = 940 ;
eta_v = 369 ;
tair_time = UNLIMITED ; // (252 currently)
variables:
double tair_time(tair_time) ;
tair_time:long_name = "atmospheric forcing time" ;
tair_time:units = "days since 1990-01-01 00:00:0.0" ;
double Tair(tair_time, eta_rho, xi_rho) ;
Tair:long_name = "ERA Intrim surface air temperature" ;
Tair:units = "Celsius" ;
Tair:time = "time" ;

// global attributes:
:type = "ROMS Forcing file" ;
:title = "Rmed16 ERA Intrim forcing" ;
:date = "14-Aug-2012" ;
:history = "ERA Intrim surface air temperature forcing" ;
}

here I put tair_time=252, which is total number of months from 1990-2010. I didn't put any "cycle_length".
and In input file , I put time-stamps as,

DSTART = 1.0d0 ! days
TIDE_START = 0.0d0 ! days
TIME_REF = 19900101.0d0 ! yyyymmdd.dd

and time attribute of roms output is
...
double ocean_time(ocean_time) ;
ocean_time:long_name = "time since initialization" ;
ocean_time:units = "seconds since 1990-01-01 00:00:00" ;
ocean_time:calendar = "gregorian" ;
ocean_time:field = "time, scalar, series" ;
....

So is it correct? Do I have to put "cycle_length" in forcing file. If this is the case,then what should be the "cycle_length" .

(2) If I am using ERA daily data and run the model for next 10 years, then what will be the "cycle_length" in this case. I want to use 365 days calendar.

(3) Is it possible that model can run from single daily/monthly forcing for 10 years. for example, say i want to run the model for 1990-2000. In that case, can I start the model from 01-01-1990(single day) forcings. So in forcing file, time=1.

correct me if I am wrong. Please give me some suggestion/hint.

Thanking you in advance.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NaN values and TIME-STEP error

#6 Unread post by kate »

cycle_length was meant for cases such as a monthly climatology which doesn't change from one year to the next. You can reuse the January each year by setting cycle_length to 365 or 365.25 or 360, depending on your calendar.

If you run for ten years from daily fields, you just need to make sure your start time is the same or later than the first record of your forcing. If you need to change the time in your initial condition file, well, that's been done, as has changing the time of the first forcing record, say when most things are daily, but the first precip record is 15 days later.

mashinde
Posts: 135
Joined: Mon Jun 22, 2009 3:46 pm
Location: Indian Institute of Tropical Meteorology, Pune, INDIA

Re: NaN values and TIME-STEP error

#7 Unread post by mashinde »

Hi Kate,

Thanks for the kind reply. I am still not understood the time attributes in forcing file. let's take example of monthly forcing. I am forcing the model with ERA-INTERIM monthly forcing for 1990-2010. So I download the data from 1990-2010 which has 252 months. I had made forcing file for these 252 records. I attached here ncdump -h of ERA-INTERIM's t2m.nc and eraint_tair_mn_1990_2010.nc

my model blows up at 275 days giving following error.


SET_2DFLD - current model time exceeds ending value for variable: Tair
TDAYS = 275.0000
Data Tmin = 1.0000 Data Tmax = 252.0000
Data Tstr = 252.0000 Data Tend = 252.0000
TINTRP1 = 0.0000 TINTRP2 = 252.0000
FAC1 = -23.0000 FAC2 = 275.0000

So in that case, what should be the time records in forcing file. So please tell how can I do it ?

Thanking you.
Attachments
ncdumph_time_r16_eraint_tair_1990-2010.txt
(1.91 KiB) Downloaded 248 times
ncdumph_time_eraint_t2m.txt
(2.88 KiB) Downloaded 232 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NaN values and TIME-STEP error

#8 Unread post by kate »

If your tair_time values are months, then this is wrong:
tair_time:units = "days since 1990-01-01 00:00:0.0" ;
I'm not sure ROMS knows about the "months" unit, so it would probably be easier to change the values of the tair_time from say 1, 2, 3, ... to 15, 45, 75 (or whatever you want for your length of year).

Post Reply