Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1bf43b0
adding documetions for doxygen
pjpegion Dec 9, 2019
d7eb21d
makefile: remove non-existent include directory
climbfuji Dec 10, 2019
4a3fe2d
initial commit adding sphinx documentation
pjpegion Dec 10, 2019
47a9545
edit index.rst
pjpegion Dec 10, 2019
87c7a81
add contents.rst
pjpegion Dec 10, 2019
6c78a68
modify confy.py
pjpegion Dec 10, 2019
5d98360
modify confy.py for doxygen
pjpegion Dec 10, 2019
2def296
modify confy.py for doxygen
pjpegion Dec 10, 2019
69e61ac
revert to sphinx only
pjpegion Dec 10, 2019
01739da
Merge pull request #7 from climbfuji/ufs_public_release_update_from_d…
pjpegion Dec 10, 2019
fc82587
setting up breathe
pjpegion Dec 11, 2019
59abfbb
fix bug in conf.py
pjpegion Dec 11, 2019
91d9e57
changes for breather
pjpegion Dec 12, 2019
2ed2300
changes for breather
pjpegion Dec 12, 2019
f8ac6e4
Doxygen and Travis.yml
pjpegion Dec 12, 2019
b55eddf
Doxygen and Travis.yml
pjpegion Dec 12, 2019
a337ac8
point to external doxygen
pjpegion Dec 12, 2019
cc8400a
more updates for doxygen and sphinx
pjpegion Dec 12, 2019
f8b21ce
update travis yml file
pjpegion Dec 12, 2019
e81493a
update doxygen config and add logo
pjpegion Dec 12, 2019
9ce44b7
revert to old travis.yml file
pjpegion Dec 12, 2019
bf24b24
add dot
pjpegion Dec 12, 2019
e718f20
add graphviz
pjpegion Dec 12, 2019
92145de
update doxygen conf
pjpegion Dec 12, 2019
41fcdbc
add references
pjpegion Dec 12, 2019
b001670
add references.rs
pjpegion Dec 12, 2019
3bf9095
Merge pull request #8 from pjpegion/ufs_public_release
pjpegion Jan 9, 2020
7c04abf
merge in updates from master
pjpegion Jan 9, 2020
0bc8a18
testing shinx with travis
pjpegion Jan 13, 2020
28bea1b
2nd testing sphinx with travis
pjpegion Jan 13, 2020
9692b8a
3rd testing sphinx with travis
pjpegion Jan 13, 2020
ed8c4f0
4th test sphinx with travis
pjpegion Jan 13, 2020
9199110
4th test sphinx with travis
pjpegion Jan 13, 2020
a455e72
5th test sphinx with travis
pjpegion Jan 13, 2020
a936270
5th test sphinx with travis
pjpegion Jan 13, 2020
354dfcc
update doxygen content
pjpegion Jan 13, 2020
51f962b
update doxygen content
pjpegion Jan 13, 2020
aee8340
modify travis.yaml
pjpegion Jan 13, 2020
80b57f4
modify travis.yaml
pjpegion Jan 13, 2020
935ffd5
add more content to documentation
pjpegion Jan 13, 2020
f8b5c37
Merge pull request #11 from pjpegion/ufs_public_release
pjpegion Jan 13, 2020
c79735d
update travis.yaml
pjpegion Jan 21, 2020
256d709
update link for doxygen docs
pjpegion Jan 21, 2020
769bed4
Update users_guide.rst
pjpegion Feb 5, 2020
8d2dfc2
Update users_guide.rst
pjpegion Feb 5, 2020
80fbde8
Update .travis.yml
pjpegion Feb 5, 2020
2471fc7
Update .travis.yml
pjpegion Feb 5, 2020
d618052
Remove unused num_parthds_stochy.f; threaded regions must use the num…
climbfuji Feb 10, 2020
c4c1a29
Merge pull request #13 from climbfuji/threading_issue_stochastic_physics
pjpegion Feb 10, 2020
77b75c4
update documentation
pjpegion Feb 24, 2020
25a23ea
Merge pull request #14 from noaa-psd/ufs_public_release
pjpegion Feb 24, 2020
e41f5ec
fix url to git flow document
pjpegion Feb 24, 2020
5cfe292
update documentation
pjpegion Mar 2, 2020
8349150
more docuementation updates
pjpegion Mar 2, 2020
e35b53b
add License
pjpegion Mar 2, 2020
7719efb
update travis.yml file
pjpegion Mar 2, 2020
09941d1
update travis.yml file
pjpegion Mar 2, 2020
8accd3f
update conf.py file
pjpegion Mar 2, 2020
cd345b6
Merge pull request #19 from noaa-psd/master
pjpegion May 11, 2020
287bd61
Merge pull request #20 from noaa-psd/release/public-v1
pjpegion May 11, 2020
48bed89
Merge branch 'master' into psd/develop
pjpegion May 11, 2020
f7a4be0
add back num_parthreads.f for compiling issue
pjpegion May 12, 2020
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
56 changes: 56 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This will run on Travis' 'new' container-based infrastructure
sudo: false

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- "./miniconda.sh -b"
- export PATH=/home/travis/miniconda2/bin:$PATH
- conda update --yes conda

