Accommodation for no-leap calendars

Post Reply
khartig
Posts: 6
Joined: June 16th, 2020, 4:22 pm
Registered HYSPLIT User: Yes

Accommodation for no-leap calendars

Post by khartig »

I'm using MeteoInfo to convert netCDF files output by the Community Atmosphere Model, version 4, into ARL format to use with HYSPLIT. The script that I use was based in part on the WRF to ARL script found here: http://meteothink.org/examples/meteoinf ... t2arl.html. However, I noticed that the .gettime() method used to generate timestamps required by .writeindexrec() was not matching up with the actual timestamps in my input netCDF files. CAM uses a no-leap calendar, so February only has 28 days every year, but the timestamp used by MeteoInfo is from python's datetime module, which assumes a proleptic Gregorian calendar, so my data was accumulating errors in the date when writing to ARL. Is there an option to specify the calendar system to MeteoInfo, or does the ARL format itself require a leap year calendar? I tried generating timestamps myself, by converting the netCDF ordinal time to year-month-day-hour format and using that as a timestamp, but HYSPLIT will not read those files because it registers a discontinuity in the time step when going from Feb 28 to Mar 1 because of the missing leap day on some years.
yaqiang
Posts: 53
Joined: October 5th, 2015, 10:20 pm
Registered HYSPLIT User: Yes

Re: Accommodation for no-leap calendars

Post by yaqiang »

I have no experience on no-leap canlendar, but I think hysplit need leap day as your testing result. So you need to convert no-leap canlendar to Gregorian calendar before writing the time in ARL data. In fact, MeteoInfo gets Gregorian time from data according starting time and hours (or other units) number which may be the right time for ARL data. Any way, if the times extracted by MeteoInfo are not correct, you can code right ones with leap day for ARL data.
Post Reply