Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #3

Merged
merged 45 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
61f8253
[develop] Replace TCL modulefiles with Lua counterparts (#413)
danielabdi-noaa Oct 21, 2022
e08e5c5
[develop] Improve error messaging and logging for generate_FV3LAM_wfl…
mkavulich Oct 21, 2022
9cd91d3
Update wflow_cheyenne.lua (#424)
mkavulich Oct 24, 2022
0ce31b4
Post merge cleanup: remove old script, consolidate test directories (…
mkavulich Oct 26, 2022
6668873
Move fixed-file mapping variables out of `config_defaults.yaml`. (#421)
danielabdi-noaa Oct 26, 2022
4daf3b8
created devclean.sh (#415)
natalie-perlin Oct 28, 2022
16ad699
[develop] Remove my_load_any from modulefiles/srw_common.lua and use …
MichaelLueken Oct 28, 2022
a1782a2
Structure and components of COMIN directory in NCO mode are modified …
chan-hoo Oct 28, 2022
3f4cfcf
Avoid the effect of external environment on tasks (#436)
danielabdi-noaa Oct 28, 2022
2f8bd26
Bug fix on hera/jet run_vx.local modulefile. (#438)
danielabdi-noaa Oct 29, 2022
b213ccc
Make CIs test NCO mode properly. (#418)
danielabdi-noaa Oct 30, 2022
ce024c4
Make CIs test NCO mode properly. (#418)
danielabdi-noaa Oct 30, 2022
0e11b9d
[develop] Update Build/Run and ConfigWorkflow Chapters (#425)
gspetro-NOAA Oct 31, 2022
6033ba6
Set agent in matrix block instead of child stages (#441)
Oct 31, 2022
2217d1c
[RELEASE] Fixes for gaea, noaacloud, and miniconda updates (#444)
mark-a-potts Nov 1, 2022
63897f0
Disable comprehensive tests option in Jenkinsfile (#454)
Nov 4, 2022
474ab7d
Updates to the NCO mode (#443)
danielabdi-noaa Nov 5, 2022
04fd9c6
Fix time offset issue on ICS with GFS nemsio and netcdf files and add…
chan-hoo Nov 9, 2022
50008ba
Minor bug fixes (#459)
danielabdi-noaa Nov 9, 2022
0ba66f9
[develop] Added return code to srw_build.sh script. (#461)
MichaelLueken Nov 10, 2022
5356d1e
Updates for building and running on MacOS (x86_64 and M1) (#467)
natalie-perlin Nov 11, 2022
b839658
[develop] Patch to correct a variable name to a lower-case (#468)
natalie-perlin Nov 14, 2022
6e84102
[develop] Source task specific portions of var_defns.sh file in ex- a…
danielabdi-noaa Nov 16, 2022
db1302f
[develop] bugfix: set PDYext and cycext in get_extrn_ics/lbcs for tim…
chan-hoo Nov 17, 2022
d03e646
[develop] Add Hera GNU modulefile and fundamental test suite and upda…
MichaelLueken Nov 17, 2022
370834b
[develop] Updated README.md and Introduction.rst for the SRW v2.1.0 r…
MichaelLueken Nov 21, 2022
f0963f6
[develop] Python-based crontab replacement (#466)
mark-a-potts Nov 28, 2022
98edca0
[develop] Pull in relevant doc updates from release v2.1.0 (#498)
gspetro-NOAA Nov 29, 2022
4a9d1fe
[develop] Update ufs-weather-model hash and add WoFS_v0 to suites and…
MichaelLueken Nov 30, 2022
ce9b0cc
[develop] modulefile updates for generic linux (#501)
natalie-perlin Dec 1, 2022
c8bb869
[develop] Add plotting scripts to the workflow. (#482)
danielabdi-noaa Dec 2, 2022
6d720f6
[develop]: Add sample verification case w/instructions (#500)
gspetro-NOAA Dec 2, 2022
b414442
[develop] Ensure arbitrary restart_interval numbers in model_configur…
chan-hoo Dec 5, 2022
f755e64
[develop] noaacloud MET updates (#504)
EdwardSnyder-NOAA Dec 6, 2022
53c62ca
[develop] Added logic to not include slurm memory option for noaaclou…
EdwardSnyder-NOAA Dec 6, 2022
0c8843f
[develop]: Correct PDF-generated release version for develop docs (#513)
gspetro-NOAA Dec 14, 2022
bea3633
[develop] Add gfs_v16.3 to file list of HPSS for FV3GFS (#510)
chan-hoo Dec 14, 2022
bf07542
[develop] Refactor setup.py to remove use of global variables. (#505)
christinaholtNOAA Dec 16, 2022
519e5c4
[develop]: Add plotting and template variable documentation (#528)
gspetro-NOAA Jan 5, 2023
3770ca5
[develop]: Add debugging guide to README.md (#519)
MichaelLueken Jan 5, 2023
d3d023b
[develop] Add DOMAIN_PREGEN_BASEDIR to gaea machine file. (#522)
christinaholtNOAA Jan 6, 2023
d3b10e6
[develop]: Fix formatting for RTD User's Guide (#533)
gspetro-NOAA Jan 9, 2023
70da0e8
[develop] Enable workflow runs on single node linux/mac machine using…
danielabdi-noaa Jan 10, 2023
23b9852
[develop] Integrate 'online-cmaq' branch into 'develop' branch: Part …
chan-hoo Jan 17, 2023
54c740e
[develop] Fix plotting bug. (#529)
danielabdi-noaa Jan 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 17 additions & 18 deletions .cicd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pipeline {
choice(name: 'SRW_PLATFORM_FILTER', choices: ['all', 'cheyenne', 'gaea', 'hera', 'jet', 'orion'], description: 'Specify the platform(s) to use')
// Allow job runner to filter based on compiler
choice(name: 'SRW_COMPILER_FILTER', choices: ['all', 'gnu', 'intel'], description: 'Specify the compiler(s) to use to build')
booleanParam name: 'SRW_WE2E_COMPREHENSIVE_TESTS', defaultValue: false, description: 'Whether to execute the comprehensive end-to-end tests'
// Uncomment the following line to re-enable comprehensive tests
// booleanParam name: 'SRW_WE2E_COMPREHENSIVE_TESTS', defaultValue: false, description: 'Whether to execute the comprehensive end-to-end tests'
}

stages {
Expand Down Expand Up @@ -89,7 +90,7 @@ pipeline {
exclude {
axis {
name 'SRW_PLATFORM'
values 'gaea', 'hera', 'jet', 'orion' //, 'pclusternoaav2use1' , 'azclusternoaav2eus1', 'gclusternoaav2usc1'
values 'gaea', 'jet', 'orion' //, 'pclusternoaav2use1' , 'azclusternoaav2eus1', 'gclusternoaav2usc1'
}

axis {
Expand All @@ -99,6 +100,10 @@ pipeline {
}
}

agent {
label env.SRW_PLATFORM
}

environment {
BRANCH_NAME_ESCAPED = env.BRANCH_NAME.replace('/', '_')
BUILD_VERSION = "${env.SRW_PLATFORM}-${env.SRW_COMPILER}-${env.BRANCH_NAME_ESCAPED}-${env.BUILD_NUMBER}"
Expand All @@ -109,12 +114,8 @@ pipeline {
stages {
// Clean the workspace, checkout the repository, and run checkout_externals
stage('Initialize') {
agent {
label env.SRW_PLATFORM
}

steps {
echo "Initializing SRW (${env.SRW_COMPILER}) build environment on ${env.SRW_PLATFORM}"
echo "Initializing SRW (${env.SRW_COMPILER}) build environment on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"
cleanWs()
checkout scm
sh '"${WORKSPACE}/manage_externals/checkout_externals"'
Expand All @@ -123,12 +124,8 @@ pipeline {

// Run the unified build script; if successful create a tarball of the build and upload to S3
stage('Build') {
agent {
label env.SRW_PLATFORM
}

steps {
echo "Building SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM}"
echo "Building SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"
sh 'bash --login "${WORKSPACE}/.cicd/scripts/srw_build.sh"'
}

Expand All @@ -142,17 +139,18 @@ pipeline {

// Run the unified test script
stage('Test') {
agent {
label env.SRW_PLATFORM
}

environment {
SRW_WE2E_EXPERIMENT_BASE_DIR = "${env.WORKSPACE}/expt_dirs"
}

steps {
echo "Testing SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM}"
echo "Testing SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"

// Remove the following line to re-enable comprehensive tests
sh 'SRW_WE2E_COMPREHENSIVE_TESTS=false bash --login "${WORKSPACE}/.cicd/scripts/srw_test.sh"'

// Uncomment the following block to re-enable comprehensive tests
/*
// If executing for a Pull Request, check for the run_we2e_comprehensive_tests. If set,
// override the value of the SRW_WE2E_COMPREHENSIVE_TESTS parameter
script {
Expand All @@ -169,12 +167,13 @@ pipeline {

sh "SRW_WE2E_COMPREHENSIVE_TESTS=${run_we2e_comprehensive_tests}" + ' bash --login "${WORKSPACE}/.cicd/scripts/srw_test.sh"'
}
*/
}

post {
always {
// Archive the test log files
sh 'cd "${SRW_WE2E_EXPERIMENT_BASE_DIR}" && tar --create --gzip --verbose --file "${WORKSPACE}/we2e_test_logs-${SRW_PLATFORM}-${SRW_COMPILER}.tgz" */log.generate_FV3LAM_wflow */log.launch_FV3LAM_wflow */log/*'
sh 'cd "${SRW_WE2E_EXPERIMENT_BASE_DIR}" && tar --create --gzip --verbose --dereference --file "${WORKSPACE}/we2e_test_logs-${SRW_PLATFORM}-${SRW_COMPILER}.tgz" */log.generate_FV3LAM_wflow */log.launch_FV3LAM_wflow */log/*'
// Remove the data sets from the experiments directory to conserve disk space
sh 'find "${SRW_WE2E_EXPERIMENT_BASE_DIR}" -regextype posix-extended -regex "^.*(orog|[0-9]{10})$" -type d | xargs rm -rf'
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'woc-epic-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: 'we2e_test_results-*-*.txt', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false], [bucket: 'woc-epic-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: 'we2e_test_logs-*-*.tgz', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []
Expand Down
6 changes: 5 additions & 1 deletion .cicd/scripts/srw_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ else
fi

# Build and install
cd ${workspace}/test
cd ${workspace}/tests
set +e
./build.sh ${platform} ${SRW_COMPILER}
build_exit=$?
set -e
cd -

# Create combined log file for upload to s3
build_dir="${workspace}/build_${SRW_COMPILER}"
cat ${build_dir}/log.cmake ${build_dir}/log.make \
>${build_dir}/srw_build-${platform}-${SRW_COMPILER}.log

exit $build_exit
27 changes: 22 additions & 5 deletions .cicd/scripts/srw_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fi
# Test directories
we2e_experiment_base_dir="${workspace}/expt_dirs"
we2e_test_dir="${workspace}/tests/WE2E"
nco_dir="${workspace}/nco_dirs"

# Run the end-to-end tests.
if "${SRW_WE2E_COMPREHENSIVE_TESTS}"; then
Expand All @@ -37,15 +38,26 @@ else
fi

cd ${we2e_test_dir}
./setup_WE2E_tests.sh ${platform} ${SRW_PROJECT} ${SRW_COMPILER} ${test_type} ${we2e_experiment_base_dir}
./setup_WE2E_tests.sh ${platform} ${SRW_PROJECT} ${SRW_COMPILER} ${test_type} \
expt_basedir=${we2e_experiment_base_dir} \
opsroot=${nco_dir}

# Allow the tests to start before checking for status.
# TODO: Create a parameter that sets the initial start delay.
sleep 300
# Run the new run_srw_tests script if the machine is Cheyenne.
if [[ "${platform}" = "cheyenne" ]]; then
cd ${workspace}/ush
./run_srw_tests.py -e=${we2e_experiment_base_dir}
cd ${we2e_test_dir}
fi

# Progress file
progress_file="${workspace}/we2e_test_results-${platform}-${SRW_COMPILER}.txt"

# Allow the tests to start before checking for status.
# TODO: Create a parameter that sets the initial start delay.
if [[ "${platform}" != "cheyenne" ]]; then
sleep 300
fi

# Wait for all tests to complete.
while true; do

Expand All @@ -71,10 +83,15 @@ done
# TODO: Create parameter that sets the interval for the we2e cron jobs; this
# value should be some factor of that interval to ensure the cron jobs execute
# before the workspace is cleaned up.
sleep 600
if [[ "${platform}" != "cheyenne" ]]; then
sleep 600
fi

# Set exit code to number of failures
set +e
failures=$(grep "Workflow status: FAILURE" ${progress_file} | wc -l)
if [[ $failures -ne 0 ]]; then
failures=1
fi
set -e
exit ${failures}
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protocol = git
repo_url = https://github.com/ufs-community/ufs-weather-model
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 52072c5
hash = 84b28ec
local_path = sorc/ufs-weather-model
required = True

Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# UFS Short-Range Weather Application

The Unified Forecast System (UFS) is a community-based, coupled, comprehensive Earth modeling system. It is designed to be the source system for NOAA’s operational numerical weather prediction applications while enabling research, development, and contribution opportunities for the broader weather enterprise. For more information about the UFS, visit the UFS Portal at https://ufscommunity.org/.
The Unified Forecast System (UFS) is a community-based, coupled, comprehensive Earth modeling system. It is designed to be the source system for NOAA’s operational numerical weather prediction applications while enabling research, development, and contribution opportunities for the broader Weather Enterprise. For more information about the UFS, visit the UFS Portal at https://ufscommunity.org/.

The UFS includes multiple applications (see a complete list at https://ufscommunity.org/science/aboutapps/) that support different forecast durations and spatial domains. This documentation describes the development branch of the UFS Short-Range Weather (SRW) Application, which targets predictions of atmospheric behavior on a limited spatial domain and on time scales from minutes to several days. The development branch of the application is continually evolving as the system undergoes open development. The latest SRW App release (v2.0.0) represents a snapshot of this continuously evolving system.
The UFS includes multiple applications (see a complete list at https://ufscommunity.org/science/aboutapps/) that support different forecast durations and spatial domains. This documentation describes the development branch of the UFS Short-Range Weather (SRW) Application, which targets predictions of atmospheric behavior on a limited spatial domain and on time scales from minutes to several days. The development branch of the application is continually evolving as the system undergoes open development. The latest SRW App release (v2.1.0) represents a snapshot of this continuously evolving system.

The UFS SRW App User's Guide associated with the development branch is at: https://ufs-srweather-app.readthedocs.io/en/develop/, while the guide specific to the SRW App v2.0.0 release can be found at: https://ufs-srweather-app.readthedocs.io/en/release-public-v2/. The repository is at: https://github.com/ufs-community/ufs-srweather-app.
The UFS SRW App User's Guide associated with the development branch is at: https://ufs-srweather-app.readthedocs.io/en/develop/, while the guide specific to the SRW App v2.1.0 release can be found at: https://ufs-srweather-app.readthedocs.io/en/release-public-v2.1.0/. The repository is at: https://github.com/ufs-community/ufs-srweather-app.

For instructions on how to clone the repository, build the code, and run the workflow, see:
https://github.com/ufs-community/ufs-srweather-app/wiki/Getting-Started

UFS Development Team. (2022, June 23). Unified Forecast System (UFS) Short-Range Weather (SRW) Application (Version v2.0.0). Zenodo. https://doi.org/10.5281/zenodo.6505854
For a debugging guide for users and developers in the field of Earth System Modeling, please see:
https://epic.noaa.gov/wp-content/uploads/2022/12/Debugging-Guide.pdf

UFS Development Team. (2022, Nov. 17). Unified Forecast System (UFS) Short-Range Weather (SRW) Application (Version v2.1.0). Zenodo. https://doi.org/10.5281/zenodo.7277602

[![Python unittests](https://github.com/ufs-community/ufs-srweather-app/actions/workflows/python_unittests.yaml/badge.svg)](https://github.com/ufs-community/ufs-srweather-app/actions/workflows/python_unittests.yaml)
[![Python functional tests](https://github.com/ufs-community/ufs-srweather-app/actions/workflows/python_func_tests.yaml/badge.svg)](https://github.com/ufs-community/ufs-srweather-app/actions/workflows/python_func_tests.yaml)
Expand Down
29 changes: 23 additions & 6 deletions devbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ OPTIONS
does a "make clean"
--build
does a "make" (build only)
--move
move binaries to final location.
--build-dir=BUILD_DIR
build directory
--install-dir=INSTALL_DIR
Expand Down Expand Up @@ -125,6 +127,7 @@ BUILD_RRFS_UTILS="off"
# Make options
CLEAN=false
BUILD=false
MOVE=false
USE_SUB_MODULES=false #change default to true later

# process required arguments
Expand Down Expand Up @@ -155,6 +158,7 @@ while :; do
--continue=?*|--continue=) usage_error "$1 argument ignored." ;;
--clean) CLEAN=true ;;
--build) BUILD=true ;;
--move) MOVE=true ;;
--build-dir=?*) BUILD_DIR=${1#*=} ;;
--build-dir|--build-dir=) usage_error "$1 requires argument." ;;
--install-dir=?*) INSTALL_DIR=${1#*=} ;;
Expand Down Expand Up @@ -245,7 +249,7 @@ fi

# set MODULE_FILE for this platform/compiler combination
MODULE_FILE="build_${PLATFORM}_${COMPILER}"
if [ ! -f "${SRW_DIR}/modulefiles/${MODULE_FILE}" ]; then
if [ ! -f "${SRW_DIR}/modulefiles/${MODULE_FILE}.lua" ]; then
printf "ERROR: module file does not exist for platform/compiler\n" >&2
printf " MODULE_FILE=${MODULE_FILE}\n" >&2
printf " PLATFORM=${PLATFORM}\n" >&2
Expand Down Expand Up @@ -398,18 +402,31 @@ module list
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}

printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

if [ "${CLEAN}" = true ]; then
printf "... Clean executables ...\n"
make ${MAKE_SETTINGS} clean 2>&1 | tee log.make
if [ -f $PWD/Makefile ]; then
printf "... Clean executables ...\n"
make ${MAKE_SETTINGS} clean 2>&1 | tee log.make
fi
elif [ "${BUILD}" = true ]; then
printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

printf "... Compile executables ...\n"
make ${MAKE_SETTINGS} build 2>&1 | tee log.make
else
printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

printf "... Compile and install executables ...\n"
make ${MAKE_SETTINGS} install 2>&1 | tee log.make

if [ "${MOVE}" = true ]; then
if [[ ! ${SRW_DIR} -ef ${INSTALL_DIR} ]]; then
printf "... Moving executables to final locations ...\n"
mkdir -p ${SRW_DIR}/${BIN_DIR}
mv ${INSTALL_DIR}/${BIN_DIR}/* ${SRW_DIR}/${BIN_DIR}
fi
fi
fi

exit 0
Loading