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

Feature 569 blocking driver #856

Merged
merged 103 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
a21be08
Add files via upload
CPKalb Sep 5, 2020
578daac
Add files via upload
CPKalb Sep 5, 2020
5a764da
Add files via upload
CPKalb Sep 5, 2020
85fb2d9
Delete Blocking_driver.py
CPKalb Sep 5, 2020
15a8fcd
Add files via upload
CPKalb Sep 5, 2020
4ff9306
Cleaned up the run_CBL so the smoothing had better logic
Sep 5, 2020
d8a4fa1
Fixed error in parm file
Sep 5, 2020
78a3758
Edits/cleanup/corrections to Blocking.py and Blocking_driver.py
Sep 10, 2020
4acd3e3
updated scripts
Sep 17, 2020
1ce38a0
Added call to CBL_plot code to generate the CBL plot.
bikegeek Sep 18, 2020
32e2e31
Updates to the driver plotting script
Sep 22, 2020
3f5c2a2
Delete Blocking_driver.py
CPKalb Sep 22, 2020
445ca0e
Delete Blocking.py
CPKalb Sep 22, 2020
871a466
Add files via upload
CPKalb Sep 22, 2020
4c25761
Merge branch 'feature_569_blocking_driver' of https://github.com/dtce…
Sep 22, 2020
767f941
updated blocking driver order
Sep 23, 2020
f4868ad
updated parm file
Sep 24, 2020
b9c1a0a
Added a command line parameter to grab a list of steps if desired
hankenstein2 Oct 19, 2020
6bf0a0f
Added more command line parameters to split up sections
hankenstein2 Oct 21, 2020
f36c58e
updates to Blocking programs for model data
Oct 26, 2020
1c3c26b
Merge branch 'feature_569_blocking_driver' of https://github.com/dtce…
Oct 26, 2020
e9d0a19
Updated the name of IBL plotting
Oct 27, 2020
2b7c2a2
New driver with options for syncing 2 datasets
Nov 26, 2020
dc57879
Updated documentation
Dec 4, 2020
8d763b5
Added documentation plot
Dec 5, 2020
4b9a429
Added plot
Dec 5, 2020
e2b8775
Another documentation file
Dec 5, 2020
b86dab1
Added Documentation plot
Dec 5, 2020
72557ab
Adding Weather Regime driver
Jan 8, 2021
f099386
Merge branch 'develop' into feature_569_blocking_driver
Jan 8, 2021
d9994ea
User Script setup
Jan 9, 2021
11789aa
Updated docs
Jan 9, 2021
9869efb
Updates to weather regime driver
Jan 10, 2021
44c2a66
Added plot directory
Jan 10, 2021
cfccdf3
Updates to Weather Regime Driver
Jan 23, 2021
def8c57
Updates to Blocking driver
Jan 23, 2021
d7ff1a8
Updates to Weather Regime driver
Jan 27, 2021
9853bae
Updates to weather regime driver
Feb 2, 2021
4302ce2
Added EOF changes to Weather Regime driver
Feb 5, 2021
8d2e3d6
Added EOF restructring to array
Feb 9, 2021
5a6c343
Updated location of Blocking driver scripts
Feb 10, 2021
9440d96
Added output file option for weather regime driver
Feb 11, 2021
76eb4eb
cleanup of drivers directory
Feb 11, 2021
0084410
Cleaned up UserScript Files
Feb 11, 2021
cdc7b70
Updated notes
Feb 11, 2021
16c71cb
Testing whether data is working
Mar 9, 2021
7bac7d7
Updated all_use_Cases.txt
Mar 9, 2021
87534bf
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 9, 2021
c34e4ab
Remove setting sys path for METplus and METplotpy
georgemccabe Mar 9, 2021
f0ef0d6
fixed path to blocking_s2s module in metplotpy
georgemccabe Mar 10, 2021
e37b246
Try removing MET_PYTHON_EXE because script
georgemccabe Mar 10, 2021
898a523
added new dependency for installing metcalcpy
georgemccabe Mar 10, 2021
7660390
added cartopy dependency for use cases
georgemccabe Mar 10, 2021
b66ac6b
cleaned up unused code and change to avoid using ush.master_metplus f…
georgemccabe Mar 10, 2021
d5f5589
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 10, 2021
3e28ded
updated driver script to avoid using ush file that doesn't exist in m…
georgemccabe Mar 10, 2021
ed3da7a
added scipy as python dependency for use cases
georgemccabe Mar 10, 2021
fe79ef6
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 11, 2021
79b38b7
Update Blocking_driver.py
CPKalb Mar 11, 2021
3920acc
Update Blocking.py
CPKalb Mar 11, 2021
46c325f
Update UserScript_obsERA_obsOnly_WeatherRegime.py
CPKalb Mar 14, 2021
98cbaec
Update UserScript_obsERA_obsOnly_WeatherRegime.py
CPKalb Mar 14, 2021
b063194
Update UserScript_obsERA_obsOnly_WeatherRegime.py
CPKalb Mar 14, 2021
5e3ddd9
Update UserScript_obsERA_obsOnly_WeatherRegime.py
CPKalb Mar 14, 2021
be23499
Update UserScript_obsERA_obsOnly_WeatherRegime.conf
CPKalb Mar 16, 2021
02d3c86
Update UserScript_obsERA_obsOnly_Blocking.conf
CPKalb Mar 16, 2021
e5a3220
Update UserScript_obsERA_obsOnly_WeatherRegime.conf
CPKalb Mar 16, 2021
27e06b7
Update UserScript_fcstGFS_obsERA_Blocking.conf
CPKalb Mar 16, 2021
083c585
Update UserScript_obsERA_obsOnly_Blocking.conf
CPKalb Mar 16, 2021
0f41bc7
Update UserScript_obsERA_obsOnly_WeatherRegime.conf
CPKalb Mar 16, 2021
ba5ac02
Fixed some variable paths
Mar 16, 2021
bd0883c
Fixed typo
Mar 16, 2021
7761121
Updated .conf file name
Mar 16, 2021
ee36af5
Updated documentation
Mar 16, 2021
adf01c6
Added useful error message
Mar 17, 2021
15afd5d
Fixed typo in blocking driver
Mar 17, 2021
64e1615
merged develop, resolved conflict, added eofs packge to s2s use cases
georgemccabe Mar 17, 2021
ced59f3
Testing a ci_overrides file
Mar 17, 2021
5dd6d50
Testing ci_overrides file
Mar 17, 2021
6f54f67
Update main.yml
CPKalb Mar 17, 2021
85dba4c
Fixed a path
Mar 17, 2021
55b6883
Updated documentation
Mar 17, 2021
ae50fd1
Updated documentation
CPKalb Mar 17, 2021
01f73c3
Path Testing
CPKalb Mar 17, 2021
4157bd1
Testing new paths with INPUT_BASE
CPKalb Mar 18, 2021
67e46ab
Fixed typo
CPKalb Mar 18, 2021
368bd08
Fixed typo
CPKalb Mar 18, 2021
23922f5
Added plotting back in
CPKalb Mar 18, 2021
d95a630
Testing
CPKalb Mar 18, 2021
6922d3b
Fixed typo
CPKalb Mar 18, 2021
c123a09
Changing data type
CPKalb Mar 18, 2021
d3df731
Fixed a bug
CPKalb Mar 18, 2021
68d83a1
Fixed a warning
Mar 22, 2021
f9a6ed4
Update UserScript_obsERA_obsOnly_WeatherRegime.py
CPKalb Mar 23, 2021
997aed8
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 24, 2021
ed9ac0a
added new dependency for metplotpy
georgemccabe Mar 24, 2021
4e86298
moved new use cases to their own section and added NEW label
georgemccabe Mar 24, 2021
10b7bfa
fixed formatting issues in documentation
georgemccabe Mar 24, 2021
81cca16
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 24, 2021
344b54b
removed scipy dependency because it is already obtained for METplotpy…
georgemccabe Mar 24, 2021
c33c67e
Updates to documentation
CPKalb Mar 24, 2021
1f32bc8
Updates to documentation and cleanup
CPKalb Mar 25, 2021
d402ac9
Merge branch 'develop' into feature_569_blocking_driver
georgemccabe Mar 25, 2021
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ jobs:
- "s2s:0"
- "space_weather:0-1"
- "tc_and_extra_tc:0-2"
- "s2s:1-3:NEW"
steps:
- uses: actions/download-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions ci/jobs/get_metcalcpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pip3 install matplotlib
pip3 install scipy
pip3 install pingouin

