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

Bugfix #2235 rename multivar_itensity to multivar_intensity_flag #2236

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10661,8 +10661,8 @@ METplus Configuration Glossary

| *Used by:* TCDiag

MODE_MULTIVAR_INTENSITY
Specify the value for 'multivar_intensity' in the MET configuration file for MODE.
MODE_MULTIVAR_INTENSITY_FLAG
Specify the value for 'multivar_intensity_flag' in the MET configuration file for MODE.

| *Used by:* MODE

Expand Down
8 changes: 4 additions & 4 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4055,7 +4055,7 @@ METplus Configuration
| :term:`FCST_MODE_IS_PROB`
| :term:`FCST_MODE_PROB_IN_GRIB_PDS`
| :term:`MODE_MULTIVAR_LOGIC`
| :term:`MODE_MULTIVAR_INTENSITY`
| :term:`MODE_MULTIVAR_INTENSITY_FLAG`
| :term:`FCST_MODE_VAR<n>_NAME`
| :term:`FCST_MODE_VAR<n>_LEVELS`
| :term:`FCST_MODE_VAR<n>_THRESH`
Expand Down Expand Up @@ -4189,16 +4189,16 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`MODE_MULTIVAR_LOGIC`
- multivar_logic

**${METPLUS_MULTIVAR_INTENSITY}**
**${METPLUS_MULTIVAR_INTENSITY_FLAG}**

.. list-table::
:widths: 5 5
:header-rows: 0

* - METplus Config(s)
- MET Config File
* - :term:`MODE_MULTIVAR_INTENSITY`
- multivar_intensity
* - :term:`MODE_MULTIVAR_INTENSITY_FLAG`
- multivar_intensity_flag

**${METPLUS_FCST_FIELD}**

Expand Down
4 changes: 2 additions & 2 deletions internal/tests/pytests/wrappers/mode/test_mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ def set_minimum_config_settings(config):
({'MODE_MASK_MISSING_FLAG': 'BOTH', },
{'METPLUS_MASK_MISSING_FLAG': 'mask_missing_flag = BOTH;'}),

({'MODE_MULTIVAR_INTENSITY': 'false, true,true', },
{'METPLUS_MULTIVAR_INTENSITY': 'multivar_intensity = [FALSE, TRUE, TRUE];'}),
({'MODE_MULTIVAR_INTENSITY_FLAG': 'false, true,true', },
{'METPLUS_MULTIVAR_INTENSITY_FLAG': 'multivar_intensity_flag = [FALSE, TRUE, TRUE];'}),

({'MODE_FCST_MULTIVAR_NAME': 'Snow', },
{'METPLUS_FCST_MULTIVAR_NAME': 'multivar_name = "Snow";'}),
Expand Down
4 changes: 2 additions & 2 deletions metplus/wrappers/mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MODEWrapper(CompareGriddedWrapper):
'METPLUS_FCST_FILE_TYPE',
'METPLUS_OBS_FILE_TYPE',
'METPLUS_MULTIVAR_LOGIC',
'METPLUS_MULTIVAR_INTENSITY',
'METPLUS_MULTIVAR_INTENSITY_FLAG',
'METPLUS_FCST_MULTIVAR_NAME',
'METPLUS_FCST_MULTIVAR_LEVEL',
'METPLUS_OBS_MULTIVAR_NAME',
Expand Down Expand Up @@ -433,7 +433,7 @@ def create_c_dict(self):

self.handle_mask(single_value=True, get_flags=True)

