Skip to content

Commit

Permalink
add postweights for 5deg case
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Oct 20, 2023
1 parent 1851e4e commit 6e6e0df
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions reg_tests/cpld_gridgen/rt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
C384_025 |
C192_050 | C384_025
C096_100 | C384_025
C048_500 | C384_025

#################################################################
# Non-baseline configurations.
Expand Down
19 changes: 11 additions & 8 deletions sorc/cpld_gridgen.fd/postwgts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,25 @@ subroutine make_postwgts
! set the destination grids
!---------------------------------------------------------------------

if(trim(res) .eq. '400')return

if(trim(res) .eq. '100')then
if(trim(res) .eq. '500')then
ndest = 1
allocate(destgrds(ndest))
destgrds = (/'1p0 '/)
destgrds = (/'5p0 '/)
end if
if(trim(res) .eq. '050')then
if(trim(res) .eq. '100')then
ndest = 2
allocate(destgrds(ndest))
destgrds = (/'1p0 ', '0p5 '/)
destgrds = (/'5p0 ', '1p0 '/)
end if
if(trim(res) .eq. '025')then
if(trim(res) .eq. '050')then
ndest = 3
allocate(destgrds(ndest))
destgrds = (/'1p0 ', '0p5 ', '0p25'/)
destgrds = (/'5p0 ', '1p0 ', '0p5 '/)
end if
if(trim(res) .eq. '025')then
ndest = 4
allocate(destgrds(ndest))
destgrds = (/'5p0 ', '1p0 ', '0p5 ', '0p25'/)
end if

!---------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions ush/cpld_gridgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ if [ $RESNAME = 500 ]; then
export NJ=35
export TOPOGFILE=ocean_topog.nc
export 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.5p0_SCRIP.nc -G latlon=36,72#lon_typ=grn_ctr#lat_typ=cap
fi
fi

if [ $RESNAME = 100 ]; then
Expand All @@ -64,6 +68,7 @@ if [ $RESNAME = 100 ]; then
export EDITSFILE=topo_edits_011818.nc
if [ $DO_POSTWGTS == .true. ]; then
#pre-generate SCRIP files for dst rectilinear grids using NCO
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.5p0_SCRIP.nc -G latlon=36,72#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.1p0_SCRIP.nc -G latlon=181,360#lon_typ=grn_ctr#lat_typ=cap
fi
fi
Expand All @@ -75,6 +80,7 @@ if [ $RESNAME = 050 ]; then
export 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.5p0_SCRIP.nc -G latlon=36,72#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.1p0_SCRIP.nc -G latlon=181,360#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.0p5_SCRIP.nc -G latlon=361,720#lon_typ=grn_ctr#lat_typ=cap
fi
Expand All @@ -87,6 +93,7 @@ if [ $RESNAME = 025 ]; then
export EDITSFILE=All_edits.nc
if [ $DO_POSTWGTS == .true. ]; then
#pre-generate SCRIP files for dst rectilinear grids using NCO
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.5p0_SCRIP.nc -G latlon=36,72#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.1p0_SCRIP.nc -G latlon=181,360#lon_typ=grn_ctr#lat_typ=cap
$APRUN -n 1 ncremap -g ${OUTDIR_PATH}/rect.0p5_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
Expand Down

0 comments on commit 6e6e0df

Please sign in to comment.