Skip to content

Commit

Permalink
Merging in changes from release/public-v1 (NOAA-EMC#141)
Browse files Browse the repository at this point in the history
* Initial spack/cmake version

* updated for umbrella build

* tweak to findnetcdf

* added include directory

* updated cmake

* changed to https for cmake submodule

* updated cmake submodule

* updated install directory

* added build for libnceppost.a

* modifications for macOS clang/gfortran build

* updated for gnu build

* udpated cmake submodule

* Add RST file for UPP v4.0

* Modifying introduction

* merged develop in and separated library from executable in build

* Update CMakeLists.txt files to support GNU compilers

* applied patch from Dusan

* Add conf.py for upp documentation

* Add index.rst for upp documentation

* Add readthedocs config file

* Modify name of main rst doc in index for readthedocs build test

* Change master file to index

* Edits for UFS documentation to remove WRF and grib1 references

* Add a readthedocs config file

* Mods to config and index files for use in readthedocs

* Update submodule pointer for cmake

* Remove old GNU makefiles with problematic names (only differing in case from existing files)

* Add files for GRIB2 table of fields

* Update .gitmodules, add branch = ufs_release_1.0 for cmake

* Update .gitmodules for testing, code review and merging

* Update include/lib flags for sigio, sfcio, nemsio

* Add REQUIRED attribute to find_package calls in CMakeLists.txt

* Comment out LAPACK dependency in CMakeLists.txt

* Revert change to .gitmodules, update submodule pointer for cmake

* sorc/ncep_post.fd/CMakeLists.txt: change GFSIO_INC to GFSIO_INC4

* Add capacity of detecting scaning mode north2south vs south2north in gaussian grid from Dusan.

* Re-factor CMake

* Fix library linking

* small fix to kyles refactor

* Add capacity of detecting scaning mode north2south vs south2north in gaussian grid from Dusan.

* Fix typo in sorc/ncep_post.fd/CMakeLists.txt

* Fix how Intel compile options with spaces in them are handled

* Update branch name for cmake submodule, update submodule pointer

* Update submodule pointer for cmake

* Update .gitmodules and submodule pointer for cmake, bugfixes for CMakeLists.txt

* Update submodule pointer for cmake

* fixes problem linking ncep_post with gnu/openmpi

* Update submodule pointer for cmake

* Revert .gitmodules change

* Bugfix: comment out debug print statement that can lead to out-of-bounds access; update submodule pointer for cmake

* Update submodule pointer for cmake

* OpenMP bugfix, use lowercase in find_package(CRTM)

* Fix post crash on macOS: use allocatable array

* Update submodule pointer for cmake

* Add UFS UPP rst documentation

* Update submodule pointer for cmake

* Rename g2tmpl_d to g2tmpl (NOAA-EMC#89)

* Update submodule pointer for cmake

* cleanup post

Change-Id: Ie52af5ff79ac4122e79d7a46e89ee2077188b0a4

* we dont depend on C HDF5 library. remove.

Change-Id: I26aa7c0bf7ed2783de1a9967d961d0260dee8b54

* use transitive properties. apply OpenMP flags if OpenMP is found. Formatting using cmake-format

Change-Id: Ic08ce6bc85a7d949c779ec597241c8cb4c20db86

* add debug gnu flags. compile_definitions does not like the quotes around long long, remove

Change-Id: Iccd5bb496944f75a79500729051dd571303cb50f

* Update CMakeLists.txt

* Update submodule pointer for cmake

* Update submodule pointer for cmake

* Add LGPL license to repository

* EMC_post is a Fortran only project. blockIO.c is not used, so do not include in building

* Update submodule pointer for cmake

* Bug fix for unary operator in INITPOST_GFS_NEMS_MPIIO.f. (NOAA-EMC#92)

* Remove old unused makefiles

* CMakeLists.txt: install postxconfig-NT-GFS-F00.txt and postxconfig-NT-GFS.txt in share directory

* Update version

@fossell says post is at version 8.0.0

* Update submodule pointer for cmake

* Fix Out of Bound Exception in GFSPOST.F (NOAA-EMC#100)

* Fix out-of-bound error in tpause routine in GFSPOST.F

* Fix use of undefined variables.

* Feature/cleanup (NOAA-EMC#95)

* cleanup post

Change-Id: Ie52af5ff79ac4122e79d7a46e89ee2077188b0a4

* we dont depend on C HDF5 library. remove.

Change-Id: I26aa7c0bf7ed2783de1a9967d961d0260dee8b54

* use transitive properties. apply OpenMP flags if OpenMP is found. Formatting using cmake-format

Change-Id: Ic08ce6bc85a7d949c779ec597241c8cb4c20db86

* add debug gnu flags. compile_definitions does not like the quotes around long long, remove

Change-Id: Iccd5bb496944f75a79500729051dd571303cb50f

* Update CMakeLists.txt

* EMC_post is a Fortran only project. blockIO.c is not used, so do not include in building

* Update version

@fossell says post is at version 8.0.0

* Revert "Feature/cleanup (NOAA-EMC#95)"

This reverts commit 7e9797b355d2b86ea9e274534f86adc42e866b95.

* remove unused compile definitions and update cmake pointer

Change-Id: Ie47cf16ebc25928bf30bfd05d4f25678219571a6

* Fix ID index in WRF-CHEM SMOKE block, which currently causes failed build in debug mode

* remove unnecessary commented line

* NetCDF static fix (#1)

* CMakeLists.txt: add MODULE to find_package calls

* Cleanup of NetCDF in CMakeLists.txt

* update cmake submodule pointer

Change-Id: I763882fd6ecc4b8cc64a60eddabccfdb7046040d

* Add MODULE to find_package(NetCDF) call (NOAA-EMC#3)

* update cmake submodule pointer

Change-Id: I69015efa425658645567e9d9f22d5e51301c1a0b

* Change version from 8.0.0 to 1.0.0

* fix the install path of compiled Fortran module files

Co-authored-by: Mark A Potts <mark.potts@noaa.gov>
Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>
Co-authored-by: Mark Potts <33099090+mark-a-potts@users.noreply.github.com>
Co-authored-by: Tracy <hertneky@ucar.edu>
Co-authored-by: Kate Fossell <fossell@ucar.edu>
Co-authored-by: Dusan Jovic <dusan.jovic@noaa.gov>
Co-authored-by: Wen Meng <wen.meng@noaa.gov>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
Co-authored-by: Kyle Gerheiser <kgerheiser@icloud.com>
Co-authored-by: Mark Potts <mpotts@redlineperf.com>
Co-authored-by: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com>
Co-authored-by: Dom Heinzeller <dom.heinzeller@noaa.gov>
Co-authored-by: Tracy <tracy.hertneky@noaa.gov>
Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
Co-authored-by: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com>
Co-authored-by: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com>
  • Loading branch information
17 people committed Jun 24, 2020
1 parent a30924d commit a51df0c
Show file tree
Hide file tree
Showing 31 changed files with 1,026 additions and 1,438 deletions.
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################
*.exe
*.o
build/
install/

*.[ao]
*.mod
*.a
*.so
*.exe
*.x

*.swp
configure.upp*
*.a
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "comupp/src/lib/crtm2"]
path = sorc/comlibs/crtm2
url = https://github.com/NCAR/UPP_CRTM
[submodule "cmake"]
path = cmake
url = https://github.com/NOAA-EMC/CMakeModules
branch = release/public-v1
24 changes: 24 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
#python:
# version: 3.7
# install:

# - requirements: docs/requirements.txt
95 changes: 95 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
cmake_minimum_required(VERSION 3.15)

file(STRINGS "VERSION" pVersion)

project(
ncep_post
VERSION ${pVersion}
LANGUAGES Fortran)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()

option(OPENMP "use OpenMP threading" OFF)

if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE
"Release"
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()

if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU|Clang|AppleClang)$")
message(WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}")
endif()

find_package(MPI REQUIRED)
find_package(PNG REQUIRED)
find_package(Jasper REQUIRED)
find_package(NetCDF MODULE REQUIRED)

if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

set(CMAKE_FIND_PACKAGE_PREFER_CONFIG true)

if(NOT TARGET sigio_4)
find_package(sigio REQUIRED)
endif()

if(NOT TARGET w3nco_4)
find_package(w3nco REQUIRED)
endif()

if(NOT TARGET g2_4)
find_package(g2 REQUIRED)
endif()

if(NOT TARGET g2tmpl)
find_package(g2tmpl REQUIRED)
endif()

if(NOT TARGET bacio_4)
find_package(bacio REQUIRED)
endif()

if(NOT TARGET ip_4)
find_package(ip REQUIRED)
endif()

if(NOT TARGET sp_4)
find_package(sp REQUIRED)
endif()

if(NOT TARGET sfcio_4)
find_package(sfcio REQUIRED)
endif()

if(NOT TARGET nemsio)
find_package(nemsio REQUIRED)
endif()

if(NOT TARGET gfsio_4)
find_package(gfsio REQUIRED)
endif()

if(NOT TARGET w3emc_4)
find_package(w3emc REQUIRED)
endif()

if(NOT TARGET crtm)
find_package(crtm REQUIRED)
endif()

add_subdirectory(sorc)

install(FILES parm/postxconfig-NT-GFS.txt parm/postxconfig-NT-GFS-F00.txt DESTINATION share)
157 changes: 157 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
### GNU LESSER GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the
terms and conditions of version 3 of the GNU General Public License,
supplemented by the additional permissions listed below.

#### 0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the
GNU General Public License.

"The Library" refers to a covered work governed by this License, other
than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

#### 1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

#### 2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

- a) under this License, provided that you make a good faith effort
to ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
- b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

#### 3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from a
header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

- a) Give prominent notice with each copy of the object code that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the object code with a copy of the GNU GPL and this
license document.

#### 4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of
the Library contained in the Combined Work and reverse engineering for
debugging such modifications, if you also do each of the following:

- a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the Combined Work with a copy of the GNU GPL and this
license document.
- c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
- d) Do one of the following:
- 0) Convey the Minimal Corresponding Source under the terms of
this License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
- 1) Use a suitable shared library mechanism for linking with
the Library. A suitable mechanism is one that (a) uses at run
time a copy of the Library already present on the user's
computer system, and (b) will operate properly with a modified
version of the Library that is interface-compatible with the
Linked Version.
- e) Provide Installation Information, but only if you would
otherwise be required to provide such information under section 6
of the GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option
4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you
use option 4d1, you must provide the Installation Information in
the manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.)

