Opened 9 years ago

Closed 9 years ago

#17 closed defect (fixed)

Bug when chaining yearly simulations with greogrian forcing files and using the time_length parameter

Reported by: nvuilsce Owned by: nvuilsce
Priority: minor Milestone:
Component: Driver files Version: orchidee_1_9_6
Keywords: calendar time_length Cc:


Without using the launching scripts based on libIGCM, in order to chain yearly simulations using yearly forcing files based on gregorian calendar, it is normally possible to set the TIME_LENGTH parameter in the .def file to "1Y".
When doing a suite of simulations starting with a non leap year, the model crashes at the beginning of the non leap year, right after the first leap year encountered, with the following message:
" The day is not in the forcing file : -3 4381 -4384 "
Consequently, it requires to set a TIME_LENGTH expressed in days, specific for the leap (366D) or non leap years (365D)

Change History (1)

comment:1 Changed 9 years ago by nvuilsce

  • Resolution set to fixed
  • Status changed from new to closed

The bug is due to the fact that the length of the yearly simulations is always the same and equals to the length of the first yearly simulation. So, if we start with a leap year, the "1Y" is always converted as 366 days. If we start with a non leap year (for instance 1982), the "1Y" is always converted as 365 days. In this later case, the simulation for the first leap year (1984) will stop at the end of the 30th december 1984. When restarting the simulation for the following year (1985), the driver tends to access to the 30th december of the former year which is not available in the forcing file and the simulation stops.
The conversion of "1Y" in days is done with the "tlen2itau" function from the dim2driver routine. In this function, the length is calculated as the difference between 2 dates : date0+1Y and date0 where date0 is a julian day of reference. The problem is that date0 is defined as the starting date of the first simulation (here the 1st January 1982) and not as the starting date of the current yearly simulation (here, the 1st January 1984).
This has been corrected in revision r999.

Note: See TracTickets for help on using tickets.