-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add global mean CO2 diagnostic #45
Add global mean CO2 diagnostic #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. Writing a 0-D variable to the history fields is a bit different (usually we output global integrals to stdout or to a text file) but this additional functionality is potentially useful too.
Thanks @lharris4—indeed I was not aware of this functionality until reading the AM4 code. It is a little funky since the diagnostics manager has no choice but to write copies of the scalar fields out to all (sub)-tile files, but nevertheless it is nice to have the data all in one place (with clear / standardized metadata) instead of having to parse it out from another source. |
The metadata is an excellent point in favor of this method. Now I remember
that we can also use diag_manager to output point soundings too and we will
get all of the appropriate metadata and NetCDF niceties.
There might be ways to output global-mean values to a single NetCDF file,
since this is done for the restart files.
…On Wed, Jun 5, 2024 at 2:24 PM Spencer Clark ***@***.***> wrote:
Thanks @lharris4 <https://github.com/lharris4>—indeed I was not aware of
this functionality until reading the AM4 code. It is a little funky since
the diagnostics manager has no choice but to write copies of the scalar
fields out to all (sub)-tile files, but nevertheless it is nice to have the
data all in one place (with clear / standardized metadata) instead of
having to parse it out from another source.
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMUQRVCLWGXXUUTHJ6ACD3LZF5JVFAVCNFSM6AAAAABI3DMZ3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQGY4DQMBXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Indeed there is! Thanks for prompting me to think about it a bit more. The issue was that I set up my diagnostics table to include the scalar field in the same files as horizontally-resolved fields. If only scalar fields are specified to be output to a particular file then that file will not be split across (sub)-tiles. |
Hi, Spencer. Thanks for digging into that. This opens the doors to a lot of
nice global-integral calculations that can be written to a NetCDF file
instead of filling up stdout.
Lucas
…On Wed, Jun 5, 2024 at 2:37 PM Spencer Clark ***@***.***> wrote:
There might be ways to output global-mean values to a single NetCDF file,
since this is done for the restart files.
Indeed there is! Thanks for prompting me to think about it a bit more. The
issue was that I set up my diagnostics table to include the scalar field in
the same files as horizontally-resolved fields. If only scalar fields are
specified to be output to a particular file then that file will not be
split across (sub)-tiles.
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMUQRVEBXX2C2TCFNQTGJZDZF5LIBAVCNFSM6AAAAABI3DMZ3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQG4YTCNJSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@laurenchilutti and / or @bensonr does this look good to merge? |
Thanks @laurenchilutti! |
Description
This PR adds a diagnostic for the global mean volume mixing ratio of CO2. It does so following the conventions / approximations in
radlw_main.f
:SHiELD_physics/gsmphys/radlw_main.f
Lines 765 to 806 in 5e5e100
It assumes the moles of CO2 per area can be computed by scaling the prescribed volume mixing ratio of CO2 by the moles of dry air per area. A global mean volume mixing ratio then can be computed by dividing the total moles of CO2 globally the by the total moles of dry air globally.
How Has This Been Tested?
This has been tested in a three-month C24 simulation outputting the instantaneous global mean CO2 concentration every 6 hours. The plot of the time series can be found below.
The simulation uses
gfs_physics_nml.ico2 = 2
. For globally uniform CO2 (e.g. withgfs_physics_nml.ico2 = 1
andgfs_physics_nml.ictm = 19970
), the diagnostic behaves as expected, producing a value exactly the same as that prescribed.Checklist:
Please check all whether they apply or not