Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 313 consistent headers #316

Merged
merged 20 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions docs/Contributors_Guide/index.rst
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.

Expand All @@ -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 Developers group

* Create a Github issue describing what the contribute code will do

Expand All @@ -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

Expand All @@ -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 (<path-to-METcalcpy>) where you have read/write/execute privileges

Expand Down Expand Up @@ -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.

Expand All @@ -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

Expand All @@ -177,7 +179,7 @@ Testing Your Code


Create User Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~
=========================

* Comment your Python code using python docstrings:

Expand Down Expand Up @@ -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.

Expand Down
7 changes: 3 additions & 4 deletions docs/Users_Guide/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
============
############
User's Guide
============
############

**Foreword: A note to METcalcpy users**

Expand Down Expand Up @@ -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`
Expand Down
25 changes: 12 additions & 13 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand All @@ -58,8 +59,8 @@ will reside (e.g. /home/someuser/).

Uncompress the compressed code using unzip <code> for the zip version or tar -xvfz <code> 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
Expand All @@ -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 <packagename>`. `


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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/Users_Guide/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
29 changes: 20 additions & 9 deletions docs/Users_Guide/vertical_interpolation.rst
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +12,7 @@ implemented with linear interpolation.


Example
~~~~~~~
=======

**Sample Data**

Expand All @@ -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*

Expand Down Expand Up @@ -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:

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
23 changes: 11 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
===========================
###########################
METcalcpy version |version|
===========================
###########################

Developed by the `Developmental Testbed Center <https://dtcenter.org/>`_,
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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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<citations>`.
Expand Down Expand Up @@ -121,8 +121,7 @@ To cite this documentation in publications, please refer to the METcalcpy User's



Indices
=======
**Indices**

* :ref:`genindex`
* :ref:`modindex`
Expand Down