self.add_met_config(name='multivar_intensity', data_type='list',
self.add_met_config(name='multivar_intensity_flag', data_type='list',
extra_args={'remove_quotes': True,
'uppercase': True})

Expand Down
4 changes: 2 additions & 2 deletions parm/met_config/MODEConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ ${METPLUS_QUILT}
//multivar_logic =
${METPLUS_MULTIVAR_LOGIC}

//multivar_intensity =
${METPLUS_MULTIVAR_INTENSITY}
//multivar_intensity_flag =
${METPLUS_MULTIVAR_INTENSITY_FLAG}

//
// Forecast and observation fields to be verified
Expand Down
2 changes: 1 addition & 1 deletion parm/use_cases/met_tool_wrapper/MODE/MODE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ OBTYPE = WRF
MODE_CONFIG_FILE = {PARM_BASE}/met_config/MODEConfig_wrapped

#MODE_MULTIVAR_LOGIC =
#MODE_MULTIVAR_INTENSITY =
#MODE_MULTIVAR_INTENSITY_FLAG =

MODE_REGRID_TO_GRID = NONE
#MODE_REGRID_METHOD =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/MODEMultivar_fcstHRRR_obsMRMS_HRRRanl.html

# Processes to run
PROCESS_LIST = MODE(mv),GenVxMask(fcst_super),GenVxMask(obs_super),MODE(super)
PROCESS_LIST = MODE

# Time Info
LOOP_ORDER = times
Expand All @@ -22,9 +22,10 @@ OBTYPE = ANALYSIS
##################################
# Multivariate MODE Configurations
##################################

# Run MODE to output super objects
[mv]
MODE_MULTIVAR_LOGIC = #1 && #2 && #3
MODE_MULTIVAR_INTENSITY_FLAG = FALSE,TRUE,TRUE

FCST_MODE_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/MODEMultivar_fcstHRRR_obsMRMS_HRRRanl
FCST_MODE_INPUT_TEMPLATE = hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2,hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2,hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2
Expand All @@ -37,11 +38,11 @@ MODE_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/f{lead?fmt=%2H}

FCST_VAR1_NAME = CSNOW
FCST_VAR1_LEVELS = L0
FCST_VAR1_OPTIONS = conv_radius = 0; conv_thresh = ==1
FCST_VAR1_OPTIONS = conv_radius = 0; conv_thresh = ==1; merge_flag = NONE

OBS_VAR1_NAME = PrecipFlag
OBS_VAR1_LEVELS = L0
OBS_VAR1_OPTIONS = conv_radius = 0; conv_thresh = ==3
OBS_VAR1_OPTIONS = conv_radius = 0; conv_thresh = ==3; merge_flag = NONE

FCST_VAR2_NAME = VIS
FCST_VAR2_LEVELS = L0
Expand Down Expand Up @@ -71,44 +72,7 @@ MODE_REGRID_METHOD = NEAREST
MODE_REGRID_WIDTH = 1
MODE_REGRID_VLD_THRESH = 0.5

##########################
# GenVxMask configurations
##########################
# Mask fcst field with the fcst super object field
[fcst_super]
GEN_VX_MASK_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/MODEMultivar_fcstHRRR_obsMRMS_HRRRanl
GEN_VX_MASK_INPUT_TEMPLATE = hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2
GEN_VX_MASK_INPUT_MASK_DIR = {OUTPUT_BASE}/mode
GEN_VX_MASK_INPUT_MASK_TEMPLATE = {init?fmt=%Y%m%d%H}/f{lead?fmt=%2H}/f_super.nc
GEN_VX_MASK_OPTIONS = -type data -input_field 'name="WIND";level="Z10";' -mask_field 'name="super";level="L0";' -thresh 'eq0' -value -9999 -name 'WIND_super'
GEN_VX_MASK_OUTPUT_DIR = {OUTPUT_BASE}/gen_vx_mask
GEN_VX_MASK_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/fcst_wind_super_{init?fmt=%Y%m%d%H}_f{lead?fmt=%2H}.nc

# Mask obs field with the obs super objects
[obs_super]
GEN_VX_MASK_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/MODEMultivar_fcstHRRR_obsMRMS_HRRRanl
GEN_VX_MASK_INPUT_TEMPLATE = hrrr.t{valid?fmt=%H}z.wrfprsf00.sub.grib2
GEN_VX_MASK_INPUT_MASK_DIR = {OUTPUT_BASE}/mode
GEN_VX_MASK_INPUT_MASK_TEMPLATE = {init?fmt=%Y%m%d%H}/f{lead?fmt=%2H}/o_super.nc
GEN_VX_MASK_OPTIONS = -type data -input_field 'name="WIND";level="Z10";' -mask_field 'name="super";level="L0";' -thresh 'eq0' -value -9999 -name 'WIND_super'
GEN_VX_MASK_OUTPUT_DIR = {OUTPUT_BASE}/gen_vx_mask
GEN_VX_MASK_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/obs_wind_super_{valid?fmt=%Y%m%d%H}.nc

#######################
# MODE on precip supers
#######################
[super]
FCST_VAR1_NAME = WIND_super
FCST_VAR1_LEVELS = Z10

OBS_VAR1_NAME = WIND_super
OBS_VAR1_LEVELS = Z10

MODE_CONV_RADIUS = 0
MODE_CONV_THRESH = ne-9999
MODE_MERGE_FLAG = NONE

MODE_OUTPUT_PREFIX = {MODEL}_vs_{OBTYPE}_{CURRENT_OBS_NAME}_{CURRENT_OBS_LEVEL}
MODE_OUTPUT_PREFIX = {MODEL}_vs_{OBTYPE}

MODE_GRID_RES = 3

Expand All @@ -119,16 +83,7 @@ MODE_NC_PAIRS_FLAG_OBJECT_ID = TRUE
MODE_NC_PAIRS_FLAG_CLUSTER_ID = TRUE
MODE_NC_PAIRS_FLAG_POLYLINES = TRUE

MODE_QUILT = True
MODE_QUILT = False

MODE_PS_PLOT_FLAG = TRUE
MODE_CT_STATS_FLAG = TRUE

FCST_MODE_INPUT_DIR = {OUTPUT_BASE}/gen_vx_mask
FCST_MODE_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/fcst_wind_super_{init?fmt=%Y%m%d%H}_f{lead?fmt=%2H}.nc

OBS_MODE_INPUT_DIR = {OUTPUT_BASE}/gen_vx_mask
OBS_MODE_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/obs_wind_super_{valid?fmt=%Y%m%d%H}.nc

MODE_OUTPUT_DIR = {OUTPUT_BASE}/mode
MODE_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/f{lead?fmt=%2H}