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

Fix weights generation for tripole->rectilinear output of ocean and ice #858

Merged
Merged
Changes from 3 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
8 changes: 4 additions & 4 deletions reg_tests/cpld_gridgen/rt.sh
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ rm -f fail_test* $COMPILE_LOG run_*.log nccmp_*.log summary.log

if [[ $target = wcoss2 ]]; then
STMP=${STMP:-/lfs/h2/emc/stmp/$USER}
export MOM6_FIXDIR=/lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/cpld_gridgen/fix_mom6
export MOM6_FIXDIR=/lfs/h2/emc/global/noscrub/emc.global/FIX/fix/mom6/20220805
BASELINE_ROOT=/lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-GFS-DEV}
export APRUN="mpiexec -n 1 -ppn 1 --cpu-bind core"
@@ -134,7 +134,7 @@ if [[ $target = wcoss2 ]]; then
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}
export MOM6_FIXDIR=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/fix_mom6
export MOM6_FIXDIR=/scratch1/NCEPDEV/global/glopara/fix/mom6/20220805
BASELINE_ROOT=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-nems}
QUEUE=${QUEUE:-batch}
@@ -143,7 +143,7 @@ elif [[ $target = hera ]]; then
SBATCH_COMMAND="./cpld_gridgen.sh"
elif [[ $target = orion ]]; then
STMP=${STMP:-/work/noaa/stmp/$USER}
export MOM6_FIXDIR=/work/noaa/nems/role-nems/ufs_utils/reg_tests/cpld_gridgen/fix_mom6
export MOM6_FIXDIR=/work/noaa/global/glopara/fix/mom6/20220805
BASELINE_ROOT=/work/noaa/nems/role-nems/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-nems}
QUEUE=${QUEUE:-batch}
@@ -153,7 +153,7 @@ elif [[ $target = orion ]]; then
SBATCH_COMMAND="./cpld_gridgen.sh"
elif [[ $target = jet ]]; then
STMP=${STMP:-/lfs4/HFIP/h-nems/$USER}
export MOM6_FIXDIR=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/fix_mom6
export MOM6_FIXDIR=/lfs4/HFIP/hfv3gfs/glopara/git/fv3gfs/fix/mom6/20220805
BASELINE_ROOT=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-h-nems}
QUEUE=${QUEUE:-batch}
32 changes: 24 additions & 8 deletions sorc/cpld_gridgen.fd/gen_fixgrid.F90
Original file line number Diff line number Diff line change
@@ -169,17 +169,22 @@ program gen_fixgrid

if(xtype.eq. 6)dp4 = real(dp8,4)

!print *,minval(dp8),maxval(dp8)
!print *,minval(dp4),maxval(dp4)

if(editmask)then
!---------------------------------------------------------------------
! apply topoedits run time mask changes if required for this config
! apply topoedits run time mask changes if required for this config
! this will create a modified topoedits file which accounts for any
! land mask changes created at run time by MOM6
!---------------------------------------------------------------------

if(trim(editsfile) == 'none')then
print '(a)', 'Need a valid editsfile to make mask edits '
stop
call abort()
end if
inquire(file=trim(dirsrc)//'/'//trim(editsfile),exist=fexist)
if (.not. fexist) then
print '(a)', 'Required topoedits file '//trim(editsfile) &
//'for land mask changes is missing '
call abort()
end if

fsrc = trim(dirsrc)//'/'//trim(editsfile)
@@ -191,11 +196,22 @@ program gen_fixgrid
! MOM6 reads the depth file, applies the topo edits and then adjusts
! depth using masking_depth and min/max depth. This call mimics
! MOM6 routines apply_topography_edits_from_file and limit_topography
! If the the topoedits file has been modified to account for MOM6 run
! time land mask changes (above), then the depth will be created using
! this modified topoedits file
!---------------------------------------------------------------------

fsrc = trim(dirsrc)//'/'//trim(editsfile)
if(editmask)fsrc = trim(dirout)//'/'//'ufs.'//trim(editsfile)
call apply_topoedits(fsrc)
fsrc = trim(dirsrc)//'/'//trim(editsfile)
if(editmask)fsrc = trim(dirout)//'/'//'ufs.'//trim(editsfile)

if (trim(editsfile) /= 'none') then
inquire(file=trim(fsrc),exist=fexist)
if (.not. fexist) then
print '(a)', 'Required topoedits file '//trim(fsrc)//' is missing '
call abort()
end if
end if
call apply_topoedits(fsrc)

!---------------------------------------------------------------------
! read MOM6 supergrid file