basedir=$(dirname "$0")
work_dir=$basedir/../..
Expand Down
1 change: 1 addition & 0 deletions ci/jobs/get_metplotpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pip3 install matplotlib
pip3 install scipy
pip3 install cmocean

basedir=$(dirname "$0")
work_dir=$basedir/../..
Expand Down
Binary file added docs/_static/s2s-IBL_frequency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/s2s-OBS_ERA_blocking_frequency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/s2s-OBS_ERA_weather_regime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
"""
Blocking Calculation: RegridDataPlane, PcpCombine, and Blocking python code
============================================================================

model_applications/
s2s/
UserScript_fcstGFS_obsERA_Blocking.py

"""

##############################################################################
# Scientific Objective
# --------------------
#
# To compute the Central Blocking Latitude, Instantaneousy blocked latitudes,
# Group Instantaneousy blocked latitudes, and the frequency of atmospheric
# blocking using the Pelly-Hoskins Method.

##############################################################################
# Datasets
# --------
#
# * Forecast dataset: GEFS Forecast 500 mb height.
# * Observation dataset: ERA Reanlaysis 500 mb height.

##############################################################################
# External Dependencies
# ---------------------
#
# You will need to use a version of Python 3.6+ that has the following packages installed::
#
# * numpy
# * netCDF4
# * datetime
# * bisect
# * scipy
#
# If the version of Python used to compile MET did not have these libraries at the time of compilation, you will need to add these packages or create a new Python environment with these packages.
#
# If this is the case, you will need to set the MET_PYTHON_EXE environment variable to the path of the version of Python you want to use. If you want this version of Python to only apply to this use case, set it in the [user_env_vars] section of a METplus configuration file.:
#
# [user_env_vars]
# MET_PYTHON_EXE = /path/to/python/with/required/packages/bin/python
#

