.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.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_model_applications_pbl_PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.py: Point-Stat: Computing PBLH from AMDAR data using two methods: Theta-increase, Critical Bulk Richardson Number ============================================================================================================= model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.conf .. GENERATED FROM PYTHON SOURCE LINES 9-13 .. contents:: :depth: 1 :local: :backlinks: none .. GENERATED FROM PYTHON SOURCE LINES 15-31 Scientific Objective -------------------- The Planetary Boundary Layer Height (PBLH) arises from a complex interaction of lower atmosphere and surface processes, and is therefore a useful metric to evaluate models. This PointStat use case computes PBLH from AMDAR aircraft data for 71 airports specified in a csv file using two methods: 1) "Theta-increase" method (Nielsen-Gammon et al., 2008, J. App. Met. Clim.), which computes PBLH by finding the lowest altitude in an aircraft profile that exceeds a specified increase in potential temperature from a base value. This theta-increase (pt_delta) value is set to 1.25 K, which is the same as the HRRR model. 2) "Critical Bulk Richardson Number" method (Seidel et al., 2012, JGR), which computes PBLH by finding the lowest altitude in an aircraft profile which exceeds a Critical Bulk Richardson Number. The name of the airport list csv file and the sounding are specified in the configuration script. .. GENERATED FROM PYTHON SOURCE LINES 33-37 Version Added ------------- METplus version 6.0 .. GENERATED FROM PYTHON SOURCE LINES 39-56 Datasets -------- **Forecast:** NOAA High Resolution Rapid Refresh (HRRR) **Observation:** AMDAR hourly 1-d netcdf files **Climatology:** None **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. .. GENERATED FROM PYTHON SOURCE LINES 58-64 METplus Components ------------------ This use case utilizes the METplus PointStat tool to compare PBLH from AMDAR data to model output. The python embedding script "calc_amdar_pblh.py" computes PBLH and sends data MET via python embedding. .. GENERATED FROM PYTHON SOURCE LINES 66-84 METplus Workflow ---------------- **Beginning time (INIT_BEG):** 2022070108 **End time (INIT_END):** 2022070108 **Increment between beginning and end times (INIT_INCREMENT):** 1H **Sequence of forecast leads to process (LEAD_SEQ):** 12 PointStat is called in this example. The following run times are processed: | **Valid:** 2022-07-01_20Z | **Forecast lead:** 12 hour PointStat is run with Python embedding (calc_amdar_pblh.py). The Python embedding script calls an airport csv file. .. GENERATED FROM PYTHON SOURCE LINES 86-95 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. parm/use_cases/model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.conf .. highlight:: bash .. literalinclude:: ../../../../parm/use_cases/model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.conf .. GENERATED FROM PYTHON SOURCE LINES 97-111 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` .. dropdown:: PointStatConfig_wrapped .. literalinclude:: ../../../../parm/met_config/PointStatConfig_wrapped .. GENERATED FROM PYTHON SOURCE LINES 113-126 Python Embedding ---------------- This use case uses a Python embedding script to read input data. .. dropdown:: parm/use_cases/model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed/calc_amdar_pblh.py .. highlight:: python .. literalinclude:: ../../../../parm/use_cases/model_applications/pbl/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed/calc_amdar_pblh.py For more information on the basic requirements to utilize Python Embedding in METplus, please refer to the MET User’s Guide section on `Python embedding `_. .. GENERATED FROM PYTHON SOURCE LINES 128-132 User Scripting -------------- User Scripting is not used in this use case. .. GENERATED FROM PYTHON SOURCE LINES 134-143 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/PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.conf /path/to/user_system.conf See :ref:`running-metplus` for more information. .. GENERATED FROM PYTHON SOURCE LINES 145-158 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 point_stat_pblh (relative to **OUTPUT_BASE**) with subdirectories for valid time (YYYYMMDD) and will contain .stat files with the following naming convention: convention: point_stat_{SOUNDING_FLAG}_{LEADTIME}L_{VALIDTIME}.stat example: point_stat_ALL_120000L_20220701_200000V.stat .. GENERATED FROM PYTHON SOURCE LINES 160-172 Keywords -------- .. note:: * PointStatToolUseCase * PythonEmbeddingFileUseCase * PBLAppUseCase Navigate to the :ref:`quick-search` page to discover other similar use cases. sphinx_gallery_thumbnail_path = '_static/pbl-PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.png' .. _sphx_glr_download_generated_model_applications_pbl_PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: PointStat_fcstHRRR_obsAMDAR_PBLH_PyEmbed.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_