#### 5. Combined Libraries.

You may place library facilities that are a work based on the Library
side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

- a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities, conveyed under the terms of this License.
- b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

#### 6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library
as you received it specifies that a certain numbered version of the
GNU Lesser General Public License "or any later version" applies to
it, you have the option of following the terms and conditions either
of that published version or of any later version published by the
Free Software Foundation. If the Library as you received it does not
specify a version number of the GNU Lesser General Public License, you
may choose any version of the GNU Lesser General Public License ever
published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
1 change: 1 addition & 0 deletions cmake
Submodule cmake added at b605db
27 changes: 27 additions & 0 deletions docs/Acknowledgments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
***************
Acknowledgments
***************

The adaptation of the original WRF Post Processor package and Users
Guide (by Mike Baldwin of NSSL/CIMMS and Hui-Ya Chuang of NCEP/EMC) was
done by Lígia Bernardet (NOAA/ESRL/DTC) in collaboration with Dusan
Jovic (NCEP/EMC), Robert Rozumalski (COMET), Wesley Ebisuzaki
(NWS/HQTR), and Louisa Nance (NCAR/RAL/DTC). Upgrades to WRF Post
Processor versions 2.2 and higher were performed by Hui-Ya Chuang, Dusan
Jovic and Mathew Pyle (NCEP/EMC). Transitioning of the documentation
from the WRF Post Processor to the Unified Post Processor was performed
by Nicole McKee (NCEP/EMC), Hui-ya Chuang (NCEP/EMC), and Jamie Wolff
(NCAR/RAL/DTC). Implementation of the Community Unified Post Processor
was performed by Tricia Slovacek and Kate Fossell (NCAR/RAL/DTC).

