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

Stochastic GM+E #280

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Stochastic GM+E #280

merged 4 commits into from
Jul 2, 2024

Conversation

iangrooms
Copy link

@iangrooms iangrooms commented May 24, 2024

This PR adds a Stochastic Kinetic Energy Backscatter Scheme (SKEBS) where the amplitude of the backscatter is based on either the GM work rate and/or the viscous work rate (FrictWork). Each of these can be multiplied by a coefficient so that, e.g. the backscatter rate could be 50% of the GM work rate plus 20% of the viscous work rate. The vertical structure of the backscatter rate associated with GM is given by the EBT profile. The component that uses FrictWork has not been extensively tested, but it does run stably for at least few years.

This code was developed starting from Phil Pegion's branch. This PR may break the stochastic EPBL and SPPT schemes developed by @pjpegion.

If you don't use the external stochastic_physics package developed by Phil Pegion, Niraj Agarwal, and collaborators, the code calls a stub in config_src/externals/stochastic_physics/ that does nothing. To use the external package, replace the contents of config_src/externals/stochastic_physics/ with the code at the link above. You can control the time and length scales of the random pattern through a namelist included in input.nml. An example is included below.

New MOM_input parameters:

DO_SKEB = True                  !   [Boolean] default = False
                                ! If true, then stochastically perturb the currents using the stochastic kinetic
                                ! energy backscatter scheme.
SKEB_NPASS = 10                 ! default = 3
                                ! number of passes of a 9-point smoother of the dissipation estimate.
SKEB_TAPER_WIDTH = 4            ! default = 4
                                ! number of cells over which the stochastic velocity increment is tapered to
                                ! zero.
SKEB_USE_GM = True              !   [Boolean] default = False
                                ! If true, adds GM work rate to the SKEBS amplitude.
SKEB_GM_COEF = 0.5              !   [nondim] default = 0.0
                                ! Fraction of GM work that is added to backscatter rate.
SKEB_USE_FRICT = False          !   [Boolean] default = False
                                ! If true, adds horizontal friction dissipation rate to the SKEBS amplitude.
SKEB_FRICT_COEF = 0.5           ! [nondim] default = 0.0
                                ! Fraction of horizontal friction work that is added to backscatter rate.

New available diagnostics:

"sppt_pattern"  [Unused]
    ! modules: {ocean_model,ocean_model_d2}
    ! long_name: random pattern for sppt
    ! units: None
    ! cell_methods: xq:point yq:point
"skeb_pattern"  [Unused]
    ! modules: {ocean_model,ocean_model_d2}
    ! long_name: random pattern for skeb
    ! units: None
    ! cell_methods: xq:point yq:point
"skebu"  [Unused]
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2}
    ! long_name: zonal current perts
    ! units: None
    ! cell_methods: xq:point yh:mean zl:mean
    ! variants: {skebu,skebu_xyave}
"skebv"  [Unused]
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2}
    ! long_name: zonal current perts
    ! units: None
    ! cell_methods: xh:mean yq:point zl:mean
    ! variants: {skebv,skebv_xyave}
"skeb_amp"  [Used]
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2}
    ! long_name: SKEB amplitude
    ! units: m s-1
    ! cell_methods: xh:mean yh:mean zl:mean area:mean
    ! variants: {skeb_amp,skeb_amp_xyave}
"psi"  [Unused]
    ! modules: {ocean_model,ocean_model_d2}
    ! long_name: stream function
    ! units: None
    ! cell_methods: xq:point yq:point zl:mean
"skeb_taper_u"  [Used]
    ! modules: ocean_model
    ! long_name: SKEB taper u
    ! units: None
"skeb_taper_v"  [Used]
    ! modules: ocean_model
    ! long_name: SKEB taper v
    ! units: None

Namelist example to control the stochastic physics package:

&nam_stochy
    new_lscale=.true.,
    OCNSPPT=-999.0
    OCNSPPT_LSCALE=500e3,
    OCNSPPT_TAU=21600,
    ISEED_OCNSPPT=201209010001,
    EPBL=-999.0,
    EPBL_LSCALE=500e3,
    EPBL_TAU=21600,
    ISEED_EPBL=201301010102,
    OCNSKEB=1.0,
    OCNSKEB_LSCALE=250e3,
    OCNSKEB_TAU=21600,
    ISEED_OCNSKEB=20,
/

The only relevant parameters for stochastic backscatter are

  • OCNSKEB which should be 1. Backscatter amplitude should be controlled by the MOM_input parameters above.
  • OCNSKEB_LSCALE is the characteristic wavelength of the backscatter in meters
  • OCNSKEB_TAU is the decorrelation time of the noise in sections
  • ISEED_OCNSKEB is a seed for the random pattern generator. If using ensembles, this seed value should be changed across ensemble members.

This commit adds a Stochastic Kinetic Energy Backscatter Scheme (SKEBS)
where the amplitude of the backscatter is based on either the GM
work rate and/or the viscous work rate (FrictWork). Each of these
can be multiplied by a coefficient so that, e.g. the backscatter rate
could be 50% of the GM work rate plus 20% of the viscous work rate.
The vertical structure of the backscatter rate associated with GM has
vertical structure given by the EBT profile. This code was developed
starting from Phil Pegion's branch, and it builds on the stochastic
physics package (external) developed by Phil Pegion, Niraj Agarwal,
and collaborators. This package allows the length and time scales
of the backscatter to be set via namelist parameters. This commit
may break the stochastic EPBL and SPPT schemes developed by P.
Pegion.
@gustavo-marques
Copy link
Collaborator

gustavo-marques commented Jun 24, 2024

@iangrooms, can you please resolve the conflicts listed below?

@gustavo-marques gustavo-marques self-requested a review July 2, 2024 19:59
Copy link
Collaborator

@gustavo-marques gustavo-marques left a comment

Choose a reason for hiding this comment

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

It's passing aux_mom tests.

@gustavo-marques gustavo-marques merged commit 6ad1530 into NCAR:dev/ncar Jul 2, 2024
8 of 10 checks passed
@mnlevy1981
Copy link
Collaborator

@gustavo-marques Can we tag this version of dev/ncar? I'll work with Ian next week on a MOM_interface PR that brings in the external stochastic_physics package and builds it (similar to MARBL, where a flag in env_build.xml toggles whether to build the actual package or the stubs that will be built by groups that don't have the full package) and also updates input_nml.yaml

@gustavo-marques
Copy link
Collaborator

@mnlevy1981; yes, I think it's fine to tag this version to work out the requirement for the external stochastic_physics package. Unless @alperaltuntas has any objections.

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.

3 participants