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

leapyear problem

Dear Sam:

I met a netcdf error when I was using a data with leapyear and nonleapyear. I think clm does not distinguish leapyear from non-leapyear, does it? Is it feasible to add leapyear and non-leapyear into the model? Will it affect the monthly average?

Best,

Ming
 
Oh, sorry. CLM does distinguish leap year and non-leap year. In the program clm_time_manager.F90. I have not go deep into it. Is it default to use no-leap instead of the gregorian calendar?
 
In the program clm_time_manager.F90, I changed the calendar to be gregorian:

character(len=ESMF_MAXSTR), public ::&
! calendar = 'NO_LEAP'
calendar = 'GREGORIAN' ! Calendar to use in date calculations. 'NO_LEAP' or 'GREGORIAN'


But I still got an error message from timemgr_restart:

timemgr_restart: unrecognized calendar specified:
GREGORIAN


It seems to me that the model contains two variables to describe gregorian - GREGORIAN and ESMF_CAL_GREGORIAN.

Still in clm_time_manager.F90:

if ( trim(cal) == 'NO_LEAP' ) then
rst_caltype = noleap
else if ( trim(cal) == 'ESMF_CAL_GREGORIAN' ) then
rst_caltype = gregorian
else
write(6,*)sub,': unrecognized calendar specified: ',calendar
call endrun
end if
 
Now I think I've changed the calendar type to be gregorian:

********** Time Manager Configuration **********
Calendar type: GREGORIAN
Timestep size (seconds): 1800
Start date (yr mon day tod): 1948 1 1
0
Stop date (yr mon day tod): 2495 7 31
0
Reference date (yr mon day tod): 1948 1 1
0
Current step number: 0
Ending step number: -999999999
Current date (yr mon day tod): 1948 1 1
0
************************************************


But I still meet problem when the model runs to the 28th of Feb. in leap year:

------------------------------------------------------------
nstep= 2831 date= 19480228 sec= 84600
------------------------------------------------------------

netcdf error from atm_readdata
netcdf strerror = NetCDF: Not a valid ID
ENDRUN: called without a message string
[cli_0]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
rank 0 in job 9 compute11_37004 caused collective abort of all ranks
exit status of rank 0: killed by signal 9


Could you give me some hints toward this? Thanks.

Ming
 

slevis

Moderator
Sorry, I have never used this option and I am not familiar with the corresponding code...

Sam
 
Thank you, though. Do you know where I should turn to regard to the esmf modeuls? I found that the input data of CLM should be with no leap years (This is helpful when we only got limited years of data and want to reuse it for spin up), otherwise the model will run into problem. If we use Gregorian Calendar, the model will make the February of a leap year seems like 29 days itself.
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
There is some documentation on this problem in the known problems page here..

https://wiki.ucar.edu/display/ccsm/List+of+Known+bugs+in+CLM3.5

Three issues documented there are:

1. Leap-year calendar does NOT work:
2. Gregorian calendar does NOT work - even if you enable it with build-time & run-time changes
3. 365-day calendar is hardcoded into several subroutines:

Good luck
 
Top