NCAR / MOM6

NCAR/CESM fork of the Modular Ocean Model v.6 (MOM6)
Other
2 stars 18 forks source link

Stochastic GM+E #280

Closed iangrooms closed 5 days ago

iangrooms commented 1 month ago

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

gustavo-marques commented 1 week ago

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

mnlevy1981 commented 5 days ago

@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 commented 5 days ago

@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.