Skip to content

Commit

Permalink
Update CMEPS (#60)
Browse files Browse the repository at this point in the history
* moved files into ufs
* implemented different interface for ufs flux_atmocn_mod
* add compile fixes for ufs
* removed reference to util and replaced with ufs
* clean up of Makefile
* removed references to use of med_kind_mod and introduced ufs_kind_mod
* removed unneeded files needed by ufs
* Optional tiled history files for ATM (ESCOMP#257)
  • Loading branch information
DeniseWorthen authored Dec 16, 2021
1 parent 5beead0 commit 8b117b4
Show file tree
Hide file tree
Showing 53 changed files with 6,185 additions and 3,785 deletions.
153 changes: 153 additions & 0 deletions .github/workflows/srt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# CIME scripts regression tests

name: scripts regression tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: main
pull_request:
branches: main

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
env:
CC: mpicc
FC: mpifort
CXX: mpicxx
CPPFLAGS: "-I/usr/include -I/usr/local/include"
# Versions of all dependencies can be updated here
PNETCDF_VERSION: pnetcdf-1.12.2
NETCDF_FORTRAN_VERSION: v4.5.2
MCT_VERSION: MCT_2.11.0
PARALLELIO_VERSION: pio2_5_4
NETCDF_C_PATH: /usr
NETCDF_FORTRAN_PATH: ${HOME}/netcdf-fortran
PNETCDF_PATH: ${HOME}/pnetcdf
CIME_MODEL: cesm
CIME_DRIVER: mct

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

- name: cime checkout
uses: actions/checkout@v2
with:
repository: ESMCI/cime

- name: share checkout
uses: actions/checkout@v2
with:
repository: ESCOMP/CESM_share
path: share

- name: cpl7 checkout
uses: actions/checkout@v2
with:
repository: ESCOMP/CESM_CPL7andDataComps
path: components/cpl7

- id: load-env
run: |
sudo apt-get update
sudo apt-get install libxml2-utils pylint wget gfortran openmpi-bin netcdf-bin libopenmpi-dev cmake libnetcdf-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: mct install
run: |
git clone -b ${{ env.MCT_VERSION }} https://github.com/MCSclimate/MCT libraries/mct
ls -l libraries/mct
- name: parallelio install
run: |
git clone -b ${{ env.PARALLELIO_VERSION }} https://github.com/NCAR/ParallelIO libraries/parallelio
ls -l libraries/parallelio
- name: cache pnetcdf
id: cache-pnetcdf
uses: actions/cache@v2
with:
path: ~/pnetcdf
key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf-redo

- name: pnetcdf build
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
run: |
wget https://parallel-netcdf.github.io/Release/${{ env.PNETCDF_VERSION }}.tar.gz
tar -xzvf ${{ env.PNETCDF_VERSION }}.tar.gz
ls -l
pushd ${{ env.PNETCDF_VERSION }}
./configure --prefix=$HOME/pnetcdf --enable-shared --disable-cxx
make
make install
popd
- name: Cache netcdf-fortran
id: cache-netcdf-fortran
uses: actions/cache@v2
with:
path: ~/netcdf-fortran
key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran-redo

- name: netcdf fortran build
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
sudo apt-get install libnetcdf-dev
wget https://github.com/Unidata/netcdf-fortran/archive/${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz
tar -xzvf ${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz
ls -l
pushd netcdf-fortran-*
./configure --prefix=$HOME/netcdf-fortran
make
make install
- name: link netcdf-c to netcdf-fortran path
# link netcdf c library here to simplify build
run: |
pushd ${{ env.NETCDF_FORTRAN_PATH }}/include
ln -fs /usr/include/*netcdf* .
pushd ${{ env.NETCDF_FORTRAN_PATH }}/lib
clibdir=`nc-config --libdir`
ln -fs $clibdir/lib* .
- name: Cache inputdata
id: cache-inputdata
uses: actions/cache@v2
with:
path: $HOME/cesm/inputdata
key: inputdata
#
# The following can be used to ssh to the testnode for debugging
# see https://github.com/mxschmitt/action-tmate for details
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: scripts regression tests
run: |
mkdir -p $HOME/cesm/scratch
mkdir -p $HOME/cesm/inputdata
cd $HOME/work/CESM_share/CESM_share/scripts/tests
ls -l $HOME/work/CESM_share/CESM_share
export NETCDF=$HOME/netcdf-fortran
export PATH=$NETCDF/bin:$PATH
export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH
./scripts_regression_tests.py --no-fortran-run --compiler gnu --mpilib openmpi --machine ubuntu-latest
# the following can be used by developers to login to the github server in case of errors
# see https://github.com/marketplace/actions/debugging-with-tmate for further details
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ if (NOT DEFINED MPILIB OR NOT ${MPILIB} STREQUAL "mpi-serial")
endif()

if(BLD_STANDALONE)
add_subdirectory(util)
add_subdirectory(ufs)
list(APPEND EXTRA_LIBS cmeps_share)
list(APPEND EXTRA_INCLUDES "${CMAKE_BINARY_DIR}/util")
list(APPEND EXTRA_INCLUDES "${CMAKE_BINARY_DIR}/ufs")
endif()

add_subdirectory(mediator)
77 changes: 0 additions & 77 deletions Makefile

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8b117b4

Please sign in to comment.