Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
WenMeng-NOAA committed Aug 13, 2021
2 parents 4ee49a9 + 2787388 commit 9c4b8ac
Show file tree
Hide file tree
Showing 318 changed files with 30,906 additions and 66,967 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Test
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
env:
FC: gfortran-9
CC: gcc-9

steps:
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libmpich-dev
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config
sudo apt-get install libpng-dev
sudo apt-get install libjpeg-dev
sudo apt-get install doxygen
- name: checkout-jasper
uses: actions/checkout@v2
with:
repository: jasper-software/jasper
path: jasper
ref: version-2.0.22

- name: build-jasper
run: |
cd jasper
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~
make -j2
make install
- name: checkout-nceplibs
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS
path: nceplibs
ref: v1.2.0

- name: build-nceplibs
run: |
cd nceplibs
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~ -DFLAT=ON -DBUILD_POST=OFF
make -j2
- name: checkout-post
uses: actions/checkout@v2
with:
path: post
submodules: true

- name: build-post
run: |
cd post
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=~ -DENABLE_DOCS=ON
make -j2



3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
branch = develop
[submodule "comupp/src/lib/crtm2"]
path = sorc/comlibs/crtm2
url = https://github.com/NCAR/UPP_CRTM
42 changes: 27 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# This is the CMake build file for EMC_post (also known as UPP).
#
cmake_minimum_required(VERSION 3.15)

file(STRINGS "VERSION" pVersion LIMIT_COUNT 1)

project(
nceppost
upp
VERSION ${pVersion}
LANGUAGES Fortran)

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

option(OPENMP "use OpenMP threading" OFF)
# Handle user options.
option(OPENMP "use OpenMP threading" ON)
option(BUILD_POSTEXEC "Build NCEPpost executable" ON)
option(BUILD_WITH_WRFLIB "Build NCEPpost with WRF library" OFF)
option(BUILD_WITH_WRFIO "Build NCEPpost with WRF-IO library" OFF)
option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)

if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(STATUS "Setting build type to 'Release' as none was specified.")
Expand All @@ -33,27 +37,35 @@ if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

if(BUILD_WITH_WRFLIB)
find_package(wrf REQUIRED)
else()
set(wrf_FOUND FALSE)
if(APPLE)
# The linker on macOS does not include `common symbols` by default
# Passing the -c flag includes them and fixes an error with undefined symbols
set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
endif()

find_package(w3nco REQUIRED)
find_package(bacio REQUIRED)
find_package(crtm REQUIRED)
find_package(g2 REQUIRED)
find_package(g2tmpl REQUIRED)
find_package(bacio REQUIRED)
find_package(ip REQUIRED)
find_package(sp REQUIRED)
find_package(w3emc REQUIRED)
find_package(crtm REQUIRED)

if(BUILD_POSTEXEC)
find_package(sigio REQUIRED)
find_package(sfcio REQUIRED)
find_package(nemsio REQUIRED)
find_package(gfsio REQUIRED)
find_package(sfcio REQUIRED)
find_package(sigio REQUIRED)
find_package(sp REQUIRED)
find_package(w3nco REQUIRED)
if(BUILD_WITH_WRFIO)
find_package(wrf_io REQUIRED)
endif()
endif()

add_subdirectory(sorc)
add_subdirectory(parm)

# If desired, build the doxygen docs.
if(ENABLE_DOCS)
find_package(Doxygen REQUIRED)
add_subdirectory(docs)
endif()

