.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.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_s2s_stratosphere_UserScript_fcstGFS_obsERA_StratosphereQBO.py: QBO Phase plots and QBO Index: UserScript, Stat-Analysis ================================================================================ model_applications/ s2s_stratosphere/ UserScript_fcstGFS_obsERA_StratosphereQBO.py .. GENERATED FROM PYTHON SOURCE LINES 12-24 Scientific Objective -------------------- Many common modes of variability in the troposphere have stratospheric teloconnection pathways. This use case performs evaluation of the Quasi-biennial Oscillation (QBO), one of the key players of stratosphereic varability, using several different calculations and plots. Specifically, phase diagrams can be used to compare the QBO plhase progression between the model and observations. Additionally, timeseries of U at 30 and 50mb are also plotted to compare the speed of propagation of QBO in the model versus observations. Continuous statistics (ME, RMSE, etc.) are calculated for U at 30 and 50mb, and are also computed separately to evaluate QBO in the easterly phase versus the westerly phase. .. GENERATED FROM PYTHON SOURCE LINES 26-37 Datasets -------- * GFS: 0-24 hour forecasts for 10/2017 - 2/2018 * ERA: 30 year climatology for EOFs and 10/2017 - 2/2018 Data for this use case is not contained in the sample data tar files due to its size. Rather, it is stored as additional data in a separate tar file, named additional_data_UserScript_fcstGFS_obsERA_StratosphereQBO.tar.gz at https://dtcenter.ucar.edu/dfiles/code/METplus/METplus_Data/v6.0/. .. GENERATED FROM PYTHON SOURCE LINES 39-46 METplus Components ------------------ This use case calls UserScript and StatAnalysis. The UserScript accesses calculation in METcalcpy, METplotpy, and METdataio. For it to run, the following versions of those repositories are needed, METcalcpy 3.0.0, METplotpy 3.0.0, and METdataio 2.1. .. GENERATED FROM PYTHON SOURCE LINES 48-62 METplus Workflow ---------------- This use case does not loop but UserScript and StatAnalysis are each run once. The UserScript call runs the driver script stratosphere_qbo_driver.py which first computes zonal and meridional means using directional_means.py in METcalcpy on U from -10 S to 10N latitude. Then, an EOF analysis is performed on this zonal and meridional mean data, and two phase diagrams of QBO are created using the plot_qbo_phase_circuits and plot_qbo_phase_space functions from stratosphere_plots.py in METplotpy. Additionally the zonal and meridional mean at 30 and 50mb are output as time series to matched pair (MPR) files using write_mpr.py in METcalcpy and are also plotted as timeseries using the plot_u_timeseries function from stratosphere_plots.py in METplotpy. Finally StatAnalysis is run on the 30 and 50mb U mpr files to compute the bias (ME). .. GENERATED FROM PYTHON SOURCE LINES 64-74 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/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.conf .. highlight:: bash .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.conf .. GENERATED FROM PYTHON SOURCE LINES 76-94 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` **StatAnalysisConfig_wrapped** .. note:: See the :ref:`Stat-Analysis 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/STATAnalysisConfig_wrapped .. GENERATED FROM PYTHON SOURCE LINES 96-101 Python Embedding ---------------- This use case does not use python embedding .. GENERATED FROM PYTHON SOURCE LINES 103-109 Python Scripting ---------------- This use case runs the stratospher_qbo_driver.py python script. The processing performed by the script are detailed in the METplus Workflow section above. .. 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/model_applications/s2s_stratosphere/UserScript_fcstGFS_obsERA_StratosphereQBO.conf /path/to/user_system.conf See :ref:`running-metplus` for more information. .. GENERATED FROM PYTHON SOURCE LINES 123-146 Expected Output --------------- A successful run will output the following both to the screen and to the logfile:: INFO: METplus has successfully finished running. There should be 4 graphics output to the plot directory in the location set as OUTPUT_DIR in the [user_env_vars] section of the configuration file: * ERA_GFS_QBO_circuits.png * ERA5_QBO_PhaseSpace.png * ERA_GFS_timeseries_30mb_u_201710_201802.png * ERA_GFS_timeseries_50mb_u_201710_201802.png The name of the output graphics can be changed using PLOT_PHASE_CIRCUITS_OUTPUT_NAME, PLOT_PHASE_SPACE_OUTPUT_NAME, PLOT_TIME_SERIES_OUTPUT_NAME_30, and PLOT_TIME_SERIES_OUTPUT_NAME_50 also in the [user_env_vars] section. Additionally many matched pair .stat files will be output to OUTPUT_DIR/mpr, and tow computed continuous statistics will be output to OUTPUT_DIR/StatAnalysis: * GFS_ERA_20171001_20180228_210000L_zonal_wind_byphase_CNT.stat * GFS_ERA_20171001_20180228_210000L_zonal_wind_CNT.stat .. GENERATED FROM PYTHON SOURCE LINES 148-165 Keywords -------- .. note:: * UserScriptUseCase * S2SAppUseCase * S2SStratosphereAppUseCase * StatAnalysisUseCase * METcalcpyUseCase * METplotpyUseCase Navigate to the :ref:`quick-search` page to discover other similar use cases. sphinx_gallery_thumbnail_path = '_static/s2s_stratosphere-UserScript_fcstGFS_obsERA_StratosphereQBO.png' .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.000 seconds) .. _sphx_glr_download_generated_model_applications_s2s_stratosphere_UserScript_fcstGFS_obsERA_StratosphereQBO.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: UserScript_fcstGFS_obsERA_StratosphereQBO.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: UserScript_fcstGFS_obsERA_StratosphereQBO.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_