Skip to content

Commit

Permalink
Merge pull request #6 from esmf-org/feature/nuopc_cap
Browse files Browse the repository at this point in the history
Update NoahMP model
  • Loading branch information
uturuncoglu authored Jan 26, 2024
2 parents 569e354 + 33cf753 commit 0cd3e23
Show file tree
Hide file tree
Showing 30 changed files with 3,002 additions and 2,952 deletions.
Binary file removed .github/workflows/data/oro_data.tile1.nc
Binary file not shown.
Binary file removed .github/workflows/data/oro_data.tile2.nc
Binary file not shown.
Binary file removed .github/workflows/data/oro_data.tile3.nc
Binary file not shown.
Binary file removed .github/workflows/data/oro_data.tile4.nc
Binary file not shown.
Binary file removed .github/workflows/data/oro_data.tile5.nc
Binary file not shown.
Binary file removed .github/workflows/data/oro_data.tile6.nc
Binary file not shown.
111 changes: 86 additions & 25 deletions .github/workflows/datm_noahmp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
name: test_datm_lnd
name: Test NUOPC cap

env:
# default compiler version
compiler: gcc@latest
# default esmf version
esmf_version: 'esmf@develop'
# default test name
test: test_datm_lnd
# set token to access gh command
GH_TOKEN: ${{ github.token }}
# installation location for application
APP_INSTALL_DIR: ${{ github.workspace }}/app
# installation location for dependencies
DEP_INSTALL_DIR: ~/.spack-ci
# option for retention period for artifacts, default is 90 days
ARTIFACTS_RETENTION_PERIOD: 2

on:
push:
Expand All @@ -10,40 +26,86 @@ on:
- cron: '0 0 * * MON'
- cron: '0 0 * * FRI'
workflow_dispatch:

inputs:
compiler:
description: 'Compiler version like gcc@12.3.0 or gcc@latest (latest available version on runner)'
required: false
type: string
default: 'gcc@latest'
esmf_version:
description: 'ESMF version or tag: esmf@develop, esmf@=8.5.0b23, esmf@git.hconfig_change_equal=8.6.0'
required: false
type: string
default: 'esmf@develop'
test:
description: 'Test that will be run'
required: false
type: string
default: test_datm_lnd

jobs:
latest-stable:
runs-on: ${{ matrix.os }}
set-matrix:
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.generate.outputs.matrix }}

steps:
# generete matrix
- name: Generate Matrix by Listing Compiler and ESMF Packages
id: generate
run: |
# output variables for debugging
echo "INPUT: >${{ inputs.compiler }}< >${{ inputs.esmf_version }}<"
echo "ENV : >${{ env.compiler }}< >${{ env.esmf_version }}<"
# create matrix JSON file
# compiler
if [ -z "${{ inputs.compiler }}" ]; then
str1="{\"compiler\": [\"${{ env.compiler }}\"],"
else
str1="{\"compiler\": [\"${{ inputs.compiler }}\"],"
fi
# esmf
if [ -z "${{ inputs.esmf_version }}" ]; then
str2="\"esmf\": [\"${{ env.esmf_version }}+external-parallelio\"],"
else
str2="\"esmf\": [\"${{ inputs.esmf_version }}+external-parallelio\"],"
fi
# test
if [ -z "${{ inputs.test }}" ]; then
str3="\"test\": [\"${{ env.test }}\"]}"
else
str3="\"test\": [\"${{ inputs.test }}\"]}"
fi
# output contect for debugging
echo "matrix=${str1}${str2}${str3}"
# output for next step
echo "matrix=${str1}${str2}${str3}" >> $GITHUB_OUTPUT
build:
needs: set-matrix

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
test: [test_datm_lnd]
esmf: [8.4.2]

env:
# set token to access gh command
GH_TOKEN: ${{ github.token }}
# installation location for application
APP_INSTALL_DIR: ${{ github.workspace }}/app
# installation location for dependencies
DEP_INSTALL_DIR: ~/.spack-ci
# option for retention period for artifacts, default is 90 days
ARTIFACTS_RETENTION_PERIOD: 2
matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }}