2 changes: 1 addition & 1 deletion CMakeModules
Submodule CMakeModules updated 36 files
+0 −7 Modules/FindGEMPAK.cmake
+0 −53 Modules/FindGSICONTROL.cmake
+0 −14 Modules/FindNDATE.cmake
+3 −0 Modules/FindNetCDF.cmake
+0 −26 Modules/FindWGRIB2.cmake
+0 −34 Modules/Findbufr.cmake
+0 −11 Modules/NewCMake/CMakeParseArguments.cmake
+0 −934 Modules/NewCMake/FindHDF5.cmake
+0 −1,514 Modules/NewCMake/FindMPI.cmake
+0 −4 Modules/NewCMake/FindMPI/fortranparam_mpi.f90.in
+0 −19 Modules/NewCMake/FindMPI/libver_mpi.c
+0 −7 Modules/NewCMake/FindMPI/libver_mpi.f90.in
+0 −10 Modules/NewCMake/FindMPI/mpiver.f90.in
+0 −37 Modules/NewCMake/FindMPI/test_mpi.c
+0 −6 Modules/NewCMake/FindMPI/test_mpi.f90.in
+0 −386 Modules/NewCMake/FindPackageHandleStandardArgs.cmake
+0 −47 Modules/NewCMake/FindPackageMessage.cmake
+0 −70 Modules/NewCMake/SelectLibraryConfigurations.cmake
+0 −15 Modules/comp_src.pl
+0 −65 Modules/findHelpers.cmake
+0 −24 Modules/platforms/Cheyenne.cmake
+0 −55 Modules/platforms/Discover.cmake
+0 −14 Modules/platforms/Gaea.cmake
+0 −14 Modules/platforms/Generic.cmake
+0 −25 Modules/platforms/Generic.cmake.orig
+0 −42 Modules/platforms/Hera.cmake
+0 −10 Modules/platforms/Jet.cmake
+0 −10 Modules/platforms/S4.cmake
+0 −60 Modules/platforms/WCOSS-C.cmake
+0 −51 Modules/platforms/WCOSS-D.cmake
+0 −61 Modules/platforms/WCOSS.cmake
+0 −62 Modules/setGNUFlags.cmake
+0 −85 Modules/setHOST.cmake
+0 −87 Modules/setIntelFlags.cmake
+0 −78 Modules/setPGIFlags.cmake
+0 −10 Modules/setPlatformVariables.cmake
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[gtg]
branch = master
tag = ncep_post_gtg.v2.0.3
protocol = git
repo_url = [email protected]:NCAR/UPP_GTG.git
local_path = sorc/post_gtg.fd
Expand Down
132 changes: 132 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@

# Unified Post-Processing (UPP)

The Unified Post Processor (UPP) software package is a software
package designed to generate useful products from raw model
output.

The UPP is currently used in operations with the Global Forecast
System (GFS), GFS Ensemble Forecast System (GEFS), North American
Mesoscale (NAM), Rapid Refresh (RAP), High Resolution Rapid Refresh
(HRRR), Short Range Ensemble Forecast (SREF), Hurricane WRF (HWRF)
applications, and is also used in Unified Forecasting System (UFS)
applications.

The UPP provides the capability to compute a variety of diagnostic
fields and interpolate to pressure levels or other vertical
coordinates.

UPP also incorporates the Joint Center for Satellite Data Assimilation
(JCSDA) Community Radiative Transfer Model (CRTM) to compute model
derived brightness temperature (TB) for various instruments and
channels. This additional feature enables the generation of a number
of simulated satellite products including GOES products.

Output from the UPP is in National Weather Service (NWS) and World
Meteorological Organization (WMO) GRIB2 format and can be used
directly by visualization, plotting, or verification packages, or for
further downstream post-processing, e.g. statistical post-processing
techniques.

Examples of UPP products include:

- T, Z, humidity, wind, cloud water, cloud ice, rain, and snow on pressure levels
- SLP, shelter level T, humidity, and wind fields
- Precipitation-related fields
- PBL-related fields
- Severe weather products (e.g. CAPE, Vorticity, Wind shear)
- Radiative/Surface fluxes
- Cloud related fields
- Aviation products
- Radar reflectivity products
- Satellite look-alike products

Support for the UFS UPP is provided through the UFS Forum by the
Developmental Testbed Center (DTC) for FV3-based applications.

