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

Not possible to output interval-averaged diagnostics with a non-even-hour frequency >= 30 minutes #193

Open
spencerkclark opened this issue May 20, 2021 · 0 comments · May be fixed by #194

Comments

@spencerkclark
Copy link
Member

This code in atmos_model.F90 -- which impacts the calculation of time_int, a key value used as the denominator in computing interval-averaged diagnostics -- will round the value of fhzero to the nearest integer before converting to units of seconds, if fhzero is at least 0.5:
https://github.com/VulcanClimateModeling/fv3gfs-fortran/blob/566e73209fde8b1ee0d073db2a7afa68ecc1d41a/FV3/atmos_model.F90#L955-L959
The value of time_int will therefore be incorrect if one uses a non-even-hour frequency greater than 30 minutes, e.g. 2.5 hours. For example you can end up with diagnostics that have an unusual cycle, starting with typically sized values which steadily decrease with time as time_int increases, before jumping back up to their typical values when time_int is reset.

sw-example

A fix for this would be to always use the approach in the else condition, i.e. to never truncate the value fhzero before converting it to have units of seconds. This way, time_int would always be reset at the expected time.

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 a pull request may close this issue.

1 participant