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

Update develop-ref after #876 #877

Merged
merged 23 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
595a47f
removed -ref from end of branch name when looking for new input data …
georgemccabe Mar 25, 2021
3eb23e0
feature 779 add support for output_flag, nc_pairs_flag, and climo_cdf…
georgemccabe Mar 30, 2021
6809d8a
Feature 779 compare pdf (#860)
georgemccabe Mar 30, 2021
ef813fe
Feature 857 tc stat met config (2nd attempt) (#862)
georgemccabe Mar 31, 2021
3972050
remove quotes around branch items
georgemccabe Apr 1, 2021
f24b9dd
only build docs in GHA
georgemccabe Apr 1, 2021
d02eef7
added missing jobs item
georgemccabe Apr 1, 2021
ef97e78
cd back to GITHUB_WORKSPACE
georgemccabe Apr 1, 2021
e9fce2f
cd back to github workspace
georgemccabe Apr 1, 2021
ed9a553
removed html theme options needed for version selector that are no lo…
georgemccabe Apr 1, 2021
9e21601
moved documentation building into script, use sphinx_rtd_theme from p…
georgemccabe Apr 1, 2021
0e7c5fe
rename jobs and steps
georgemccabe Apr 1, 2021
2cd8800
Feature 767 ext dependencies doc update (#866)
j-opatz Apr 6, 2021
2638c4f
feature CI documentation (#867)
georgemccabe Apr 6, 2021
511323a
Feature 836 rtd release doc (#870)
jprestop Apr 7, 2021
188eab8
Adding NOAA/CPC to the list of requestors. Already ran the script to …
JohnHalleyGotway Apr 8, 2021
e5bd13f
Adding common label for NOAA/OPC. The new label has already been push…
JohnHalleyGotway Apr 8, 2021
02ff221
sort list of files in directory to ensure the same result regardless …
georgemccabe Apr 8, 2021
4e3827c
Feature 852 series by same name (#868)
georgemccabe Apr 12, 2021
36fb55e
Merge branch 'develop-ref' into develop
georgemccabe Apr 12, 2021
2670308
feature 871 TCGen new MET config variables (#872)
georgemccabe Apr 12, 2021
0f8f8d3
Feature 728 update python embedding (#876)
j-opatz Apr 13, 2021
cb5518f
Merge branch 'develop-ref' into develop
georgemccabe Apr 13, 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
30 changes: 25 additions & 5 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4917,11 +4917,6 @@ METplus Configuration Glossary

| *Used by:* TCGen

TC_GEN_OPS_HIT_TDIFF
Specify the value of ops_hit_tdiff in the MET configuration file.

| *Used by:* TCGen

TC_GEN_DISCARD_INIT_POST_GENESIS_FLAG
Specify the value of discard_init_post_genesis_flag in the MET configuration file.

Expand Down Expand Up @@ -6211,3 +6206,28 @@ METplus Configuration Glossary
Specify the value for 'init_str_exc_val' in the MET configuration file for TCStat.

| *Used by:* TCStat

TC_GEN_GENESIS_MATCH_POINT_TO_TRACK
Specify the value for 'genesis_match_point_to_track' in the MET configuration file for TCGen.

| *Used by:* TCGen

TC_GEN_GENESIS_MATCH_WINDOW_BEG
Specify the value for 'genesis_match_window.beg' in the MET configuration file for TCGen.

| *Used by:* TCGen

TC_GEN_GENESIS_MATCH_WINDOW_END
Specify the value for 'genesis_match_window.end' in the MET configuration file for TCGen.

| *Used by:* TCGen

TC_GEN_OPS_HIT_WINDOW_BEG
Specify the value for 'ops_hit_window.beg' in the MET configuration file for TCGen.

| *Used by:* TCGen

TC_GEN_OPS_HIT_WINDOW_END
Specify the value for 'ops_hit_window.end' in the MET configuration file for TCGen.

| *Used by:* TCGen
38 changes: 34 additions & 4 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3693,10 +3693,14 @@ Configuration
| :term:`TC_GEN_BASIN_MASK`
| :term:`TC_GEN_DLAND_THRESH`
| :term:`TC_GEN_GENESIS_MATCH_RADIUS`
| :term:`TC_GEN_GENESIS_MATCH_POINT_TO_TRACK`
| :term:`TC_GEN_GENESIS_MATCH_WINDOW_BEG`
| :term:`TC_GEN_GENESIS_MATCH_WINDOW_END`
| :term:`TC_GEN_DEV_HIT_RADIUS`
| :term:`TC_GEN_DEV_HIT_WINDOW_BEGIN`
| :term:`TC_GEN_DEV_HIT_WINDOW_END`
| :term:`TC_GEN_OPS_HIT_TDIFF`
| :term:`TC_GEN_OPS_HIT_WINDOW_BEG`
| :term:`TC_GEN_OPS_HIT_WINDOW_END`
| :term:`TC_GEN_DISCARD_INIT_POST_GENESIS_FLAG`
| :term:`TC_GEN_DEV_METHOD_FLAG`
| :term:`TC_GEN_OPS_METHOD_FLAG`
Expand Down Expand Up @@ -4033,6 +4037,30 @@ Below the file contents are descriptions of each environment variable referenced
* - :term:`TC_GEN_GENESIS_MATCH_RADIUS`
- genesis_match_radius

**${METPLUS_GENESIS_MATCH_POINT_TO_TRACK}**

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_GEN_GENESIS_MATCH_POINT_TO_TRACK`
- genesis_match_point_to_track

**${METPLUS_GENESIS_MATCH_WINDOW_DICT}**

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_GEN_GENESIS_MATCH_WINDOW_BEG`
- genesis_match_window.beg
* - :term:`TC_GEN_GENESIS_MATCH_WINDOW_END`
- genesis_match_window.end

**${METPLUS_DEV_HIT_RADIUS}**

.. list-table::
Expand All @@ -4044,16 +4072,18 @@ Below the file contents are descriptions of each environment variable referenced
* - :term:`TC_GEN_DEV_HIT_RADIUS`
- dev_hit_radius

**${METPLUS_OPS_HIT_TDIFF}**
**${METPLUS_OPS_HIT_WINDOW_DICT}**

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_GEN_OPS_HIT_TDIFF`
- ops_hit_tdiff
* - :term:`TC_GEN_OPS_HIT_WINDOW_BEG`
- ops_hit_window.beg
* - :term:`TC_GEN_OPS_HIT_WINDOW_END`
- ops_hit_window.end

**${METPLUS_DISCARD_INIT_POST_GENESIS_FLAG}**

Expand Down
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
Expand Up @@ -9,10 +9,10 @@
# Scientific Objective
# --------------------
#
# Once this method is complete, a forecast and reference track analysis file
# for the valid date of interest (YYYYMMDDHH) will have been created {OUTPUT_BASE}/decks,
# forecast and reference tracks paired up {OUTPUT_BASE}/tc_pairs and global storm tracks
# for the valid date of interest will be plotted {OUTPUT_BASE}/cyclone (PlateCaree projection)
# Once this method is complete, a user-created extra TC track file
# for the valid date of interest (YYYYMMDDHH) will have been created,
# paired up by TCPairs, and global storm tracks
# for the valid date of interest will be plotted by CyclonePlotter (PlateCaree projection)

##############################################################################
# Datasets
Expand Down Expand Up @@ -44,17 +44,17 @@
# METplus Components
# ------------------
#
# This use case utilizes the METplus TCPairs wrapper to search for
# files that are valid at a given run time and generate a command to run
# the MET tool tc_pairs. It then uses the CyclonePlotter wrapper to create
# a global plot of storm tracks for the desired day of interest (YYYYMMDDHH)
# This use case utilizes Python user script-created output files that are accessible via the TCPairs wrapper.
# Due to the nature of the source file (already tracked extra TCs), the TCPairs wrapper is passed the "Adeck" file for each storm twice:
# once as the adeck or forecast file, and once as the bdeck or analysis file. Essentially, TCPairs is matching a forecast to itself.
# It then uses the CyclonePlotter wrapper to create a global plot of storm tracks for the desired day of interest (YYYYMMDDHH).

##############################################################################
# METplus Workflow
# ----------------
#
# TCPairs is the first tool called in this example. It processes the following
# run times:
# run times for each storm file:
#
# | **Init/Valid:** 2020100700
# |
Expand Down Expand Up @@ -95,7 +95,11 @@
# Python Embedding
# ----------------
#
# This use case uses a Python embedding script to read input data
# This use case uses a Python embedding script to read input data.
# Because the source file already contains "analysis" tracks for the extra TCs,
# this Python script only needs to output storm tracks that have a valid time matching
# the user input. These storms are put into separate storm files, to better mimic how TC storms are
# typically passed to TCPairs.
#
# parm/use_cases/model_applications/tc_and_extra_tc/CyclonePlotter_fcstGFS_obsGFS_OPC/extract_opc_decks.py
#
Expand Down Expand Up @@ -142,11 +146,12 @@
# Output for this use case will be found in **tc_pairs/201412** (relative to **OUTPUT_BASE**)
# and will contain the following files:
#
# * decks/adeck.2020100700.dat
# * decks/bdeck.2020100700.dat
# * tc_pairs/tc_pairs.2020100700.dat
# * decks/adeck/adeck.2020100700.xxxx.dat
# * tc_pairs/tc_pairs.2020100700.xxxx.tcst
# * cyclone/20201007.png
# * cyclone/20201007.txt
#
# where "xxxx" is the unique four digit storm identifier for TCPairs wrapper to use.

##############################################################################
# Keywords
Expand Down
31 changes: 28 additions & 3 deletions internal_tests/pytests/tc_gen/test_tc_gen_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@
'TC_GEN_DEV_HIT_WINDOW_END': '30'},
{'METPLUS_DEV_HIT_WINDOW_DICT': 'dev_hit_window = {beg = -30;end = 30;}'}),

({'TC_GEN_OPS_HIT_TDIFF': '49'},
{'METPLUS_OPS_HIT_TDIFF': 'ops_hit_tdiff = 49;'}),

({'TC_GEN_DISCARD_INIT_POST_GENESIS_FLAG': 'False'},
{'METPLUS_DISCARD_INIT_POST_GENESIS_FLAG': 'discard_init_post_genesis_flag = FALSE;'}),

Expand Down Expand Up @@ -239,6 +236,34 @@
({'TC_GEN_NC_PAIRS_GRID': 'G004'},
{'METPLUS_NC_PAIRS_GRID': 'nc_pairs_grid = "G004";'}),

({'TC_GEN_GENESIS_MATCH_POINT_TO_TRACK': 'False', },
{'METPLUS_GENESIS_MATCH_POINT_TO_TRACK': 'genesis_match_point_to_track = FALSE;'}),

({'TC_GEN_GENESIS_MATCH_WINDOW_BEG': '-1', },
{
'METPLUS_GENESIS_MATCH_WINDOW_DICT': 'genesis_match_window = {beg = -1;}'}),

({'TC_GEN_GENESIS_MATCH_WINDOW_END': '2', },
{
'METPLUS_GENESIS_MATCH_WINDOW_DICT': 'genesis_match_window = {end = 2;}'}),

({
'TC_GEN_GENESIS_MATCH_WINDOW_BEG': '-2',
'TC_GEN_GENESIS_MATCH_WINDOW_END': '1',
},
{'METPLUS_GENESIS_MATCH_WINDOW_DICT': 'genesis_match_window = {beg = -2;end = 1;}'}),
({'TC_GEN_OPS_HIT_WINDOW_BEG': '1', },
{'METPLUS_OPS_HIT_WINDOW_DICT': 'ops_hit_window = {beg = 1;}'}),

({'TC_GEN_OPS_HIT_WINDOW_END': '47', },
{'METPLUS_OPS_HIT_WINDOW_DICT': 'ops_hit_window = {end = 47;}'}),

({
'TC_GEN_OPS_HIT_WINDOW_BEG': '1',
'TC_GEN_OPS_HIT_WINDOW_END': '47',
},
{'METPLUS_OPS_HIT_WINDOW_DICT': 'ops_hit_window = {beg = 1;end = 47;}'}),

]
)
def test_tc_gen(metplus_config, config_overrides, env_var_values):
Expand Down
46 changes: 42 additions & 4 deletions metplus/wrappers/tc_gen_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TCGenWrapper(CommandBuilder):
'METPLUS_GENESIS_MATCH_RADIUS',
'METPLUS_DEV_HIT_RADIUS',
'METPLUS_DEV_HIT_WINDOW_DICT',
'METPLUS_OPS_HIT_TDIFF',
'METPLUS_OPS_HIT_WINDOW_DICT',
'METPLUS_DISCARD_INIT_POST_GENESIS_FLAG',
'METPLUS_DEV_METHOD_FLAG',
'METPLUS_OPS_METHOD_FLAG',
Expand All @@ -65,6 +65,8 @@ class TCGenWrapper(CommandBuilder):
'METPLUS_DLAND_FILE',
'METPLUS_BASIN_FILE',
'METPLUS_NC_PAIRS_GRID',
'METPLUS_GENESIS_MATCH_POINT_TO_TRACK',
'METPLUS_GENESIS_MATCH_WINDOW_DICT',
]

OUTPUT_FLAGS = ['fho',
Expand Down Expand Up @@ -210,9 +212,7 @@ def create_c_dict(self):
data_type='int',
metplus_configs=['TC_GEN_DEV_HIT_RADIUS'])
self.handle_dev_hit_window()
self.add_met_config(name='ops_hit_tdiff',
data_type='int',
metplus_configs=['TC_GEN_OPS_HIT_TDIFF'])
self.handle_ops_hit_window()
self.add_met_config(name='discard_init_post_genesis_flag',
data_type='bool',
metplus_configs=[
Expand Down Expand Up @@ -246,6 +246,12 @@ def create_c_dict(self):
self.add_met_config(name='nc_pairs_grid',
data_type='string',
metplus_configs=['TC_GEN_NC_PAIRS_GRID'])
self.add_met_config(
name='genesis_match_point_to_track',
data_type='bool',
metplus_configs=['TC_GEN_GENESIS_MATCH_POINT_TO_TRACK']
)
self.handle_genesis_match_window()

# get INPUT_TIME_DICT values since wrapper only runs
# once (doesn't look over time)
Expand Down Expand Up @@ -291,6 +297,38 @@ def handle_dev_hit_window(self):
)
self.handle_met_config_dict(dict_name, dict_items)

def handle_ops_hit_window(self):
dict_name = 'ops_hit_window'
dict_items = []
dict_items.append(
self.get_met_config(name='beg',
data_type='int',
metplus_configs=['TC_GEN_OPS_HIT_WINDOW_BEGIN',
'TC_GEN_OPS_HIT_WINDOW_BEG',])
)
dict_items.append(
self.get_met_config(name='end',
data_type='int',
metplus_configs=['TC_GEN_OPS_HIT_WINDOW_END',])
)
self.handle_met_config_dict(dict_name, dict_items)

def handle_genesis_match_window(self):
dict_name = 'genesis_match_window'
dict_items = []
dict_items.append(
self.get_met_config(name='beg',
data_type='int',
metplus_configs=['TC_GEN_GENESIS_MATCH_WINDOW_BEGIN',
'TC_GEN_GENESIS_MATCH_WINDOW_BEG',])
)
dict_items.append(
self.get_met_config(name='end',
data_type='int',
metplus_configs=['TC_GEN_GENESIS_MATCH_WINDOW_END',])
)
self.handle_met_config_dict(dict_name, dict_items)

def handle_fcst_genesis(self):
dict_name = 'fcst_genesis'
dict_items = []
Expand Down
23 changes: 18 additions & 5 deletions parm/met_config/TCGenConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,26 @@ ${METPLUS_DLAND_THRESH}
//
////////////////////////////////////////////////////////////////////////////////

//
// Genesis matching logic. Compare the forecast genesis point to all points in
// the Best track (TRUE) or the single Best track genesis point (FALSE).
//
//genesis_match_point_to_track =
${METPLUS_GENESIS_MATCH_POINT_TO_TRACK}

//
// Radius in km to search for a matching genesis event
//
// genesis_match_radius =
${METPLUS_GENESIS_MATCH_RADIUS}

//
// Time window in hours, relative to the model genesis time, to search for a
// matching Best track point
//
//genesis_match_window = {
${METPLUS_GENESIS_MATCH_WINDOW_DICT}

//
// Radius in km for a development scoring method hit
//
Expand All @@ -184,12 +198,11 @@ ${METPLUS_DEV_HIT_RADIUS}
// dev_hit_window =
${METPLUS_DEV_HIT_WINDOW_DICT}

// Time window in hours for the Best track genesis minus model initialization
// time difference for an operational scoring method hit
//
// Maximum Best track genesis minus model initialization time difference for an
// operational scoring method hit
//
// ops_hit_tdiff =
${METPLUS_OPS_HIT_TDIFF}
//ops_hit_window = {
${METPLUS_OPS_HIT_WINDOW_DICT}

//
// Discard genesis forecasts for initializations at or after the matching
Expand Down
10 changes: 8 additions & 2 deletions parm/use_cases/met_tool_wrapper/TCGen/TCGen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,19 @@ TC_GEN_DLAND_THRESH = NA

TC_GEN_GENESIS_MATCH_RADIUS = 500

#TC_GEN_GENESIS_MATCH_POINT_TO_TRACK = True

#TC_GEN_GENESIS_MATCH_WINDOW_BEG = 0
#TC_GEN_GENESIS_MATCH_WINDOW_END = 0

#TC_GEN_OPS_HIT_WINDOW_BEG = 0
#TC_GEN_OPS_HIT_WINDOW_END = 48

TC_GEN_DEV_HIT_RADIUS = 500

TC_GEN_DEV_HIT_WINDOW_BEGIN = -24
TC_GEN_DEV_HIT_WINDOW_END = 24

TC_GEN_OPS_HIT_TDIFF = 48

TC_GEN_DISCARD_INIT_POST_GENESIS_FLAG = True

TC_GEN_DEV_METHOD_FLAG = True
Expand Down
Loading