##############################################################################
# METplus Components
# ------------------
#
# This use case runs the blocking driver script which runs the steps the user
# lists in STEPS_OBS. The possible steps are regridding, time averaging, computing a running
# mean, computing anomalies, computing CBLs (CBL), plotting CBLs (PLOTCBL), computing IBLs (IBL),
# plotting IBL frequency (PLOTIBL), computing GIBLs (GIBL), computing blocks (CALCBLOCKS), and
# plotting the blocking frequency (PLOTBLOCKS). Regridding, time averaging, running means, and
# anomaloies are set up in the UserScript .conf file and are formatted as follows:
# PROCESS_LIST = RegridDataPlane(regrid_fcst), RegridDataPlane(regrid_obs), PcpCombine(daily_mean_fcst), PcpCombine(daily_mean_obs), PcpCombine(running_mean_obs), PcpCombine(anomaly_obs), UserScript(script_blocking)
#
# The other steps are listed in the Blocking .conf file and are formatted as follows:
# FCST_STEPS = CBL+IBL+PLOTIBL
# OBS_STEPS = CBL+PLOTCBL+IBL+PLOTIBL

##############################################################################
# METplus Workflow
# ----------------
#
# The blocking python code is run for each time for the forecast and observations data. This
# example loops by init time for the model pre-processing, and valid time for the other steps.
# This version is set to only process the blocking steps (CBL, PLOTCBL, IBL, PLOTIBL), omitting
# the regridding, time averaging, running mean, and anomaly pre-processing steps. However, the
# configurations for pre-processing are available for user reference.

##############################################################################
# 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/s2s/UserScript_fcstGFS_obsERA_Blocking.py.
# The file UserScript_fcstGFS_obsERA_Blocking.conf runs the python program, however
# UserScript_fcstGFS_obsERA_Blocking/Blocking_fcstGFS_obsERA.conf sets the variables
# for all steps of the Blocking use case including data paths.
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking.conf

##############################################################################
# MET Configuration
# ---------------------
#
# METplus sets environment variables based on the values in the METplus configuration file.
# These variables are referenced in the MET configuration file. **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 not controlled by an environment variable, you can add additional environment variables to be set only within the METplus environment using the [user_env_vars] section of the METplus configuration files. See the 'User Defined Config' section on the 'System Configuration' page of the METplus User's Guide for more information.
#
# See the following files for more information about the environment variables set in this configuration file.
#
# parm/use_cases/met_tool_wrapper/RegridDataPlane/RegridDataPlane.py
# parm/use_cases/met_tool_wrapper/PCPCombine/PCPCOmbine_derive.py
# parm/use_cases/met_tool_wrapper/PCPCombine/PCPCOmbine_subtract.py

##############################################################################
# Python Scripts
# ----------------
#
# This use case uses Python scripts to perform the blocking calculation
#
# parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking_driver.py:
# This script calls the requested steps in the blocking analysis for a forecast, observation, or both. The possible
# steps are computing CBLs, plotting CBLs, computing IBLs, plotting IBLs, computing GIBLs, computing blocks, and
# plotting blocks.
#
# parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking.py:
# This script runs the requested steps, containing the code for computing CBLs, computing IBLs, computing GIBLs,
# and computing blocks.
#
# parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking_WeatherRegime_util.py:
# This script contains functions used by both the blocking anwd weather regime analysis, including the code for
# determining which steps the user wants to run, and finding and reading the input files in the format from the output
# pre-processing steps
#
# .. highlight:: python
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking_driver.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking/Blocking_WeatherRegime_util.py
#

