.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.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_land_GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.py: GridStat: Temporal and spatial verification of soil moisture ============================================================ model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.conf .. GENERATED FROM PYTHON SOURCE LINES 9-13 .. contents:: :depth: 1 :local: :backlinks: none .. GENERATED FROM PYTHON SOURCE LINES 15-24 Scientific Objective -------------------- Comparison between prototype forecast models and existing observational data is critical to ensuring that model upgrades are completed with minimal downsides or degradation in verification statistics. This use case compares a GFS HR run to SMOPS, a combination dataset of satellite measurements concerning soil characteristics. By completing temporal and spatial verification measurements, this use case serves as an excellent baseline for evaluating near surface model soil moisture .. GENERATED FROM PYTHON SOURCE LINES 26-30 Version Added ------------- METplus version 13.0 .. GENERATED FROM PYTHON SOURCE LINES 32-49 Datasets -------- **Forecast:** Global Forecast System (GFS) v17 prototype version (tag HR1) 12km resolution, 0-0.1 meter soil temperature **Observation:** NOAA Soil Moisture Products System (SMOPS) 0.25 degree resolution, blended soil temperature **NOTE:** Retrieving observation data from CLASS requires user account **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 51-56 METplus Components ------------------ The two MET tools used in this use case are GridStat and SeriesAnalysis. Both tools require Python Embedding to ingest observation data. .. GENERATED FROM PYTHON SOURCE LINES 58-80 METplus Workflow ---------------- **Beginning time (INIT_BEG):** 2020-06-07 **End time (INIT_END):** 2020-06-07 **Increment between beginning and end times (INIT_INCREMENT):** 12 hours **Sequence of forecast leads to process (LEAD_SEQ):** 24 hours With an increment of 12 hours and no difference between the INIT_BEG and INIT_END, only one time is run in this use case: a 24 hour lead from 2020-06-07. Both GridStat and SeriesAnalysis are used over this time frame, requesting CNT line type output. Because both tools are run using the same input data, much of SeriesAnalysis' settings reference GridStat's settings, which is the first tool used. The forecast and observation grid resolutions differ, so regridding is used to interpolate the higher resolution forecast data to the lower resolution observation data for verification, using a bilinear method. Note that for rigorous comparisons of water budgets users may want to use conservative regridding rather than bilinear as bilinear regridding does not conserve total water mass. A poly masking for CONUS is used, with the mask being available from the MET installation. .. GENERATED FROM PYTHON SOURCE LINES 82-91 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, e.g. parm/use_cases/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.conf .. highlight:: bash .. literalinclude:: ../../../../parm/use_cases/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.conf .. GENERATED FROM PYTHON SOURCE LINES 93-112 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:: GridStatConfig_wrapped .. literalinclude:: ../../../../parm/met_config/GridStatConfig_wrapped .. dropdown:: SeriesAnalysisConfig_wrapped .. literalinclude:: ../../../../parm/met_config/SeriesAnalysisConfig_wrapped .. GENERATED FROM PYTHON SOURCE LINES 114-131 Python Embedding ---------------- This use case calls the read_SMOPS_data.py script to read and pass to GridStat and SeriesAnalysis a MET-usable dataset for the observation data. In its current form, the SMOPS data is read in by MET upside down, and is not CF-compliant. Using a simplified Python script, the input file and variable field are passed at runtime and the associated data is extracted. This is passed in memory to MET and verification proceeds normally. .. dropdown:: parm/use_cases/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python/read_SMOPS_data.py .. highlight:: python .. literalinclude:: ../../../../parm/use_cases/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python/read_SMOPS_data.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 133-137 User Scripting -------------- This use case does not use additional scripts. .. GENERATED FROM PYTHON SOURCE LINES 139-148 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/model_applications/land/GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.conf /path/to/user_system.conf See :ref:`running-metplus` for more information. .. GENERATED FROM PYTHON SOURCE LINES 150-182 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 will be in two subfolders relative to **OUTPUT_BASE**: * GridStat * SeriesAnalysis Each of these directories will hold the output from their respectively named tools. The GridStat folder will contain two files, one STAT file with the CNT line type output and one netCDF file, which contains 3 fields (not including the lat/lon fields). Those fields are: * FCST_SOILW_Z0.1-0_CONUS(lat, lon) * OBS_Blended_SM_UNKNOWN_CONUS(lat, lon) * DIFF_SOILW_Z0.1-0_Blended_SM_UNKNOWN_CONUS(lat, lon) For the SeriesAnalysis folder, only one netCDF output is created. Six variable fields are present (not including the lat/lon and series fields). Those variables are: * series_cnt_ME(lat, lon) * series_cnt_MAE(lat, lon) * series_cnt_RMSE(lat, lon) * series_cnt_MBIAS(lat, lon) * series_cnt_FBAR(lat, lon) * series_cnt_OBAR(lat, lon) .. GENERATED FROM PYTHON SOURCE LINES 184-197 Keywords -------- .. note:: * GridStatToolUseCase * PythonEmbeddingFileUseCase * LandAppUseCase Navigate to the :ref:`quick-search` page to discover other similar use cases. sphinx_gallery_thumbnail_path = '_static/land-GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.png' .. _sphx_glr_download_generated_model_applications_land_GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: GridStat_fcstGFS_obsSMOPS_soilMoisture_Python.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_