Skip to content

Commit

Permalink
per #1402, clean up use cases in air_quality_and_comp, climate, and d…
Browse files Browse the repository at this point in the history
…ata_assimilation
  • Loading branch information
georgemccabe committed Jul 14, 2022
1 parent c024bd7 commit 049fb1c
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 313 deletions.
Original file line number Diff line number Diff line change
@@ -1,135 +1,88 @@
# Ensemble Stat using Python Embedding Input

[config]

## Configuration-related settings such as the process list, begin and end times, etc.
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/air_quality_and_comp/EnsembleStat_fcstICAP_obsMODIS_aod.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 = EnsembleStat

# Looping by times: steps through each 'task' in the PROCESS_LIST for each
# defined time, and repeats until all times have been evaluated.
LOOP_ORDER = times

# LOOP_BY: Set to INIT to loop over initialization times
LOOP_BY = INIT
###
# 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
###

# Format of INIT_BEG and INT_END
LOOP_BY = INIT
INIT_TIME_FMT = %Y%m%d%H%M

# Start time for METplus run
INIT_BEG=201608150000

# End time for METplus run
INIT_END=201608150000

# Increment between METplus runs in seconds. Must be >= 60
INIT_INCREMENT=06H

# List of forecast leads to process
LEAD_SEQ = 12H

# Used in the MET config file for: model, output_prefix
MODEL = ICAP

# Name to identify observation data in output
OBTYPE = NRL_AOD

# The MET ensemble_stat logging level
# 0 quiet to 5 loud, Verbosity setting for MET ensemble_stat output, 2 is default.
# This takes precendence over the general LOG_MET_VERBOSITY set in metplus_logging.conf
#LOG_ENSEMBLE_STAT_VERBOSITY = 2

OBS_ENSEMBLE_STAT_WINDOW_BEGIN = -5400
OBS_ENSEMBLE_STAT_WINDOW_END = 5400

OBS_FILE_WINDOW_BEGIN = 0
OBS_FILE_WINDOW_END = 0

# number of expected members for ensemble. Should correspond with the
# number of items in the list for FCST_ENSEMBLE_STAT_INPUT_TEMPLATE
ENSEMBLE_STAT_N_MEMBERS = 7

# ens.ens_thresh value in the MET config file
# threshold for ratio of valid files to expected files to allow app to run
ENSEMBLE_STAT_ENS_THRESH = 0.1

# Used in the MET config file for: regrid to_grid field
ENSEMBLE_STAT_REGRID_TO_GRID = NONE

ENSEMBLE_STAT_OUTPUT_PREFIX =

ENSEMBLE_STAT_CONFIG_FILE = {PARM_BASE}/met_config/EnsembleStatConfig_wrapped

# ENSEMBLE_STAT_MET_OBS_ERR_TABLE is not required.
# If the variable is not defined, or the value is not set
# than the MET default is used.
#ENSEMBLE_STAT_MET_OBS_ERR_TABLE =

# Ensemble Variables and levels as specified in the ens field dictionary
# of the MET configuration file. Specify as ENS_VARn_NAME, ENS_VARn_LEVELS,
# (optional) ENS_VARn_OPTION
ENS_VAR1_NAME = {CONFIG_DIR}/forecast_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/icap_{init?fmt=%Y%m%d%H}_aod.nc:total_aod:{valid?fmt=%Y%m%d%H%M}:MET_PYTHON_INPUT_ARG
LOOP_ORDER = times

# Forecast Variables and levels as specified in the fcst field dictionary
# of the MET configuration file. Specify as FCST_VARn_NAME, FCST_VARn_LEVELS,
# (optional) FCST_VARn_OPTION
FCST_VAR1_NAME = {CONFIG_DIR}/forecast_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/icap_{init?fmt=%Y%m%d%H}_aod.nc:total_aod:{valid?fmt=%Y%m%d%H%M}:MET_PYTHON_INPUT_ARG

