forked from NCAR/noahmp
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from esmf-org/feature/nuopc_cap
Update NoahMP model
- Loading branch information
Showing
30 changed files
with
3,002 additions
and
2,952 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -10,40 +26,86 @@ on: | |
- cron: '0 0 * * MON' | ||
- cron: '0 0 * * FRI' | ||
workflow_dispatch: | ||
|
||
inputs: | ||
compiler: | ||
description: 'Compiler version like [email protected] 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, [email protected]_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 | ||
|
@@ -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: | | ||
[email protected] 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.