From f3599e020c642ac840c4cd33b571a8f583db48ef Mon Sep 17 00:00:00 2001 From: Christina Kalb Date: Thu, 7 Nov 2024 00:34:43 -0700 Subject: [PATCH] Updating workflow descriptions --- .../s2s_mjo/UserScript_fcstGFS_obsERA_OMI.py | 35 ++-- .../s2s_mjo/UserScript_obsERA_obsOnly_OMI.py | 39 +++-- ...rScript_fcstGFS_obsERA_StratosphereBias.py | 35 ++-- ...Script_fcstGFS_obsERA_StratospherePolar.py | 158 ++++++++++++------ ...erScript_fcstGFS_obsERA_StratosphereQBO.py | 132 ++++++++++----- 5 files changed, 253 insertions(+), 146 deletions(-) diff --git a/docs/use_cases/model_applications/s2s_mjo/UserScript_fcstGFS_obsERA_OMI.py b/docs/use_cases/model_applications/s2s_mjo/UserScript_fcstGFS_obsERA_OMI.py index 42edfd733..602662b6d 100644 --- a/docs/use_cases/model_applications/s2s_mjo/UserScript_fcstGFS_obsERA_OMI.py +++ b/docs/use_cases/model_applications/s2s_mjo/UserScript_fcstGFS_obsERA_OMI.py @@ -57,21 +57,9 @@ # METplus Components # ------------------ # -# This use case calls UserScript twice. The first UserScript creates a list of the EOF files -# needed for the calculation. It is done separately since the EOF files are needed for each day -# of the year while the OMI calculation is on a separate time frame. The second UserScript runs the -# OMI calculation. -# -# There are three optional pre-processing steps for the OMI calculation. These include using PcpCombine to -# compute daily averages for the forecast, and using RegridDataPlane for both the model and observations -# to cut the grid to only include -20 to 20 latitude. These omitted steps can be turned back on by using the -# PROCESS_LIST that is commented out: -# -# PROCESS_LIST = PcpCombine(daily_mean_fcst), RegridDataPlane(regrid_obs_olr), RegridDataPlane(regrid_fcst_olr), UserScript(create_eof_filelist), UserScript(script_omi) -# -# Settings for the optional pre-processing steps can be found in the respective sections of the configuration, -# daily_mean_fcst, regrid_obs_olr, and regrid_fcst_olr. Data is not provided in the tarball to run these steps, -# but the configurations are provided for reference on how to set up these calculations. +# This use case calls UserScript twice, first to create a list of EOF files and then to run +# the OMI calculation. In addition, there are three optional pre-processing steps, PCP-Combine +# and two calls to Regrid-Data-Plane. # # This use case requires METcalcpy, METplotpy, and METdataio to run. The metcalcpy scripts accessed include the following: # @@ -98,8 +86,21 @@ # **Sequence of forecast leads to process (LEAD_SEQ):** 0 # # This use case does not loop, but the UserScript to create and EOF filelist is run once and the OMI driver script is -# run once for both the model and observations across the entire time period. The 3 optional pre-processing steps -# loop by valid time when they are turned on. The Phase diagram plots are created over a different time frame than the +# run once for both the model and observations across the entire time period. The EOF filelist is created separately +# since the EOF files are needed for each day of the year while the OMI calculation is on a separate time frame. + +# The 3 optional pre-processing steps loop by valid time when they are turned on. The steps include using PcpCombine to +# compute daily averages for the forecast, and using RegridDataPlane for both the model and observations +# to cut the grid to only include -20 to 20 latitude. These omitted steps can be turned back on by using the +# PROCESS_LIST that is commented out: +# +# PROCESS_LIST = PcpCombine(daily_mean_fcst), RegridDataPlane(regrid_obs_olr), RegridDataPlane(regrid_fcst_olr), UserScript(create_eof_filelist), UserScript(script_omi) +# +# Settings for the optional pre-processing steps can be found in the respective sections of the configuration, +# daily_mean_fcst, regrid_obs_olr, and regrid_fcst_olr. Data is not provided in the tarball to run these steps, +# but the configurations are provided for reference on how to set up these calculations. +# +# The Phase diagram plots are created over a different time frame than the # calculation, 01-01-2017 to 03-31-2017 for both plots. ############################################################################## diff --git a/docs/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_OMI.py b/docs/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_OMI.py index 0a1a95549..3aba1737f 100644 --- a/docs/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_OMI.py +++ b/docs/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_OMI.py @@ -56,31 +56,20 @@ # METplus Components # ------------------ # -# This use case calls UserScript twice. The first UserScript creates a list of the EOF files -# needed for the calculation. It is done separately since the EOF files are needed for each day -# of the year while the OMI calculation is on a separate time frame. The second UserScript runs the -# OMI calculation. -# -# There is one optional pre-processing steps for the OMI calculation, using RegridDataPlane which cuts -# the observation grid to only include -20 to 20 latitude. This omitted step can be turned back on by -# using the PROCESS_LIST that is commented out: -# -# PROCESS_LIST = RegridDataPlane(regrid_obs_olr), UserScript(create_eof_filelist), UserScript(script_omi) -# -# Settings for the optional pre-processing step can be found in the regrid_obs_olr section of the configuration. -# Data is not provided in the tarball to run this steps, but the configurations is provided for reference on -# how to set up this step. +# This use case calls UserScript twice, first to create a list of EOF files and then to run +# the OMI calculation. In addition, there are three optional pre-processing steps, PCP-Combine +# and two calls to Regrid-Data-Plane. # # This use case requires METcalcpy, METplotpy, and METdataio to run. The metcalcpy scripts accessed include the following: - +# # * metcalcpy/contributed/rmm_omi/compute_mjo_indices.py # # The METplotpy scripts accessed include the following: - -# * metplotpy/contributed/mjo_rmm_omi/plot_mjo_indioces.py +# +# * metplotpy/contributed/mjo_rmm_omi/plot_mjo_indioces.py # # The METdataio scripts accessed include the following: - +# # * METreadnc/util/read_netcdf.py ############################################################################## @@ -96,8 +85,18 @@ # **Sequence of forecast leads to process (LEAD_SEQ):** 0 # # This use case does not loop, but the UserScript to create and EOF filelist is run once and the OMI driver script is -# run once. The optional pre-processing step loops by valid time. The Phase diagram plot is created over a different time -# frame than the calculation, 10-01-2012 to 03-30-2012. +# run once. The EOF filelist is done separately since the EOF files are needed for each day of the year while the OMI +# calculation is on a separate time frame.The optional pre-processing step loops by valid time. The optional +# pre-processing step uses Regrid-Data-Plane to cut the observation grid to only include -20 to 20 latitude. This +# omitted step can be turned back on by using the PROCESS_LIST that is commented out: +# +# PROCESS_LIST = RegridDataPlane(regrid_obs_olr), UserScript(create_eof_filelist), UserScript(script_omi) +# +# Settings for the optional pre-processing step can be found in the regrid_obs_olr section of the configuration. +# Data is not provided in the tarball to run this steps, but the configurations is provided for reference on +# how to set up this step. + +# The Phase diagram plot is created over a different time frame than the calculation, 10-01-2012 to 03-30-2012. ############################################################################## # METplus Configuration diff --git a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias.py b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias.py index 0daae3d1d..f91274f5b 100644 --- a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias.py +++ b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias.py @@ -59,22 +59,20 @@ # ------------------ # # This use case calls UserScript first, Series-Analysis, and then UserScript -# a second time. The first call to UserScript runs zonal_mean_driver.py. This script -# computes zonal and meridional mean data from the directional_means program in -# METplotpy. Then, Series-Analysis is run on the zonal mean output to compute -# continuous statistics. Finally, the second call to UserScript runs bias_plot_driver.py -# which creates bias plots for temperature and wind. +# a second time. METcalcpy, METplotpy, and METdataio are needed for this use case to run. +# The metcalcpy scripts accessed include the following: # -# METcalcpy, METplotpy, and METdataio are needed for this use case to run. The metcalcpy -# scripts accessed include the following: # * metcalcpy/pre_processing/directional_means.py # # The METplotpy scripts accessed include the following: +# # * metplotpy/stratosphere_diagnostics/stratosphere_plots.py # # The METdataio scripts accessed include the following: +# # * METreadnc/util/read_netcdf.py + ############################################################################## # METplus Workflow # ---------------- @@ -88,7 +86,14 @@ # **Sequence of forecast leads to process (LEAD_SEQ):** 24 # # This use case does not loop. The two calls to UserScript are run once. Series- -# Analysis is also run once. +# Analysis is also run once. The first call to UserScript runs zonal_mean_driver.py. +# This script computes zonal and meridional mean data from the directional_means program in +# METplotpy. Then, Series-Analysis is run on the zonal mean output to compute +# continuous statistics. Finally, the second call to UserScript runs bias_plot_driver.py +# which creates bias plots for temperature and wind. +# +# METcalcpy 3.0.0 or higher, METplotpy 3.0.0 or higher, and METdataio 2.1 or higher are needed +# for this use case. ############################################################################## # METplus Configuration @@ -115,7 +120,6 @@ # # .. dropdown:: SeriesAnalysisConfig_wrapped # -# .. highlight:: bash # .. literalinclude:: ../../../../parm/met_config/SeriesAnalysisConfig_wrapped ############################################################################## @@ -158,7 +162,7 @@ # --------------- # # Pass the use case configuration file to the run_metplus.py script along with any -# user-specific system configuration files if desired: +# user-specific system configuration files if desired:: # # run_metplus.py /path/to/METplus/parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias.conf /path/to/user_system.conf # @@ -172,10 +176,11 @@ # # INFO: METplus has successfully finished running. # -# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. Output for this use -# case will be found in model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereBias (relative -# to **OUTPUT_BASE**). The output includes the zonal mean files for the forecast and observations, the -# output from Series-Analysis, and bias plots. There are two bias plots output:: +# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. +# Output for this use case will be found in +# {OUTPUT_BASE}/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar +# The output includes the netCDF zonal mean files for the forecast and observations, netCDF output +# from Series-Analysis, and bias plots. There are two bias plots output:: # # * plots/GFS_ERA_ME_2018_02_zonal_mean_T.png # * plots/GFS_ERA_ME_2018_02_zonal_mean_U.png @@ -202,7 +207,7 @@ # * SeriesAnalysis/series_analysis_files_obs_init_ALL_valid_ALL_lead_ALL.txt # # The zonal mean output includes 28 files for the forecast -# and observations, one for each day. The file format for February 1 is: +# and observations, one for each day. The file format for February 1 is:: # # * FCST/FCST_zonal_mean_U_T_20180201_000000.nc # * OBS/OBS_zonal_mean_U_T_20180201_000000.nc diff --git a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.py b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.py index e4c8af185..5708df011 100644 --- a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.py +++ b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.py @@ -8,47 +8,88 @@ """ +############################################################################## +# .. contents:: +# :depth: 1 +# :local: +# :backlinks: none + ############################################################################## # Scientific Objective # -------------------- # +# Many common modes of variability in the troposphere have stratospheric teloconnection +# pathways. Thus, the stratosphere can be a source of predictability for surface weather. +# # This use case calls functions in METcalcpy to create polar cap temperature # and polar vortex wind. It then runs Stat-Analysis on the output zonal means # and creates a contour plot of bias in lead time and pressure level. + +############################################################################## +# Version Added +# ------------- # +# METplus version 6.0 ############################################################################## # Datasets # -------- # -# * Forecast dataset: GFS Forecast U and T at multiple pressure levels -# * Observation dataset: ERA Reanlaysis U and T at multiple pressure levels +# **Forecast:** GFS Forecast U and T at multiple pressure levels +# +# **Observation:** ERA Reanlaysis U and T at multiple pressure levels # -# Data for this use case is not contained in the sample data tar files due to -# its size. Rather, it is stored as additional data in a separate tar file. +# **Climatology:** None # +# **Location:** Data for this use case is not contained in the sample data tar files due to +# its size. Rather, it is stored as additional data in a separate tar file, named +# additional_data_UserScript_fcstGFS_obsERA_StratosphereQBO.tar.gz at +# https://dtcenter.ucar.edu/dfiles/code/METplus/METplus_Data/v6.0/. ############################################################################## # METplus Components # ------------------ # -# This use case runs the UserScript wrapper tool to run a user provided script, -# in this case, polar_t_u_driver.py which output data into MET's matched pair format. -# It then runs Stat-Analysis to compute the bias and RMSE, and another UserScript, -# bias_rmse_plot_driver.py, to create the plots. +# This use case runs UserScript twice and Stat-Analysis once. The UserScripts compute +# polar cap temperature and polar vortex wind and create plots. METcalcpy, METplotpy, +# and METdataio are needed for this use case. The metcalcpy scripts accessed include +# the following: +# +# * metcalcpy/pre_processing/directional_means.py +# +# * metcalcpy/util/write_mpr.py +# +# The METplotpy scripts accessed include the following: +# +# * metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py +# +# The METdataio scripts accessed include the following: # +# * METreadnc/util/read_netcdf.py + ############################################################################## # METplus Workflow # ---------------- # -# This use case loops over lead times for the first UserScript and Stat-Analysis, -# and the plotting proceeds over the entire time period -# -# UserScript: Computes polar cap temperature and polar vortex U -# Stat-Analysis: Computes ME and RMSE on polar cap temperature and polar vortex U -# UserScript: Creates ME and RMSE plots +# **Beginning time (VALID_BEG):** 2018-02-01 +# +# **End time (VALID_END):** 2018-02-28 +# +# **Increment between beginning and end times (VALID_INCREMENT):** 30 days +# +# **Sequence of forecast leads to process (LEAD_SEQ):** 0 - 384h at 24h intervals # +# This use case loops over lead times for the first UserScript and Stat-Analysis, +# and the second UserScript runs once over the entire time period. The first UserScript +# runs polar_t_u_driver.py which computes polar cap temperature and polar vortex wind +# and outputs that data to .stat files in MET's matched pair format. Then, Stat-Analysis +# is run to compute bias and RMSE on the polar cap temperature and polar vortex wind. +# Finally, the second UserScript runs the bias_rmse_plot_driver.py which creates plots +# of bias and RMSE over lead time and pressure level. +# +# METcalcpy 3.0.0 or higher, METplotpy 3.0.0 or higher, and METdataio 2.1 or higher are needed +# for this use case ############################################################################## # METplus Configuration @@ -60,67 +101,65 @@ # # .. highlight:: bash # .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.conf -# ############################################################################# # MET Configuration # --------------------- # -# 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. +# 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. # # **YOU SHOULD NOT SET ANY OF THESE ENVIRONMENT VARIABLES YOURSELF! THEY WILL BE OVERWRITTEN BY METPLUS WHEN IT CALLS THE MET TOOLS!** # -# If there is a setting in the MET configuration file that is currently not supported by METplus you'd like to control, please refer to: +# If there is a setting in the MET configuration file that is currently +# not supported by METplus you’d like to control, please refer to: # :ref:`Overriding Unsupported MET config file settings` # -# **STATAnalysisConfig_wrapped** -# -# .. note:: See the :ref:`Series-Analysis MET Configuration` section of the User's Guide for more information on the environment variables used in the file below: -# -# .. highlight:: bash -# .. literalinclude:: ../../../../parm/met_config/STATAnalysisConfig_wrapped +# .. dropdown:: STATAnalysisConfig_wrapped # +# .. literalinclude:: ../../../../parm/met_config/STATAnalysisConfig_wrapped ############################################################################## # Python Embedding # ---------------- # # This use case does not use python embedding -# ############################################################################## -# Running METplus -# --------------- -# -# This use case can be run two ways: -# -# 1) Passing in UserScript_fcstGFS_obsERA_StratospherePolar.conf, -# then a user-specific system configuration file:: +# User Scripting +# -------------- # -# run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.conf -c /path/to/user_system.conf +# There are two python scripts in the is use case. The first, polar_t_u_driver.py reads in netCDF files for the +# forecast and observations and computes zonal means for temperature and wind. Then, polar cap temperature is +# computed by taking the meridional mean between 60 and 90 latitude, while polar vortex u is computed by taking +# the meridional mean between 50 and 80 latitude. This data is written to output files in MET's matched pair +# format. # -# 2) Modifying the configurations in parm/metplus_config, then passing in UserScript_fcstGFS_obsERA_StratospherePolar.conf: +# The second python script, bias_rmse_plot_driver reads in the output of Stat-Analysis and creates plots of bias +# and RMSE for polar cap temperature and polar vortex u. Variables input to this script are given in the +# [user_env_vars] section of the configuration file. # -# run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.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 -# -# and for the [exe] section, you will need to define the location of NON-MET executables. -# No executables are required for performing this use case. +# .. dropdown:: parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar/polar_t_u_driver.py +# +# .. highlight:: python +# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar/polar_t_u_driver.py # -# Example User Configuration File:: +# .. dropdown:: parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar/bias_rmse_plot_driver.py +# +# .. highlight:: python +# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar/bias_rmse_plot_driver.py + +############################################################################## +# Running METplus +# --------------- # -# [dir] -# INPUT_BASE = /path/to/sample/input/data -# OUTPUT_BASE = /path/to/output/dir -# MET_INSTALL_DIR = /path/to/met-X.Y +# Pass the use case configuration file to the run_metplus.py script along +# with any user-specific system configuration files if desired:: # +# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar.conf /path/to/user_system.conf # +# See :ref:`running-metplus` for more information. + ############################################################################## # Expected Output @@ -130,6 +169,27 @@ # # INFO: METplus has successfully finished running. # +# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. +# Output for this use case will be found in +# {OUTPUT_BASE}/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratospherePolar +# The output includes matched pair files, one for each lead time and valid time in mpr directory. +# The output files have the following format:: +# +# * polar_cap_T_stat_GFS_HH0000L_YYYYMMDD_000000V.stat +# * polar_cap_T_stat_GFS_HHH0000L_YYYYMMDD_000000V.stat +# +# Additionally, CNT statistics will be output to the StatAnalysis directory with one file for each lead +# time and variable. The files have the following format:: +# +# * GFS_ERA_20180201_20180228_HH0000L_PolarCapT_CNT.stat +# * GFS_ERA_20180201_20180228_HH0000L_PolarVortexU_CNT.stat +# +# Four plot are also output to the plots directory:: +# +# * ME_2018_02_polar_cap_T.png +# * ME_2018_02_polar_vortex_U.png +# * RMSE_2018_02_polar_cap_T.png +# * RMSE_2018_02_polar_vortex_U.png ############################################################################## # Keywords diff --git a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.py b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.py index 9e0dd09e6..ec3464a12 100644 --- a/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.py +++ b/docs/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.py @@ -8,6 +8,12 @@ """ +############################################################################## +# .. contents:: +# :depth: 1 +# :local: +# :backlinks: none + ############################################################################## # Scientific Objective # -------------------- @@ -20,54 +26,77 @@ # plotted to compare the speed of propagation of QBO in the model versus observations. # Continuous statistics (ME, RMSE, etc.) are calculated for U at 30 and 50mb, and are also # computed separately to evaluate QBO in the easterly phase versus the westerly phase. -# ############################################################################## # Version Added # ------------- # # METplus version 6.0 -# ############################################################################## # Datasets # -------- # -# * GFS: 0-24 hour forecasts for 10/2017 - 2/2018 -# * ERA: 30 year climatology for EOFs and 10/2017 - 2/2018 +# **Forecast:** GFS 0-24 hour forecasts for 10/2017 - 2/2018 +# +# **Observation:** ERA 30 year climatology for EOFs and 10/2017 - 2/2018 +# +# **EOFs:** EOFs computed for 10/1991 - 12/2020 # -# Data for this use case is not contained in the sample data tar files due to -# its size. Rather, it is stored as additional data in a separate tar file, +# **Location:** Data for this use case is not contained in the sample data tar files +# due to its size. Rather, it is stored as additional data in a separate tar file, # named additional_data_UserScript_fcstGFS_obsERA_StratosphereQBO.tar.gz at # https://dtcenter.ucar.edu/dfiles/code/METplus/METplus_Data/v6.0/. -# ############################################################################## # METplus Components # ------------------ # -# This use case calls UserScript and StatAnalysis. The UserScript accesses calculation -# in METcalcpy, METplotpy, and METdataio. For it to run, the following versions of those -# repositories are needed, METcalcpy 3.0.0, METplotpy 3.0.0, and METdataio 2.1. +# This use case calls UserScript once and StatAnalysis once. Additionally, METcalcpy, +# METplotpy, and METdataio are required to run. The metcalcpy scripts accessed include +# the following: +# +# * metcalcpy/pre_processing/directional_means.py +# +# * metcalcpy/util/write_mpr.py +# +# The METplotpy scripts accessed include the following: +# +# * metplotpy/contributed/stratosphere_diagnostics/stratosphere_plots.py +# +# The METdataio scripts accessed include the following: # +# * METreadnc/util/read_netcdf.py ############################################################################## # METplus Workflow # ---------------- # -# This use case does not loop but UserScript and StatAnalysis are each run once. -# The UserScript call runs the driver script stratosphere_qbo_driver.py which first -# computes zonal and meridional means using directional_means.py in METcalcpy on U from -# -10 S to 10N latitude. Then, an EOF analysis is performed on this zonal and meridional -# mean data, and two phase diagrams of QBO are created using the plot_qbo_phase_circuits and -# plot_qbo_phase_space functions from stratosphere_plots.py in METplotpy. Additionally the -# zonal and meridional mean at 30 and 50mb are output as time series to matched pair (MPR) -# files using write_mpr.py in METcalcpy and are also plotted as timeseries using the -# plot_u_timeseries function from stratosphere_plots.py in METplotpy. Finally StatAnalysis is -# run on the 30 and 50mb U mpr files to compute the bias (ME). +# **Beginning time (INIT_BEG):** 2018-02-01 +# +# **End time (INIT_END):** 2018-02-28 +# +# **Increment between beginning and end times (INIT_INCREMENT):** 30 days +# +# **Sequence of forecast leads to process (LEAD_SEQ):** 0, 3, 6, 9, 12, 15, 18, 21 hours +# +# This use case does not loop but UserScript and StatAnalysis are each run once using data +# from the entire time period. he UserScript call runs stratosphere_qbo_driver.py to compute +# a QBO index. The output QBO index is run through Stat-Analysis to compute the bias. # -# METcalcpy, METplotpy and METdataio are needed for this use case to run. +# There is an optional step to calculate EOFs rather than providing an input file. This +# calculation is performed inside qbo_driver.py, but requires building a list of input +# files to use to create EOFs using a call to UserScript. This step is turned off due to +# the length of time it needs to run, but can be turned back on using the PROCESS_LIST that +# is commented out. # +# PROCESS_LIST = UserScript(create_obs_eofs_filelist), UserScript(compute_plot_qbo), StatAnalysis(qbo_bias) +# +# Other changes needed to calculate EOFs are described in the User Scripting section below. Data is not +# provided for the EOF calculation. +# +# METcalcpy 3.0.0 or higher, METplotpy 3.0.0 or higher, and METdataio 2.1 or higher are needed +# for this use case. ############################################################################## # METplus Configuration @@ -79,54 +108,64 @@ # # .. highlight:: bash # .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.conf -# ############################################################################# # MET Configuration # --------------------- # -# 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. +# 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. # # **YOU SHOULD NOT SET ANY OF THESE ENVIRONMENT VARIABLES YOURSELF! THEY WILL BE OVERWRITTEN BY METPLUS WHEN IT CALLS THE MET TOOLS!** # -# If there is a setting in the MET configuration file that is currently not supported by METplus you'd like to control, please refer to: +# If there is a setting in the MET configuration file that is currently +# not supported by METplus you’d like to control, please refer to: # :ref:`Overriding Unsupported MET config file settings` # -# **StatAnalysisConfig_wrapped** -# -# .. note:: See the :ref:`Stat-Analysis MET Configuration` section of the User's Guide for more information on the environment variables used in the file below: -# -# .. highlight:: bash -# .. literalinclude:: ../../../../parm/met_config/STATAnalysisConfig_wrapped +# .. dropdown:: StatAnalysisConfig_wrapped # +# .. literalinclude:: ../../../../parm/met_config/STATAnalysisConfig_wrapped ############################################################################## # Python Embedding # ---------------- # # This use case does not use python embedding -# ############################################################################## -# Python Scripting -# ---------------- +# User Scripting +# -------------- # -# This use case runs the stratospher_qbo_driver.py python script. The processing -# performed by the script are detailed in the METplus Workflow section above. +# This use case runs the stratosphere_qbo_driver.py python script, which first +# computes zonal and meridional means using directional_means.py in METcalcpy on U from +# -10 S to 10N latitude. Then, an EOF analysis is performed on this zonal and meridional +# mean data, and two phase diagrams of QBO are created using the plot_qbo_phase_circuits and +# plot_qbo_phase_space functions from stratosphere_plots.py in METplotpy. Additionally the +# zonal and meridional mean at 30 and 50mb are output as time series to matched pair (MPR) +# files using write_mpr.py in METcalcpy and are also plotted as timeseries using the +# plot_u_timeseries function from stratosphere_plots.py in METplotpy. Finally StatAnalysis is +# run on the 30 and 50mb U mpr files to compute the bias (ME). # +# Variables input to this script are given in the [user_env_vars] section of the configuration +# file. As mentioned above, the option exists to compute EOFs inside the script. To do this, +# the COMPUTE_EOF_ZONAL_MERIDIONAL_MEAN variable should be set to true, and an input file list +# provided by turning on the UserScipt call for [create_eof_filelist]. +# +# # .. dropdown:: parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO/stratosphere_qbo_driver.py +# +# .. highlight:: python +# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO/stratosphere_qbo_driver.py ############################################################################## # Running METplus # --------------- # # Pass the use case configuration file to the run_metplus.py script along with any -# user-specific system configuration files if desired: +# user-specific system configuration files if desired:: # # run_metplus.py /path/to/METplus/parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.conf /path/to/user_system.conf # # See :ref:`running-metplus` for more information. -# ############################################################################## # Expected Output @@ -136,22 +175,25 @@ # # INFO: METplus has successfully finished running. # -# There should be 4 graphics output to the plot directory in the location set as OUTPUT_DIR -# in the [user_env_vars] section of the configuration file: +# # Refer to the value set for **OUTPUT_BASE** to find where the output data was generated. +# Output for this use case will be found in +# {OUTPUT_BASE}/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO +# There should be 4 graphics output to the plot directory:: # # * ERA_GFS_QBO_circuits.png # * ERA5_QBO_PhaseSpace.png # * ERA_GFS_timeseries_30mb_u_201710_201802.png # * ERA_GFS_timeseries_50mb_u_201710_201802.png # -# The name of the output graphics can be changed using PLOT_PHASE_CIRCUITS_OUTPUT_NAME, -# PLOT_PHASE_SPACE_OUTPUT_NAME, PLOT_TIME_SERIES_OUTPUT_NAME_30, and PLOT_TIME_SERIES_OUTPUT_NAME_50 -# also in the [user_env_vars] section. Additionally many matched pair .stat files will be output to -# OUTPUT_DIR/mpr, and tow computed continuous statistics will be output to OUTPUT_DIR/StatAnalysis: +# Additionally matched pair .stat files for each day will be output to the mpr directory. These +# files have the following format:: +# +# * qbo_u_GFS_210000L_YYYYMMDD_000000V.stat +# +# Two computed continuous statistics will be output to the StatAnalysis directory:: # # * GFS_ERA_20171001_20180228_210000L_zonal_wind_byphase_CNT.stat # * GFS_ERA_20171001_20180228_210000L_zonal_wind_CNT.stat -# ############################################################################## # Keywords