# Observation Variables and levels as specified in the obs field dictionary
# of the MET configuration file. Specify as OBS_VARn_NAME, OBS_VARn_LEVELS,
# (optional) OBS_VARn_OPTION
OBS_VAR1_NAME = {CONFIG_DIR}/analysis_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/AGGR_HOURLY_{valid?fmt=%Y%m%d}T{valid?fmt=%H%M}_1deg_global_archive.nc:aod_nrl_total:Mean
###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

ENS_ENSEMBLE_STAT_INPUT_DATATYPE = PYTHON_NUMPY

FCST_ENSEMBLE_STAT_INPUT_DATATYPE = PYTHON_NUMPY

OBS_ENSEMBLE_STAT_INPUT_GRID_DATATYPE = PYTHON_NUMPY

[dir]
# Use case configuration file directory
CONFIG_DIR = {PARM_BASE}/use_cases/model_applications/air_quality_and_comp/EnsembleStat_fcstICAP_obsMODIS_aod

# Forecast model input directory for ensemble_stat
FCST_ENSEMBLE_STAT_INPUT_DIR =
FCST_ENSEMBLE_STAT_INPUT_TEMPLATE = 0, 1, 2, 3, 4, 5, 6

# Point observation input dir for ensemble_stat
OBS_ENSEMBLE_STAT_POINT_INPUT_DIR =

# Grid observation input dir for ensemble_stat
OBS_ENSEMBLE_STAT_INPUT_GRID_DATATYPE = PYTHON_NUMPY
OBS_ENSEMBLE_STAT_GRID_INPUT_DIR = {INPUT_BASE}/model_applications/air_quality_and_comp/aod
OBS_ENSEMBLE_STAT_GRID_INPUT_TEMPLATE = PYTHON_NUMPY

# directory containing climatology mean input to EnsembleStat
# Not used in this example
ENSEMBLE_STAT_CLIMO_MEAN_INPUT_DIR =
ENSEMBLE_STAT_OUTPUT_DIR = {OUTPUT_BASE}

# directory containing climatology mean input to EnsembleStat
# Not used in this example
ENSEMBLE_STAT_CLIMO_STDEV_INPUT_DIR =

# output directory for ensemble_stat
ENSEMBLE_STAT_OUTPUT_DIR = {OUTPUT_BASE}
###
# Field Info
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info
###

CONFIG_DIR = {PARM_BASE}/use_cases/model_applications/air_quality_and_comp/EnsembleStat_fcstICAP_obsMODIS_aod

[filename_templates]
ENS_VAR1_NAME = {CONFIG_DIR}/forecast_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/icap_{init?fmt=%Y%m%d%H}_aod.nc:total_aod:{valid?fmt=%Y%m%d%H%M}:MET_PYTHON_INPUT_ARG

# FCST_ENSEMBLE_STAT_INPUT_TEMPLATE - comma separated list of ensemble members
# or a single line, - wildcard characters may be used.
FCST_VAR1_NAME = {CONFIG_DIR}/forecast_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/icap_{init?fmt=%Y%m%d%H}_aod.nc:total_aod:{valid?fmt=%Y%m%d%H%M}:MET_PYTHON_INPUT_ARG

# FCST_ENSEMBLE_STAT_INPUT_TEMPLATE = ????????gep?/d01_{init?fmt=%Y%m%d%H}_02400.grib
FCST_ENSEMBLE_STAT_INPUT_TEMPLATE = 0, 1, 2, 3, 4, 5, 6
OBS_VAR1_NAME = {CONFIG_DIR}/analysis_embedded.py {OBS_ENSEMBLE_STAT_GRID_INPUT_DIR}/AGGR_HOURLY_{valid?fmt=%Y%m%d}T{valid?fmt=%H%M}_1deg_global_archive.nc:aod_nrl_total:Mean

OBS_ENSEMBLE_STAT_POINT_INPUT_TEMPLATE =

OBS_ENSEMBLE_STAT_GRID_INPUT_TEMPLATE = PYTHON_NUMPY
###
# EnsembleStat Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#ensemblestat
###

