Skip to content

Conversation

@alperaltuntas
Copy link
Member

Description of changes

This PR adds the startTimeIn argument to an ESMF_TimeIntervalGet call in med_phases_history_set_timeinfo to fix monthly history averages.

Specific notes

Specifically, this PR fixes the following error:

20251208 194429.074 ERROR            PET127 ESMCI_TimeInterval.C:708 ESMCI::TimeInterval::get() Cannot get value  - need startTime or endTime to convert -1 months to days on ESMC_CALKIND_NOLEAP calendar, since months are not an integral number of years.

encountered when the following user_nl_cpl changes are made:

history_option_atm_avg = 'nmonths'
history_n_atm_avg = 1
history_option_ocn_avg = 'nmonths'
history_n_ocn_avg = 1

Contributors other than yourself, if any: none

CMEPS Issues Fixed (include github issue #): none

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) : bfb

Any User Interface Changes (namelist or namelist defaults changes)? none

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

A (JRA) compset runs on derecho with cesm3_0_alpha07g.sbx.

call ESMF_TimeIntervalGet(timediff(2), d_r8=time_bnds(2), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeIntervalGet(timediff(1), d_r8=time_bnds(1), rc=rc)
call ESMF_TimeIntervalGet(timediff(1), starttime, d_r8=time_bnds(1), rc=rc)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this a named argument?
starttime=startime

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@jedwards4b jedwards4b merged commit 6539501 into ESCOMP:main Dec 9, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants