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

Add framework for new tendency, revised PV diagnostics packages #1210

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,13 @@
<package name="limited_area" description="Limited-area simulations, which have lateral boundaries"/>
<package name="jedi_da" description="Data Assimilation in JEDI framework"/>
<package name="no_invariant_stream" description="No separate invariant I/O stream is active"/>

<package name="tendencies" description="Diagnostics tendency budget terms for winds, thetam and qv"/>
<package name="pv_diagnostics" description="Basic PV diagnostics calculations activated by config_pv_diag"/>
<package name="pv_tendencies" description="PV tendency calculations activated by config_pv_tend"/>
<package name="pv_scalar" description="PV scalar advection activated by config_pv_scalar"/>
<package name="pv_microphysics" description="PV microphysics process tendency calculations activated by config_pv_microphys"/>
<package name="pv_isobaric" description="Isobaric PV variable interpolation activated by config_pv_isobaric"/>
</packages>


Expand Down Expand Up @@ -1628,8 +1635,16 @@

</var_array>
#endif
</var_struct>
<!-- MW: adding a PV scalar ARRAY for optional PV scalar diagnostic variable because the scalar advection subroutine expects a scalar array input !-->
<var_array name="pv_scalars" type="real" dimensions="nVertLevels nCells Time" streams="restart">
<var name="pv_scalar" array_group="passive" units="PVU"
description="Ertel's potential vorticity to be advected by the model (1 PVU = 10^{-6} m^{2} s^{-1} K kg^{-1})"
packages="pv_scalar"
streams="restart"/>
</var_array>

</var_struct>

<var_struct name="diag" time_levs="1">

<!-- coefficients for the vertical tridiagonal solve -->
Expand Down Expand Up @@ -1715,9 +1730,6 @@
<var name="pv_cell" type="real" dimensions="nVertLevels nCells Time" units="s^{-1}"
description="absolute vertical vorticity averaged to the cell center from the vertices"/>

<var name="dtheta_dt_mp" type="real" dimensions="nVertLevels nCells Time" units="K s^{-1}"
description="Potential temperature heating rate from microphysics"/>

<!-- reconstructed horizontal velocity vectors at cell centers -->
<var name="uReconstructX" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="Cartesian x-component of reconstructed horizontal velocity at cell centers"/>
Expand Down Expand Up @@ -1929,6 +1941,14 @@
packages="mp_thompson_aers_in"/>
</var_array>
#endif
<!-- MW: Tendency variable array for optional pv_scalar diagnostic variable. -->
<!-- pv_scalars_tend only contains one variable but we need the array because the scalar transport code expects it -->
<var_array name="pv_scalars_tend" type="real" dimensions="nVertLevels nCells Time">
<var name="tend_pv_scalar" array_group="passive" units="PVU kg m^{-3} s^{-1}"
description="Tendency of Ertel's potential vorticity from scalar advection multiplied by dry air density divided by d(zeta)/dz"
packages="pv_scalar" />
</var_array>

</var_struct>

<!-- ===================================================================================== -->
Expand Down
3 changes: 2 additions & 1 deletion src/core_atmosphere/diagnostics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ mpas_soundings.o:
################### Generally no need to modify below here ###################


OBJS = mpas_atm_diagnostics_manager.o mpas_atm_diagnostics_utils.o
OBJS = mpas_atm_diagnostics_manager.o mpas_atm_diagnostics_utils.o mpas_atm_diagnostics_packages.o

all: $(DIAGNOSTIC_MODULES) $(OBJS)

mpas_atm_diagnostics_manager.o: mpas_atm_diagnostics_utils.o $(DIAGNOSTIC_MODULES)

mpas_atm_diagnostics_packages.o: mpas_atm_diagnostics_utils.o

clean:
$(RM) *.o *.mod *.f90
Expand Down
48 changes: 48 additions & 0 deletions src/core_atmosphere/diagnostics/Registry_diagnostics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,54 @@
<!-- soundings -->
#include "Registry_soundings.xml"

<!-- tendencies -->
#include "Registry_tendencies.xml"


<!-- ........................................................................ -->
<!-- Declare namelist config options for tendency and PV diagnostics packages -->
<!-- ........................................................................ -->
<nml_record name="diagnostics" in_defaults="false">

<!-- NAMELIST VARIABLES ADDED FOR INITIALIZATION OF INITIAL TENDENCY DIAGNOSTICS: -->
<nml_option name="config_tend" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for outputting tendency budget terms for thetam, water-vapor mixing ratio, and reconstructed winds"
possible_values=".true. for accumulating tendency terms; .false. otherwise"/>


<!-- NAMELIST VARIABLES ADDED FOR INITIALIZATION OF PV DIAGNOSTICS: -->
<nml_option name="config_pv_diag" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for calculation of potential vorticity and variables interpolated to dynamic tropopause"
possible_values=".true. for PV diagnostics calculation; .false. otherwise"/>

<!-- The following are only active when config_pv_diag = True -->
<!-- config_pv_tend requires config_tend = True -->
<nml_option name="config_pv_tend" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for calculation of potential vorticity tendency diagnostics"
possible_values=".true. for PV tendency diagnostics calculation; .false. otherwise"/>

<nml_option name="config_pv_isobaric" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for interpolation of PV diagnostics onto isobaric levels"
possible_values=".true. for PV diagnostics interpolation; .false. otherwise"/>

<!-- MC_TODO: should only be activated if Thompson MP scheme is used -->
<nml_option name="config_pv_microphys" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for calculation of specific process tendencies from Thompson microphysics"
possible_values=".true. for PV tendencies from specific mp processes; .false. otherwise"/>

<!-- MC_TODO: need to deal with restarts; pv_scalars variable defined in Registry.xml -->
<nml_option name="config_pv_scalar" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical for treating the initial PV field as a passive scalar and transporting it throughout the simulation"
possible_values=".true. for calculating scalar PV transport; .false. otherwise"/>

</nml_record>

<!-- ******************************* -->
<!-- End includes from diagnostics -->
<!-- ******************************* -->
Loading