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

Add diagnostics for water vapor photochemistry parametrization #255

Open
DWesl opened this issue Feb 26, 2025 · 3 comments
Open

Add diagnostics for water vapor photochemistry parametrization #255

DWesl opened this issue Feb 26, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@DWesl
Copy link

DWesl commented Feb 26, 2025

Description

The documentation implies I can request dtend_qv_photochem and dtend_qv_prodloss from the water vapor photochemistry scheme or its wrapper, as I can for the ozone photochemistry scheme.
CCPP currently quietly skips those, leaving me to rely on dtend_qv_phys, which probably includes photochemistry, and is probably just photochemistry near the stratopause.

However, forecasts produce excess water vapor near and above the stratopause, and the water vapor field varies enough I'd like to be sure, and to investigate which of the terms of the parametrization produces the increase and variation.

Solution

Wrap wherever physics/photochem/module_h2ophys.F90 with the same bits around the call locations of physics/photochem/module_ozphys.F90 that let it calculate dtend_o3_photochem, then add the array allocation and optional argument to module_h2ophys%run to allow it to calculate and return dtend_qv_prodloss. I can't tell where those calls and allocations happen well enough to add them myself.

Alternatives (optional)

  • Run ccpp-scm for an hour at a time without advection somewhere around 75°S to find photochemical tendencies
  • Run the photochemical scheme myself outside of CCPP to get the tendencies
  • Point CCPP at a parameter file containing zeros ($(P-L)_0$ and $q_{v0}$) or infinities ($\tau = -1/\frac{\partial (P-L)}{\partial q_{v}}$) to see if the problem goes away
  • Point CCPP to a file where $\tau = -1/\frac{\partial (P-L)}{\partial q_v}$ is capped at two months so water vapor stays closer to climatology
@DWesl DWesl added the enhancement New feature or request label Feb 26, 2025
@dustinswales
Copy link
Collaborator

Greetings @DWesl
As far as diagnostics go, we only include fields that have historically been used for NOAA applications. If you want to add these diagnostics as you suggested and open a pull request, we could incorporate them in h2o photochemistry scheme.
Also, can you point to where in the documentation it references these diagnostics?
The scientific documentation does not mention these diagnostics.

@DWesl
Copy link
Author

DWesl commented Feb 28, 2025

If you want to add these diagnostics as you suggested and open a pull request, we could incorporate them in h2o photochemistry scheme.

Could you point me toward where dtend_o3_photochem gets calculated? I can't work out where in the code base that is, and grepping for that string yields no results.

I suspect the allocation of the other O$_3$ photochemical tendencies would be somewhere near, so I could find those and copy that for the water photochemistry tracers.

Also, can you point to where in the documentation it references these diagnostics? The scientific documentation does not mention these diagnostics.

The ozone photochemistry scientific documentation doesn't mention dtend_o3_{photochem,prodloss,o3mix,temp,o3column} either, but the CCPP diagnostics documentation shows the parts I can put together to create those variables, and they show up when requested. Given the ozone photochemistry scheme is my primary point of reference for CCPP, I thought water vapor might be similar.

@dustinswales
Copy link
Collaborator

dustinswales commented Feb 28, 2025

My apologies that this is so scattered. Hopefully this can clear things up.

All of the diagnostics are allocated by the host in GFS_typedefs.F90
Then within the physics, dtend is passed around the schemes and populated accordingly.

Recently the photochemistry schemes were refactored and as part of that refactoring the schemes adopted a paradigm where all diagnostics are optional. This was to avoid passing in a host-specific diagnostic array, e.g. dtend, into a scheme that is accessible to many hosts.

dtend_o3_photochem is populated later on in GFS_physics_post.F90. This is also where the other ozone diagnostics are copied from the scheme output to the dtend array.

With that you should be able to add the h2o diagnostics by following how they are handled with the ozone diagnostics; starting from where they are allocated by the host (GFS_typedefs.F90), calculated within the scheme (module_ozphys.F90), and finally where the diagnostics are populated (GFS_physics_post.F90).
Feel free to reach out if you have more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants