Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/ss_180
Browse files Browse the repository at this point in the history
* origin/develop:
  Update the C192 default ocean resolution in the gdas_init utility (ufs-community#980)
  Use HPC-stack libraries on WCOSS2 (ufs-community#975)
  Fix compiler warning in fre-nctools.fd (ufs-community#969)
  Fix Gnu compilation on Hera (ufs-community#965)
  Update fixed data directory path for Gaea (ufs-community#972)
  • Loading branch information
DavidHuber-NOAA committed Sep 9, 2024
2 parents fb6eb56 + 5de880a commit d3bb0ea
Show file tree
Hide file tree
Showing 23 changed files with 78 additions and 44 deletions.
2 changes: 1 addition & 1 deletion fix/link_fixdirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ elif [ $machine = "wcoss2" ]; then
elif [ $machine = "s4" ]; then
FIX_DIR="/data/prod/glopara/fix"
elif [ $machine = "gaea" ]; then
FIX_DIR="/gpfs/f5/epic/proj-shared/global/glopara/data/fix"
FIX_DIR="/gpfs/f5/ufs-ard/world-shared/global/glopara/data/fix"
fi

am_ver=${am_ver:-20220805}
Expand Down
19 changes: 5 additions & 14 deletions modulefiles/build.hera.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Load environment to compile UFS_UTILS on Hera using Gnu
hpss_ver=os.getenv("hpss_ver") or ""
load(pathJoin("hpss", hpss_ver))

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8-ompi416/install/modulefiles/Core")

stack_gcc_ver=os.getenv("stack_gcc_ver") or "9.2"
load(pathJoin("stack-gcc", gnu_ver))

stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.5"
stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.6"
load(pathJoin("stack-openmpi", stack_openmpi_ver))

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
Expand Down Expand Up @@ -41,22 +41,13 @@ load(pathJoin("w3emc", w3emc_ver))
sigio_ver=os.getenv("sigio_ver") or "2.3.2"
load(pathJoin("sigio", sigio_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.14.0"
load(pathJoin("hdf5", hdf5_ver))

netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2"
load(pathJoin("netcdf-c", netcdf_c_ver))

netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.1"
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
nccmp_ver=os.getenv("nccmp_ver") or "1.9.1"
load(pathJoin("nccmp", nccmp_ver))

esmf_ver=os.getenv("esmf_ver") or "8.6.0"
esmf_ver=os.getenv("esmf_ver") or "8.5.0"
load(pathJoin("esmf", esmf_ver))

nco_ver=os.getenv("nco_ver") or "5.0.6"
nco_ver=os.getenv("nco_ver") or "5.1.6"
load(pathJoin("nco", nco_ver))

whatis("Description: UFS_UTILS build environment")
24 changes: 13 additions & 11 deletions modulefiles/build.wcoss2.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ load(pathJoin("craype", craype_ver))
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
load(pathJoin("intel", intel_ver))

cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.7"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.12"
load(pathJoin("cray-mpich", cray_mpich_ver))

libjpeg_ver=os.getenv("libjpeg_ver") or "9c"
Expand All @@ -26,11 +26,11 @@ load(pathJoin("zlib", zlib_ver))
libpng_ver=os.getenv("libpng_ver") or "1.6.37"
load(pathJoin("libpng", libpng_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.10.6"
load(pathJoin("hdf5", hdf5_ver))
hdf5_ver=os.getenv("hdf5_ver") or "1.14.0"
load(pathJoin("hdf5-C", hdf5_ver))

netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"
load(pathJoin("netcdf", netcdf_ver))
netcdf_ver=os.getenv("netcdf_ver") or "4.9.2"
load(pathJoin("netcdf-C", netcdf_ver))

bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))
Expand All @@ -42,13 +42,13 @@ load(pathJoin("bacio", bacio_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.4"
load(pathJoin("nemsio", nemsio_ver))

sigio_ver=os.getenv("sigio_ver") or "2.3.2"
load(pathJoin("sigio", sigio_ver))

sp_ver=os.getenv("sp_ver") or "2.3.3"
sp_ver=os.getenv("sp_ver") or "2.4.0"
load(pathJoin("sp", sp_ver))

ip_ver=os.getenv("ip_ver") or "4.0.0"
Expand All @@ -57,20 +57,22 @@ load(pathJoin("ip", ip_ver))
g2_ver=os.getenv("g2_ver") or "3.4.5"
load(pathJoin("g2", g2_ver))

-- for mpiexec command
-- Needed for mpiexec command.
cray_pals_ver=os.getenv("cray_pals_ver") or "1.2.2"
load(pathJoin("cray-pals", cray_pals_ver))

-- Needed at runtime for nco utilities.
udunits_ver=os.getenv("udunits_ver") or "2.2.28"
load(pathJoin("udunits", udunits_ver))

-- Needed at runtime for nco utilities.
gsl_ver=os.getenv("gsl_ver") or "2.7"
load(pathJoin("gsl", gsl_ver))

nco_ver=os.getenv("nco_ver") or "4.9.7"
nco_ver=os.getenv("nco_ver") or "5.0.6"
load(pathJoin("nco", nco_ver))

esmf_ver=os.getenv("esmf_ver") or "8.4.1"
load(pathJoin("esmf", esmf_ver))
esmf_ver=os.getenv("esmf_ver") or "8.6.0"
load(pathJoin("esmf-C", esmf_ver))

whatis("Description: UFS_UTILS build environment")
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/13km.conus.nam.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export TRACERS_INPUT=""

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/13km.conus.rap.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export GEOGRID_FILE_INPUT=${HOMEufs}/fix/am/geo_em.d01.nc_RAPX

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/13km.na.gfs.ncei.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export CDATE=2019080100

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/25km.conus.gfs.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export CDATE=2019110400

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export CDATE=2021062718

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/3km.conus.hrrr.gfssdf.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export GEOGRID_FILE_INPUT=${HOMEufs}/fix/am/geo_em.d01.nc_HRRRX

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions reg_tests/chgres_cube/3km.conus.hrrr.newsfc.grib2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export GEOGRID_FILE_INPUT=${HOMEufs}/fix/am/geo_em.d01.nc_HRRRX

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions reg_tests/chgres_cube/driver.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ compiler=${compiler:-"intel"}
source ../../sorc/machine-setup.sh > /dev/null 2>&1
module use ../../modulefiles
module load build.$target.$compiler
# load nccmp
module load netcdf
module load nccmp
module list

export OUTDIR="${WORK_DIR:-/lfs/h2/emc/stmp/$LOGNAME}"
Expand Down Expand Up @@ -60,8 +63,6 @@ rm -f $LOG_FILE* $SUM_FILE

export OMP_STACKSIZE=1024M

export NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp
#export NCCMP=${NCCMP:-nccmp}
rm -fr $OUTDIR

this_dir=$PWD
Expand Down Expand Up @@ -163,7 +164,7 @@ TEST10=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltim
LOG_FILE=consistency.log11
export APRUN="mpiexec -n 12 -ppn 12 --cpu-bind core"
TEST11=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:05:00 \
-N c96.fv3.netcdf2wam -l select=1:ncpus=12:ompthreads=1:mem=75GB $PWD/c96.fv3.netcdf2wam.sh)
-N c96.fv3.netcdf2wam -l select=1:ncpus=12:ompthreads=1:mem=80GB $PWD/c96.fv3.netcdf2wam.sh)

#-----------------------------------------------------------------------------
# Initialize CONUS 25-KM USING GFS PGRIB2+BGRIB2 files.
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/cpld_gridgen/parm/grid.nml.IN
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
& grid_nml
&grid_nml
ni=NI_GLB
nj=NJ_GLB
dirsrc='FIXDIR'
Expand Down
6 changes: 5 additions & 1 deletion reg_tests/cpld_gridgen/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if [[ $target = wcoss2 ]]; then
export APRUN="mpiexec -n 1 -ppn 1 --cpu-bind core"
QUEUE=${QUEUE:-dev}
SBATCH_COMMAND="./cpld_gridgen.sh"
NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp
NCCMP=nccmp
elif [[ $target = hera ]]; then
STMP=${STMP:-/scratch1/NCEPDEV/stmp4/$USER}
export MOM6_FIXDIR=/scratch1/NCEPDEV/global/glopara/fix/mom6/20220805
Expand Down Expand Up @@ -217,6 +217,10 @@ fi

module use $PATHTR/modulefiles
module load build.$target.$compiler
if [[ $target = wcoss2 ]]; then
module load netcdf
module load nccmp
fi
module list

if [[ $CREATE_BASELINE = true ]]; then
Expand Down
4 changes: 2 additions & 2 deletions reg_tests/global_cycle/driver.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ compiler=${compiler:-"intel"}
source ../../sorc/machine-setup.sh > /dev/null 2>&1
module use ../../modulefiles
module load build.$target.$compiler
module load netcdf
module load nccmp
module list

WORK_DIR="${WORK_DIR:-/lfs/h2/emc/stmp/$LOGNAME}"
Expand Down Expand Up @@ -56,8 +58,6 @@ export NWPROD=$PWD/../..

reg_dir=$PWD

export NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp

LOG_FILE=consistency.log
rm -f ${LOG_FILE}*

Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/driver.orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ rm -fr $WORK_DIR
#-----------------------------------------------------------------------------

LOG_FILE1=${LOG_FILE}01
TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.uniform \
TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:20:00 -A $PROJECT_CODE -q $QUEUE -J c96.uniform \
-o $LOG_FILE1 -e $LOG_FILE1 ./c96.uniform.sh)

#-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions reg_tests/grid_gen/driver.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ compiler=${compiler:-"intel"}
source ../../sorc/machine-setup.sh > /dev/null 2>&1
module use ../../modulefiles
module load build.$target.$compiler
module load netcdf
module load nccmp
module list

set -x
Expand All @@ -44,8 +46,6 @@ if [ "$UPDATE_BASELINE" = "TRUE" ]; then
source ../get_hash.sh
fi

export NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp

LOG_FILE=consistency.log
rm -f ${LOG_FILE}
SUM_FILE=summary.log
Expand Down
6 changes: 5 additions & 1 deletion reg_tests/ocnice_prep/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ if [[ $target = wcoss2 ]]; then
ACCOUNT=${ACCOUNT:-GFS-DEV}
export APRUN="mpiexec -n 1 -ppn 1 --cpu-bind core"
QUEUE=${QUEUE:-dev}
NCCMP=nccmp
SBATCH_COMMAND="./ocnice_prep.sh"
NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp
elif [[ $target = hera ]]; then
STMP=${STMP:-/scratch1/NCEPDEV/stmp4/$USER}
BASELINE_ROOT=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/ocnice_prep/baseline_data
Expand Down Expand Up @@ -221,6 +221,10 @@ fi

module use $PATHTR/modulefiles
module load build.$target.$compiler
if [[ $target = wcoss2 ]]; then
module load netcdf
module load nccmp/1.8.9.0
fi
module list

if [[ $CREATE_BASELINE = true ]]; then
Expand Down
4 changes: 2 additions & 2 deletions reg_tests/weight_gen/driver.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ compiler=${compiler:-"intel"}
source ../../sorc/machine-setup.sh > /dev/null 2>&1
module use ../../modulefiles
module load build.$target.$compiler
module load netcdf
module load nccmp
module list

export DATA="${WORK_DIR:-/lfs/h2/emc/stmp/$LOGNAME}"
Expand All @@ -54,8 +56,6 @@ fi
export HOMEreg=/lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/weight_gen
export HOMEufs=$PBS_O_WORKDIR/../..

export NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp

./weight_gen.sh

exit 0
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/program_setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ subroutine read_setup_namelist(filename)
print*,'- INPUT DATA FROM SPECTRAL GFS GAUSSIAN NEMSIO FILE.'
case ("gfs_sigio")
print*,'- INPUT DATA FROM SPECTRAL GFS SIGIO/SFCIO FILE.'
#endif()
#endif
case ("gaussian_netcdf")
print*,'- INPUT DATA FROM FV3 GAUSSIAN NETCDF FILE.'
case ("grib2")
Expand Down
2 changes: 2 additions & 0 deletions sorc/fre-nctools.fd/shared_lib/mosaic_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ void initNode(struct Node *node);
void addEnd(struct Node *list, double x, double y, double z, int intersect, double u, int inbound, int inside);
int addIntersect(struct Node *list, double x, double y, double z, int intersect, double u1, double u2,
int inbound, int is1, int ie1, int is2, int ie2);
void insertIntersect(struct Node *list, double x, double y, double z, double u1, double u2, int inbound,
double x2, double y2, double z2);
int length(struct Node *list);
int samePoint(double x1, double y1, double z1, double x2, double y2, double z2);
int sameNode(struct Node node1, struct Node node2);
Expand Down
20 changes: 18 additions & 2 deletions sorc/global_cycle.fd/cycle.f90
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ PROGRAM SFC_DRV
PRINT*,"READ NAMCYC NAMELIST."

CALL BAOPENR(36, "fort.36", IERR)
READ(36, NML=NAMCYC)
IF (IERR /= 0) THEN
PRINT*,'FATAL ERROR READING FORT.36 NAMELIST. IERR: ', IERR
CALL MPI_ABORT(MPI_COMM_WORLD, 32, IERR)
ENDIF
READ(36, NML=NAMCYC, IOSTAT=IERR)
IF (IERR /= 0) THEN
PRINT*,'FATAL ERROR READING FORT.36 NAMELIST. IERR: ', IERR
CALL MPI_ABORT(MPI_COMM_WORLD, 33, IERR)
ENDIF
!IF (MYRANK==0) WRITE(6,NAMCYC)

IF (MAX_TASKS < 99999 .AND. MYRANK > (MAX_TASKS - 1)) THEN
Expand Down Expand Up @@ -412,7 +420,15 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LENSFC,LSOIL,DELTSFC, &
INPUT_NML_FILE = "NULL"

CALL BAOPENR(37, "fort.37", IERR)
READ (37, NML=NAMSFCD)
IF (IERR /= 0) THEN
PRINT*,'FATAL ERROR OPENING FORT.37 NAMELIST. IERR: ', IERR
CALL MPI_ABORT(MPI_COMM_WORLD, 30, IERR)
ENDIF
READ (37, NML=NAMSFCD, IOSTAT=IERR)
IF (IERR /= 0) THEN
PRINT*,'FATAL ERROR READING FORT.37 NAMELIST. IERR: ', IERR
CALL MPI_ABORT(MPI_COMM_WORLD, 31, IERR)
ENDIF

PRINT*
PRINT*,'IN ROUTINE SFCDRV,IDIM=',IDIM,'JDIM=',JDIM,'FH=',FH
Expand Down
2 changes: 1 addition & 1 deletion ush/global_cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ cat << EOF > fort.36
&NAMCYC
idim=$CRES, jdim=$CRES, lsoil=$LSOIL,
iy=$iy, im=$im, id=$id, ih=$ih, fh=$FHOUR,
deltsfc=$DELTSFC,ialb=$IALB,use_ufo=$use_ufo,donst=$DONST,
deltsfc=$DELTSFC,ialb=$IALB,use_ufo=$use_ufo,donst="$DONST",
do_sfccycle=$DO_SFCCYCLE,do_lndinc=$DO_LNDINC,isot=$ISOT,ivegsrc=$IVEGSRC,
zsea1_mm=$zsea1,zsea2_mm=$zsea2,MAX_TASKS=$MAX_TASKS_CY,
frac_grid=$FRAC_GRID
Expand Down
2 changes: 1 addition & 1 deletion util/gdas_init/set_fixed_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ ${CTAR} == 'C48' ] ; then
elif [ ${CTAR} == 'C96' ]; then
OCNRES='500'
elif [ ${CTAR} == 'C192' ]; then
OCNRES='050'
OCNRES='025'
elif [ ${CTAR} == 'C384' ]; then
OCNRES='025'
elif [ ${CTAR} == 'C768' ]; then
Expand Down

0 comments on commit d3bb0ea

Please sign in to comment.