ESCOMP / ESCOMP/atmospheric_physics
Add check_energy_chng calls (and inputs) for ZM scheme / CAM7 suite
- Dominant language
- Fortran
- Stars
- 12
- Forks
- 38
- Avg merge
- 11h 16m
- Merged PRs (30d)
- 5
Description
Branched out from #186 on discussion for `suite_cam7.xml`
Copying @cacraigucar
@nusbaume originally wrote:
> I believe we need to add another set of `check_energy` calls after the ZM block here:
@jimmielin originally wrote:
> Thanks @nusbaume, also wanted to add that before running the ZM scheme, the following should be called to zero the inputs to `check_energy_chng`:
>
> ```
> check_energy_zero_fluxes
> ```
>
> Some inputs need to be provided to `check_energy_chng` to actually check the energy changes match the boundary fluxes.
>
> Based on `physpkg.F90` calls to check_energy_chng after `convect_deep_tend`:
>
> ```fortran
> ! Check energy integrals, including "reserved liquid"
> flx_cnd(:ncol) = prec_dp(:ncol) + rliq(:ncol)
> snow_dp(:ncol) = snow_dp(:ncol) + rice(:ncol)
> call check_energy_cam_chng(state, tend, "convect_deep", nstep, ztodt, zero, flx_cnd, snow_dp, zero)
> snow_dp(:ncol) = snow_dp(:ncol) - rice(:ncol)
> ```
>
> the following inputs need to be provided (as an output from the ZM scheme):
>
> * `scheme_name` = `"convect_deep"`
> * `net_liquid_and_lwe_ice_fluxes_through_top_and_bottom_of_atmosphere_column` ("flx_cnd" in check_energy_chng) = `prec_dp(:ncol) + rliq(:ncol)`
> * `net_lwe_ice_fluxes_through_top_and_bottom_of_atmosphere_column` ("flx_ice" in check_energy_chng; I don't like how the above code is recycling `snow_dp` there simply for calling `check_energy_cam_chng`) = `snow_dp(:ncol) + rice(:ncol)`
>
> I realized I have to make the same changes for the shallow convection. Here is how I added these fluxes for my scheme: [jimmielin@8c9b103](https://github.com/jimmielin/atmospheric_physics/commit/8c9b103fc865694eeb595e18855f50b68ce2e5ab)
>
> It looks like `snow_dp` comes from `zm_conv_evap`, so that needs to be provided in the interstitial that renames general to deep. But in the case of ZM, `rice` has to be added on top of it. Maybe pass `net_lwe_ice_fluxes_through_top_and_bottom_of_atmosphere_column` into both the scheme that computes `rice` then add `snow_dp` on top of it in the interstitial.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.