.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram.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_mjo_UserScript_obsERA_obsOnly_PhaseDiagram.py: UserScript: Make a Phase Diagram plot from input RMM or OMI =========================================================== model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram.py .. GENERATED FROM PYTHON SOURCE LINES 9-13 .. contents:: :depth: 1 :local: :backlinks: none .. GENERATED FROM PYTHON SOURCE LINES 15-21 Scientific Objective -------------------- Phase diagrams are used to Indices for MJO and QBO. This use case produces a phase diagram using either OLR based MJO Index (OMI) or the Real-time Multivariate MJO index (RMM) .. GENERATED FROM PYTHON SOURCE LINES 23-27 Version Added ------------- METplus version 4.1 .. GENERATED FROM PYTHON SOURCE LINES 29-46 Datasets -------- **Forecast:** None **Observation:** ERA Reanlaysis Outgoing Longwave Radiation **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 48-53 METplus Components ------------------ This use case runs UserScript twice, once to create a text file containing a listing of input files and then to create a Phase Diagram. .. GENERATED FROM PYTHON SOURCE LINES 55-69 METplus Workflow ---------------- **Beginning time (INIT_BEG):** 2012-01-01 **End time (INIT_END):** 2012-03-31 **Increment between beginning and end times (INIT_INCREMENT):** 1 day **Sequence of forecast leads to process (LEAD_SEQ):** 0 hour The UserScript that creates a filelist is run once for each valid time, while the UserScript to create a phase diagram is run only once. It creates a phase diagram plot using the input files. Variables for the phase diagram are set in the [user_env_vars] section of the .conf file. .. GENERATED FROM PYTHON SOURCE LINES 71-80 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_mjo/UserScript_obsERA_obsOnly_PhaseDiagram.conf .. highlight:: bash .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram.conf .. GENERATED FROM PYTHON SOURCE LINES 82-86 MET Configuration ----------------- There are no MET configuration files in this use case. .. GENERATED FROM PYTHON SOURCE LINES 88-92 Python Embedding ---------------- This use case does not use python embedding. .. GENERATED FROM PYTHON SOURCE LINES 94-111 User Scripting -------------- The first UserScript creates a listing of text file (save_inpput_file_txt). The second, PhaseDiagram_driver.py orchestrates the generation of a phase diagram plot. Inputs to the phase diagram driver are a text file containing the following columns, yyyy,mm,dd,hh,pc1,pc2,amp for OMI, or yyyy,mm,dd,pc1,pc2,phase,amp,source for RMM. .. dropdown:: parm/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram/save_input_files_txt.py .. highlight:: python .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram/save_input_files_txt.py .. dropdown:: parm/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram/PhaseDiagram_driver.py .. highlight:: python .. literalinclude:: ../../../../parm/use_cases/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram/PhaseDiagram_driver.py .. GENERATED FROM PYTHON SOURCE LINES 113-122 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_mjo/UserScript_obsERA_obsOnly_PhaseDiagram.conf /path/to/user_system.conf See :ref:`running-metplus` for more information. .. GENERATED FROM PYTHON SOURCE LINES 124-137 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 {OUTPUT_BASE}/model_applications/s2s_mjo/UserScript_obsERA_obsOnly_PhaseDiagram/plots The output is one plot:: * RMM_phase_diagram.png .. GENERATED FROM PYTHON SOURCE LINES 139-152 Keywords -------- .. note:: * S2SAppUseCase * S2SMJOAppUseCase * UserScriptUseCase * METplotpyUseCase Navigate to :ref:`quick-search` to discover other similar use cases. .. _sphx_glr_download_generated_model_applications_s2s_mjo_UserScript_obsERA_obsOnly_PhaseDiagram.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: UserScript_obsERA_obsOnly_PhaseDiagram.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: UserScript_obsERA_obsOnly_PhaseDiagram.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: UserScript_obsERA_obsOnly_PhaseDiagram.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_