Change get_average_days_per_year to use ESMF_CalendarGet #1624
Labels
blocked: dependency
Wait to work on this until dependency is resolved
enhancement
new capability or improved behavior of existing capability
In an upcoming tag, I'm going to introduce a new function in
clm_time_manager
,get_average_days_per_year
(see also #1612 ). Ideally, this would use theESMF_CalendarGet
subroutine, returningdaysPerYear + real(daysPerYrDn, r8)/real(daysPerYrDd, r8)
. However, I currently cannot use that subroutine for two reasons:(1) We don't use the real ESMF library in all builds, and the ESMF WRF time manager that we use in other situations doesn't support
ESMF_CalendarGet
.(2) It appears that there is a bug in
ESMF_CalendarGet
for Gregorian calendars: it returns information appropriate for a noleap calendar, not for a Gregorian calendar.Thus, we need to wait until both (1) we can rely on using the real ESMF library in all builds, and (2) the above ESMF bug is resolved and we can rely on users having a version of the ESMF library with this bug fix included. I am therefore marking this issue as "blocked", even though we don't have specific issues that block it.
Once we can rely on the above, we should change the implementation of
get_average_days_per_year
as noted above.We should also introduce unit tests of this function for both a NOLEAP and a GREGORIAN calendar.
However, before we add these unit tests, we will need to change the unit test build to use the real esmf library instead of the esmf wrf time manager. This will involve getting rid of stuff in the top-level CMakeLists.txt that refers to the esmf wrf time manager, and adding the appropriate includes and links for the esmf library.
The text was updated successfully, but these errors were encountered: