problem in setting TIME_REF parameter

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

problem in setting TIME_REF parameter

#1 Unread post by turuncu »

Hi,

I had problem with setting TIME_REF parameter. When i set it into 19990701.0d0 i expect that the caldate method in ROMS/Utility/get_date.F must return model start date as 1999-07-01 but it returns 1999-06-30. I add some print statement into this method and i figure out that the INT must be replaced with NINT. When you set the TIME_REF greater than zero it select gregorian calendar.

The r_date value is;

r_date = 19990701.0000000000 1999.00000000000000 182.000000000000000 7.00000000000000000 1.00000000000000000 0.000000000000000000E+00 0.000000000000000000E+00 0.000000000000000000E+00

and the values from method are,

tdays = 0.000000000000000000E+00
rday = 182.000000000000000
year = 1999
yday = 182.000000000000000
month = 6
day = 30


if i modify the line,

Code: Select all

month=MIN(12,1+INT(yday/30.6001_r8))
with

Code: Select all

month=MIN(12,1+NINT(yday/30.6001_r8))
it returns the correct value. Because 182/30.6001 is 6.947692981395486 and NINT will return 7 and also day correction is necessary, the old one,

Code: Select all

day=INT(yday)-iydl(month)+1
and new,

Code: Select all

day=INT(yday)-iyd(month)+1
Is there anybody faced this kind of problem before? Is it a bug? or i miss something.

Thanks,

Post Reply