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

use mid-point of time step for time stamp of history file for cesm-coupling run #498

Merged

Conversation

nmizukami
Copy link
Collaborator

@nmizukami nmizukami commented Dec 2, 2024

CESM will require the component uses the mid-point of the output time step if average is used for aggregation.

For now, all the history file uses average for output variable aggregation in the history file.

This PR enforces time stamp in the history file is the mid-point of the time stamp if cesm-coupling is on

resolve #413

@nmizukami nmizukami added the cesm-coupling For cesm coupling label Dec 2, 2024
@@ -203,6 +203,10 @@ SUBROUTINE output(ierr, message)
index_write_all = arth(1,1,nRch_local)
end if

if (trim(runMode)=='cesm-coupling') then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment to just say that we are setting the timestamp of the average history output as the midpoint of the average.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added comment: "For cesm coupling mode, the timestamp of the average history output is the midpoint of time bounds"

@@ -14,6 +14,8 @@ MODULE public_var

! physical constants
real(dp), parameter,public :: pi=3.14159265359_dp ! pi
real(dp), parameter,public :: Cw=4190.0_dp ! heat capacity of water [J/kg/K]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check that these agree with the current values set in the shr_const_mod.F90 code under the share directory.

@nmizukami nmizukami merged commit 7541760 into ESCOMP:cesm-coupling Dec 21, 2024
@nmizukami nmizukami deleted the cesm-coupling_timestamp-cesm branch December 21, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cesm-coupling For cesm coupling
Development

Successfully merging this pull request may close these issues.

Have time-stamps for "averaged" output history data be middle of interval, but "instantaneous" be end
2 participants