install:
- conda install --yes sphinx
- pip install sphinx_rtd_theme

# Blacklist
branches:
only:
- ufs_public_release
- release/public-v1

# Environment variables
env:
global:
- GH_REPO_NAME: stochastic_physics
- DOXYFILE: $TRAVIS_BUILD_DIR/
- GH_REPO_REF: github.com/noaa-psd/stochastic_physics.git

# Install dependencies
addons:
apt:
packages:
- doxygen
- graphviz

# Build your code e.g. by calling make
script:
- doxygen
- pushd docs
# Use Sphinx to make the html docs
- make html
# Tell GitHub not to use jekyll to compile the docs
- touch build/html/.nojekyll
- popd

# Generate and deploy documentation
before_deploy:
- cp -r html docs/build/html/doxygen
deploy:
provider: pages
skip_cleanup: true
local_dir: docs/build/html
github_token: $GH_REPO_TOKEN
on:
branch:
- ufs_public_release
- release/public-v1
22 changes: 22 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PROJECT_NAME = "stochastic physics"
PROJECT_NUMBER = v1
STRIP_FROM_PATH =
INPUT =
FILE_PATTERNS = *.md \
*.h \
*.doc \
*.c \
*.f \
*.F90
RECURSIVE = YES
USE_MDFILE_AS_MAINPAGE = README.md
OPTIMIZE_FOR_FORTRAN = YES
GENERATE_XML = NO
INLINE_SIMPLE_STRUCTS = YES
EXTRACT_ALL = YES
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
PROJECT_LOGO = docs/UFS_logo.png
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright 2020 The Regents of the University of Colorado

The stochastic_physics code incorporated in the Unified Forecast System (UFS)
was jointly developed by the National Oceanic and Atmospheric Administration and the
University of Colorado, Boulder. The gold standard copy of the Code
will be maintained by NOAA at https://github.com/noaa-psd/stochastic_physics.

In cooperation with the Copyright Holder, the National Oceanic and
Atmospheric Administration is releasing this code under the
GNU Lesser General PUblic License v3.0 (the "License"); you may not use this
file except in compliance with the License.

You may obtain a copy of the License at

https://www.gnu.org/licenses/lgpl-3.0.en.html

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
3 changes: 1 addition & 2 deletions compile_standalone
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh -x
compile_all=1
compile_all=0
FC=mpif90
INCS="-I. -I../FV3/gfsphysics/ -I../FMS/include -I../FV3/atmos_cubed_sphere -I../FMS/fv3gfs"
FLAGS64=" -traceback -real-size 64 -DSTOCHY_UNIT_TEST -c "$INCS
Expand All @@ -18,7 +18,6 @@ if [ $compile_all -eq 1 ];then
$FC ${FLAGS64} setlats_lag_stochy.f
$FC ${FLAGS64} glats_stochy.f
$FC ${FLAGS64} gozrineo_stochy.f
$FC ${FLAGS64} num_parthds_stochy.f
$FC ${FLAGS64} dezouv_stochy.f
$FC ${FLAGS64} dozeuv_stochy.f
$FC ${FLAGS64} epslon_stochy.f
Expand Down
4 changes: 4 additions & 0 deletions compns_stochy.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
!>@brief The module 'compns_stochy_mod' contains the subroutine compns_stochy
module compns_stochy_mod

