start time for river is greater than current model time??

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

start time for river is greater than current model time??

#1 Unread post by FengZhou »

Hi, all

when I upgrade to ROMS3.2, I met trouble in preparing the river forcing file. The error message is :
GET_CYCLE - starting time for variable: river
is greater than current model time.
TMIN = 1.0000 TDAYS = 0.0000
The start time in ROMS_INI.nc file is 0, and river_time in ROMS_FRC_Rivers.nc is like following:
-364
-335
...
-61
-30
1
30
...
305
336
The problem remains, no matter what changes I have made to the river_time (like [0:30:330]). I use the matlab routines suggested by ROMS developer, wrt_rivers.m

I have tried to add a cycle_length to the river_time, but failed.

The code ROMS3.1 has no this problem.

Have you any suggestions?

Thank you!

zhou

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

Re: start time for river is greater than current model time??

#2 Unread post by kate »

From another post:
das7105 wrote:It's resolved now. In my previous runs, my river forcing file had the variable 'river' (river identification number in varinfo.dat) but never specified values for it. Apparently, this didn't cause a problem in the old code, but did when I got the latest (revision 338).

An easy fix- just specify river ID in the forcing files and all is good again...
It seems that some Matlab scripts need to be updated...

FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

Re: start time for river is greater than current model time??

#3 Unread post by FengZhou »

Thank you, Kate!

The problem is solved.

But its weird for ROMS to read in River Id from river forcing file, and then to compare with 'smday' ( start modeling day), it should have compared with 'river_time', am I right?

btw, cycle_length is completely useless for river file.

zhou

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

Re: start time for river is greater than current model time??

#4 Unread post by kate »

FengZhou wrote:But its weird for ROMS to read in River Id from river forcing file, and then to compare with 'smday' ( start modeling day), it should have compared with 'river_time', am I right?

btw, cycle_length is completely useless for river file.

zhou
Cycle_length is useless or do you mean broken? You might have confused it with your negative times. If ROMS is using River ID as you say, that's just weird (and likely a bug).

staalstrom
Posts: 31
Joined: Mon Feb 04, 2008 3:43 pm
Location: NIVA, OSLO, NORWAY

Re: start time for river is greater than current model time??

#5 Unread post by staalstrom »

Hi
I also have this problem.
I also have the variable "river" specified in the forcing file. I have 16 rivers so the river identification numbers goes form 1 to 16.
But I still get this problem.

staalstrom
Posts: 31
Joined: Mon Feb 04, 2008 3:43 pm
Location: NIVA, OSLO, NORWAY

Re: start time for river is greater than current model time??

#6 Unread post by staalstrom »

Hi again

Downgrading to ROMS3.1 did not solve the problem!
In my varinfo.dat there is variable called "river".

Andre Staalstrom

francis
Posts: 21
Joined: Wed Jun 13, 2007 1:22 pm
Location: Indian National Center for Ocean Information Servi

Re: start time for river is greater than current model time??

#7 Unread post by francis »

You may be able to solve these problems if you can make certain changes in the matlab scripts (if you are using one) that add river data into the forcing file. You may add the following lines

coads_time=(15:30:365)
%River.time=julian(Year,Month,Day,12.0)-2440000; (I commented this option)
River.time=coads_time;

edit the following section of wrt_rivers.m Var.cycle_length

rtimc=365.0 %% In my case (one can pass this as an argument to the function too!)
if (~got.Rtime),
Var.name =Vname.Rtime;
Var.type =ncdouble;
Var.dimid=[did.Rtime];
Var.long ='river runoff time';
Var.units='days';
% Var.offset=2440000;
Var.cycle_length = rtimc;
Var.field=[Vname.Rtime,', scalar, series'];
[varid,status]=nc_vdef(ncid,Var);
clear Var
end,

and edit Roms_tools/mask/nc_vdef.m
to add a section on time cycle_length

if (isfield(Var,'cycle_length')),
text=Var.cycle_length;
lstr=length(text);
if (lstr > 0),
[status]=mexcdf('ncattput',ncid,varid,'cycle_length',ncdouble,lstr,text);
if (status == -1),
error(['NC_VDEF: ncattput - unable to define attribute: ',...
Vname.name,':cycle_length']);
end,
end,
end,

Hope this will solve the problem.

staalstrom
Posts: 31
Joined: Mon Feb 04, 2008 3:43 pm
Location: NIVA, OSLO, NORWAY

Re: start time for river is greater than current model time??

#8 Unread post by staalstrom »

Hei
For some reason I prefer to edit the cdl-files manually.
Probably because I never took time to look into all the Roms matlab tools.
Anyway, I think I understood from what you wrote that there should be a something called cycle_length in the the river_time variable in the forcing nc file. So I added one line in my cdl file.

double river_time(time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 2008-01-01 00:00:00" ;
river_time:add_offset = 0. ;
river_time:cycle_length = 365. ;
river_time:field = "river_time, scalar, series" ;

I have a matlab script that put time into the forcing file:
river_time=[0; 365];
I guess cycle_length is the time of the end of the timeseries?

Anyway, none of this helped. Still got the error: Tmin=1>Tdays=0.
Then I put ocean_time=1 in my ocean_ini.nc file, and then it worked. Now it is reading the forcing-file (and the times are 0 and 365).

So, it's working (startin at day 2) but I still don't understand why it diden't work in the first place.

Andre Stalstrom

xuyi

Re: start time for river is greater than current model time??

#9 Unread post by xuyi »

I have the same problem. I am using the version 350.
it says " GET_CYCLE - starting time for variable: river
is greater than current model time.
TMIN = 1.0000 TDAYS = 0.0000
"

Post Reply