Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar bug in med_phases_profile_mod #432

Open
dougiesquire opened this issue Feb 29, 2024 · 0 comments
Open

Calendar bug in med_phases_profile_mod #432

dougiesquire opened this issue Feb 29, 2024 · 0 comments

Comments

@dougiesquire
Copy link

The routine med_phases_profile attempts to get the wall clock time using the calendar set in the NUOPC CLOCK_attributes. This can cause issues if the calendar is not GREGORIAN. For example, today is a leap day so an error is thrown trying to run any experiment using a NO_LEAP calendar:

20240229 134349.633 ERROR            PET00 ESMCI_Calendar.C:1161 ESMCI::Calendar::convertToTime() Input argument out of range  - ; NoLeap: for month 2, dd=29 > 28 days in the month.
20240229 134349.633 ERROR            PET00 ESMCI_Time.C:333 ESMCI::Time::set() Input argument out of range  - Internal subroutine call returned Error
20240229 134349.633 ERROR            PET00 ESMCI_Time.C:870 ESMCI::Time::syncToRealTime() Input argument out of range  - Internal subroutine call returned Error
20240229 134349.633 ERROR            PET00 ESMF_Time.F90:1485 ESMF_TimeSyncToRealTime() Input argument out of range  - Internal subroutine call returned Error
20240229 134349.633 ERROR            PET00 med_phases_profile_mod.F90:176 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 MED:src/addon/NUOPC/src/NUOPC_ModelBase.F90:2207 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:3642 Input argument out of range  - Phase 'med_phases_profile' Run for modelComp 1 did not return ESMF_SUCCESS
20240229 134349.633 ERROR            PET00 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:3880 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:3557 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:3642 Input argument out of range  - Phase 'RunPhase1' Run for modelComp 1 did not return ESMF_SUCCESS
20240229 134349.633 ERROR            PET00 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:3880 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:3557 Input argument out of range  - Passing error in return code
20240229 134349.633 ERROR            PET00 esmApp.F90:143 Input argument out of range  - Passing error in return code

The easy fix is to initialize wallclocktime in med_phases_profile using calkindflag=ESMF_CALKIND_GREGORIAN. I can confirm that this fixed the issue for me today. If you agree, I'm happy to submit a PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant