.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/met_tool_wrapper/TCDiag/TCDiag.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_met_tool_wrapper_TCDiag_TCDiag.py: TCDiag: Basic Use Case ====================== met_tool_wrapper/TCDiag/TCDiag.conf .. GENERATED FROM PYTHON SOURCE LINES 9-34 Overview -------------------- This use case illustrates the use of tc_diag tool, which is currently considered a beta-level release that lacks full functionality. The use case illustrates running the tc_diag tool for a tropical cyclone forecast case and generating intermediate NetCDF output files of the input model's data transformed onto an azimuth-range grid. When the full functionality of the tc_diag tool is released in MET v12.0.0, this use case will also output environmental diagnostics computed from callable Python scripts. The diagnostics are computed on a range-azimuth grid that follows the projected storm track. For inputs, it uses 0.25 deg gridded GRIB files from the a retrospective reforecast of the Global Forecast System (GFS). For the track, it uses the GFS's predicted track to ensure that the model's simulated storm doesn't contaminate the diagnostics result as a result of the model's simulated storm being mistaken for environmental factors. (Note: a future version of the tc_diag tool will include removal of the model's vortex, allowing diagnostics to be computed along any arbitrarily defined track.) Novel aspects of this use case: * This is the first example use case to run the tc_diag tool. * Example of running for a single tropical cyclone forecast case from Tropical Storm Bret (2023) using GFS data. .. GENERATED FROM PYTHON SOURCE LINES 36-42 Scientific Objective -------------------- Generate intermediate data files, in which the input model's data have been transformed to a range-azimuth grid, in preparation for further diagnostic calculations using Python-based routines. .. GENERATED FROM PYTHON SOURCE LINES 44-64 Datasets -------- **Forecast:** GFS grib files **Track:** a-deck file (Automated Tropical Cyclone Forecast System format) **Location:** All of the input data required for this use case can be found in the met_test sample data tarball. Click here to 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 `Running METplus`_ section for more information. **Data source:** Users may obtain real-time data from the deterministic GFS runs from NOAA's NOMADS server: https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.YYYYMMDD/ZZ/atmos/ where YYYYMMDD is the date (4-digit year, 2-digit month, 2-digit day), ZZ is the initialization hour of the desired model cycle (00, 06, 12, 18). .. GENERATED FROM PYTHON SOURCE LINES 66-72 METplus Components ------------------ This use case utilizes the METplus TCDiag wrapper to search for the desired ADECK file and forecast files that correspond to the track. It generates a command to run tc_diag if all required files are found. .. GENERATED FROM PYTHON SOURCE LINES 74-83 METplus Workflow ---------------- TCDiag is the only tool called in this example. It processes the following run times: **Init:** 2023-06-20 0000Z **Forecast lead:** 0, 6, and 12 hours .. GENERATED FROM PYTHON SOURCE LINES 85-92 METplus Configuration --------------------- parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf .. highlight:: bash .. literalinclude:: ../../../../parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf .. GENERATED FROM PYTHON SOURCE LINES 94-109 MET Configuration --------------------- METplus sets environment variables based on user settings in the METplus configuration file. See :ref:`How METplus controls MET config file settings` 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` .. note:: See the :ref:`TCDiag MET Configuration` section of the User's Guide for more information on the environment variables used in the file below: .. highlight:: bash .. literalinclude:: ../../../../parm/met_config/TCDiagConfig_wrapped .. GENERATED FROM PYTHON SOURCE LINES 111-121 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/METplus/parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf /path/to/user_system.conf See :ref:`running-metplus` for more information. .. GENERATED FROM PYTHON SOURCE LINES 123-138 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 met_tool_wrapper/TCDiag (relative to **OUTPUT_BASE**) and will contain the following files: * sal032023_gfso_doper_2023062012_cyl_grid_parent.nc * sal032023_gfso_doper_2023062012_diag.nc * sal032023_gfso_doper_2023062012_diag.dat .. GENERATED FROM PYTHON SOURCE LINES 140-154 Keywords -------- .. note:: * DiagnosticsUseCase * TCDiagToolUseCase * GRIB2FileUseCase * TropicalCycloneUseCase Navigate to the :ref:`quick-search` page to discover other similar use cases. .. GENERATED FROM PYTHON SOURCE LINES 154-156 .. code-block:: Python # .. _sphx_glr_download_generated_met_tool_wrapper_TCDiag_TCDiag.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: TCDiag.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: TCDiag.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: TCDiag.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_