Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Add ESMF_TimeIntervalProdI8 routine #1215

Merged

Conversation

mgduda
Copy link
Contributor

@mgduda mgduda commented Feb 5, 2017

This merge adds a new routine, ESMF_TimeIntervalProdI8, for multiplying an ESMF_TimeInterval
by an 8-byte integer.

To complement the existing routine ESMF_TimeIntervalProdI that implements the * operator
for multiplying an ESMF_TimeInterval by a 4-byte integer, this PR adds a new routine,
ESMF_TimeIntervalProdI8, that multiplies an ESMF_TimeInterval by an 8-byte integer. This new
routine is accessed through the * operator in the same way as the existing
ESMF_TimeIntervalProdI routine. This routine is useful when multiplying small intervals (e.g., 1
second) by large integers (e.g., the number of seconds in 1000 years).

Also included in this merge is a commit to bring the ESMF time manager code into a nearly
synchronized state with the CIME version of the time manager.

This commit updates the ESMF time manager code to match the code in
CIME at commit 654504c, with several exceptions:

* In wrf_error_fatal.F90, we don't use shr_sys_abort from the non-existent
  (in MPAS) module shr_sys_mod
* In ESMF_TimeMod.F90, we keep the fix for the format string error found
  on a BG/Q and fixed in MPAS commit 64006e9
* In ESMF_TimeMod.F90, we keep the fix for the time interval computation
  that was introduced in MPAS commit 6d25633

Besides changing the definition of ESMF_KIND_R4 and ESMF_KIND_R8, this commit
essentially just removes whitespace at the end of source lines.
… 8-byte int

To complement the existing routine ESMF_TimeIntervalProdI that implements
the '*' operator for multiplying an ESMF_TimeInterval by a 4-byte integer,
this commit adds a new routine, ESMF_TimeIntervalProdI8, that multiplies
an ESMF_TimeInterval by an 8-byte integer. This new routine is accessed
through the '*' operator in the same way as the existing
ESMF_TimeIntervalProdI routine.

This commit mirrors commit 656670e in CIME.
@matthewhoffman
Copy link
Member

All cores should test this. Note this does not change any MPAS functionality. That will be brought in my Michael in a follow on request.

@mark-petersen
Copy link
Contributor

I merged this PR into ocean/develop and tested with our nightly regression suite using gnu and intel, debug on for intel. Everything passed bit-for-bit with previous test.

I approve this PR.

@matthewhoffman
Copy link
Member

I tested these commits on landice/develop with our regression suite, and all tests passed.

@mgduda , let me know if/when you want me to merge this.

@mgduda
Copy link
Contributor Author

mgduda commented Feb 6, 2017

@matthewhoffman and @mark-petersen thanks very much for testing this PR with the ocean and land-ice regression tests.

@matthewhoffman feel free to merge this PR whenever it's convenient for you.

@mark-petersen
Copy link
Contributor

@matthewhoffman or @mgduda, can either of you tell me if this commit actually changed the clock counter to an 8-byte integer? Or did it just bring in capability, and the clock counter is still a 4-byte integer? I'm trying to figure out if we can run ACME past 34 years with the setting reference_time="0000-01-01_00:00:00. (Right now we leave ref time out, so ref time defaults to the start time). cc'ing @jonbob here, as we talked about this.

@matthewhoffman
Copy link
Member

@mark-petersen , no, this commit just adds an ESMF routine that is never used by MPAS timekeeping. The next step is to make MPAS timekeeping use it. That was delayed until ACME had the same update to ESMF timekeeping as is implemented here. Michael added it to CIME, and ACME got it in CIME5.2 last week. So now the next phase can proceed when Michael (or someone else) has time to do it.

@mark-petersen
Copy link
Contributor

@matthewhoffman Thanks, that is really helpful.

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

Successfully merging this pull request may close these issues.

3 participants