steps:
# test component
- name: Test Component
uses: esmf-org/nuopc-comp-testing@feature/v1.2
uses: esmf-org/nuopc-comp-testing@feature/v1.3
with:
app_install_dir: ${{ env.APP_INSTALL_DIR }}
artifacts_name: artifacts for ${{ matrix.test }} ${{ matrix.compiler }} ${{ matrix.esmf }}
artifacts_files: |
${{ env.APP_INSTALL_DIR }}/run/PET*
${{ env.APP_INSTALL_DIR }}/run/*.txt
${{ env.APP_INSTALL_DIR }}/run/*.log
${{ env.APP_INSTALL_DIR }}/run/comp.test.lnd.out.2000-01-01-75600.*
baseline_files: |
baseline_files: |
${{ env.APP_INSTALL_DIR }}/run/comp.test.*.nc
cache_input_file_list: |
${{ env.APP_INSTALL_DIR }}/run/INPUT
Expand All @@ -56,14 +118,13 @@ jobs:
cd ${{ env.APP_INSTALL_DIR }}/noahmp
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${{ env.APP_INSTALL_DIR }} -DOPENMP=ON ../
cmake -DCMAKE_INSTALL_PREFIX=${{ env.APP_INSTALL_DIR }} -DCMAKE_Fortran_FLAGS=\"-g -fbacktrace\" ../
make
make install
component_module_name: lnd_comp_nuopc
component_module_name: lnd_comp_nuopc.mod
data_component_name: datm
dependencies: |
fms@2022.04 precision=32,64
esmf@${{ matrix.esmf }}+external-parallelio
${{ matrix.esmf }}
dependencies_install_dir: ${{ env.DEP_INSTALL_DIR }}
mpirun_args: --oversubscribe -np 6 --mca btl_tcp_if_include eth0
test_definition: ${{ env.APP_INSTALL_DIR }}/noahmp/.github/workflows/tests/${{ matrix.test }}.yaml
103 changes: 56 additions & 47 deletions .github/workflows/tests/test_datm_lnd.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,69 @@
---
components:
drv:
runseq:
dt:
values: 3600
lnd-to-atm:
values: remapMethod=bilinear:unmappedaction=ignore:zeroregion=select:srcTermProcessing=0:termOrder:srcseq
atm-to-lnd:
values: remapMethod=bilinear:unmappedaction=ignore:zeroregion=select:srcTermProcessing=0:termOrder:srcseq
atm:
lnd:
input:
field_table:
protocol: wget
end_point: 'https://raw.githubusercontent.com'
files:
- /ufs-community/ufs-weather-model/develop/tests/parm/fd_nems.yaml
#- /ufs-community/ufs-weather-model/develop/tests/parm/fd_nems.yaml
- /uturuncoglu/ufs-weather-model/feature/noahmp/tests/parm/fd_ufs.yaml
force: True
config:
nuopc:
name: esmxRun.config
hconfig:
name: esmxRun.yaml
content:
ESMX_attributes:
Verbosity:
values: high
ALLCOMP_attributes:
case_name:
values: comp.test
stop_n:
values: 1
stop_option:
values: ndays
stop_tod:
values: 0
stop_ymd:
values: -999
restart_n:
values: 1
restart_option:
values: never
restart_ymd:
values: -999
no_group:
ESMX_component_list:
values: ATM LND
startTime:
values: '2000-01-01T00:00:00'
stopTime:
values: '2000-01-02T00:00:00'
logKindFlag:
values: ESMF_LOGKIND_MULTI
globalResourceControl:
values: .true.
ESMX_log_flush:
values: .true.
ESMX_field_dictionary:
values: fd_nems.yaml
ESMX:
App:
globalResourceControl:
values: 'true'
logKindFlag:
values: ESMF_LOGKIND_Multi
logAppendFlag:
values: 'false'
logFlush:
values: 'true'
fieldDictionary:
values: fd_ufs.yaml
startTime:
values: '2000-01-01T00:00:00'
stopTime:
values: '2000-01-02T00:00:00'
Driver:
componentList:
values:
- ATM
- LND
attributes:
Verbosity:
values: low
no_group:
runSequence:
values: |
@3600
LND -> ATM :remapMethod=bilinear:unmappedaction=ignore:zeroregion=select:srcTermProcessing=0:termOrder:srcseq
ATM -> LND :remapMethod=bilinear:unmappedaction=ignore:zeroregion=select:srcTermProcessing=0:termOrder:srcseq
ATM
LND
@
generalAttributes:
no_group:
case_name:
values: comp.test
stop_n:
values: 1
stop_option:
values: ndays
stop_tod:
values: 0
stop_ymd:
values: -999
restart_n:
values: 1
restart_option:
values: never
restart_ymd:
values: -999

lnd: test_datm_lnd/lnd.yaml

Expand Down
91 changes: 38 additions & 53 deletions .github/workflows/tests/test_datm_lnd/datm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,45 @@ input:
- /trunk/inputdata/share/meshes/fv1.9x2.5_141008_ESMFmesh.nc
target_directory: 'INPUT'
config:
nuopc1:
name: esmxRun.config
hconfig:
name: esmxRun.yaml
content:
no_group:
ATM_model:
values: datm
ATM_petlist:
values: 0-5
ATM_attributes:
Verbosity:
values: 0
Diagnostic:
values: 0
read_restart:
values: .false.
orb_eccen:
values: 1.e36
orb_iyear:
values: 2000
orb_iyear_align:
values: 2000
orb_mode:
values: fixed_year
orb_mvelp:
values: 1.e36
orb_obliq:
values: 1.e36
ScalarFieldCount:
values: 3
ScalarFieldIdxGridNX:
values: 1
ScalarFieldIdxGridNY:
values: 2
ScalarFieldIdxNextSwCday:
values: 3
ScalarFieldName:
values: cpl_scalars
case_name:
values: comp.test
stop_n:
values: 1
stop_option:
values: ndays
stop_tod:
values: 0
stop_ymd:
values: -999
restart_n:
values: 1
restart_option:
values: never
restart_ymd:
values: -999
nuopc2:
ATM:
no_group:
model:
values: datm
petlist:
values: 0-5
attributes:
Verbosity:
values: 0
Diagnostic:
values: 0
read_restart:
values: .false.
orb_eccen:
values: 1.e36
orb_iyear:
values: 2000
orb_iyear_align:
values: 2000
orb_mode:
values: fixed_year
orb_mvelp:
values: 1.e36
orb_obliq:
values: 1.e36
ScalarFieldCount:
values: 3
ScalarFieldIdxGridNX:
values: 1
ScalarFieldIdxGridNY:
values: 2
ScalarFieldIdxNextSwCday:
values: 3
ScalarFieldName:
values: cpl_scalars
nuopc:
name: datm.streams
content:
no_group:
Expand Down
Loading

0 comments on commit 0cd3e23

Please sign in to comment.