-
Notifications
You must be signed in to change notification settings - Fork 0
added nonhydrostatic capabilities to MPAS-O #21
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
base: master
Are you sure you want to change the base?
Changes from 25 commits
88fb291
4c0eeaa
28d6588
e84e755
91dff6b
dba0784
7355644
5ca480c
a5fd43f
95295fa
046ce71
650c6dd
c2b2412
3eacc9e
c9cf963
e81723c
2c5bcbf
2f4fa64
c947a8e
59bb822
2f46b53
bc8290b
fdb1d58
d55b293
1577b35
58ce136
4fc4447
5fc334c
6b2320a
a111c41
18a8b6e
e209e96
1934c38
3e9778b
bc9cabc
9b31e2b
b94a4c0
f9a76a1
2dec6bd
707cc46
a882fd9
3759f61
85718b4
9052bc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -365,6 +365,18 @@ | |
| <!-- ocean_constants --> | ||
| <config_density0>1026.0</config_density0> | ||
|
|
||
| <!-- nonhydrostatic_pressure --> | ||
| <config_enable_nonhydrostatic_mode>.false.</config_enable_nonhydrostatic_mode> | ||
| <config_nonhydrostatic_solve_surface_boundary_condition>'noGradient'</config_nonhydrostatic_solve_surface_boundary_condition> | ||
| <config_enable_vertMomentum_disable_nonHydro>.false.</config_enable_vertMomentum_disable_nonHydro> | ||
| <config_nonhydrostatic_remove_rhs_mean>.true.</config_nonhydrostatic_remove_rhs_mean> | ||
| <config_nonhydrostatic_preconditioner>'jacobi'</config_nonhydrostatic_preconditioner> | ||
| <config_nonhydrostatic_solver_type>'pipecgrr'</config_nonhydrostatic_solver_type> | ||
| <config_petsc_rtol>1.0e-10</config_petsc_rtol> | ||
| <config_petsc_atol>1.0E-20</config_petsc_atol> | ||
| <config_petsc_maxit>10000</config_petsc_maxit> | ||
| <config_use_constant_forced_pgf>.false.</config_use_constant_forced_pgf> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we want to retain this option long term. My feeling is to remove the constant_forced_pgf from this PR |
||
|
|
||
| <!-- pressure_gradient --> | ||
| <config_pressure_gradient_type>'Jacobian_from_TS'</config_pressure_gradient_type> | ||
| <config_common_level_weight>0.5</config_common_level_weight> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1732,6 +1732,88 @@ Valid values: any positive real, but typically 1000-1035 | |
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <!-- nonhydrostatic_pressure --> | ||
|
|
||
| <entry id="config_enable_nonhydrostatic_mode" type="logical" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| Flag to enable the nonhydrostatic pressure calculation | ||
|
|
||
| Valid values: .true. or .false. | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_nonhydrostatic_solve_surface_boundary_condition" type="char*1024" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| setting for surface boundary condition for the pressure correction solve | ||
|
|
||
| Valid values: noGradient or no pressure | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_enable_vertMomentum_disable_nonHydro" type="logical" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| flag to enable hydrostatic pressure with vertical momentum tendencies | ||
|
|
||
| Valid values: .true. or .false. | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_nonhydrostatic_remove_rhs_mean" type="logical" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| flag to enabling mean from the right hand side of the nonhydro solve | ||
|
|
||
| Valid values: .true. or .false. | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_nonhydrostatic_preconditioner" type="char*1024" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| String describing preconditioner to use, recommended options -- jacobi, bjacobi, ilu | ||
|
|
||
| Valid values: jacobi, bjacobi, ilu | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_nonhydrostatic_solver_type" type="char*1024" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| String describing the solver context, recommended types -- pipecgrr, pipecg, cg, bcgs, gmres | ||
|
|
||
| Valid values: pipecgrr, pipecg, cg, bcgs, gmres | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_petsc_rtol" type="real" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| relative tolerance for the norm in petsc convergence | ||
|
|
||
| Valid values: very small positive reals | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_petsc_atol" type="real" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| absolute tolerance for the norm in petsc convergence | ||
|
|
||
| Valid values: very small positive reals | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_petsc_maxit" type="integer" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| maximum number of iterations in petsc solve | ||
|
|
||
| Valid values: positive integers | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
| <entry id="config_use_constant_forced_pgf" type="logical" | ||
| category="nonhydrostatic_pressure" group="nonhydrostatic_pressure"> | ||
| logical to enable a constant pressure gradient that is added to rest of PGF NOTE: need to remove after rebasing on to master... | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is actually a note (I'm guessing I made it) to remove this flag. |
||
|
|
||
| Valid values: .true. or .false. | ||
| Default: Defined in namelist_defaults.xml | ||
| </entry> | ||
|
|
||
|
|
||
| <!-- pressure_gradient --> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,6 +244,14 @@ | |
| description="If true, Laplacian horizontal mixing is used on the tracer equation." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_use_vertMom_del2" type="logical" default_value=".false." units="unitless" | ||
| description="If true, Laplacian horizontal mixing is used on the vertical momentum equation." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_vertMom_del2" type="real" default_value="0.0" units="m^2 s^{-1}" | ||
| description="Horizontal viscosity, $\nu_{2h}$. If config_hmix_use_ref_cell_width = .true. then $\nu_h$ = config_mom_del2*(cellWidth / config_hmix_use_ref_cell_width). If config_hmix_use_ref_cell_width = .false. then it is referenced to the smallest cell." | ||
| possible_values="any positive real" | ||
| /> | ||
| <nml_option name="config_tracer_del2" type="real" default_value="10.0" units="m^2 s^{-1}" | ||
| description="Horizontal diffusion, $\kappa_{2h}$. If config_hmix_use_ref_cell_width = .true. then $\kappa_h$ = config_tracer_del2*(cellWidth / config_hmix_use_ref_cell_width). If config_hmix_use_ref_cell_width = .false. then it is referenced to the smallest cell." | ||
| possible_values="any positive real" | ||
|
|
@@ -1108,6 +1116,48 @@ | |
| possible_values="any positive real, but typically 1000-1035" | ||
| /> | ||
| </nml_record> | ||
| <nml_record name="nonhydrostatic_pressure"> | ||
| <nml_option name="config_enable_nonhydrostatic_mode" type="logical" default_value=".false." units="unitless" | ||
| description="Flag to enable the nonhydrostatic pressure calculation" | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_nonhydrostatic_solve_surface_boundary_condition" type="character" default_value="noGradient" units="unitless" | ||
| description="setting for surface boundary condition for the pressure correction solve" | ||
| possible_values="noGradient or no pressure" | ||
| /> | ||
| <nml_option name="config_enable_vertMomentum_disable_nonHydro" type="logical" default_value=".false." units="unitless" | ||
| description="flag to enable hydrostatic pressure with vertical momentum tendencies" | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_nonhydrostatic_remove_rhs_mean" type="logical" default_value=".true." units="unitless" | ||
| description="flag to enabling mean from the right hand side of the nonhydro solve" | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_nonhydrostatic_preconditioner" type="character" default_value="jacobi" units="unitless" | ||
| description="String describing preconditioner to use, recommended options -- jacobi, bjacobi, ilu" | ||
| possible_values="jacobi, bjacobi, ilu" | ||
| /> | ||
| <nml_option name="config_nonhydrostatic_solver_type" type="character" default_value="pipecgrr" units="unitless" | ||
| description="String describing the solver context, recommended types -- pipecgrr, pipecg, cg, bcgs, gmres" | ||
| possible_values="pipecgrr, pipecg, cg, bcgs, gmres" | ||
| /> | ||
| <nml_option name="config_petsc_rtol" type="real" default_value="1.0e-10" units="unitless" | ||
| description="relative tolerance for the norm in petsc convergence" | ||
| possible_values="very small positive reals" | ||
| /> | ||
| <nml_option name="config_petsc_atol" type="real" default_value="1.0E-20" units="unitless" | ||
| description="absolute tolerance for the norm in petsc convergence" | ||
| possible_values="very small positive reals" | ||
| /> | ||
| <nml_option name="config_petsc_maxit" type="integer" default_value="10000" units="unitless" | ||
| description="maximum number of iterations in petsc solve" | ||
| possible_values="positive integers" | ||
| /> | ||
| <nml_option name="config_use_constant_forced_pgf" type="logical" default_value=".false." units="unitless" | ||
| description="logical to enable a constant pressure gradient that is added to rest of PGF NOTE: need to remove after rebasing on to master..." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| </nml_record> | ||
| <nml_record name="pressure_gradient" mode="forward"> | ||
| <nml_option name="config_pressure_gradient_type" type="character" default_value="pressure_and_zmid" units="unitless" | ||
| description="Form of pressure gradient terms in momentum equation. For most applications, the gradient of pressure and layer mid-depth are appropriate. For isopycnal coordinates, one may use the gradient of the Montgomery potential. The sea surface height gradient (ssh_gradient) option is for barotropic, depth-averaged pressure." | ||
|
|
@@ -1305,6 +1355,10 @@ | |
| description="If true, $h^{hf}$ is included in the desired ALE thickness, and the prognostic equations for $D^{lf}$ and $h^{hf}$ are integrated in the code." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_disable_ALE" type="logical" default_value=".false." units="unitless" | ||
| description="flag to disable the ALE coordinate and revert to eulerian mode NOTE: only works for RK4 at present" | ||
| possible_values=".true. or .false." | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is another really untested option that I would suggest we remove. I don't think we want this finding its way to e3sm master |
||
| /> | ||
| <nml_option name="config_thickness_filter_timescale" type="real" default_value="5.0" units="days" | ||
| description="Filter time scale for the low-frequency baroclinic divergence, $\tau_{Dlf}$." | ||
| possible_values="any positive real value, but typically 5 days." | ||
|
|
@@ -1383,6 +1437,18 @@ | |
| description="Disables tendencies on the velocity field from the Coriolis force and momentum advection." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_disable_vvel_all_tend" type="logical" default_value=".false." units="unitless" | ||
| description="Disables all tendencies on the vertical velocity field." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_disable_vvel_coriolis" type="logical" default_value=".false." units="unitless" | ||
| description="Disables tendencies on the vertical velocity field from the Coriolis force." | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_disable_vvel_adv" type="logical" default_value=".false." units="unitless" | ||
| description="Disables advection of vertical velocity" | ||
| possible_values=".true. or .false." | ||
| /> | ||
| <nml_option name="config_disable_vel_pgrad" type="logical" default_value=".false." units="unitless" | ||
| description="Disables tendencies on the velocity field from the horizontal pressure gradient." | ||
| possible_values=".true. or .false." | ||
|
|
@@ -1491,6 +1557,7 @@ | |
| <package name="topographicWaveDragPKG" description="This package controls variables required for topographic wave drag"/> | ||
| <package name="gotmPKG" description="This package is for GOTM variables, which are only needed when using GOTM for the vertical turbulence closure."/> | ||
| <package name="verticalRemapPKG" description="This package is for variables required for vertical Lagrangian remapping."/> | ||
| <package name="nonhydrostaticPKG" description="This package is for variables needed for the nonhydrostatic capabilities"/> | ||
| </packages> | ||
|
|
||
| <streams> | ||
|
|
@@ -2118,6 +2185,14 @@ | |
| <var name="ssh" type="real" dimensions="nCells Time" units="m" | ||
| description="sea surface height" | ||
| /> | ||
| <var name="vertVelocityNonhydro" type="real" dimensions="nVertLevelsP1 nCells Time" units="m s^{-1}" | ||
| description="prognostic vertical velocity, only used when config_enable_nonhydrostatic_mode = .true." | ||
| packages="nonhydrostaticPKG" | ||
| /> | ||
| <var name="nonhydrostaticPressure" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}" | ||
| description="nonhydrostatic pressure, set to zero if config_enable_nonhydrostatic_mode = .false." | ||
| packages="nonhydrostaticPKG" | ||
| /> | ||
|
Comment on lines
+2188
to
+2276
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can these variables be put in the |
||
|
|
||
| <!-- FIELDS FOR FREQUENCY FILTERED THICKNESS --> | ||
| <var name="highFreqThickness" type="real" dimensions="nVertLevels nCells Time" units="m" | ||
|
|
@@ -2466,6 +2541,10 @@ | |
| description="time tendency of normal component of velocity" | ||
| packages="forwardMode" | ||
| /> | ||
| <var name="tendVertVelocityNonhydro" type="real" dimensions="nVertLevelsP1 nCells Time" units="m s^{-2}" name_in_code="vertVelocityNonhydroTend" | ||
| description="time tendency of the vertical velocity (Only active for non hydrostatic mode)" | ||
| packages="nonhydrostaticPKG" | ||
| /> | ||
|
Comment on lines
+2542
to
+2631
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, can this be in the |
||
| <var name="tendLayerThickness" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}" name_in_code="layerThickness" | ||
| description="time tendency of layer thickness" | ||
| packages="forwardMode" | ||
|
|
@@ -2493,6 +2572,10 @@ | |
| <var name="daysSinceStartOfSim" type="real" dimensions="Time" units="days" | ||
| description="Time since simulationStartTime, for plotting" | ||
| /> | ||
| <var name="nhPressureCorrection" type="real" dimensions="nVertLevels nCells Time" units="unitless" | ||
| description="the pressure correction coming from the poisson pressure equation" | ||
| packages="nonhydrostaticPKG" | ||
| /> | ||
|
Comment on lines
+2608
to
+2671
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add to |
||
| <var name="salinitySurfaceRestoringTendency" type="real" dimensions="nCells Time" units="m PSU/s" packages="activeTracersSurfaceRestoringPKG" | ||
| description="salinity tendency due to surface restoring" | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were these added by the automated scripts? Or hand entered?