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 check_energy related history output variables to check_energy_diagnostics #161

Closed
jimmielin opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jimmielin
Copy link
Member

jimmielin commented Nov 21, 2024

In CAM check_energy.F90 the following history variables are written out:

    call addfld('TEINP',  horiz_only,  'A', 'J/m2', 'Total energy of physics input')
    call addfld('TEOUT',  horiz_only,  'A', 'J/m2', 'Total energy of physics output')
    call addfld('TEFIX',  horiz_only,  'A', 'J/m2', 'Total energy after fixer')
    call addfld('EFIX',   horiz_only,  'A', 'W/m2', 'Effective sensible heat flux due to energy fixer')
    call addfld('DTCORE', (/ 'lev' /), 'A', 'K/s' , 'T tendency due to dynamical core')
    call addfld('DQCORE', (/ 'lev' /), 'A', 'kg/kg/s' , 'Water vapor tendency due to dynamical core')

The following variables are missing:

  • TEINP is state%te_ini(:,dyn_te_idx), and should be written out with the standard name vertically_integrated_total_energy_using_dycore_energy_formula_at_start_of_physics_timestep
  • TEFIX is state%te_cur(:,dyn_te_idx). It is currently written out with the standard name vertically_integrated_total_energy_using_dycore_energy_formula but the field name is te_cur_dyn. Should be renamed to TEFIX?
  • EFIX is eshflx from check_energy_fix_run. It has the standard name net_sensible_heat_flux_through_top_and_bottom_of_atmosphere_column and should be written out right after a call to check_energy_fix_run (before it is zeroed out by the next scheme) -- this might need splitting the diagnostic into a check_energy_fix_diagnostics so it is called at the right time.
  • DTCORE is tendency_of_air_temperature_due_to_dynamics, it is computed at the end of physpkg after check_energy_fix_run -- could go with the same EFIX into the same diagnostics module

The following have been implemented:

  • TEOUT

To capture the appropriate quantities at the right point in time there might be separate schemes needed for several of them.

  • TEINP is ready after check_energy_chng_timestep_init
  • TEFIX is ready after the energy fixer / tendencies applied and check_energy_chng computes the total energy ?
  • EFIX is ready after check_energy_fix_run but before the next tendencies are zeroed out for check_energy_zero_fluxes + chng
  • DTCORE should be a separate scheme, check when/where it is called in CAM
@jimmielin
Copy link
Member Author

Splitting out DTCORE etc. into #168

jimmielin added a commit that referenced this issue Feb 14, 2025
…name update (#169)

Originator(s): @jimmielin

Summary (include the keyword ['closes', 'fixes', 'resolves'] and issue
number):

* Fixes #161: Add check_energy related history output variables to check_energy_diagnostics
* Fixes #166: Need to remove old CAM suite definition files
* Fixes #176 (updates `teout` standard name to
`vertically_integrated_total_energy_using_dycore_energy_formula_at_end_of_physics_timestep`)

Companion PR in SIMA: ESCOMP/CAM-SIMA#339

Describe any changes made to the namelist: N/A

List all files eliminated and why:
```
Fix #166 to remove old SDF files from scoping exercise
D       suites/suite_cam4.xml
D       suites/suite_cam6.xml
D       suites/suite_cam6_silhs.xml
```

List all files added and what they do:
```
Add global energy fixer diagnostics (teinp, teout, tefix, efix) 
A       schemes/sima_diagnostics/check_energy_fix_diagnostics.F90
A       schemes/sima_diagnostics/check_energy_fix_diagnostics.meta
```


List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)
```
Move some developments to check_energy_fix_diagnostics so they can be called at right time.
M       schemes/sima_diagnostics/check_energy_diagnostics.F90
M       schemes/sima_diagnostics/check_energy_diagnostics.meta

Add call to check_energy_fix_diagnostics in schemes using global energy fixer:
M       suites/suite_adiabatic.xml
M       suites/suite_cam7.xml

Update teout standard name
M       doc/NamesNotInDictionary.txt
M       schemes/check_energy/check_energy_chng.meta
M       schemes/check_energy/check_energy_gmean/check_energy_gmean.meta
M       schemes/check_energy/check_energy_save_teout.meta
M       schemes/sima_diagnostics/check_energy_diagnostics.F90
M       schemes/sima_diagnostics/check_energy_diagnostics.meta
M       schemes/sima_diagnostics/check_energy_gmean_diagnostics.meta
```

List any test failures: N/A

Is this a science-changing update? New physics package, algorithm
change, tuning changes, etc? N/A (diagnostics change only)
@jimmielin
Copy link
Member Author

Fixed in #169

@github-project-automation github-project-automation bot moved this from To Do to Done in CAM Development Feb 14, 2025
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
Status: Done
Development

No branches or pull requests

1 participant