Skip to content

tracer tendency diagnostics and related bug fixes#681

Merged
climbfuji merged 37 commits into
NCAR:mainfrom
SamuelTrahanNOAA:feature/gsl-develop-diagnostics-20210609
Jul 21, 2021
Merged

tracer tendency diagnostics and related bug fixes#681
climbfuji merged 37 commits into
NCAR:mainfrom
SamuelTrahanNOAA:feature/gsl-develop-diagnostics-20210609

Conversation

@SamuelTrahanNOAA
Copy link
Copy Markdown
Contributor

@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/ufsatm#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
Comment thread CODEOWNERS Outdated
# These owners will be the default owners for everything in the repo.
#* @defunkt
* @climbfuji @llpcarson @grantfirl @JulieSchramm
* @DomHeinzeller
Copy link
Copy Markdown
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.

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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).

@climbfuji climbfuji merged commit 09faa73 into NCAR:main Jul 21, 2021
JohanaRomeroAlvarez pushed a commit to JohanaRomeroAlvarez/ccpp-physics that referenced this pull request Sep 8, 2025
* Changes to logging and initialization of the CLM Lake Model.

1. Use ice thickness hice(i) to find the level in the lake where ice is
   zero.
2. Do not allow lake temperature to be below freezing point if there is
   no ice.
3. If there is no snow or ice, do not allow surface lake temperature to
   be below freezing point.
   These changes fixed the problem with large errors in the energy budget
   at the beginning of the cold-start run with lakes.
4. Added flag to turn on debug print statements in the CLM lake model.

* merge ccpp-physics ufs-community#91 (UFS-SRW v3.0.0 SciDoc updates)
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