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

tracer tendency diagnostics and related bug fixes #681

Merged

Conversation

SamuelTrahanNOAA
Copy link
Collaborator

@SamuelTrahanNOAA SamuelTrahanNOAA commented Jun 23, 2021

This PR merges NOAA-GSL's gsl/develop branch; the primary update is new tracer tendency diagnostics. Previously, only T, u, v, Qv, and O3 had tendencies. Now, all non-chemical tracers have tendencies, stored in a more efficient manner. The dt3dt, dq3dt, du3dt, and dv3dt arrays are replaced with a 4D array that is sparse in the outer two dimensions, implemented using a 3D array and a 2D index array:

dtend(i,k,dtidx(variable,process))

This allows a great number of variables and processes, without tremendous memory usage. It also speeds up the diagnostic tendency code since the user can enable only specific tendencies, instead of using the catch-all ldiag3d and qdiag3d flags.

Extensive documentation on this new feature is on the ccpp-doc PR:

https://github.com/NCAR/ccpp-doc/pull/38/files

This is intended as a medium-term solution, and will be replaced eventually by the new CCPP framework in development. It is possible to generalize this code to work for all models and add other missing features. However, the new framework should provide a more suitable method, when that framework is completed. Hence, we prefer to provide a solution that is good enough for the current feature requests, rather than a completely general solution that would be troublesome in the current framework.

Ancestor repository PRs:

ufs-community/ufs-weather-model#660
NOAA-EMC/fv3atm#332

SamuelTrahanNOAA and others added 30 commits January 4, 2021 23:56
… with diagnostics turned on: fv3_ccpp_control_prod fv3_ccpp_gfs_v15p2_prod fv3_ccpp_gfs_v16beta_prod fv3_ccpp_gsd_prod
…microphysics, total physics, and total non-physics, along with all other variables that previously worked. The TKE is being stubborn and the fv3_control does not want to report total physics tendency for liq_wat tracer.
… rename variables, use nprocess_summed to avoid summing sums
Add diagnostic tendencies for all tracers. Move all d*3dt variables into a 4D sparse array stored as `dtend(i,k,dtidx(tracer,process))` to reduce memory usage.
1. Store rtg (AKA clw AKA qtr) instead of gq0 in DCNV and SCNV
pre/post for schemes that use convective transport. Tracers handled
solely by convective transport (ones not in rtg) are reported as
convective transport tendencies. Tendencies for variables in rtg are
reported as dcnv and scnv tendencies.

2. Report TKE tendencies from gfs v16 PBL.

3. Add diagnostic tendencies to drag_suite
…encies

dtend: add drag_suite tendencies and fix many bugs in convection tendencies
CODEOWNERS Outdated
@@ -3,7 +3,7 @@

# These owners will be the default owners for everything in the repo.
#* @defunkt
* @climbfuji @llpcarson @grantfirl @JulieSchramm
* @DomHeinzeller
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please revert this change.

@@ -238,7 +238,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, lkm, lsm, lsm_noahmp,
tsurf_ice(i) = tisfc(i)
ep1d_ice(i) = zero
gflx_ice(i) = zero
if (iemsflg == 2 .and. .not. flag_init .and. lsm == lsm_ruc) then
if (iemsflg == 2 .and. (.not.flag_init .or. flag_restart) .and. lsm == lsm_ruc) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the impact of this flag_restart? Will it fix restart reproducibility for RUC LSM configuration?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, required when using RUC with its own ice model and iemsflg == 2.

Copy link
Collaborator

@junwang-noaa junwang-noaa left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

Looks good.

This PR adds diagnostic 3d tendencies for u, v, t, and all available tracers on a per-process basis. The solution is as general as it can be under the current limitations of the CCPP framework and will carry us through until the new CCPP framework code generator capgen.py provides a better solution (hopefully at some point in the next 12 months).

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 this pull request may close these issues.

5 participants