diff --git a/.github/parm/use_case_groups.json b/.github/parm/use_case_groups.json index f4dcd06a1e..be6f546335 100644 --- a/.github/parm/use_case_groups.json +++ b/.github/parm/use_case_groups.json @@ -1,5 +1,5 @@ [ - { + { "category": "met_tool_wrapper", "index_list": "0-29,59-61", "run": false @@ -49,6 +49,11 @@ "index_list": "9", "run": false }, + { + "category": "short_range", + "index_list": "10-12", + "run": false + }, { "category": "data_assimilation", "index_list": "0", diff --git a/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.png b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.png new file mode 100644 index 0000000000..b34ba13937 Binary files /dev/null and b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.png differ diff --git a/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.png b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.png new file mode 100644 index 0000000000..042cd49668 Binary files /dev/null and b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.png differ diff --git a/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.png b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.png new file mode 100644 index 0000000000..7f1384226d Binary files /dev/null and b/docs/_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.png differ diff --git a/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.py b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.py new file mode 100644 index 0000000000..2c4f89bb50 --- /dev/null +++ b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.py @@ -0,0 +1,173 @@ +""" +UserScript: Physics Tendency Planview Plot +========================================== + +model_applications/ +short_range/ +UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf + +""" + +############################################################################## +# Scientific Objective +# -------------------- +# +# To plot tendencies of temperature, moisture, and wind components averaged over +# a time window and spatial domain. Tendencies are partitioned into physics +# parameterizations and dynamics. Physics parameterizations include schemes like +# deep convection, convective gravity wave drag, short wave radiation, plantetary +# boundary layer, microphysics, and others. Non-physics tendencies (or dynamics) +# are due to horizontal and vertical motion. The residual (which should be zero) +# is the difference between the actual change in the state variable over the +# requested time window and the expected change due to physics parameterizations +# and dynamics tendencies. One can plot a single tendency component at multiple +# pressure levels or plot all tendency components at a single pressure level. +# This use case illustrates how to generate plan views (horizontal cross +# sections). The METplotpy source code is needed to generate the plot. +# Clone the METplotpy repository (https://github.com/dtcenter/METplotpy) under the same base +# directory as the METPLUS_BASE directory so that the METplus and +# METplotpy directories are under the same base directory (i.e. if the METPLUS_BASE directory is +# /home/username/working/METplus, then clone the METplotpy source +# code into the /home/username/working directory). + +############################################################################## +# Datasets +# -------- +# +# * Forecast dataset: FV3 3-D history file with physics and dynamics tendencies +# * Grid specification: FV3 2-D grid specification file with latitude and longitude of each grid point +# +# **Location:** All of the input data required for this use case can be +# found in the met_test sample data tarball. Click here to the METplus +# releases page and download sample data for the appropriate release: +# https://github.com/dtcenter/METplus/releases +# The tarball should be unpacked into the directory that you will set +# the value of INPUT_BASE. See the "Running METplus" section below for more +# information. + + +############################################################################## +# External Dependencies +# --------------------- +# You will need to use a versio of Python 3.86 that has the following packages +# installed: +# +# * cartopy (0.20.3 only) +# * matplotlib +# * metpy +# * numpy +# * pandas +# * shapely +# * xarray +# + + + +############################################################################## +# METplus Components +# ------------------ +# +# This use case runs the METplotpy planview_fv3.py script to generate the +# plan views. + +############################################################################## +# METplus Workflow +# ---------------- +# +# This use case does not loop but plots physics tendency data that has been +# subsetted to one date: 2019-05-04. + +################################################################################################### +# METplus Configuration +# --------------------- +# +# METplus first loads all of the configuration files found in +# parm/metplus_config, +# then it loads any configuration files passed to METplus via the command line +# i.e. +# parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf +# +# .. highlight:: bash +# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf + +############################################################################## +# MET Configuration +# ----------------- +# +# No MET tools are used in this use case. +# +# METplus sets environment variables based on user settings in the METplus +# configuration file. +# See :ref:`How METplus controls MET config file settings` +# for more details. + + +############################################################################## +# Running METplus +# --------------- +# +# This use case can be run in the following way: +# +# 1) Passing in UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf +# then a user-specific system configuration file:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf /path/to/user_system.conf +# +# 2) Modifying the configurations in parm/metplus_config, then passing in +# UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf +# +# The former method is recommended. Whether you add them to a user-specific +# configuration file or modify the metplus_config files, the following +# variables must be set correctly: +# +# * **INPUT_BASE** - Path to directory where sample data tarballs are +# unpacked (See Datasets section to obtain tarballs). This is not required +# to run METplus, but it is required to run the examples in parm/use_cases +# * **OUTPUT_BASE** - Path where METplus output will be written. This must +# be in a location where you have write permissions +# * **MET_INSTALL_DIR** - Path to location where MET is installed locally +# +# Example User Configuration File:: +# +# [dir] +# INPUT_BASE = /path/to/sample/input/data +# OUTPUT_BASE = /path/to/output/dir +# MET_INSTALL_DIR = /path/to/met-X.Y +# +# **NOTE:** All of these items must be found under the [dir] section. + +############################################################################## +# Expected Output +# --------------- +# +# A successful run will output the following both to the screen and to +# the logfile:: +# +# INFO: METplus has successfully finished running. +# +# Refer to the value set for **OUTPUT_BASE** to find where the output +# data was generated. +# The following file will be created: +# +# physics_tendency_planview.png + +############################################################################## +# Keywords +# -------- +# +# +# .. note:: +# +# * MediumRangeAppUseCase +# * PhysicsTendency +# * ValidationUseCase +# * ShortRangeAppUseCase +# +# Navigate to the :ref:`quick-search` page to discover other similar +# use cases. +# +# +# +# sphinx_gallery_thumbnail_path = '_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.png' diff --git a/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.py b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.py new file mode 100644 index 0000000000..89d0bb967f --- /dev/null +++ b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.py @@ -0,0 +1,164 @@ +""" +UserScript: Physics Tendency Vertical Cross Section plot +========================================================================= + +model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf + +""" + +############################################################################## +# Scientific Objective +# -------------------- +# +# To plot tendencies of temperature, moisture, and wind components averaged over +# a time window and spatial domain. Tendencies are partitioned into physics +# parameterizations and dynamics. Physics parameterizations include schemes like +# deep convection, convective gravity wave drag, short wave radiation, plantetary +# boundary layer, microphysics, and others. Non-physics tendencies (or dynamics) +# are due to horizontal and vertical motion. The residual (which should be zero) +# is the difference between the actual change in the state variable over the requested +# time window and the expected change due to physics parameterizations and dynamics +# tendencies. One can plot a single tendency component at multiple pressure levels or +# plot all tendency components at a single pressure level. This use case illustrates +# how to generate the vertical cross section plot. The METplotpy source code is needed to generate the plot. +# Clone the METplotpy repository (https://github.com/dtcenter/METplotpy) under the same base +# directory as the METPLUS_BASE directory so that the METplus and +# METplotpy directories are under the same base directory (i.e. if the METPLUS_BASE directory is +# /home/username/working/METplus, then clone the METplotpy source +# code into the /home/username/working directory). + + +############################################################################## +# Datasets +# -------- +# +# | Forecast dataset: FV3 3-D history file with physics and dynamics tendencies +# | Grid specification: FV3 2-D grid specification file with latitude and longitude of each grid point +# +# | **Location:** All of the input data required for this use case can be found in the met_test sample data tarball. Click here to the METplus releases page and download sample data for the appropriate release: https://github.com/dtcenter/METplus/releases +# | The tarball should be unpacked into the directory that you will set the value of INPUT_BASE. See `Running METplus`_ section for more information. +# + + + +############################################################################## +# External Dependencies +# --------------------- +# You will need to use a versio of Python 3.86 that has the following packages +# installed: +# +# * cartopy (0.20.3 only) +# * matplotlib +# * metpy +# * numpy +# * pandas +# * shapely +# * xarray +# + + + +############################################################################## +# METplus Components +# ------------------ +# +# This use case runs the METplotpy cross_section_vert.py script to generate the plan views. +# + +############################################################################## +# METplus Workflow +# ---------------- +# +# This use case does not loop but plots physics tendency data that has been +# subsetted to one date: 2019-05-04. +# + + +############################################################################## +# METplus Configuration +# --------------------- +# +# METplus first loads all of the configuration files found in parm/metplus_config, +# then it loads any configuration files passed to METplus via the command line +# i.e. parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf +# +# .. highlight:: bash +# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf +# + +############################################################################## +# MET Configuration +# --------------------- +# +# No MET tools are used in this use case. +# +# METplus sets environment variables based on user settings in the METplus configuration file. +# See :ref:`How METplus controls MET config file settings` for more details. +# +# .. note:: See the :ref:`MODE MET Configuration` section of the User's Guide for more information on the environment variables used in the file below: +# + +############################################################################## +# Running METplus +# --------------- +# +# This use case can be run in the following way: +# +# 1) Passing in UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf then a user-specific system configuration file:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf /path/to/user_system.conf +# +# 2) Modifying the configurations in parm/metplus_config, then passing in UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf +# +# The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly: +# +# * **INPUT_BASE** - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases +# * **OUTPUT_BASE** - Path where METplus output will be written. This must be in a location where you have write permissions +# * **MET_INSTALL_DIR** - Path to location where MET is installed locally +# +# Example User Configuration File:: +# +# [dir] +# INPUT_BASE = /path/to/sample/input/data +# OUTPUT_BASE = /path/to/output/dir +# MET_INSTALL_DIR = /path/to/met-X.Y +# +# **NOTE:** All of these items must be found under the [dir] section. +# + +############################################################################## +# Expected Output +# --------------- +# +# A successful run will output the following both to the screen and to the logfile:: +# +# INFO: METplus has successfully finished running. +# +# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. +# The following file will be created: +# +# short_range-physics_tendency_vertical_cross_section.png +# +# + + +############################################################################## +# Keywords +# -------- +# +# +# .. note:: +# +# * MediumRangeAppUseCase +# * PhysicsTendency +# * ValidationUseCase +# * ShortRangeAppUseCase +# +# Navigate to the :ref:`quick-search` page to discover other similar use cases. +# +# +# +# sphinx_gallery_thumbnail_path = '_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.png' +# diff --git a/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.py b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.py new file mode 100644 index 0000000000..5e6415cd57 --- /dev/null +++ b/docs/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.py @@ -0,0 +1,175 @@ +""" +UserScript: Physics Tendency Vertical Profile plot +========================================================================= + +model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf + +""" + +############################################################################## +# Scientific Objective +# -------------------- +# +# To plot tendencies of temperature, moisture, and wind components averaged over +# a time window and spatial domain. Tendencies are partitioned into physics +# parameterizations and dynamics. Physics parameterizations include schemes like +# deep convection, convective gravity wave drag, short wave radiation, plantetary +# boundary layer, microphysics, and others. Non-physics tendencies (or dynamics) +# are due to horizontal and vertical motion. The residual (which should be zero) +# is the difference between the actual change in the state variable over the requested +# time window and the expected change due to physics parameterizations and dynamics +# tendencies. One can plot a single tendency component at multiple pressure levels or +# plot all tendency components at a single pressure level. This use case illustrates +# how to generate the vertical profile plot. The METplotpy source code is needed to generate the plot. +# Clone the METplotpy repository (https://github.com/dtcenter/METplotpy) under the same base +# directory as the METPLUS_BASE directory so that the METplus and +# METplotpy directories are under the same base directory (i.e. if the METPLUS_BASE directory is +# /home/username/working/METplus, then clone the METplotpy source +# code into the /home/username/working directory). + + + +############################################################################## +# Datasets +# -------- +# +# * Forecast dataset: FV3 3-D history file with physics and dynamics tendencies +# * Grid specification: FV3 2-D grid specification file with latitude and longitude of each grid point +# * Mid-CONUS Shapefiles: +# +# * MID_CONUS.cpg +# * MID_CONUS.dbf +# * MID_CONUS.poly +# * MID_CONUS.prj +# * MID_CONUS.shp +# * MID_CONUS.shx +# +# | **Location:** All of the input data required for this use case can be found in the met_test sample data tarball. Click here to the METplus releases page and download sample data for the appropriate release: https://github.com/dtcenter/METplus/releases +# | The tarball should be unpacked into the directory that you will set the value of INPUT_BASE. See `Running METplus`_ section for more information. +# + + + +############################################################################## +# External Dependencies +# --------------------- +# You will need to use a versio of Python 3.86 that has the following packages +# installed: +# +# * cartopy (0.20.3 only) +# * matplotlib +# * metpy +# * numpy +# * pandas +# * shapely +# * xarray +# + + + +############################################################################## +# METplus Components +# ------------------ +# +# This use case runs the METplotpy vert_profile_fv3.py script to generate the vertical profile plot. +# + +############################################################################## +# METplus Workflow +# ---------------- +# +# +# | This use case does not loop but plots physics tendency data that has been +# | subsetted to one date: 2019-05-04. +# | + + +############################################################################## +# METplus Configuration +# --------------------- +# +# METplus first loads all of the configuration files found in parm/metplus_config, +# then it loads any configuration files passed to METplus via the command line +# i.e. parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf +# +# .. highlight:: bash +# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf +# + +############################################################################## +# MET Configuration +# --------------------- +# +# No MET tools are used in this use case. +# +# METplus sets environment variables based on user settings in the METplus configuration file. +# See :ref:`How METplus controls MET config file settings` for more details. +# +# .. note:: See the :ref:`MODE MET Configuration` section of the User's Guide for more information on the environment variables used in the file below: +# + +############################################################################## +# Running METplus +# --------------- +# +# This use case can be run in the following way: +# +# 1) Passing in UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf then a user-specific system configuration file:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf /path/to/user_system.conf +# +# 2) Modifying the configurations in parm/metplus_config, then passing in UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf:: +# +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf +# +# The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly: +# +# * **INPUT_BASE** - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases +# * **OUTPUT_BASE** - Path where METplus output will be written. This must be in a location where you have write permissions +# * **MET_INSTALL_DIR** - Path to location where MET is installed locally +# +# Example User Configuration File:: +# +# [dir] +# INPUT_BASE = /path/to/sample/input/data +# OUTPUT_BASE = /path/to/output/dir +# MET_INSTALL_DIR = /path/to/met-X.Y +# +# **NOTE:** All of these items must be found under the [dir] section. +# + +############################################################################## +# Expected Output +# --------------- +# +# A successful run will output the following both to the screen and to the logfile:: +# +# INFO: METplus has successfully finished running. +# +# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. +# The following file will be created: +# +# short_range-physics_tendency_vertical_profile.png +# +# + + + +############################################################################## +# Keywords +# -------- +# +# +# .. note:: +# +# * MediumRangeAppUseCase +# * PhysicsTendency +# * ValidationUseCase +# * ShortRangeAppUseCase +# +# Navigate to the :ref:`quick-search` page to discover other similar use cases. +# +# +# +# sphinx_gallery_thumbnail_path = '_static/short_range-UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.png' +# diff --git a/internal/tests/use_cases/all_use_cases.txt b/internal/tests/use_cases/all_use_cases.txt index 6599002f72..1471e60e09 100644 --- a/internal/tests/use_cases/all_use_cases.txt +++ b/internal/tests/use_cases/all_use_cases.txt @@ -147,6 +147,9 @@ Category: short_range 7::MODE_fcstFV3_obsGOES_BrightnessTemp::model_applications/short_range/MODE_fcstFV3_obsGOES_BrightnessTemp.conf,model_applications/short_range/MODE_fcstFV3_obsGOES_BrightnessTemp/ci_overrides.conf 8::MODE_fcstFV3_obsGOES_BrightnessTempObjs:: model_applications/short_range/MODE_fcstFV3_obsGOES_BrightnessTempObjs.conf 9::METdbLoad_fcstFV3_obsGoes_BrightnessTemp::model_applications/short_range/METdbLoad_fcstFV3_obsGoes_BrightnessTemp.conf:: metdataio_env,metviewer +10::UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview::model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf:: metplotpy_env +11::UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile::model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf:: metplotpy_env +12::UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection::model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf:: metplotpy_env Category: space_weather diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf new file mode 100644 index 0000000000..3dada0c557 --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.conf @@ -0,0 +1,53 @@ +[config] + +# Documentation for this use case can be found at +# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview.html + +# For additional information, please see the METplus Users Guide. +# https://metplus.readthedocs.io/en/latest/Users_Guide + +### +# Processes to run +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list +### + +PROCESS_LIST = UserScript + + +### +# Time Info +# LOOP_BY options are INIT, VALID, RETRO, and REALTIME +# If set to INIT or RETRO: +# INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set +# If set to VALID or REALTIME: +# VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set +# LEAD_SEQ is the list of forecast leads to process +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control +### + +LOOP_BY = REALTIME +VALID_TIME_FMT = %Y +VALID_BEG = 2019 + +USER_SCRIPT_RUNTIME_FREQ = RUN_ONCE + + +### +# UserScript Settings +# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#userscript +### + +FV3_HISTORY_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/fv3_history.nc +GRID_SPEC_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/grid_spec.nc +PRESSURE_LEVEL = 500 +USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/planview_plot.py {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/physics_tendency_planview.yaml {FV3_HISTORY_FILE} {GRID_SPEC_FILE} tmp pbl -p {PRESSURE_LEVEL} -t 1 -v 20190504T14 -o {OUTPUT_BASE}/plots/short_range-physics_tendency_planview.png --nofineprint + +[user_env_vars] + +# Planview plot specific variables + +LOG_FILE = "planview.log" + +LOG_LEVEL = "DEBUG" + +YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/physics_tendency_planview.yaml diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/physics_tendency_planview.yaml b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/physics_tendency_planview.yaml new file mode 100644 index 0000000000..182a3f2f0f --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/physics_tendency_planview.yaml @@ -0,0 +1,71 @@ +# Names of tendency variables in model output (i.e. FV3 history file) +# Each type of tendency (moisture, temperature, wind component) has its own set of variables. +tendency_varnames: + spfh: + - dq3dt_deepcnv + - dq3dt_mp + - dq3dt_pbl + - dq3dt_shalcnv + - dq3dt_nophys + tmp: + - dt3dt_congwd + - dt3dt_deepcnv + - dt3dt_lw + - dt3dt_mp + - dt3dt_orogwd + - dt3dt_pbl + - dt3dt_rdamp + - dt3dt_shalcnv + - dt3dt_sw + - dt3dt_nophys + ugrd: + - du3dt_congwd + - du3dt_deepcnv + - du3dt_mp + - du3dt_orogwd + - du3dt_pbl + - du3dt_rdamp + - du3dt_shalcnv + - du3dt_nophys + vgrd: + - dv3dt_congwd + - dv3dt_deepcnv + - dv3dt_mp + - dv3dt_orogwd + - dv3dt_pbl + - dv3dt_rdamp + - dv3dt_shalcnv + - dv3dt_nophys + +# Name of variables in history file that contain the temperature, moisture, wind at time zero (initialization time). +time0_varname: + tmp : tmp_i + spfh: qv_i + ugrd: ugrd_i + vgrd: vgrd_i + + +# Name of the longitude and latitude variables in the grid specification file. +lon_name : "grid_lont" +lat_name : "grid_latt" + + +# Geographic extent (in degrees) of 2-D plots. +# (lonmin, lonmax, latmin, latmax) +extent: + - -122 + - -72.7 + - 22.1 + - 49.5 + +# Found FV3 standard_parallel by trial and error with smaller and smaller tolerances given to mepy.assign_y_x(). longitude is mean. +standard_parallel : 38.139 + +# color map +cmap : "Spectral_r" + +# resolution (dots per inch) of output +dpi : 150 + + + diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/planview_plot.py b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/planview_plot.py new file mode 100755 index 0000000000..cb23b2c24b --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_Planview/planview_plot.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import os +import sys +import yaml +from metplotpy.contributed.fv3_physics_tend import planview_fv3 + +''' +Generate the plan view plot. + +Requires a configuration file that has the history and grid input files in addition to the location of +the planview_fv3.py file +''' + + +if __name__ == "__main__": + planview_fv3.main() + diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf new file mode 100644 index 0000000000..3bfd4ed04c --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf @@ -0,0 +1,52 @@ +[config] + +# Documentation for this use case can be found at +# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.html + +# For additional information, please see the METplus Users Guide. +# https://metplus.readthedocs.io/en/latest/Users_Guide + +### +# Processes to run +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list +### + +PROCESS_LIST = UserScript + + +### +# Time Info +# LOOP_BY options are INIT, VALID, RETRO, and REALTIME +# If set to INIT or RETRO: +# INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set +# If set to VALID or REALTIME: +# VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set +# LEAD_SEQ is the list of forecast leads to process +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control +### + +LOOP_BY = REALTIME +VALID_TIME_FMT = %Y +VALID_BEG = 2019 + +USER_SCRIPT_RUNTIME_FREQ = RUN_ONCE + + +### +# UserScript Settings +# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#userscript +### + +FV3_HISTORY_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/fv3_history.nc +GRID_SPEC_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/grid_spec.nc +USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/vertical_cross_section_plot.py {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/physics_tendency_vertical_cross_section.yaml {FV3_HISTORY_FILE} {GRID_SPEC_FILE} tmp -t 2 -v 20190504T14 -s 32 -115 -e 34 -82 -o {OUTPUT_BASE}/plots/short_range-physics_tendency_vertical_cross_section.png --nofineprint + +[user_env_vars] + +# Vertical Cross Section plot specific variables + +LOG_FILE = "VerticalCrossSection.log" + +LOG_LEVEL = "DEBUG" + +YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/physics_tendency_vertical_cross_section.yaml diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/physics_tendency_vertical_cross_section.yaml b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/physics_tendency_vertical_cross_section.yaml new file mode 100644 index 0000000000..182a3f2f0f --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/physics_tendency_vertical_cross_section.yaml @@ -0,0 +1,71 @@ +# Names of tendency variables in model output (i.e. FV3 history file) +# Each type of tendency (moisture, temperature, wind component) has its own set of variables. +tendency_varnames: + spfh: + - dq3dt_deepcnv + - dq3dt_mp + - dq3dt_pbl + - dq3dt_shalcnv + - dq3dt_nophys + tmp: + - dt3dt_congwd + - dt3dt_deepcnv + - dt3dt_lw + - dt3dt_mp + - dt3dt_orogwd + - dt3dt_pbl + - dt3dt_rdamp + - dt3dt_shalcnv + - dt3dt_sw + - dt3dt_nophys + ugrd: + - du3dt_congwd + - du3dt_deepcnv + - du3dt_mp + - du3dt_orogwd + - du3dt_pbl + - du3dt_rdamp + - du3dt_shalcnv + - du3dt_nophys + vgrd: + - dv3dt_congwd + - dv3dt_deepcnv + - dv3dt_mp + - dv3dt_orogwd + - dv3dt_pbl + - dv3dt_rdamp + - dv3dt_shalcnv + - dv3dt_nophys + +# Name of variables in history file that contain the temperature, moisture, wind at time zero (initialization time). +time0_varname: + tmp : tmp_i + spfh: qv_i + ugrd: ugrd_i + vgrd: vgrd_i + + +# Name of the longitude and latitude variables in the grid specification file. +lon_name : "grid_lont" +lat_name : "grid_latt" + + +# Geographic extent (in degrees) of 2-D plots. +# (lonmin, lonmax, latmin, latmax) +extent: + - -122 + - -72.7 + - 22.1 + - 49.5 + +# Found FV3 standard_parallel by trial and error with smaller and smaller tolerances given to mepy.assign_y_x(). longitude is mean. +standard_parallel : 38.139 + +# color map +cmap : "Spectral_r" + +# resolution (dots per inch) of output +dpi : 150 + + + diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/vertical_cross_section_plot.py b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/vertical_cross_section_plot.py new file mode 100755 index 0000000000..09bd40b37b --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/vertical_cross_section_plot.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import os +import sys +import yaml +from metplotpy.contributed.fv3_physics_tend import cross_section_vert + +''' +Generate the vertical cross section plots. + +Requires a configuration file that has the history and grid input files in addition to the location of +the cross_section_vert.py file +''' + + +if __name__ == "__main__": + cross_section_vert.main() + diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf new file mode 100644 index 0000000000..12fff6efdd --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf @@ -0,0 +1,53 @@ +[config] + +# Documentation for this use case can be found at +# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.html + +# For additional information, please see the METplus Users Guide. +# https://metplus.readthedocs.io/en/latest/Users_Guide + +### +# Processes to run +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list +### + +PROCESS_LIST = UserScript + + +### +# Time Info +# LOOP_BY options are INIT, VALID, RETRO, and REALTIME +# If set to INIT or RETRO: +# INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set +# If set to VALID or REALTIME: +# VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set +# LEAD_SEQ is the list of forecast leads to process +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control +### + +LOOP_BY = REALTIME +VALID_TIME_FMT = %Y +VALID_BEG = 2019 + +USER_SCRIPT_RUNTIME_FREQ = RUN_ONCE + + +### +# UserScript Settings +# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#userscript +### + +FV3_HISTORY_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/fv3_history.nc +GRID_SPEC_FILE = {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/grid_spec.nc +USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/vertical_profile_plot.py {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/physics_tendency_vertical_profile.yaml {FV3_HISTORY_FILE} {GRID_SPEC_FILE} tmp -t 2 -v 20190504T14 -o {OUTPUT_BASE}/plots/short_range-physics_tendency_vertical_profile.png -s {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency/shapefiles/MID_CONUS --nofineprint + + +[user_env_vars] + +# VerticalProfile plot specific variables + +LOG_FILE = "VerticalProfile.log" + +LOG_LEVEL = "DEBUG" + +YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/physics_tendency_vertical_profile.yaml diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/physics_tendency_vertical_profile.yaml b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/physics_tendency_vertical_profile.yaml new file mode 100644 index 0000000000..182a3f2f0f --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/physics_tendency_vertical_profile.yaml @@ -0,0 +1,71 @@ +# Names of tendency variables in model output (i.e. FV3 history file) +# Each type of tendency (moisture, temperature, wind component) has its own set of variables. +tendency_varnames: + spfh: + - dq3dt_deepcnv + - dq3dt_mp + - dq3dt_pbl + - dq3dt_shalcnv + - dq3dt_nophys + tmp: + - dt3dt_congwd + - dt3dt_deepcnv + - dt3dt_lw + - dt3dt_mp + - dt3dt_orogwd + - dt3dt_pbl + - dt3dt_rdamp + - dt3dt_shalcnv + - dt3dt_sw + - dt3dt_nophys + ugrd: + - du3dt_congwd + - du3dt_deepcnv + - du3dt_mp + - du3dt_orogwd + - du3dt_pbl + - du3dt_rdamp + - du3dt_shalcnv + - du3dt_nophys + vgrd: + - dv3dt_congwd + - dv3dt_deepcnv + - dv3dt_mp + - dv3dt_orogwd + - dv3dt_pbl + - dv3dt_rdamp + - dv3dt_shalcnv + - dv3dt_nophys + +# Name of variables in history file that contain the temperature, moisture, wind at time zero (initialization time). +time0_varname: + tmp : tmp_i + spfh: qv_i + ugrd: ugrd_i + vgrd: vgrd_i + + +# Name of the longitude and latitude variables in the grid specification file. +lon_name : "grid_lont" +lat_name : "grid_latt" + + +# Geographic extent (in degrees) of 2-D plots. +# (lonmin, lonmax, latmin, latmax) +extent: + - -122 + - -72.7 + - 22.1 + - 49.5 + +# Found FV3 standard_parallel by trial and error with smaller and smaller tolerances given to mepy.assign_y_x(). longitude is mean. +standard_parallel : 38.139 + +# color map +cmap : "Spectral_r" + +# resolution (dots per inch) of output +dpi : 150 + + + diff --git a/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/vertical_profile_plot.py b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/vertical_profile_plot.py new file mode 100755 index 0000000000..7531fe5a55 --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/vertical_profile_plot.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import os +import sys +import yaml +from metplotpy.contributed.fv3_physics_tend import vert_profile_fv3 + +''' +Generate the vertical profile plot. + +Requires a configuration file that has the history and grid input files in addition to the location of +the vert_profile_fv3.py file +''' + + +if __name__ == "__main__": + vert_profile_fv3.main() +