From fe47753bd86471d06ddbfa24478dc72853edf9f5 Mon Sep 17 00:00:00 2001 From: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:50:26 -0600 Subject: [PATCH] Feature 313 consistent headers (#316) * Updating section headers Changing the heading formatting to match sphinx and METplus User's Guide documentation. * Updating section headers Changing the heading formatting to match sphinx and METplus User's Guide documentation. * Updating section headers Changing the heading formatting to match sphinx and METplus User's Guide documentation. Left bolded sections alone. Are these sub-subsections? * Removed "for METcalcpy" b/c redundant * changing header to # for consistency * changing header to # for consistency * fixing sections to = * changing header to # for consistency * updating code blocks for consistency * one more code-block to fix * fixing indent * reverting back to "you" * bolding switching back to bolding from chapters in hopes of getting rid of an error message. * bolding Changing chapter headers back to bolding in hopes of getting rid of an error message * Changing 2nd beta2 reference to rc1 * Removing redundant references to METcalcpy --------- Co-authored-by: jprestop Co-authored-by: bikegeek --- docs/Contributors_Guide/index.rst | 36 +++++++++++---------- docs/Users_Guide/index.rst | 7 ++-- docs/Users_Guide/installation.rst | 25 +++++++------- docs/Users_Guide/release-notes.rst | 4 +-- docs/Users_Guide/vertical_interpolation.rst | 29 +++++++++++------ docs/index.rst | 23 +++++++------ 6 files changed, 67 insertions(+), 57 deletions(-) diff --git a/docs/Contributors_Guide/index.rst b/docs/Contributors_Guide/index.rst index 331ed719..1940b4f5 100644 --- a/docs/Contributors_Guide/index.rst +++ b/docs/Contributors_Guide/index.rst @@ -1,12 +1,13 @@ +################### Contributor's Guide -==================== +################### METcalcpy is written entirely in Python to provide statistics calculations and other utilities that are used by METviewer, METplotpy, and other applications. The modules and packages can be imported into other scripts. Python Requirements -~~~~~~~~~~~~~~~~~~~ +=================== * Python 3.10.4 @@ -36,28 +37,29 @@ Python Requirements Coding Standards -~~~~~~~~~~~~~~~~ +================ METplus has adopted some coding standards for its Python code. Detailed information can be found here: https://metplus.readthedocs.io/en/main_v4.0/Users_Guide/ Comment the Python code using Python docstrings: https://peps.python.org/pep-0257/ Organization of Code in the Github Repository -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +============================================= + The source code for METcalcpy resides in a public GitHub repository: https://github.com/dtcenter/METcalcpy Contributed code will reside in one of the following directories: -* METcalcpy/metcalpy +* *METcalcpy/metcalpy* -* METcalcpy/metcalcpy/contributed +* *METcalcpy/metcalcpy/contributed* -* METcalcpy/metcalcpy/diagnostics +* *METcalcpy/metcalcpy/diagnostics* -* METcalcpy/metcalpy/pre-processing +* *METcalcpy/metcalpy/pre-processing* -* METcalcpy/metcalcpy/util +* *METcalcpy/metcalcpy/util* The *METcalcpy/metcalcpy/contributed* directory is where contributed code (from outside contributors) is initially saved. @@ -71,9 +73,9 @@ Finally, the *METcalcpy/metcalcpy* directory contains statistics scripts that ar Tasks to Perform Before Contributing Code -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +========================================= -* You will need a Github account and be included into the METcalcpy Developer's group +* You will need a Github account and be included into the METcalcpy Developer’s group * Create a Github issue describing what the contribute code will do @@ -87,7 +89,7 @@ Tasks to Perform Before Contributing Code * Fill out the issue template with relevant information -* Provide information about the enhancement or new feature, the time estimate for the work, assignees (an engineer and a scientist), and fill in the labels (menu on the right hand bar of the issues page). +* Provide information about the enhancement or new feature, the time estimate for the work, assignees (an engineer and a scientist), and fill in the labels (menu on the right hand bar of the issues page) * Provide as much relevant information as possible @@ -96,7 +98,7 @@ Tasks to Perform Before Contributing Code * Set up your conda/virtual environment or have your system administrator install the necessary Python version and third-party packages defined above Retrieve METcalcpy code -~~~~~~~~~~~~~~~~~~~~~~~ +======================= * Create a METcalcpy directory on your host machine () where you have read/write/execute privileges @@ -145,7 +147,7 @@ Retrieve METcalcpy code Contributing Your Code -~~~~~~~~~~~~~~~~~~~~~~ +====================== * Begin working in the feature branch that you created in the previous step. From this point on, your code will deviate from the code in the *develop* branch. @@ -159,7 +161,7 @@ Otherwise work in one of the appropriate METcalcpy directories. Testing Your Code -~~~~~~~~~~~~~~~~~~ +================= * Use the pytest framework to create tests to ensure that your code works @@ -177,7 +179,7 @@ Testing Your Code Create User Documentation -~~~~~~~~~~~~~~~~~~~~~~~~~ +========================= * Comment your Python code using python docstrings: @@ -218,7 +220,7 @@ Create User Documentation (e.g. /home/my_dir) and *feature_123_xyz* is the feature branch you created Incorporate Your Code Into the Repository -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +========================================= * Create a pull request (PR) within GitHub and assign one or more scientists and/or engineers from the METplus core team to review your code to verify that your tests are successful and the documentation is correct. diff --git a/docs/Users_Guide/index.rst b/docs/Users_Guide/index.rst index 936bc73c..e95f7299 100644 --- a/docs/Users_Guide/index.rst +++ b/docs/Users_Guide/index.rst @@ -1,6 +1,6 @@ -============ +############ User's Guide -============ +############ **Foreword: A note to METcalcpy users** @@ -66,8 +66,7 @@ National Center for Atmospheric Research (NCAR) is sponsored by NSF. vertical_interpolation release-notes -Indices and tables -================== +**Indices and tables** * :ref:`genindex` * :ref:`search` diff --git a/docs/Users_Guide/installation.rst b/docs/Users_Guide/installation.rst index eb3c01ce..9e145123 100644 --- a/docs/Users_Guide/installation.rst +++ b/docs/Users_Guide/installation.rst @@ -1,11 +1,12 @@ -Installation guide for METcalcpy -=========================================== +****************** +Installation Guide +****************** METcalcpy is written entirely in Python to provide statistics calculations and other utilities that are used by METviewer, METplotpy, and other applications. Python Requirements -~~~~~~~~~~~~~~~~~~~ +=================== * Python 3.8.6 @@ -44,8 +45,8 @@ Python Requirements * xarray 2022.3.0 -Retrieve METcalcpy code -~~~~~~~~~~~~~~~~~~~~~~~ +Retrieve Code +============= You can retrieve the METcalcpy source code using the web browser. Begin by entering https://github.com/dtcenter/METcalcpy in @@ -58,8 +59,8 @@ will reside (e.g. /home/someuser/). Uncompress the compressed code using unzip for the zip version or tar -xvfz for the tar.gz version. -Install METcalcpy package -~~~~~~~~~~~~~~~~~~~~~~~~~ +Install Package +=============== It is recommended that one works within a conda environment when using the METcalcpy package. Please refer to https://docs.conda.io/projects/conda/en/latest for more information abount conda as a package and environnent @@ -75,14 +76,12 @@ This instructs pip to install the package based on instructios in the setup.py f (as indicated by the '.'). The `-e` directs pip to install the package in edit mode, so if one wishes to make changes to this source code, the changes are automatically applied without the need to re-install the package. - - `Note: In a future release, METcalcpy will be located on PyPI (Python Package Index) to facilitate installation into a virtual environment or conda environment using `pip `. ` -Explore METcalcpy modules -~~~~~~~~~~~~~~~~~~~~~~~~~ +Explore Modules +=============== There are numerous statistics tools and other useful utilities available in METcalcpy. To examine what is available, open a Python console from the command line by entering `python` at the command line. @@ -216,8 +215,8 @@ Produces information that looks like the following:: -Using METcalcpy modules -~~~~~~~~~~~~~~~~~~~~~~~ +Using Modules +============= From within the active conda environment, use the METcalcpy packages and and modules of interest in your code. For example, in the METplotpy performance_diagram.py file, the event_equalization diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index 27cae6e4..0b289241 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -9,8 +9,8 @@ METcalcpy Release Notes ======================= -METcalcpy Version 2.1.0-beta2 release notes (20230620) ------------------------------------------------------- +METcalcpy Version 2.1.0-rc1 release notes (20230620) +---------------------------------------------------- .. dropdown:: New Functionality diff --git a/docs/Users_Guide/vertical_interpolation.rst b/docs/Users_Guide/vertical_interpolation.rst index 0a28b8ea..8346580d 100644 --- a/docs/Users_Guide/vertical_interpolation.rst +++ b/docs/Users_Guide/vertical_interpolation.rst @@ -1,8 +1,9 @@ +********************** Vertical Interpolation -======================= +********************** Description -~~~~~~~~~~~ +=========== This module is used to perform pressure to height conversion in TC-RMW data (netCDF or grb2) by vertically interpolating fields @@ -11,7 +12,7 @@ implemented with linear interpolation. Example -~~~~~~~ +======= **Sample Data** @@ -21,13 +22,17 @@ https://dtcenter.ucar.edu/dfiles/code/METplus/METplotpy/tcrmw/tc_rmw_example.nc. Save this data file to a directory of your choosing and *cd* to your directory: -``cd $METCALCPY_DATA_DIR`` +.. code-block:: ini + + cd $METCALCPY_DATA_DIR *$METCALCPY_DATA_DIR* is the directory where you stored the example data. Uncompress the data using *gunzip*: -``gunzip tc_rmw_example.nc.gz`` +.. code-block:: ini + + gunzip tc_rmw_example.nc.gz You should now have a file: *tc_rmw_example.nc* @@ -60,7 +65,7 @@ fields: Run from the Command Line -~~~~~~~~~~~~~~~~~~~~~~~~~ +========================= A sample Bourne-shell script can be used to convert the pressure level data to height level data: @@ -81,13 +86,17 @@ the directory where you saved the sample data: e.g. -``export DATA_DIR=/users/mydir/data/tcrmw`` +.. code-block:: ini + + export DATA_DIR=/users/mydir/data/tcrmw Replace the `/path/to/output` to the directory where you want to save your output: e.g. -``--output /users/mydir/tcrmw/output`` +.. code-block:: ini + + --output /users/mydir/tcrmw/output Where in this example, the /users/mydir/tcrmw/output is the directory where the output should be directed. Replace this with the full path to the desired location for output files. @@ -125,7 +134,9 @@ To perform the conversion, do the following: * run the script, enter the following command: -``sh height_from_pressure_tcrmw.sh`` +.. code-block:: ini + + sh height_from_pressure_tcrmw.sh This will produce a netCDF file with the filename specified in the *height_from_pressure_tcrmw.sh* script, in this case it is *tc_rmw_example_vertical_interp.nc* and will be located in the output directory specified diff --git a/docs/index.rst b/docs/index.rst index 39943bda..de2a64eb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,15 @@ -=========================== +########################### METcalcpy version |version| -=========================== +########################### + Developed by the `Developmental Testbed Center `_, Boulder, CO .. image:: _static/METplus_banner_photo_web.png -History -___------- +**History** + + The Model Evaluation Tools (MET) were developed by the Developmental Testbed Center (DTC) and released in January 2008. The goal of the tools was to provide the community with a platform-independent and extensible framework @@ -35,8 +37,8 @@ diagnostics capability for NOAA's UFS and a component of NCAR's SIMA modeling frameworks. It is being actively developed by NCAR, ESRL, EMC and is open to community contributions. -METplus Concept ---------------- +**METplus Concept** + METplus is the overarching, or umbrella, repository and hence framework for the Unified Forecast System verification capability. It is intended to be extensible through adding additional capability developed by the community. @@ -74,8 +76,7 @@ was developed because CESM is comprised of a number of different components that are developed and managed independently. Each component also may have additional "external" dependencies that need to be maintained independently. -Acronyms --------- +**Acronyms** * **MET** - Model Evaluation Tools * **DTC** - Developmental Testbed Center @@ -92,8 +93,7 @@ Acronyms * **GSD** - Global Systems Division -Authors -------- +**Authors** Many authors, listed below in alphabetical order, have contributed to the documentation of METplus. To cite this documentation in publications, please refer to the METcalcpy User's Guide :ref:`Citation Instructions`. @@ -121,8 +121,7 @@ To cite this documentation in publications, please refer to the METcalcpy User's -Indices -======= +**Indices** * :ref:`genindex` * :ref:`modindex`