Skip to content

Commit

Permalink
Merge branch 'develop' into feature/b2i
Browse files Browse the repository at this point in the history
needed for the PR
  • Loading branch information
givelberg committed Sep 10, 2024
2 parents 001c793 + b853fe9 commit ba600cd
Show file tree
Hide file tree
Showing 212 changed files with 7,121 additions and 3,592 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,5 @@ install*/
/sorc/gdas
/sorc/gdas-utils
!/bundle/CMakeLists.txt
!/bundle/fv3-interface.cmake
/bundle/*
20 changes: 12 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
path = sorc/icepack
url = https://github.com/JCSDA-internal/Icepack.git
branch = feature/ecbuild-new
[submodule "sorc/mom6"]
path = sorc/mom6
url = https://github.com/jcsda-internal/MOM6.git
branch = main-ecbuild
[submodule "sorc/soca"]
path = sorc/soca
url = https://github.com/jcsda-internal/soca.git
Expand All @@ -73,10 +69,10 @@
path = sorc/crtm
url = https://github.com/jcsda/crtm.git
branch = release/crtm_jedi_v2.4.1
[submodule "sorc/fms"]
path = sorc/fms
url = https://github.com/jcsda/fms.git
branch = release-stable
[submodule "sorc/jcb"]
path = sorc/jcb
url = https://github.com/noaa-emc/jcb.git
branch = develop
[submodule "parm/jcb-gdas"]
path = parm/jcb-gdas
url = https://github.com/noaa-emc/jcb-gdas
Expand All @@ -85,3 +81,11 @@
path = parm/jcb-algorithms
url = https://github.com/noaa-emc/jcb-algorithms
branch = develop
[submodule "sorc/da-utils"]
path = sorc/da-utils
url = https://github.com/noaa-emc/da-utils.git
branch = develop
[submodule "sorc/bufr-query"]
path = sorc/bufr-query
url = https://github.com/noaa-emc/bufr-query.git
branch = develop
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ Global Data Assimilation System Application

The one app to rule them all

## Notes to developers

1 - As a developer, you will have to build the GDASApp againt the `dev/gdasapp` branch of the `global-workflow`

```bash
git clone --recursive --jobs 8 --branch dev/gdasapp https://github.com/NOAA-EMC/global-workflow.git
```

2 - For the most part (boundaries of that terminology is stil TBD), changes to the `global-workflow` related to the `GDASApp` developement will be issued in the `dev/gdasapp` branch.

3 - If your feature development involves changes to the global-workflow and the GDASApp, you will have to issue a PR in each repository. The GDASApp PR will have to have the same name in order for the GDASApp CI to build and run the correct branches.

4 - If your work is contained within the `global-workflow` only, you will have to submit a dummy PR in the `GDASApp` with the same branch name.
To submit a dummy PR, just create a branch with an empty commit:
```
git commit --allow-empty -m "Dummy commit to trigger PR"
```


[![Orion](https://github.com/NOAA-EMC/GDASApp/actions/workflows/orion.yaml/badge.svg)](https://github.com/NOAA-EMC/GDASApp/actions/workflows/orion.yaml)
[![Hera](https://github.com/NOAA-EMC/GDASApp/actions/workflows/hera.yaml/badge.svg)](https://github.com/NOAA-EMC/GDASApp/actions/workflows/hera.yaml)

Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ case ${BUILD_TARGET} in
;;
esac

CMAKE_OPTS+=" -DCLONE_JCSDADATA=$CLONE_JCSDADATA"
CMAKE_OPTS+=" -DCLONE_JCSDADATA=$CLONE_JCSDADATA -DMACHINE=$BUILD_TARGET"

BUILD_DIR=${BUILD_DIR:-$dir_root/build}
if [[ $CLEAN_BUILD == 'YES' ]]; then
Expand Down Expand Up @@ -126,7 +126,7 @@ set -x
if [[ $BUILD_JCSDA == 'YES' ]]; then
make -j ${BUILD_JOBS:-6} VERBOSE=$BUILD_VERBOSE
else
builddirs="gdas iodaconv land-imsproc land-jediincr gdas-utils"
builddirs="gdas iodaconv land-imsproc land-jediincr gdas-utils bufr-query"
for b in $builddirs; do
cd $b
make -j ${BUILD_JOBS:-6} VERBOSE=$BUILD_VERBOSE
Expand Down
22 changes: 19 additions & 3 deletions bundle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ option(BUILD_GDASBUNDLE "Build GDAS Bundle" ON)
option(CLONE_JCSDADATA "Clone JCSDA test data repositories" OFF)
option(WORKFLOW_TESTS "Include global-workflow dependent tests" OFF)

# Depend path for non-ecbuild packages
set(DEPEND_LIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/Depends)
list(APPEND CMAKE_PREFIX_PATH ${DEPEND_LIB_ROOT})

# Library path for non-ecbuild packages
link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib)

include( GNUInstallDirs )
if(APPLE)
list( APPEND CMAKE_INSTALL_RPATH $ENV{llvm_openmp_ROOT}/lib )
endif()
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_CURRENT_BINARY_DIR}/fv3 )

# Initialize bundle
# -----------------
ecbuild_bundle_initialize()
Expand Down Expand Up @@ -75,6 +88,9 @@ if(BUILD_GDASBUNDLE)
# Gibbs seawater
ecbuild_bundle( PROJECT gsw SOURCE "../sorc/gsw" )

# EMC BUFR-query library
ecbuild_bundle( PROJECT bufr-query SOURCE "../sorc/bufr-query" )

# Core JEDI repositories
ecbuild_bundle( PROJECT oops SOURCE "../sorc/oops" )
ecbuild_bundle( PROJECT vader SOURCE "../sorc/vader" )
Expand All @@ -84,8 +100,8 @@ if(BUILD_GDASBUNDLE)
option(ENABLE_UFO_DATA "Obtain ufo test data from ufo-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT ufo SOURCE "../sorc/ufo" )

# FMS and FV3 dynamical core
ecbuild_bundle( PROJECT fms SOURCE "../sorc/fms" )
# FV3 dynamical core
include(fv3-interface.cmake)
ecbuild_bundle( PROJECT fv3 SOURCE "../sorc/fv3" )

# fv3-jedi and associated repositories
Expand All @@ -100,11 +116,11 @@ if(BUILD_GDASBUNDLE)
if ( BUILD_ICEPACK )
ecbuild_bundle( PROJECT icepack SOURCE "../sorc/icepack" )
endif()
ecbuild_bundle( PROJECT mom6 SOURCE "../sorc/mom6" )
ecbuild_bundle( PROJECT soca SOURCE "../sorc/soca" )

# Build JEDI/DA or other peripherals
ecbuild_bundle( PROJECT gdas-utils SOURCE "../utils" )
ecbuild_bundle( PROJECT da-utils SOURCE "../sorc/da-utils" )

# Build IODA converters
option(BUILD_IODA_CONVERTERS "Build IODA Converters" ON)
Expand Down
18 changes: 18 additions & 0 deletions bundle/fv3-interface.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# FV3 dycore
set(OPENMP ON )
set(32BIT OFF)
set(DEBUG OFF)
set(MOVING_NEST OFF)
set(MULTI_GASES OFF)
set(USE_GFSL63 ON )
set(NO_PHYS ON )
set(GFS_PHYS OFF)
set(GFS_TYPES OFF)
set(use_WRTCOMP OFF)
set(INTERNAL_FILE_NML ON )
set(ENABLE_QUAD_PRECISION ON )

add_library(fv3dycore IMPORTED SHARED)
set_target_properties(fv3dycore PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/fv3/libfv3.${CMAKE_SHARED_LIBRARY_SUFFIX})

message(WARN "WE ARE USING fv3-interface.cmake")
29 changes: 25 additions & 4 deletions ci/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,32 @@ repo_url="https://github.com/NOAA-EMC/GDASApp.git"
for pr in $open_pr_list; do
gh pr edit $pr --remove-label $CI_LABEL --add-label ${CI_LABEL}-Running
echo "Processing Pull Request #${pr}"

# get the branch name used for the PR
gdasapp_branch=$(gh pr view $pr --json headRefName -q ".headRefName")

# get the fork information
pr_details=$(gh pr view $pr --repo ${repo_url} --json headRepository,headRepositoryOwner,headRefName)

# extract the necessary info
fork_owner=$(gh pr view $pr --repo ${repo_url} --json headRepositoryOwner --jq '.headRepositoryOwner.login')
fork_name=$(gh pr view $pr --repo ${repo_url} --json headRepository --jq '.headRepository.name')

# construct the fork URL
gdasapp_url="https://github.com/$fork_owner/${fork_name}.git"

echo "Fork URL: $gdasapp_url"
echo "Branch Name: $gdasapp_branch"

# create PR specific directory
if [ -d $GDAS_CI_ROOT/PR/$pr ]; then
rm -rf $GDAS_CI_ROOT/PR/$pr
fi
mkdir -p $GDAS_CI_ROOT/PR/$pr
cd $GDAS_CI_ROOT/PR/$pr

# clone copy of repo
git clone --recursive $repo_url
git clone --recursive --jobs 8 --branch $gdasapp_branch $gdasapp_url
cd GDASApp

# checkout pull request
Expand Down Expand Up @@ -94,11 +115,11 @@ for pr in $open_pr_list; do
# run build and testing command
$my_dir/run_ci.sh -d $GDAS_CI_ROOT/PR/$pr/GDASApp -o $GDAS_CI_ROOT/PR/$pr/output_${commit}
ci_status=$?
gh pr comment $pr --body-file $GDAS_CI_ROOT/PR/$pr/output_${commit}
gh pr comment $pr --repo ${repo_url} --body-file $GDAS_CI_ROOT/PR/$pr/output_${commit}
if [ $ci_status -eq 0 ]; then
gh pr edit $pr --remove-label ${CI_LABEL}-Running --add-label ${CI_LABEL}-Passed
gh pr edit $pr --repo ${repo_url} --remove-label ${CI_LABEL}-Running --add-label ${CI_LABEL}-Passed
else
gh pr edit $pr --remove-label ${CI_LABEL}-Running --add-label ${CI_LABEL}-Failed
gh pr edit $pr --repo ${repo_url} --remove-label ${CI_LABEL}-Running --add-label ${CI_LABEL}-Failed
fi
done

Expand Down
29 changes: 27 additions & 2 deletions ci/gw_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,36 @@ workflow_url="https://github.com/NOAA-EMC/global-workflow.git"
for pr in $open_pr_list; do
gh pr edit $pr --remove-label $CI_LABEL --add-label ${CI_LABEL}-Running
echo "Processing Pull Request #${pr}"

# get the branch name used for the PR
gdasapp_branch=$(gh pr view $pr --json headRefName -q ".headRefName")

# check for a companion PR in the global-workflow
companion_pr_exists=$(gh pr list --repo ${workflow_url} --head ${gdasapp_branch} --state open)
if [ -n "$companion_pr_exists" ]; then
# get the PR number
companion_pr=$(echo "$companion_pr_exists" | awk '{print $1;}')

# extract the necessary info
fork_owner=$(gh pr view $companion_pr --repo $workflow_url --json headRepositoryOwner --jq '.headRepositoryOwner.login')
fork_name=$(gh pr view $companion_pr --repo $workflow_url --json headRepository --jq '.headRepository.name')

# Construct the fork URL
workflow_url="https://github.com/$fork_owner/$fork_name.git"

echo "Fork URL: $workflow_url"
echo "Branch Name: $gdasapp_branch"
fi

# create PR specific directory
if [ -d $GDAS_CI_ROOT/workflow/PR/$pr ]; then
rm -rf $GDAS_CI_ROOT/workflow/PR/$pr
fi
mkdir -p $GDAS_CI_ROOT/workflow/PR/$pr
cd $GDAS_CI_ROOT/workflow/PR/$pr

# clone global workflow develop branch
git clone --recursive $workflow_url
git clone --recursive --jobs 8 --branch dev/gdasapp $workflow_url

# checkout pull request
cd $GDAS_CI_ROOT/workflow/PR/$pr/global-workflow/sorc/gdas.cd
Expand Down
4 changes: 2 additions & 2 deletions ci/hera.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export GDAS_CI_ROOT=/scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp
export GDAS_CI_ROOT=/scratch1/NCEPDEV/da/role.jedipara/CI/GDASApp
export GDAS_CI_HOST='hera'
export GDAS_MODULE_USE=$GDAS_CI_ROOT/repo/modulefiles
export SLURM_ACCOUNT=da-cpu
export SALLOC_ACCOUNT=$SLURM_ACCOUNT
export SBATCH_ACCOUNT=$SLURM_ACCOUNT
export SLURM_QOS=debug
export PATH=$PATH:/scratch1/NCEPDEV/da/Cory.R.Martin/CI/gh/gh_2.46.0_linux_amd64/bin
export PATH=$PATH:/home/role.jedipara/bin
5 changes: 5 additions & 0 deletions mains/gdas.cc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "ufo/instantiateObsFilterFactory.h"
#include "ufo/ObsTraits.h"

#include "oops/runs/ConvertToStructuredGrid.h"
#include "oops/runs/ConvertState.h"
#include "oops/runs/HofX4D.h"
#include "oops/runs/LocalEnsembleDA.h"
Expand Down Expand Up @@ -52,6 +53,9 @@ int runApp(int argc, char** argv, const std::string traits, const std::string ap
// Define a map from app names to lambda functions that create unique_ptr to Applications
std::map<std::string, std::function<std::unique_ptr<oops::Application>()>> apps;

apps["converttostructuredgrid"] = []() {
return std::make_unique<oops::ConvertToStructuredGrid<Traits>>();
};
apps["convertstate"] = []() {
return std::make_unique<oops::ConvertState<Traits>>();
};
Expand Down Expand Up @@ -96,6 +100,7 @@ int main(int argc, char ** argv) {
// Check that the application is recognized
// ----------------------------------------
const std::set<std::string> validApps = {
"converttostructuredgrid",
"convertstate",
"hofx4d",
"localensembleda",
Expand Down
4 changes: 1 addition & 3 deletions modulefiles/GDAS/gaea.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ load("fftw/3.3.10")
load("fckit/0.11.0")
load("fiat/1.2.0")
load("ectrans/1.2.0")
load("fms/2023.04")
load("atlas/0.35.1")
load("sp/2.5.0")
load("gsl-lite/0.37.0")
Expand Down Expand Up @@ -74,9 +75,6 @@ load("py-xarray/2023.7.0")
load("py-f90nml/1.4.3")
load("py-pip/23.1.2")

-- hack for wxflow
--prepend_path("PYTHONPATH", "/scratch1/NCEPDEV/da/python/gdasapp/wxflow/20240307/src")

setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")
Expand Down
11 changes: 5 additions & 6 deletions modulefiles/GDAS/hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ load("fftw/3.3.10")
load("fckit/0.11.0")
load("fiat/1.2.0")
--load("ectrans/1.2.0")
load("fms/2023.04")
load("atlas/0.35.1")
load("sp/2.5.0")
load("gsl-lite/0.37.0")
Expand Down Expand Up @@ -73,9 +74,7 @@ load("py-scipy/1.11.3")
load("py-xarray/2023.7.0")
load("py-f90nml/1.4.3")
load("py-pip/23.1.2")

-- hack for wxflow
prepend_path("PYTHONPATH", "/scratch1/NCEPDEV/da/python/gdasapp/wxflow/20240307/src")
load("py-click/8.1.7")

setenv("CC","mpiicc")
setenv("FC","mpiifort")
Expand All @@ -86,9 +85,9 @@ local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv("CRTM_FIX","/scratch1/NCEPDEV/da/Cory.R.Martin/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp/data")
setenv("GDASAPP_UNIT_TEST_DATA_PATH", "/scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp/data/test")
setenv("CRTM_FIX","/scratch1/NCEPDEV/da/role.jedipara/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/scratch1/NCEPDEV/da/role.jedipara/GDASApp/testdata")
setenv("GDASAPP_UNIT_TEST_DATA_PATH", "/scratch1/NCEPDEV/da/role.jedipara/GDASApp/unittestdata")
--prepend_path("PATH","/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/intel-18.0.5.274/prod_util/1.2.2/bin")

whatis("Name: ".. pkgName)
Expand Down
9 changes: 5 additions & 4 deletions modulefiles/GDAS/hercules.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ load("fftw/3.3.10")
load("fckit/0.11.0")
load("fiat/1.2.0")
load("ectrans/1.2.0")
load("fms/2023.04")
load("atlas/0.35.1")
load("sp/2.5.0")
load("gsl-lite/0.37.0")
Expand All @@ -60,7 +61,7 @@ load("py-pybind11/2.11.0")
--load("crtm/v2.4_jedi")
load("contrib/0.1")
load("noaatools/3.1")
load("rocoto/1.3.5")
load("rocoto/1.3.7")

load("hpc/1.2.0")
unload("python/3.10.13")
Expand All @@ -79,9 +80,9 @@ local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv("CRTM_FIX","/work2/noaa/da/cmartin/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/work2/noaa/da/cmartin/CI/GDASApp/data")
setenv("GDASAPP_UNIT_TEST_DATA_PATH", "/work2/noaa/da/cmartin/CI/GDASApp/data/test/")
setenv("CRTM_FIX","/work2/noaa/da/role-da/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/work2/noaa/da/role-da/GDASApp/testdata")
setenv("GDASAPP_UNIT_TEST_DATA_PATH", "/work2/noaa/da/role-da/GDASApp/unittestdata")
prepend_path("PATH","/apps/contrib/NCEP/libs/hpc-stack/intel-2018.4/prod_util/1.2.2/bin")

execute{cmd="ulimit -s unlimited",modeA={"load"}}
Expand Down
4 changes: 1 addition & 3 deletions modulefiles/GDAS/noaacloud.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ load("fftw/3.3.10")
load("fckit/0.11.0")
load("fiat/1.2.0")
load("ectrans/1.2.0")
load("fms/2023.04")
load("atlas/0.35.1")
load("sp/2.5.0")
load("gsl-lite/0.37.0")
Expand Down Expand Up @@ -72,9 +73,6 @@ load("py-xarray/2023.7.0")
load("py-f90nml/1.4.3")
load("py-pip/23.1.2")

-- hack for wxflow
--prepend_path("PYTHONPATH", "/contrib/Wei.Huang/data/glopara/data/gdasapp-wxflow-20240307/src/wxflow")

setenv("CC","mpiicc")
setenv("FC","mpiifort")
setenv("CXX","mpiicpc")
Expand Down
Loading

0 comments on commit ba600cd

Please sign in to comment.