The UPP uses some of the [NCEPLIBS](https://github.com/NOAA-EMC/NCEPLIBS)
project.

## Authors

NCEP/EMC Developers

Code Manager: Wen Meng, Huiya Chuang, Kate Fossell

## Prerequisites

This package requires the following NCEPLIBS packages:

- [NCEPLIBS-g2](https://github.com/NOAA-EMC/NCEPLIBS-g2)
- [NCEPLIBS-g2tmpl](https://github.com/NOAA-EMC/NCEPLIBS-g2tmpl)
- [NCEPLIBS-sp](https://github.com/NOAA-EMC/NCEPLIBS-sp)
- [NCEPLIBS-ip](https://github.com/NOAA-EMC/NCEPLIBS-ip)
- [NCEPLIBS-bacio](https://github.com/NOAA-EMC/NCEPLIBS-bacio)
- [NCEPLIBS-w3emc](https://github.com/NOAA-EMC/NCEPLIBS-w3emc)
- [NCEPLIBS-w3nco](https://github.com/NOAA-EMC/NCEPLIBS-w3nco)
- [CRTM](https://github.com/noaa-emc/emc_crtm)

Also required to build NCEPpost executable (cmake option
BUILD_POSTEXEC):

- [NCEPLIBS-sigio](https://github.com/NOAA-EMC/NCEPLIBS-sigio) -
- [NCEPLIBS-sfcio](https://github.com/NOAA-EMC/NCEPLIBS-sfcio) -
- [NCEPLIBS-nemsio](https://github.com/NOAA-EMC/NCEPLIBS-nemsio) -
- [NCEPLIBS-gfsio](https://github.com/NOAA-EMC/NCEPLIBS-gfsio)

The [NCEPLIBS-wrf_io](https://github.com/NOAA-EMC/NCEPLIBS-wrf_io)
library is required to build with NCEPpost with WRF-IO library (cmake
option BUILD_WITH_WRFIO).

The following third-party libraries are required:

- [netcdf-c](https://github.com/Unidata/netcdf-c)
- [netcdf-fortran](https://github.com/Unidata/netcdf-fortran)
- [Jasper](https://github.com/jasper-software/jasper)
- [libpng](http://www.libpng.org/pub/png/libpng.html)
- [libz](https://zlib.net/)

## Building

Builds include:

- Operational use GNC build as Wen described for both library and
executable (library used for GFS only at this time)

- MRW App uses UPP packaged with nceplibs and cmake to build/run with
executable (via release/public-v1 branch).

- SRW App uses UPP repo branch/tag directly and uses cmake to
build/run with executable (via release/public-v2 branch).

- Community standalone uses UPP repo branch/tag directly and uses
cmake to build/run with executable (via release/public-v2
branch). For these procedures, we add a
-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} where INSTALL_PREFIX is the
location of the nceplibs installation as a dependency requirement.

```
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
make
make test
make install
```

## Disclaimer

The United States Department of Commerce (DOC) GitHub project code is
provided on an "as is" basis and the user assumes responsibility for
its use. DOC has relinquished control of the information and no longer
has responsibility to protect the integrity, confidentiality, or
availability of the information. Any claims against the Department of
Commerce stemming from the use of its GitHub project will be governed
by all applicable Federal law. Any reference to specific commercial
products, processes, or services by service mark, trademark,
manufacturer, or otherwise, does not constitute or imply their
endorsement, recommendation or favoring by the Department of
Commerce. The Department of Commerce seal and logo, or the seal and
logo of a DOC bureau, shall not be used in any manner to imply
endorsement of any commercial product or activity by DOC or the United
States Government.
4 changes: 1 addition & 3 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
9.9.9
# This is a placeholder version number.
# It will be replaced with an appropriate version following a discussion within the UPP management.
10.0.8
57 changes: 0 additions & 57 deletions clean

This file was deleted.

18 changes: 8 additions & 10 deletions cmake/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,26 @@ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
include(CMakeFindDependencyMacro)

find_dependency(MPI)
find_dependency(NetCDF COMPONENTS Fortran)

# ON/OFF implies @PROJECT_NAME@ was compiled with/without OpenMP
if(@OPENMP@)
find_dependency(OpenMP COMPONENTS Fortran)
endif()

find_dependency(NetCDF COMPONENTS Fortran)

find_dependency(w3nco CONFIG)
find_dependency(bacio CONFIG)
find_dependency(crtm CONFIG)
find_dependency(g2 CONFIG)
find_dependency(g2tmpl CONFIG)
find_dependency(bacio CONFIG)
find_dependency(ip CONFIG)
find_dependency(sp CONFIG)
find_dependency(w3emc CONFIG)
find_dependency(crtm CONFIG)

# nceppost library does not depend on these, the executable does.
#find_dependency(sigio CONFIG)
#find_dependency(sfcio CONFIG)
#find_dependency(nemsio CONFIG)
#find_dependency(gfsio CONFIG)
#find_dependency(nemsio CONFIG)
#find_dependency(sfcio CONFIG)
#find_dependency(sigio CONFIG)
#find_dependency(sp CONFIG)
#find_dependency(w3nco CONFIG)

# Get the build type from library target
get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@ IMPORTED_CONFIGURATIONS)
Expand Down
Loading

0 comments on commit 9c4b8ac

Please sign in to comment.