Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions reg_tests/cpld_gridgen/cpld_gridgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ MOSAICDIR_PATH=${MOSAICDIR_PATH:-$PATHTR/fix/orog}
FIXDIR_PATH=${MOM6_FIXDIR}/${RESNAME}
if [[ ${ATMLIST} -eq -1 ]]; then
ATMRESLIST=12,24,48,96,192,384,768,1152,3072
elif [[ ${ATMLIST} -eq -99 ]]; then
ATMRESLIST=
else
ATMRESLIST=${ATMLIST}
fi
Expand Down Expand Up @@ -169,6 +171,22 @@ if [ $RESNAME = 025 ]; then
fi
fi

if [ $RESNAME = 008 ]; then
NI=4500
NJ=3297
DO_POSTWGTS=.false.
TOPOGFILE=ocean_topog.nc
EDITSFILE=none
if [ $DO_POSTWGTS == .true. ]; then
#pre-generate SCRIP files for dst rectilinear grids using NCO
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.9p00_SCRIP.nc -G latlon=20,40#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.5p00_SCRIP.nc -G latlon=36,72#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.1p00_SCRIP.nc -G latlon=181,360#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.0p50_SCRIP.nc -G latlon=361,720#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.0p25_SCRIP.nc -G latlon=721,1440#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.0p125_SCRIP.nc -G latlon=1440,2880#lon_typ=grn_ctr#lat_typ=cap
fi
fi
edit_namelist < grid.nml.IN > grid.nml
$APRUN ./cpld_gridgen

Expand Down
1 change: 1 addition & 0 deletions reg_tests/cpld_gridgen/rt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
mx100 | 48,96,192,384,768,1152
mx500 | 24,48,96,192,384,768,1152
mx900 | 12,24
#mx008 | -99
12 changes: 9 additions & 3 deletions reg_tests/cpld_gridgen/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ elif [[ $target = wcoss2 ]]; then
STMP=${STMP:-/lfs/h2/emc/stmp/$USER}
ACCOUNT=${ACCOUNT:-GFS-DEV}
QUEUE=${QUEUE:-dev}
WLCLK=40
WLCLK=60
export MOM6_FIXDIR=/lfs/h2/emc/global/noscrub/emc.global/FIX/fix/mom6/${MOM6_version}
BASELINE_ROOT=/lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/cpld_gridgen/baseline_data
export APRUN="mpiexec -n 12 -ppn 12 --cpu-bind core"
Expand Down Expand Up @@ -198,6 +198,12 @@ while read -r line || [ "$line" ]; do
ATMLIST=-1
fi

if [[ ${TEST_NAME} == "008" ]]; then
NTASKS=24
else
NTASKS=12
fi

export NEW_BASELINE=${NEW_BASELINE_ROOT}/$TEST_NAME
RUNDIR=$RUNDIR_ROOT/$TEST_NAME
mkdir -p $RUNDIR
Expand All @@ -211,10 +217,10 @@ while read -r line || [ "$line" ]; do

if [[ $target = wcoss2 ]]; then
tests[$i]=$(qsub -V -o $PATHRT/run_${TEST_NAME}.log -e $PATHRT/run_${TEST_NAME}.log -q $QUEUE -A $ACCOUNT \
-l walltime=00:${WLCLK}:00 -N $TEST_NAME -l select=1:ncpus=12 -v RESNAME=$TEST_NAME,ATMLIST="'$ATMLIST'" ./cpld_gridgen.sh)
-l walltime=00:${WLCLK}:00 -N $TEST_NAME -l select=1:ncpus=${NTASKS} -v RESNAME=$TEST_NAME,ATMLIST="'$ATMLIST'" ./cpld_gridgen.sh)

else
tests[$i]=$(sbatch --parsable --ntasks-per-node=12 --nodes=1 -t 00:${WLCLK}:00 -A $ACCOUNT -q $QUEUE -J $TEST_NAME \
tests[$i]=$(sbatch --parsable --ntasks-per-node=${NTASKS} --nodes=1 -t 00:${WLCLK}:00 -A $ACCOUNT -q $QUEUE -J $TEST_NAME \
$PARTITION -o run_${TEST_NAME}.log -e run_${TEST_NAME}.log ./cpld_gridgen.sh "$TEST_NAME" "$ATMLIST")
fi

Expand Down
7 changes: 4 additions & 3 deletions sorc/cpld_gridgen.fd/gen_fixgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ program gen_fixgrid
character(len= 6) :: cnx

!-------------------------------------------------------------------------
! Initialize esmf environment. Everything except the generation of the
! Initialize esmf environment. Everything except the generation of the
! ESMF weights is done on the root PE.
!-------------------------------------------------------------------------

Expand Down Expand Up @@ -560,6 +560,7 @@ program gen_fixgrid
!---------------------------------------------------------------------
! use ESMF to create positional weights for mapping a field from its
! native stagger location (Cu,Cv,Bu) onto the center (Ct) grid location
! these are used for both post and downscaling
!---------------------------------------------------------------------

method=ESMF_REGRIDMETHOD_BILINEAR
Expand All @@ -573,7 +574,7 @@ program gen_fixgrid

call ESMF_RegridWeightGen(srcFile=trim(fsrc),dstFile=trim(fdst), &
weightFile=trim(fwgt), regridmethod=method, &
ignoreDegenerate=.true., &
ignoreDegenerate=.true., largeFileFlag=.true., &
unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=__FILE__)) call ESMF_Finalize(endflag=ESMF_END_ABORT)
Expand All @@ -596,7 +597,7 @@ program gen_fixgrid

call ESMF_RegridWeightGen(srcFile=trim(fsrc),dstFile=trim(fdst), &
weightFile=trim(fwgt), regridmethod=method, &
ignoreDegenerate=.true., &
ignoreDegenerate=.true., largeFileFlag=.true., &
unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=__FILE__)) call ESMF_Finalize(endflag=ESMF_END_ABORT)
Expand Down
Empty file added sorc/cpld_gridgen.fd/rt.conf
Empty file.
Loading