Skip to content

Commit

Permalink
Moving use case to new area
Browse files Browse the repository at this point in the history
  • Loading branch information
Christina Kalb committed Dec 19, 2024
1 parent 15cf58e commit 7ed1bdd
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 70 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Grid-Stat, MODE, Stat-Analysis, UserScript: GFS Clouds
Grid-Stat, MODE, Stat-Analysis, UserScript, Gen-Vx-Mask: GFS Clouds
============================================================================
model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf
model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf
"""
##############################################################################
Expand Down Expand Up @@ -50,9 +50,9 @@
# METplus Components
# ------------------
#
# This use case calls GridStat, MODE three times, StatAnalysis, and UserScript
# twice. Additionally, METcalcpy, METplotpy, and METdataio are required to run
# this use case. The METcalcpy scripts accessed include the following:
# This use case calls GenVxMask once, GridStat once, MODE three times, StatAnalysis
# once, and UserScript twice. Additionally, METcalcpy, METplotpy, and METdataio are
# required to run this use case. The METcalcpy scripts accessed include the following:
#
# * metcalcpy/util/read_env_vars_in_config.py
#
Expand Down Expand Up @@ -81,9 +81,9 @@
#
# **Sequence of forecast leads to process (LEAD_SEQ):** 0, 6, 12, 18
#
# The Grid-Stat, MODE, and Stat-Analysis tools are run for each time. This example
# loops by model initialization time. It processes one initialization time and three
# lead times for each for a total of 3 valid times, listed below.
# GenVxMask is run once. The Grid-Stat, MODE, and Stat-Analysis tools run for each time.
# This example loops by model initialization time. It processes one initialization time and
# three lead times for each for a total of 3 valid times, listed below.
#
# | **Valid:** 2024-03-07_00Z
# | **Forecast lead:** 00
Expand All @@ -107,10 +107,10 @@
#
# 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,
# parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf
# i.e. parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf

##############################################################################
# MET Configuration
Expand Down Expand Up @@ -159,15 +159,15 @@
# and high clouds for GSS, CSI, and Frequency bias with lead time. Input variables to both
# scripts are set in the [user_env_vars] section of the .conf file.
#
# .. dropdown:: parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py
# .. dropdown:: parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py
#
# .. highlight:: python
# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py
#
# .. dropdown:: parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py
# .. dropdown:: parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py
#
# .. highlight:: python
# .. literalinclude:: ../../../../parm/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py

##############################################################################
# Running METplus
Expand All @@ -176,7 +176,7 @@
# 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/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf /path/to/user_system.conf
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer.conf /path/to/user_system.conf
#
# See :ref:`running-metplus` for more information.

Expand All @@ -190,10 +190,16 @@
#
# 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/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer. There will
# be 5 output directories, grid_stat, mode, stat_analysis, reformatted, and plots
# The grid_stat directory will contain 3 .stat file sand 3 .nc files::
# {OUTPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer. There will
# be 6 directories with output data, masks, grid_stat, mode, stat_analysis, reformatted, and
# plots. The mask directory will contain an input mask and the following output mask file::
#
# * West_Pacific.nc
#
# The grid_stat directory will contain 4 .stat file sand 4 .nc files::
#
# * grid_stat_GFS_cloud_000000L_20240307_000000V_pairs.nc
# * grid_stat_GFS_cloud_000000L_20240307_000000V.stat
# * grid_stat_GFS_cloud_060000L_20240307_060000V_pairs.nc
# * grid_stat_GFS_cloud_060000L_20240307_060000V.stat
# * grid_stat_GFS_cloud_120000L_20240307_120000V_pairs.nc
Expand All @@ -203,6 +209,10 @@
#
# The mode directory will contain the following files::
#
# * mode_GFS_high_cloud_000000L_20240307_000000V_000000A_cts.txt
# * mode_GFS_high_cloud_000000L_20240307_000000V_000000A_obj.nc
# * mode_GFS_high_cloud_000000L_20240307_000000V_000000A_obj.txt
# * mode_GFS_high_cloud_000000L_20240307_000000V_000000A.ps
# * mode_GFS_high_cloud_060000L_20240307_060000V_000000A_cts.txt
# * mode_GFS_high_cloud_060000L_20240307_060000V_000000A_obj.nc
# * mode_GFS_high_cloud_060000L_20240307_060000V_000000A_obj.txt
Expand All @@ -215,6 +225,10 @@
# * mode_GFS_high_cloud_180000L_20240307_180000V_000000A_obj.nc
# * mode_GFS_high_cloud_180000L_20240307_180000V_000000A_obj.txt
# * mode_GFS_high_cloud_180000L_20240307_180000V_000000A.ps
# * mode_GFS_low_cloud_000000L_20240307_000000V_000000A_cts.txt
# * mode_GFS_low_cloud_000000L_20240307_000000V_000000A_obj.nc
# * mode_GFS_low_cloud_000000L_20240307_000000V_000000A_obj.txt
# * mode_GFS_low_cloud_000000L_20240307_000000V_000000A.ps
# * mode_GFS_low_cloud_060000L_20240307_060000V_000000A_cts.txt
# * mode_GFS_low_cloud_060000L_20240307_060000V_000000A_obj.nc
# * mode_GFS_low_cloud_060000L_20240307_060000V_000000A_obj.txt
Expand All @@ -227,6 +241,10 @@
# * mode_GFS_low_cloud_180000L_20240307_180000V_000000A_obj.nc
# * mode_GFS_low_cloud_180000L_20240307_180000V_000000A_obj.txt
# * mode_GFS_low_cloud_180000L_20240307_180000V_000000A.ps
# * mode_GFS_mid_cloud_000000L_20240307_000000V_000000A_cts.txt
# * mode_GFS_mid_cloud_000000L_20240307_000000V_000000A_obj.nc
# * mode_GFS_mid_cloud_000000L_20240307_000000V_000000A_obj.txt
# * mode_GFS_mid_cloud_000000L_20240307_000000V_000000A.ps
# * mode_GFS_mid_cloud_060000L_20240307_060000V_000000A_cts.txt
# * mode_GFS_mid_cloud_060000L_20240307_060000V_000000A_obj.nc
# * mode_GFS_mid_cloud_060000L_20240307_060000V_000000A_obj.txt
Expand All @@ -242,9 +260,10 @@
#
# The stat_analysis directory will contain the following files::
#
# * stat_analysis_GFS_ANAL_060000L_CTS.stat
# * stat_analysis_GFS_ANAL_120000L_CTS.stat
# * stat_analysis_GFS_ANAL_180000L_CTS.stat
# * stat_analysis_GFS_ANAL_West_Pacific_000000L_CTS.stat
# * stat_analysis_GFS_ANAL_West_Pacific_060000L_CTS.stat
# * stat_analysis_GFS_ANAL_West_Pacific_120000L_CTS.stat
# * stat_analysis_GFS_ANAL_West_Pacific_180000L_CTS.stat
#
# The reformatted directory will contain the following files::
#
Expand Down Expand Up @@ -307,4 +326,4 @@
# Navigate to the :ref:`quick-search` page to discover other similar use cases.
#
#
# sphinx_gallery_thumbnail_path = '_static/short_range-GridStat_fcstGFS_obsGFS_cloudFracLayer.png'
# sphinx_gallery_thumbnail_path = '_static/clouds-GridStat_fcstGFS_obsGFS_cloudFracLayer.png'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[config]

# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer.html
# https://metplus.readthedocs.io/en/latest/generated/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer.html

# For additional information, please see the METplus Users Guide.
# https://metplus.readthedocs.io/en/latest/Users_Guide
Expand All @@ -11,9 +11,8 @@
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list
###

#PROCESS_LIST = GenVxMask(mask)
#PROCESS_LIST = GridStat, Mode(low_cloud), Mode(mid_cloud), StatAnalysis(agg_lead), UserScript(reformat_CTS), UserScript(plot_stats)
PROCESS_LIST = GridStat, Mode(low_cloud), Mode(mid_cloud), Mode(high_cloud), StatAnalysis(agg_lead), UserScript(reformat_CTS), UserScript(plot_stats)
#PROCESS_LIST = GenVxMask(mask), GridStat, Mode(low_cloud), StatAnalysis(agg_lead), UserScript(reformat_CTS), UserScript(plot_stats)
PROCESS_LIST = GenVxMask(mask), GridStat, Mode(low_cloud), Mode(mid_cloud), Mode(high_cloud), StatAnalysis(agg_lead), UserScript(reformat_CTS), UserScript(plot_stats)


###
Expand All @@ -36,47 +35,48 @@ INIT_INCREMENT = 21600
LEAD_SEQ = 0, 6, 12, 18


#[mask]
## Make one mask for the entire time
#INIT_END = {INIT_BEG}
#LEAD_SEQ = 6
#
#####
###
###
#####
#
#GEN_VX_MASK_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/GFS_0.25
#GEN_VX_MASK_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/gfs.0p25.{init?fmt=%Y%m%d%H}.f{lead?fmt=%HHH}.grib2
#
#GEN_VX_MASK_INPUT_MASK_DIR = {INPUT_BASE}/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks
#GEN_VX_MASK_INPUT_MASK_TEMPLATE = US_ATL_PAC.poly
#
#GEN_VX_MASK_OUTPUT_DIR={OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks
#GEN_VX_MASK_OUTPUT_TEMPLATE = US_Atl_Pac.nc
#
####
## GenVxMask Settings
## https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#genvxmask
####
#
#GEN_VX_MASK_OPTIONS = -type poly
#
#[config]
[mask]
# Make one mask for the entire time
INIT_END = {INIT_BEG}
LEAD_SEQ = 6

###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

GEN_VX_MASK_INPUT_DIR = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/GFS_0.25
GEN_VX_MASK_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/gfs.0p25.{init?fmt=%Y%m%d%H}.f{lead?fmt=%HHH}.grib2

GEN_VX_MASK_INPUT_MASK_DIR = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks
GEN_VX_MASK_INPUT_MASK_TEMPLATE = West_Pacific.poly

GEN_VX_MASK_OUTPUT_DIR={OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks
GEN_VX_MASK_OUTPUT_TEMPLATE = West_Pacific.nc

###
# GenVxMask Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#genvxmask
###

GEN_VX_MASK_OPTIONS = -type poly


# Return to the config section
[config]

###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

FCST_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/GFS_0.25
FCST_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/GFS_0.25
FCST_GRID_STAT_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/gfs.0p25.{init?fmt=%Y%m%d%H}.f{lead?fmt=%HHH}.grib2

OBS_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/analysis
OBS_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/analysis
OBS_GRID_STAT_INPUT_TEMPLATE = {valid?fmt=%Y%m%d}/gfs.t{valid?fmt=%H}z.pgrb2.0p25.f000

GRID_STAT_OUTPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/grid_stat
GRID_STAT_OUTPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/grid_stat
GRID_STAT_OUTPUT_PREFIX = GFS_cloud

FCST_MODE_INPUT_DIR = {FCST_GRID_STAT_INPUT_DIR}
Expand All @@ -85,7 +85,7 @@ FCST_MODE_INPUT_TEMPLATE = {FCST_GRID_STAT_INPUT_TEMPLATE}
OBS_MODE_INPUT_DIR = {OBS_GRID_STAT_INPUT_DIR}
OBS_MODE_INPUT_TEMPLATE = {OBS_GRID_STAT_INPUT_TEMPLATE}

MODE_OUTPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/mode
MODE_OUTPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/mode


###
Expand Down Expand Up @@ -130,6 +130,9 @@ OBS_GRID_STAT_VAR3_THRESH = ge50
GRID_STAT_NEIGHBORHOOD_WIDTH = 5
GRID_STAT_NEIGHBORHOOD_SHAPE = SQUARE

#GRID_STAT
GRID_STAT_MASK_POLY = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks/West_Pacific.nc

GRID_STAT_OUTPUT_FLAG_CTC = STAT
GRID_STAT_OUTPUT_FLAG_CTS = STAT
GRID_STAT_OUTPUT_FLAG_SL1L2 = STAT
Expand Down Expand Up @@ -185,8 +188,8 @@ MODE_MATCH_FLAG = NO_MERGE
MODE_GRID_RES = 28
MODE_MASK_MISSING_FLAG = BOTH

#MODE_MASK_POLY_FLAG = BOTH
#MODE_VERIFICATION_MASK_TEMPLATE = /glade/derecho/scratch/kalb/NRL/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks/US_Atl_Pac.nc
MODE_MASK_POLY_FLAG = BOTH
MODE_VERIFICATION_MASK_TEMPLATE = {INPUT_BASE}/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/masks/West_Pacific.nc

MODE_NC_PAIRS_FLAG_POLYLINES = False

Expand Down Expand Up @@ -236,10 +239,10 @@ MODEL1 = GFS

STAT_ANALYSIS_CONFIG_FILE = {PARM_BASE}/met_config/STATAnalysisConfig_wrapped

MODEL1_STAT_ANALYSIS_LOOKIN_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/grid_stat
MODEL1_STAT_ANALYSIS_LOOKIN_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/grid_stat

STAT_ANALYSIS_OUTPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/stat_analysis
MODEL1_STAT_ANALYSIS_OUT_STAT_TEMPLATE = {model?fmt=%s}_ANAL_{lead?fmt=%H%M%S}L_CTS.stat
STAT_ANALYSIS_OUTPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/stat_analysis
MODEL1_STAT_ANALYSIS_OUT_STAT_TEMPLATE = stat_analysis_{model?fmt=%s}_ANAL_{vx_mask?fmt=%s}_{lead?fmt=%H%M%S}L_CTS.stat


###
Expand All @@ -250,8 +253,9 @@ STAT_ANALYSIS_JOB1 = -job aggregate_stat -line_type CTC -out_line_type CTS -by f

MODEL_LIST = {MODEL1}
FCST_LEAD_LIST = 00, 06, 12, 18
VX_MASK_LIST = West_Pacific

GROUP_LIST_ITEMS = MODEL_LIST
GROUP_LIST_ITEMS = MODEL_LIST, VX_MASK_LIST
LOOP_LIST_ITEMS = FCST_LEAD_LIST


Expand All @@ -266,13 +270,13 @@ PYTHONPATH = {METDATAIO_BASE}:{METDATAIO_BASE}/METdbLoad:{METDATAIO_BASE}/METdbL
# Settings for the reformatting of the CTS linetype, to later be iused for plotting
###
#
REFORMAT_YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS.yaml
REFORMAT_YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS.yaml

# Input directory where the .stat files you need to reformat are located
REFORMAT_INPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/stat_analysis
REFORMAT_INPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/stat_analysis

# Output directory to store the reformatted data
REFORMAT_OUTPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformatted
REFORMAT_OUTPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformatted

# Name of the output file containing reformatted data
REFORMAT_OUTPUT_FILENAME = reformat_CTS.data
Expand All @@ -286,7 +290,7 @@ REFORMAT_LINETYPE = CTS
# Settings for creating the plots of GSS, CSI, and frequency bias
###
# Directory where the YAML configurations for plotting are located
PLOTTING_YAML_CONFIG_DIR = {PARM_BASE}/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer
PLOTTING_YAML_CONFIG_DIR = {PARM_BASE}/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer

# YAML Configuration file list
PLOTTING_YAML_CONFIG_FILE_LIST = custom_line_GSS.yaml, custom_line_CSI.yaml, custom_line_FBIAS.yaml
Expand All @@ -295,7 +299,7 @@ PLOTTING_YAML_CONFIG_FILE_LIST = custom_line_GSS.yaml, custom_line_CSI.yaml, cus
PLOTTING_STAT_INPUT = {REFORMAT_OUTPUT_DIR}/{REFORMAT_OUTPUT_FILENAME}

# Output directory for plots
PLOTTING_OUTPUT_DIR = {OUTPUT_BASE}/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/plots
PLOTTING_OUTPUT_DIR = {OUTPUT_BASE}/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/plots

# List of the output filenames for plotting. This should have the same number of files as
# PLOTTING_YAML_CONFIG_FILE_LIST and they should be in the same order
Expand All @@ -312,7 +316,7 @@ PLOTTING_LOG_FILENAME = {LOG_DIR}/plotting.log
###

USER_SCRIPT_RUNTIME_FREQ = RUN_ONCE
USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py
USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/reformat_CTS_linetype.py


[plot_stats]
Expand All @@ -322,4 +326,4 @@ USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/GridS
###

USER_SCRIPT_RUNTIME_FREQ = RUN_ONCE
USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/short_range/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py
USER_SCRIPT_COMMAND = {PARM_BASE}/use_cases/model_applications/clouds/GridStat_fcstGFS_obsGFS_cloudFracLayer/plot_line_stats.py

0 comments on commit 7ed1bdd

Please sign in to comment.