Skip to content

Commit

Permalink
feature/stack
Browse files Browse the repository at this point in the history
Merge branch 'develop' into feature/stack

Fixes ufs-community#248
  • Loading branch information
GeorgeGayno-NOAA committed Feb 24, 2021
2 parents 448e24a + 5b27654 commit dfc85d7
Show file tree
Hide file tree
Showing 65 changed files with 2,203 additions and 29,755 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/build_and_test.yml

This file was deleted.

133 changes: 133 additions & 0 deletions .github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
env:
CC: gcc-9
FC: gfortran-9
CXX: g++-9
strategy:
matrix:
os: [macos-10.15, ubuntu-20.04]
compiler: [gcc-9]

steps:
- name: install-dependencies
run: |
if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then
sudo apt-get update
sudo apt-get install doxygen
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
elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then
brew install doxygen
brew install mpich
brew install netcdf
brew install wget
if [[ ${{ matrix.compiler }} == "gcc-9" ]]; then
sudo ln -sf /usr/local/bin/gfortran-9 /usr/local/bin/gfortran
elif [[ ${{ matrix.compiler }} == "gcc-10" ]]; then
sudo ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
fi
fi
- name: cache-esmf
id: cache-esmf
uses: actions/cache@v2
with:
path: ~/esmf
key: esmf-${{ runner.os }}-8.0.1-2

- name: build-esmf
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
set -x
pushd ~
export ESMF_DIR=~/esmf-ESMF_8_0_1
wget https://github.com/esmf-org/esmf/archive/ESMF_8_0_1.tar.gz &> /dev/null && ls -l
tar zxf ESMF_8_0_1.tar.gz && ls -l
cd esmf-ESMF_8_0_1
export ESMF_COMM=mpich3
export ESMF_INSTALL_BINDIR=bin
export ESMF_INSTALL_LIBDIR=lib
export ESMF_INSTALL_MODDIR=mod
export ESMF_COMPILER=gfortran
export ESMF_INSTALL_PREFIX=~/esmf
export ESMF_NETCDF=split
if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then
export ESMF_NETCDF_INCLUDE=/usr/include
export ESMF_NETCDF_LIBPATH=/usr/x86_64-linux-gnu
elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then
export ESMF_NETCDF_INCLUDE=/usr/local/include
export ESMF_NETCDF_LIBPATH=/usr/local/lib
fi
make -j2
make install
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v2
with:
path: ~/jasper
key: jasper-${{ runner.os }}-2.0.22

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
set -x
pwd
wget https://github.com/jasper-software/jasper/archive/version-2.0.22.tar.gz &> /dev/null && ls -l
tar zxf version-2.0.22.tar.gz && ls -l
cd jasper-version-2.0.22
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install
- name: checkout-nceplibs
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS
path: nceplibs

- name: cache-nceplibs
id: cache-nceplibs
uses: actions/cache@v2
with:
path: ~/nceplibs
key: nceplibs-${{ runner.os }}-1.3.0

- name: build-nceplibs
run: |
set -x
export ESMFMKFILE=~/esmf/lib/esmf.mk
wget https://github.com/NOAA-EMC/NCEPLIBS/archive/v1.3.0.tar.gz &> /dev/null
tar zxf v1.3.0.tar.gz && ls -l
cd NCEPLIBS-1.3.0
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper' -DCMAKE_INSTALL_PREFIX='~/nceplibs' -DFLAT=ON
make -j2
- name: checkout-ufs-utils
uses: actions/checkout@v2
with:
path: ufs_utils

- name: build-ufs-utils
run: |
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd ufs_utils
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper;~/nceplibs' -DENABLE_DOCS=On
make -j2
make test



124 changes: 124 additions & 0 deletions .github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: esmf-8.0.1_jasper-2.0.22_nceplibs-develop
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
env:
CC: gcc-9
FC: gfortran-9
CXX: g++-9
strategy:
matrix:
os: [macos-10.15, ubuntu-20.04]
compiler: [gcc-9]

steps:
- name: install-dependencies
run: |
if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then
sudo apt-get update
sudo apt-get install doxygen
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
elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then
brew install doxygen
brew install mpich
brew install netcdf
brew install wget
if [[ ${{ matrix.compiler }} == "gcc-9" ]]; then
sudo ln -sf /usr/local/bin/gfortran-9 /usr/local/bin/gfortran
elif [[ ${{ matrix.compiler }} == "gcc-10" ]]; then
sudo ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
fi
fi
- name: cache-esmf
id: cache-esmf
uses: actions/cache@v2
with:
path: ~/esmf
key: esmf-${{ runner.os }}-8.0.1-2

- name: build-esmf
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
set -x
pushd ~
export ESMF_DIR=~/esmf-ESMF_8_0_1
wget https://github.com/esmf-org/esmf/archive/ESMF_8_0_1.tar.gz &> /dev/null && ls -l
tar zxf ESMF_8_0_1.tar.gz && ls -l
cd esmf-ESMF_8_0_1
export ESMF_COMM=mpich3
export ESMF_INSTALL_BINDIR=bin
export ESMF_INSTALL_LIBDIR=lib
export ESMF_INSTALL_MODDIR=mod
export ESMF_COMPILER=gfortran
export ESMF_INSTALL_PREFIX=~/esmf
export ESMF_NETCDF=split
if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then
export ESMF_NETCDF_INCLUDE=/usr/include
export ESMF_NETCDF_LIBPATH=/usr/x86_64-linux-gnu
elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then
export ESMF_NETCDF_INCLUDE=/usr/local/include
export ESMF_NETCDF_LIBPATH=/usr/local/lib
fi
make -j2
make install
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v2
with:
path: ~/jasper
key: jasper-${{ runner.os }}-2.0.22

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
set -x
pwd
wget https://github.com/jasper-software/jasper/archive/version-2.0.22.tar.gz &> /dev/null && ls -l
tar zxf version-2.0.22.tar.gz && ls -l
cd jasper-version-2.0.22
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install
- name: checkout-nceplibs
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS
path: nceplibs

- name: build-nceplibs
run: |
set -x
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd nceplibs
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper' -DCMAKE_INSTALL_PREFIX='~' -DFLAT=ON
make -j2
- name: checkout-ufs-utils
uses: actions/checkout@v2
with:
path: ufs_utils

- name: build-ufs-utils
run: |
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd ufs_utils
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper' -DENABLE_DOCS=On
make -j2
make test



4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ exec/
*.x

*.swp
*.o
emcsfc_ice_blend
ml01rg2.x

11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# User options.
option(OPENMP "use OpenMP threading" ON)
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 @@ -22,6 +23,8 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
message(STATUS "Set BUILD_TESTING to YES and build unit testing package under tests")
set(BUILD_TESTING "YES")
endif()

# Set compiler flags.
Expand Down Expand Up @@ -53,10 +56,8 @@ endif()
find_package(gfsio REQUIRED)
find_package(sfcio REQUIRED)
find_package(w3nco REQUIRED)
find_package(landsfcutil REQUIRED)
find_package(bacio REQUIRED)
find_package(nemsio REQUIRED)
find_package(nemsiogfs REQUIRED)
find_package(sigio REQUIRED)
find_package(sp REQUIRED)
find_package(ip REQUIRED)
Expand All @@ -72,6 +73,12 @@ endif()

add_subdirectory(sorc)

# Run unit tests.
include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
find_package(Doxygen REQUIRED)
Expand Down
Loading

0 comments on commit dfc85d7

Please sign in to comment.