erf-model / ERF

Energy Research and Forecasting Model
https://erf.readthedocs.io/en/latest/
Other
26 stars 40 forks source link

Remove qke #1905

Closed AMLattanzi closed 3 weeks ago

AMLattanzi commented 3 weeks ago

This PR follows the equations in the JAMES paper and compresses the KE and QKE vars. This reduces the memory footprint in terms of the dycore variables and the eddy diffusivities.

Source terms: Deardorff: image MYNN 2.5: image

This is a work in progress and results will be posted to this thread.

AMLattanzi commented 3 weeks ago

There are some small differences between this new implementation and the current development:

  1. The use of ComputeSmnSmn averages the strains to CC, rather than using a central difference at the CC.
  2. The source terms are computed once per time step rather than once per RK stage.
  3. The buoyancy source follows the Deardorff model and thus is \partial_{z} \theta_d whereas the MYNN module used \theta_v. It's unclear if Deardorff should also use \theta_v.

Despite these differences (which means the CTest will never pass) the GABLS case looks decent: image image image

ewquon commented 3 weeks ago

There are some small differences between this new implementation and the current development:

  1. The use of ComputeSmnSmn averages the strains to CC, rather than using a central difference at the CC.
  2. The source terms are computed once per time step rather than once per RK stage.
  3. The buoyancy source follows the Deardorff model and thus is \partial_{z} \theta_d whereas the MYNN module used \theta_v. It's unclear if Deardorff should also use \theta_v.

The buoyancy source should depend on the kinematic virtual temperature flux, so we need to use virtual temperature. I believe we have the unsaturated path coded up but it gets more complicated under saturated conditions. From Deardorff1980:

image
AMLattanzi commented 3 weeks ago

I have reverted the source terms to conform to what was originally in the development branch. We can sort out the theta_v and frequency with which we compute source terms in a subsequent PR so things don't get too convoluted.

The benchmark remake is due to the fact that KE is clipped at machine precision but QKE was clipped at 1.0e-12.