Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Setting calendar

boyle5@llnl_gov

New Member
In the documentation it is indicated that there is a choice of calendars: 'NO_LEAP' and 'GREGORIAN'.
In my namelist I have set calendar = 'GREGORIAN' but the in the output the time variable still has the 'NO-LEAP' calendar attribute. All the other time settings START_YMD START_TOD REF_YMD REF_TOD that are set by the namelist are picked up. NSREST = 0.
My naive reading of the time_manager.F90 code seems to indicate that NO_LEAP is set there and I can't find where the namelist variable is adopted.

This seems very simple- what am I doing wrong?
 

eaton

CSEG and Liaisons
Changing the calendar in CAM is not fully implemented. The time manager,
which is based on a prototype version of the ESMF library, will accept
setting the calendar to Gregorian, and as you advance time the dates will
work correctly. However, the solar calculations are based strictly on a
365-day calendar. I'm not exactly sure how the solar zenith calculation
behaves in day 366 of a leap year. There is a bug as you have noted that
the calendar attribute in the netCDF output is hardcoded to NO_LEAP (in
history.F90). That could easily be fixed, but the astronomy calculation
would still be wrong which is a larger problem.
 

boyle5@llnl_gov

New Member
Just to clarify matters -
if I have set calendar = GREGORIAN - the time calculation (days since) includes leap days even though the time axis attribute is 'NO_LEAP'.

Is this correct?

I am aware of the mis-match in the astronomy and the gregorian calendar. This would be serious in long integrations, but my application only involves 3-5 day integrations so the impact is minimal.
 
Top