Acknowledgement


If significant help was provided via the UPP helpdesk for work resulting
in a publication, please acknowledge the Developmental Testbed Center
UPP Team.

For referencing this document please use:

UPP Users Guide V4, 24 pp. [available online at
https://dtcenter.org/sites/default/files/community-code/upp-users-guide-v4.pdf]
7 changes: 7 additions & 0 deletions docs/BuildRunWithoutApp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
***********************************************
Building and Running UPP without an Application
***********************************************

Currently the UPP within the UFS application cannot be built as a standolone application. Please visit
the `UPP community code website <https://dtcenter.org/community-code/unified-post-processor-upp>`_ for
instructions on obtaining, building and running the UPP as a stand-alone application.
21 changes: 21 additions & 0 deletions docs/CodeOverview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*************
Code Overview
*************

The UPP can be used to post-process WRF-ARW, WRF-NMM, NMMB, GFS, CFS, and FV3 forecasts with current support within UFS available for FV3 only. It can ingest FV3 history files (dyn*/phy*) in netCDF and binarynemsiompiio format.

Unipost Functionalities:

- Interpolates the forecasts from the models native vertical
coordinate to NWS standard output levels (e.g., pressure, height)
and computes mean sea level pressure. If the requested parameter
is on a models native level, then no vertical interpolation is
performed.

- Computes diagnostic output quantities (e.g., convective available
potential energy, helicity, relative humidity). A full list of
fields that can be generated by *unipost* is provided in
https://dtcenter.org/sites/default/files/community-code/upp-grib2-table_0.pdf.

- Outputs the results in NWS and WMO standard GRIB2 format (for GRIB
documentation, see http://www.nco.ncep.noaa.gov/pmb/docs/).
Loading

0 comments on commit a51df0c

Please sign in to comment.