implicit none

contains

!-----------------------------------------------------------------------
!>@brief The module 'compns_stochy_mod' set the default namelist options reads in the stochastic physics namelist
!! and sets logicals and other parameters based on the namelist
!>@details Namelist can be either a file, or an internal namelist
subroutine compns_stochy (me,sz_nml,input_nml_file,fn_nml,nlunit,deltim,iret)
!$$$ Subprogram Documentation Block
!
Expand Down
5 changes: 5 additions & 0 deletions dezouv_stochy.f
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
!>@brief The module 'dezouv_stochy_mod' contains the subroutine dezouv_stochy
! of divergence and odd harmonics of vorticty
module dezouv_stochy_mod

implicit none

contains

!>@brief The subroutine 'dezouv_stochy' caculates even u and odd v winds harmonics from the even harmonics
! of divergence and odd harmonics of vorticty
!>@details This code is taken from the legacy spectral GFS
subroutine dezouv_stochy(dev,zod,uev,vod,epsedn,epsodn,
& snnp1ev,snnp1od,ls_node)
cc
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/UFS_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: stochast_physics-docs

channels:
- conda-forge

dependencies:
- breathe
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
70 changes: 70 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
#import os
#import sys
#sys.path.append( "/Users/ppegion/.local/bin" )
#sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'UFS stochastic physics'
copyright = '2020, The Regents of the University of Colorado'
author = 'Philip Pegion'

# The full version, including alpha/beta/rc tags
release = 'public'

# assign master document

master_doc = 'index'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.

# create doxygen documentation
#import subprocess
#read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
#print('read_the_docs_build',read_the_docs_build)
#if read_the_docs_build:
# subprocess.call('cd ../../ ; doxygen', shell=True)
#extensions = ['sphinx.ext.autodoc', 'breathe']
##extensions = ['breathe']
#breathe_projects = { "stochastic_physics": "../../xml/" }
#breathe_default_project = "stochastic_physics"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

14 changes: 14 additions & 0 deletions docs/source/developers_guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Developer's guide
=================

Code is housed on github at https://github.com/noaa-psd/stochastic_physics. Please read more about the Development process at https://github.com/ufs-community/ufs/wiki/Development-Processes#Developing-with-Gitflow.

Please make a fork and checkout the entire ufs-community weather model at https://github.com/ufs-community/ufs-weather-model and point to your fork of the stochastic_physics submodule.

Standalone testing
""""""""""""""""""
If you intend to make modifications to the stochastic physics source code, there is a simplified program that exercises the random pattern generator without needing to run the entire model. Please see README.standalone in the stochastic_physics directory.

Full model tests
""""""""""""""""
The code updates are not expected to change existing results, so the full model regression tests need to be run. All of the tests must pass, although only a sub-set of tests are needed to consider adding changes to the stochastic_physics repository: fv3_control, fv3_stochy, fv3_ccpp_control, and fv3_ccpp_stochy. If the results are expected to change, then there needs to be scientific evidience that the change in results are what is expected.
10 changes: 10 additions & 0 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Getting Started
==================================================
The stochastic physics currently only works with the UFS-atmosphere model

You should get the full system at https://github.com/ufs-community/ufs-weather-model, which will include the stochastic physics code.

In order to enable stochastic physics in a model run, you will need to turn it on via `namelist options <namelist_options.html>`_

If using the CIME workflow decribed at https://ufs-mrweather-app.readthedocs.io/en/latest/, please add do_sppt=T, etc. to user_nl_ufsatm in the case directory.

18 changes: 18 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Welcome to UFS stochastic physics's documentation!
==================================================

.. toctree::
:maxdepth: 2

getting_started
users_guide
namelist_options
developers_guide
references


Source Code Documentation
==========================

Doxygen generated `content <https://noaa-psd.github.io/stochastic_physics/doxygen/index.html>`_

Loading