MODEL = ICAP
OBTYPE = NRL_AOD

# Template to look for climatology input to EnsembleStat relative to ENSEMBLE_STAT_CLIMO_MEAN_INPUT_DIR
# Not used in this example
ENSEMBLE_STAT_CLIMO_MEAN_INPUT_TEMPLATE =
OBS_ENSEMBLE_STAT_WINDOW_BEGIN = -5400
OBS_ENSEMBLE_STAT_WINDOW_END = 5400

# Template to look for climatology input to EnsembleStat relative to ENSEMBLE_STAT_CLIMO_STDEV_INPUT_DIR
# Not used in this example
ENSEMBLE_STAT_CLIMO_STDEV_INPUT_TEMPLATE =
ENSEMBLE_STAT_N_MEMBERS = 7

ENSEMBLE_STAT_ENS_THRESH = 0.1

ENSEMBLE_STAT_OUTPUT_TEMPLATE =
ENSEMBLE_STAT_REGRID_TO_GRID = NONE

ENSEMBLE_STAT_OUTPUT_PREFIX =
Original file line number Diff line number Diff line change
@@ -1,127 +1,97 @@
# GridStat METplus Configuration for the CESM_vs_GFS climate model use case:
[config]

# List of applications to run - only GridStat for this case
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/climate/GridStat_fcstCESM_obsGFS_ConusTemp.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 = GridStat

# time looping - options are INIT, VALID, RETRO, and REALTIME

###
# 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
LOOP_BY = INIT
# LEAD_SEQ is the list of forecast leads to process
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control
###

# Format of VALID_BEG and VALID_END using % items
# %Y = 4 digit year, %m = 2 digit month, %d = 2 digit day, etc.
# see www.strftime.org for more information
# %Y%m%d%H expands to YYYYMMDDHH
LOOP_BY = INIT
INIT_TIME_FMT = %Y%m%d%H

# Start time for METplus run - must match INIT_TIME_FMT
INIT_BEG = 2014080100

# End time for METplus run - must match INIT_TIME_FMT
INIT_END = 2014080200

# Increment between METplus runs (in seconds if no units are specified)
# Must be >= 60 seconds
INIT_END = 2014080200
INIT_INCREMENT = 86400

# List of forecast leads to process for each run time (init or valid)
LEAD_SEQ = 6, 12

# Order of loops to process data - Options are times, processes
# times = run all items in the PROCESS_LIST for a single initialization
# time, then repeat until all times have been evaluated.
# processes = run each item in the PROCESS_LIST for all times
# specified, then repeat for the next item in the PROCESS_LIST.
LOOP_ORDER = times

# Location of MET config file to pass to the GridStat
GRID_STAT_CONFIG_FILE = {PARM_BASE}/met_config/GridStatConfig_wrapped

# Name to identify model (forecast) data in output
MODEL = CESM
###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

# Name to identify observation data in output (used in output file path)
OBTYPE = GFS_ANALYS
FCST_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/climate/CESM
FCST_GRID_STAT_INPUT_TEMPLATE = MetPlus.globe.{init?fmt=%Y-%m-%d}-00000.cam.h0.{init?fmt=%Y-%m-%d}-10800.nc

OBS_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/climate/gfs_analysis
OBS_GRID_STAT_INPUT_TEMPLATE = {valid?fmt=%Y%m%d}/gfsanl_4_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M}_000.grb2

GRID_STAT_OUTPUT_DIR = {OUTPUT_BASE}/climate/CESM_GridStat
GRID_STAT_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}


###
# Field Info
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info
###

GRID_STAT_ONCE_PER_FIELD = False

# Name of forecast variable 1, List of levels to evaluate for forecast variable 1, and
# List of thresholds to evaluate for each name/level combination for forecast variable 1
FCST_VAR1_NAME = TS
FCST_VAR1_LEVELS = "({valid?fmt=%Y%m%d_%H%M%S},*,*)"
FCST_VAR1_LEVELS = "({valid?fmt=%Y%m%d_%H%M%S},*,*)"
FCST_VAR1_THRESH = ge32.0, ge65.0, ge75.0
FCST_VAR1_OPTIONS = convert(x) = K_to_F(x);

