"""
CycloneVerification: TC Verification Compare ADECK vs BDECK
===========================================================

model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf

"""
##############################################################################
# .. contents::
#   :depth: 1
#   :local:
#   :backlinks: none

###########################################
# Scientific Objective
# --------------------
#
# This use case run TC-Pairs to produce produce matched pairs of forecast model 
# output and an observation dataset. TC-Pairs produces matched pairs for position 
# errors, as well as wind, sea level pressure, and distance to land values for 
# each input dataset. Then TC-stat will filter TC-pairs output based on user criteria.

##############################################################################
# Version Added
# -------------
#
# METplus version 4.1

##############################################################################
# Datasets
# --------
#
# | **Forecast:** Automated Tropical Cyclone Forecasting System (ATCF) Adeck
# |     /path/to/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample/a{basin}{cyclone}{init?fmt=%Y}.dat
#
# | **Observation:** Automated Tropical Cyclone Forecasting System (ATCF) Bdeck
# |     /path/to/{TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample/b{basin}{cyclone}{init?fmt=%Y}.dat
#
# **Location:** All of the input data required for this use case can be 
# found in a sample data tarball. Each use case category will have 
# one or more sample data tarballs. It is only necessary to download 
# the tarball with the use case’s dataset and not the entire collection 
# of sample data. Click here to access the METplus releases page and download sample data 
# for the appropriate release: https://github.com/dtcenter/METplus/releases
# This tarball should be unpacked into the directory that you will 
# set the value of INPUT_BASE. See :ref:`running-metplus` section for more information.

##############################################################################
# METplus Workflow
# ----------------
#
# **Beginning time (INIT_BEG):** 202108
#
# The following tools are used for each run time:
#
# TCPairs
# TCStat
#
# To generate TCPairs output, this example loops by initialization time for every 6 hour period that is available
# in the data set between 2021082500 and 2021083000. Then TCStat filters the TCPairs output based on user criteria
# (e.g. storm characteristics in this use case).

##############################################################################
# METplus Components
# ------------------
#
# This use case first runs TC-Pairs to produce matched pairs of Adeck and Bdeck files.
# The TC-Pairs output (tcst files) is then read by the TC-Stat tool to further filter the tcst files
# as well as summarize the statistical information. 

##############################################################################
# METplus Workflow
# ----------------
#
# **Beginning time (INIT_BEG):** 202108
#
# **End time (INIT_END):** None
#
# **Increment between beginning and end times (INIT_INCREMENT):** None
#
# **Sequence of forecast leads to process (LEAD_SEQ):** None
#
# This example does not loop in time, but rather relies on ranges of times passed to
# TCPairs and TCStat to perform relevant tasks.
#
# TCPairs is the first tool called in this example. It processes the following
# run times for each storm file (e.g. aal092021.dat, aal102021.dat) against the corresponding 
# Bdeck files (e.g. bal092021.dat, bal102021.dat):
#
# | **Init/Valid:** 2021082500
# | **End/Valid:** 2021083000
#
# TC-Stat is the second (and final) tool called in this example. It processes the output
# from TCPairs. In this example the TC-Stat filters the TC-Pairs output based on the 
# characteristics of the storm (HU, SD, SS, TS, TD). The output from the TC-Stat can be used to 
# aggregate verification statistics (e.g. Track, Intensity, MSLP, wind radii errors etc.).

##############################################################################
# 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. /path/to/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf

##############################################################################
# MET Configuration
# -----------------
#
# METplus sets environment variables based on user settings in the METplus configuration file. 
# See :ref:`How METplus controls MET config file settings<metplus-control-met>` for more details. 
#
# **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 currently not supported by METplus you'd like to control, please refer to:
# :ref:`Overriding Unsupported MET config file settings<met-config-overrides>`
#
# .. dropdown:: TCPairsConfig_wrapped
#
#   .. literalinclude:: ../../../../parm/met_config/TCPairsConfig_wrapped
#
# .. dropdown:: TCStatConfig_wrapped
#
#   .. literalinclude:: ../../../../parm/met_config/TCStatConfig_wrapped

##############################################################################
# Python Embedding
# ----------------
#
# This use case does not use Python embedding.

##############################################################################
# User Scripting
# --------------
#
# User Scripting is not used in this use case.

##############################################################################
# Running METplus
# ---------------
#
# 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/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf /path/to/user_system.conf
#
# See :ref:`running-metplus` for more information.

##############################################################################
# Expected Output
# ---------------
#
# A successful run will output the following both to the screen and to the logfile::
#
#   INFO: METplus has successfully finished running.
#
# 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 tc_pairs/ tc_stat/ (relative to **OUTPUT_BASE**)
# and will contain the following files:
#
# * tc_pairs/tc_pairs.al092021.tcst
# * tc_pairs/tc_pairs.al102021.tcst
# * tc_stat/tc_stat_summary.tcst
#

##############################################################################
# Keywords
# --------
#
# .. note::
#
#   * TCPairsToolUseCase
#   * TCStatToolUseCase
#   * TropicalCycloneUseCase
#
#   Navigate to the :ref:`quick-search` page to discover other similar use cases.
#
#
#




