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..559694484e --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection.conf @@ -0,0 +1,50 @@ +[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 +### + +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 {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/fv3_history.nc {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalCrossSection/grid_spec.nc 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 \ No newline at end of file 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..2aea5c6f24 --- /dev/null +++ b/parm/use_cases/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile.conf @@ -0,0 +1,50 @@ +[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 +### + +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 {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/fv3_history.nc {INPUT_BASE}/model_applications/short_range/UserScript_fcstFV3_fcstOnly_PhysicsTendency_VerticalProfile/grid_spec.nc 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_VerticalProfile/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 \ No newline at end of file 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() +