# Name of observation variable, levels, and thresholds
# levels and thresh must be the same length as FCST_VAR1_LEVELS and FCST_VAR1_THRESH
OBS_VAR1_NAME = TMP
OBS_VAR1_LEVELS = Z2
OBS_VAR1_THRESH = ge32.0, ge65.0, ge75.0
OBS_VAR1_OPTIONS = convert(x) = K_to_F(x);

# Set to true to run GridStat separately for each field specified
# Set to false to create one run of GridStat per run time that
# includes all fields specified.
# Not used for this example
GRID_STAT_ONCE_PER_FIELD = False

GRID_STAT_REGRID_TO_GRID = FCST
###
# GridStat Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#gridstat
###

GRID_STAT_VERIFICATION_MASK = {FCST_GRID_STAT_INPUT_DIR}/conus_cesm_mask.nc
MODEL = CESM
OBTYPE = GFS_ANALYS

# Set to true if forecast data is probabilistic
FCST_IS_PROB = false
GRID_STAT_REGRID_TO_GRID = FCST

# Set to true if observation data is probabilistic
# Only used if configuring forecast data as the 'OBS' input
OBS_IS_PROB = false
GRID_STAT_VERIFICATION_MASK = {FCST_GRID_STAT_INPUT_DIR}/conus_cesm_mask.nc

# Output prefix set in grid_stat config file
GRID_STAT_OUTPUT_PREFIX={MODEL}_{CURRENT_OBS_NAME}_vs_{OBTYPE}

GRID_STAT_OUTPUT_FLAG_CTC = STAT
GRID_STAT_OUTPUT_FLAG_CTS = STAT
GRID_STAT_OUTPUT_FLAG_CNT = STAT
GRID_STAT_OUTPUT_FLAG_SL1L2 = STAT


GRID_STAT_NC_PAIRS_FLAG_LATLON = FALSE
GRID_STAT_NC_PAIRS_FLAG_RAW = FALSE
GRID_STAT_NC_PAIRS_FLAG_DIFF = FALSE
GRID_STAT_NC_PAIRS_FLAG_CLIMO = FALSE
GRID_STAT_NC_PAIRS_FLAG_APPLY_MASK = FALSE

GRID_STAT_INTERP_FIELD = NONE

# End of [config] section and start of [dir] section
[dir]

# directory containing forecast input to GridStat
FCST_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/climate/CESM

# directory containing observation input to GridStat
OBS_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/climate/gfs_analysis

# directory containing climatology input to GridStat
# Not used in this example
GRID_STAT_CLIMO_MEAN_INPUT_DIR =

# directory to write output from GridStat
GRID_STAT_OUTPUT_DIR = {OUTPUT_BASE}/climate/CESM_GridStat

# End of [dir] section and start of [filename_templates] section
[filename_templates]

# Template to look for forecast input to GridStat relative to FCST_GRID_STAT_INPUT_DIR
FCST_GRID_STAT_INPUT_TEMPLATE = MetPlus.globe.{init?fmt=%Y-%m-%d}-00000.cam.h0.{init?fmt=%Y-%m-%d}-10800.nc

# Template to look for observation input to GridStat relative to OBS_GRID_STAT_INPUT_DIR
OBS_GRID_STAT_INPUT_TEMPLATE = {valid?fmt=%Y%m%d}/gfsanl_4_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M}_000.grb2

# Optional subdirectories relative to GRID_STAT_OUTPUT_DIR to write output from GridStat
GRID_STAT_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}

# Template to look for climatology input to GridStat relative to GRID_STAT_CLIMO_MEAN_INPUT_DIR
# Not used in this example
GRID_STAT_CLIMO_MEAN_INPUT_TEMPLATE =
Loading

0 comments on commit 049fb1c

Please sign in to comment.