##############################################################################
# Running METplus
# ---------------
#
# This use case is run in the following ways:
#
# 1) Passing in UserScript_fcstGFS_obsERA_Blocking.py then a user-specific system configuration file::
#
# master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking.py -c /path/to/user_system.conf
#
# 2) Modifying the configurations in parm/metplus_config, then passing in UserScript_fcstGFS_obsERA_Blocking.py::
#
# master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking.py
#
# 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
#

##############################################################################
# Expected 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 model_applications/s2s/Blocking (relative to **OUTPUT_BASE**) and will contain output
# for the steps requested. This may include the regridded data, daily averaged files, running mean files,
# and anomaly files. In addition, output CBL, IBL, and Blocking frequency plots can be generated. The location
# of these output plots can be specified as BLOCKING_PLOT_OUTPUT_DIR. If it is not specified, plots will be sent
# to model_applications/s2s/Blocking/plots (relative to **OUTPUT_BASE**).

##############################################################################
# Keywords
# --------
#
# sphinx_gallery_thumbnail_path = '_static/s2s-IBL_frequency.png'
#
# .. note:: `RegridDataPlaneUseCase <https://dtcenter.github.io/METplus/search.html?q=RegridDataPlaneUseCase&check_keywords=yes&area=default>`_,
# `PCPCombineUseCase <https://dtcenter.github.io/METplus/search.html?q=PCPCombineUseCase&check_keywords=yes&area=default>`_,
# `S2SAppUseCase <https://dtcenter.github.io/METplus/search.html?q=S2SAppUseCase&check_keywords=yes&area=default>`_,
# `NetCDFFileUseCase <https://dtcenter.github.io/METplus/search.html?q=NetCDFFileUseCase&chek_keywords=yes&area=default>`_,
# `GRIB2FileUseCase <https://dtcenter.github.io/METplus/search.html?q=GRIB2FileUseCase&check_keywords=yes&area=default>`_,
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
"""
Blocking Calculation: RegridDataPlane, PcpCombine, and Blocking python code
===========================================================================

model_applications/
s2s/
UserScript_obsERA_obsOnly_Blocking.py

"""

##############################################################################
# Scientific Objective
# --------------------
#
# To compute the Central Blocking Latitude, Instantaneousy blocked latitudes,
# Group Instantaneousy blocked latitudes, and the frequency of atmospheric
# blocking using the Pelly-Hoskins Method.

##############################################################################
# Datasets
# --------
#
# * Forecast dataset: None
# * Observation dataset: ERA Reanlaysis 500 mb height.

##############################################################################
# External Dependencies
# ---------------------
#
# You will need to use a version of Python 3.6+ that has the following packages installed::
#
# * numpy
# * netCDF4
# * datetime
# * bisect
# * scipy
#
# If the version of Python used to compile MET did not have these libraries at the time of compilation, you will need to add these packages or create a new Python environment with these packages.
#
# If this is the case, you will need to set the MET_PYTHON_EXE environment variable to the path of the version of Python you want to use. If you want this version of Python to only apply to this use case, set it in the [user_env_vars] section of a METplus configuration file.:
#
# [user_env_vars]
# MET_PYTHON_EXE = /path/to/python/with/required/packages/bin/python
#

##############################################################################
# METplus Components
# ------------------
#
# This use case runs the blocking driver script which runs the steps the user
# lists in STEPS_OBS. The possible steps are regridding, time averaging, computing a
# running mean, computing anomalies, computing CBLs (CBL), plotting CBLs (PLOTCBL),
# computing IBLs (IBL), plotting IBL frequency (PLOTIBL), computing GIBLs (GIBL),
# computing blocks (CALCBLOCKS), and plotting the blocking frequency (PLOTBLOCKS).
# Regridding, time averaging, running means, and anomaloies are set up in the UserScript
# .conf file and are formatted as follows:
# PROCESS_LIST = RegridDataPlane(regrid_obs), PcpCombine(daily_mean_obs), PcpCombine(running_mean_obs), PcpCombine(anomaly_obs), UserScript(script_blocking)
#
# The other steps are listed in the Blocking .conf file and are formatted as follows:
# OBS_STEPS = CBL+PLOTCBL+IBL+PLOTIBL+GIBL+CALCBLOCKS+PLOTBLOCKS
#

##############################################################################
# METplus Workflow
# ----------------
#
# The blocking python code is run for each time for the forecast and observations
# data. This example loops by valid time. This version is set to only process the blocking
# steps (CBL, PLOTCBL, IBL, PLOTIBL, GIBL, CALCBLOCKS, PLOTBLOCKS), omitting the regridding,
# time averaging, running mean, and anomaly pre-processing steps. However, the configurations
# for pre-processing are available for user reference.

##############################################################################
# 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/s2s/UserScript_obsERA_obsOnly_Blocking.py.
# The file UserScript_obsERA_obsOnly_Blocking.conf runs the python program, however
# UserScript_obsERA_obsOnly_Blocking/Regrid_PCP_obsERA_obsOnly_Blocking.conf sets the
# variables for all steps of the Blocking use case.
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking.conf

##############################################################################
# MET Configuration
# ---------------------
#
# METplus sets environment variables based on the values in the METplus configuration file.
# These variables are referenced in the MET configuration file. **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 not controlled by an environment variable, you can add additional environment variables to be set only within the METplus environment using the [user_env_vars] section of the METplus configuration files. See the 'User Defined Config' section on the 'System Configuration' page of the METplus User's Guide for more information.
#
# See the following files for more information about the environment variables set in this configuration file.
#
# parm/use_cases/met_tool_wrapper/RegridDataPlane/RegridDataPlane.py
# parm/use_cases/met_tool_wrapper/PCPCombine/PCPCOmbine_derive.py
# parm/use_cases/met_tool_wrapper/PCPCombine/PCPCOmbine_subtract.py

##############################################################################
# Python Scripts
# ----------------
#
# This use case uses Python scripts to perform the blocking calculation
#
# parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking_driver.py:
# This script calls the requested steps in the blocking analysis for a forecast, observation, or both. The possible
# steps are computing CBLs, plotting CBLs, computing IBLs, plotting IBLs, computing GIBLs, computing blocks, and
# plotting blocks.
#
# parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking.py:
# This script runs the requested steps, containing the code for computing CBLs, computing IBLs, computing GIBLs,
# and computing blocks.
#
# parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking_WeatherRegime_util.py:
# This script contains functions used by both the blocking anwd weather regime analysis, including the code for
# determining which steps the user wants to run, and finding and reading the input files in the format from the output
# pre-processing steps
#
# .. highlight:: python
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking_driver.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking/Blocking_WeatherRegime_util.py
#

##############################################################################
# Running METplus
# ---------------
#
# This use case is run in the following ways:
#
# 1) Passing in UserScript_obsERA_obsOnly_Blocking.py then a user-specific system configuration file::
#
# master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking.py -c /path/to/user_system.conf
#
# 2) Modifying the configurations in parm/metplus_config, then passing in UserScript_obsERA_obsOnly_Blocking.py::
#
# master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/s2s/UserScript_obsERA_obsOnly_Blocking.py
#
# 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
#

##############################################################################
# Expected 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 model_applications/s2s/Blocking (relative to **OUTPUT_BASE**) and will contain output
# for the steps requested. This may include the regridded data, daily averaged files, running mean files,
# and anomaly files. In addition, output CBL, IBL, and Blocking frequency plots can be generated. The location
# of these output plots can be specified as BLOCKING_PLOT_OUTPUT_DIR. If it is not specified, plots will be sent
# to model_applications/s2s/Blocking/plots (relative to **OUTPUT_BASE**).

##############################################################################
# Keywords
# --------
#
# sphinx_gallery_thumbnail_path = '_static/s2s-OBS_ERA_blocking_frequency.png'
#
# .. note:: `RegridDataPlaneUseCase <https://dtcenter.github.io/METplus/search.html?q=RegridDataPlaneUseCase&check_keywords=yes&area=default>`_,
# `PCPCombineUseCase <https://dtcenter.github.io/METplus/search.html?q=PCPCombineUseCase&check_keywords=yes&area=default>`_,
# `S2SAppUseCase <https://dtcenter.github.io/METplus/search.html?q=S2SAppUseCase&check_keywords=yes&area=default>`_,
# `NetCDFFileUseCase <https://dtcenter.github.io/METplus/search.html?q=NetCDFFileUseCase&chek_keywords=yes&area=default>`_,
# `GRIB2FileUseCase <https://dtcenter.github.io/METplus/search.html?q=GRIB2FileUseCase&check_keywords=yes&area=default>`_,
Loading