From ae910155e0b681eee6d6caa205bcc16a5f68117e Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 19 Jul 2021 18:40:37 -0500 Subject: [PATCH 01/33] files intake from existing coupled-crow branch --- scripts/exglobal_forecast.sh | 1624 ++++----------------------- scripts/exglobal_forecast.sh_bk | 1422 +++++++++++++++++++++++ ush/forecast_det.sh | 82 ++ ush/forecast_postdet.sh | 880 +++++++++++++++ ush/forecast_predet.sh | 294 +++++ ush/parsing_model_configure_DATM.sh | 40 + ush/parsing_model_configure_FV3.sh | 82 ++ ush/parsing_namelists_CICE.sh | 604 ++++++++++ ush/parsing_namelists_FV3.sh | 508 +++++++++ ush/parsing_namelists_FV3_GOCART.sh | 364 ++++++ ush/parsing_namelists_MOM6.sh | 88 ++ 11 files changed, 4584 insertions(+), 1404 deletions(-) create mode 100755 scripts/exglobal_forecast.sh_bk create mode 100755 ush/forecast_det.sh create mode 100755 ush/forecast_postdet.sh create mode 100755 ush/forecast_predet.sh create mode 100755 ush/parsing_model_configure_DATM.sh create mode 100755 ush/parsing_model_configure_FV3.sh create mode 100644 ush/parsing_namelists_CICE.sh create mode 100755 ush/parsing_namelists_FV3.sh create mode 100755 ush/parsing_namelists_FV3_GOCART.sh create mode 100644 ush/parsing_namelists_MOM6.sh diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 564c0c798a3..9efed80ef46 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -1,1422 +1,238 @@ -#!/bin/ksh -################################################################################ -# UNIX Script Documentation Block -# Script name: exglobal_forecast.sh -# Script description: Runs a global FV3GFS model forecast -# -# Author: Fanglin Yang Org: NCEP/EMC Date: 2016-11-15 -# Abstract: This script runs a single GFS forecast with FV3 dynamical core. -# This script is created based on a C-shell script that GFDL wrote -# for the NGGPS Phase-II Dycore Comparison Project. -# -# Script history log: -# 2016-11-15 Fanglin Yang First Version. -# 2017-02-09 Rahul Mahajan Added warm start and restructured the code. -# 2017-03-10 Fanglin Yang Updated for running forecast on Cray. -# 2017-03-24 Fanglin Yang Updated to use NEMS FV3GFS with IPD4 -# 2017-05-24 Rahul Mahajan Updated for cycling with NEMS FV3GFS -# 2017-09-13 Fanglin Yang Updated for using GFDL MP and Write Component -# 2019-03-05 Rahul Mahajan Implemented IAU -# 2019-03-21 Fanglin Yang Add restart capability for running gfs fcst from a break point. -# 2019-12-12 Henrique Alves Added wave model blocks for coupled run -# 2020-01-31 Henrique Alves Added IAU capability for wave component -# 2020-06-02 Fanglin Yang restore restart capability when IAU is turned on. -# -# $Id$ -# -# Attributes: -# Language: Portable Operating System Interface (POSIX) Shell -# Machine: WCOSS-CRAY, Theia +#!/bin/bash ################################################################################ +## UNIX Script Documentation Block +## Script name: exglobal_fcst_nemsfv3gfs.sh +## Script description: Runs a global FV3GFS model forecast +## +## Author: Fanglin Yang Organization: NCEP/EMC Date: 2016-11-15 +## Abstract: This script runs a single GFS forecast with FV3 dynamical core. +## This script is created based on a C-shell script that GFDL wrote +## for the NGGPS Phase-II Dycore Comparison Project. +## +## Script history log: +## 2016-11-15 Fanglin Yang First Version. +## 2017-02-09 Rahul Mahajan Added warm start and restructured the code. +## 2017-03-10 Fanglin Yang Updated for running forecast on Cray. +## 2017-03-24 Fanglin Yang Updated to use NEMS FV3GFS with IPD4 +## 2017-05-24 Rahul Mahajan Updated for cycling with NEMS FV3GFS +## 2017-09-13 Fanglin Yang Updated for using GFDL MP and Write Component +## 2019-04-02 +## +## Attributes: +## Language: Portable Operating System Interface (POSIX) Shell +## Machines: All supported platforms +## +## Usage (Arguments) +## No command line argument +## +## Data input (location, name) +## Warm start files: +## 1. restart file except sfc_data, $gmemdir/RESTART/$PDY.$cyc.*.nc +## 2. sfcanl_data, $memdir/RESTART/$PDY.$cyc.*.nc +## 3. coupler_res, $gmemdir/RESTART/$PDY.$cyc.coupler.res +## 4. increment file, $memdir/${CDUMP}.t${cyc}z.atminc.nc +## OR $DATA/INPUT/fv3_increment.nc +## Cold start files: +## 1. initial condition, $memdir/INPUT/*.nc +## Restart files: +## +## Fix files: +## 1. computing grid, $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc +## 2. orography data, $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc +## 3. mosaic data, $FIXfv3/$CASE/${CASE}_mosaic.nc +## 4. Global O3 data, $FIX_AM/${O3FORC} +## 5. Global H2O data, $FIX_AM/${H2OFORC} +## 6. Global solar constant data, $FIX_AM/global_solarconstant_noaa_an.txt +## 7. Global surface emissivity, $FIX_AM/global_sfc_emissivity_idx.txt +## 8. Global CO2 historical data, $FIX_AM/global_co2historicaldata_glob.txt +## 8. Global CO2 monthly data, $FIX_AM/co2monthlycyc.txt +## 10. Additional global CO2 data, $FIX_AM/fix_co2_proj/global_co2historicaldata +## 11. Climatological aerosol global distribution +## $FIX_AM/global_climaeropac_global.txt +## 12. Monthly volcanic forcing $FIX_AM/global_volcanic_aerosols_YYYY-YYYY.txt +## +## Data output (location, name) +## If quilting=true and output grid is gaussian grid: +## 1. atmf data, $memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$OUTPUT_FILE +## 2. sfcf data, $memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$OUTPUT_FILE +## 3. logf data, $memdir/${CDUMP}.t${cyc}z.logf${FH3}.$OUTPUT_FILE +## If quilting=false and output grid is not gaussian grid: +## 1. NGGPS2D, $memdir/nggps2d.tile${n}.nc +## 2. NGGPS3D, $memdir/nggps3d.tile${n}.nc +## 3. grid spec, $memdir/grid_spec.tile${n}.nc +## 4. atmospheric static tiles, $memdir/atmos_static.tile${n}.nc +## 5. atmospheric 4x daily tiles, $memdir/atmos_4xdaily.tile${n}.nc +## +## Status output +## 0: Normal +## others: Error +## +## Namelist input, in RUNDIR, +## 1. diag_table +## 2. nems.configure +## 3. model_configure +## 4. input.nml +####################### +# Main body starts here +####################### -# Set environment. VERBOSE=${VERBOSE:-"YES"} if [ $VERBOSE = "YES" ] ; then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi - -machine=${machine:-"WCOSS_C"} -machine=$(echo $machine | tr '[a-z]' '[A-Z]') - -# Cycling and forecast hour specific parameters -CDUMPwave="${CDUMP}wave" -CASE=${CASE:-C768} -CDATE=${CDATE:-2017032500} -CDUMP=${CDUMP:-gdas} -FHMIN=${FHMIN:-0} -FHMAX=${FHMAX:-9} -FHOUT=${FHOUT:-3} -FHZER=${FHZER:-6} -FHCYC=${FHCYC:-24} -FHMAX_HF=${FHMAX_HF:-0} -FHOUT_HF=${FHOUT_HF:-1} -NSOUT=${NSOUT:-"-1"} -FDIAG=$FHOUT -if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi -WRITE_DOPOST=${WRITE_DOPOST:-".false."} -restart_interval=${restart_interval:-0} -rst_invt1=`echo $restart_interval |cut -d " " -f 1` - -PDY=$(echo $CDATE | cut -c1-8) -cyc=$(echo $CDATE | cut -c9-10) - -# Directories. -pwd=$(pwd) -NWPROD=${NWPROD:-${NWROOT:-$pwd}} -HOMEgfs=${HOMEgfs:-$NWPROD} -FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} -FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} -export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} -export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} -FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} -DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory -ROTDIR=${ROTDIR:-$pwd} # rotating archive directory -ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions -DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis - -# Model resolution specific parameters -DELTIM=${DELTIM:-225} -layout_x=${layout_x:-8} -layout_y=${layout_y:-16} -LEVS=${LEVS:-65} - -# Utilities -NCP=${NCP:-"/bin/cp -p"} -NLN=${NLN:-"/bin/ln -sf"} -NMV=${NMV:-"/bin/mv"} -SEND=${SEND:-"YES"} #move final result to rotating directory -ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -KEEPDATA=${KEEPDATA:-"NO"} - -# Other options -MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER -ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) -PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment - -# IAU options -DOIAU=${DOIAU:-"NO"} -IAUFHRS=${IAUFHRS:-0} -IAU_DELTHRS=${IAU_DELTHRS:-0} -IAU_OFFSET=${IAU_OFFSET:-0} - -# Model specific stuff -FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} -FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} -PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} -PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} - -# Wave coupling parameter defaults to false -cplwav=${cplwav:-.false.} - -# Model config options -APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} -NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} -cores_per_node=${cores_per_node:-${npe_node_max:-24}} -ntiles=${ntiles:-6} -NTASKS_FV3=${NTASKS_FV3:-$npe_fv3} - -TYPE=${TYPE:-"nh"} # choices: nh, hydro -MONO=${MONO:-"non-mono"} # choices: mono, non-mono -RUN_CCPP=${RUN_CCPP:-"NO"} - -QUILTING=${QUILTING:-".true."} -OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} -OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} -WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} -WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} -affix="nemsio" -[[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" - -rCDUMP=${rCDUMP:-$CDUMP} - -#------------------------------------------------------------------ -# setup the runtime environment -if [ $machine = "WCOSS_C" ] ; then - HUGEPAGES=${HUGEPAGES:-hugepages4M} - . $MODULESHOME/init/sh 2>/dev/null - module load iobuf craype-$HUGEPAGES 2>/dev/null - export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} - export MKL_CBWR=AVX2 - export WRTIOBUF=${WRTIOBUF:-"4M"} - export NC_BLKSZ=${NC_BLKSZ:-"4M"} - export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" -fi - -#------------------------------------------------------- -if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi -mkdata=NO -if [ ! -d $DATA ]; then - mkdata=YES - mkdir -p $DATA -fi -cd $DATA || exit 8 -mkdir -p $DATA/INPUT - -if [ $cplwav = ".true." ]; then - if [ $CDUMP = "gdas" ]; then - RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart - else - RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} - fi - if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi - $NLN $RSTDIR_WAVE restart_wave -fi - -if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then - RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART - if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi - $NLN $RSTDIR_ATM RESTART -else - mkdir -p $DATA/RESTART -fi - -#------------------------------------------------------- -# determine if restart IC exists to continue from a previous forecast -RERUN="NO" -filecount=$(find $RSTDIR_ATM -type f | wc -l) -if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then - reverse=$(echo "${restart_interval[@]} " | tac -s ' ') - for xfh in $reverse ; do - yfh=$((xfh-(IAU_OFFSET/2))) - SDATE=$($NDATE +$yfh $CDATE) - PDYS=$(echo $SDATE | cut -c1-8) - cycs=$(echo $SDATE | cut -c9-10) - flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res - flag2=$RSTDIR_ATM/coupler.res - if [ -s $flag1 ]; then - CDATE_RST=$SDATE - [[ $RERUN = "YES" ]] && break - mv $flag1 ${flag1}.old - if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi - RERUN="YES" - [[ $xfh = $rst_invt1 ]] && RERUN="NO" - fi - done -fi - -#------------------------------------------------------- -# member directory -if [ $MEMBER -lt 0 ]; then - prefix=$CDUMP - rprefix=$rCDUMP - memchar="" -else - prefix=enkf$CDUMP - rprefix=enkf$rCDUMP - memchar=mem$(printf %03i $MEMBER) -fi -memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar -if [ ! -d $memdir ]; then mkdir -p $memdir; fi - -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) -gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar -sCDATE=$($NDATE -3 $CDATE) - -if [[ "$DOIAU" = "YES" ]]; then - sCDATE=$($NDATE -3 $CDATE) - sPDY=$(echo $sCDATE | cut -c1-8) - scyc=$(echo $sCDATE | cut -c9-10) - tPDY=$gPDY - tcyc=$gcyc -else - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc -fi - -#------------------------------------------------------- -# initial conditions -warm_start=${warm_start:-".false."} -read_increment=${read_increment:-".false."} -res_latlon_dynamics="''" - -# Determine if this is a warm start or cold start -if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then - export warm_start=".true." -fi - -# turn IAU off for cold start -DOIAU_coldstart=${DOIAU_coldstart:-"NO"} -if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then - export DOIAU="NO" - echo "turning off IAU" - DOIAU_coldstart="YES" - IAU_OFFSET=0 - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc -fi - -#------------------------------------------------------- -if [ $warm_start = ".true." -o $RERUN = "YES" ]; then -#------------------------------------------------------- -#............................. - if [ $RERUN = "NO" ]; then -#............................. - - # Link all (except sfc_data) restart files from $gmemdir - for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsuf=$(echo $file2 | cut -d. -f1) - if [ $fsuf != "sfc_data" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Link sfcanl_data restart files from $memdir - for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsufanl=$(echo $file2 | cut -d. -f1) - if [ $fsufanl = "sfcanl_data" ]; then - file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Need a coupler.res when doing IAU - if [ $DOIAU = "YES" ]; then - rm -f $DATA/INPUT/coupler.res - cat >> $DATA/INPUT/coupler.res << EOF - 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) - ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second - ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second -EOF - fi - - # Link increments - if [ $DOIAU = "YES" ]; then - for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do - incfhr=$(printf %03i $i) - if [ $incfhr = "006" ]; then - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc - fi - if [ ! -f $increment_file ]; then - echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" - echo "Abort!" - exit 1 - fi - $NLN $increment_file $DATA/INPUT/fv_increment$i.nc - IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" - done - read_increment=".false." - res_latlon_dynamics="" - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc - if [ -f $increment_file ]; then - $NLN $increment_file $DATA/INPUT/fv_increment.nc - read_increment=".true." - res_latlon_dynamics="fv_increment.nc" - fi - fi - -#............................. - else ##RERUN - - export warm_start=".true." - PDYT=$(echo $CDATE_RST | cut -c1-8) - cyct=$(echo $CDATE_RST | cut -c9-10) - for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) - $NLN $file $DATA/INPUT/$file2 - done - - hour_rst=`$NHOUR $CDATE_RST $CDATE` - IAU_FHROT=$((IAU_OFFSET+hour_rst)) - if [ $DOIAU = "YES" ]; then - IAUFHRS=-1 - IAU_DELTHRS=0 - IAU_INC_FILES="''" - fi - - rst_list_rerun="" - xfh=$restart_interval_gfs - while [ $xfh -le $FHMAX_GFS ]; do - rst_list_rerun="$rst_list_rerun $xfh" - xfh=$((xfh+restart_interval_gfs)) - done - restart_interval="$rst_list_rerun" - - fi -#............................. + echo $(date) EXECUTING $0 $* >&2 + set -x +fi + +SCRIPTDIR=$(dirname $(readlink -f "$0") )/../ush +echo "MAIN: environment loaded for $machine platform,Current Script locates in $SCRIPTDIR." + +# include all subroutines. Executions later. +source $SCRIPTDIR/cplvalidate.sh # validation of cpl* +source $SCRIPTDIR/forecast_predet.sh # include functions for variable definition +source $SCRIPTDIR/forecast_det.sh # include functions for run type determination +source $SCRIPTDIR/forecast_postdet.sh # include functions for variables after run type determination +source $SCRIPTDIR/nems_configure.sh # include functions for nems_configure processing +source $SCRIPTDIR/parsing_model_configure_FV3.sh +source $SCRIPTDIR/parsing_model_configure_DATM.sh + +# Compset string. For nems.configure.* template selection. Default ATM only +confignamevarfornems=${confignamevarfornems:-'atm'} + +# Coupling control switches, for coupling purpose, off by default +cpl=${cpl:-.false.} +cplflx=${cplflx:-.false.} # default off,import from outside source +cplwav=${cplwav:-.false.} # ? how to control 1-way/2-way? +cplchem=${cplchem:-.false.} # Chemistry model +cplgocart=${cplgocart:-.false.} # Chemistry model +cplice=${cplice:-.false.} # ICE model + +OCNTIM=${OCNTIM:-3600} +DELTIM=${DELTIM:-450} +ICETIM=${DELTIM} + +CPL_SLOW=${CPL_SLOW:-$OCNTIM} +CPL_FAST=${CPL_FAST:-$ICETIM} + +echo "MAIN: $confignamevarfornems selected" +echo "MAIN: Forecast script started for $confignamevarfornems on $machine" + +echo "MAIN: Validating $confignamevarfornems with cpl switches" +cplvalidate +echo "MAIN: $confignamevarfornems validated, continue" +# Validate the consistency between $confignamevarfornems and $CPL switches + +echo "MAIN: Loading variables before determination of run type" + +common_predet + +echo $RUN +case $RUN in + 'data') DATM_predet;; + 'gfs') FV3_GFS_predet;; + 'gdas') FV3_GFS_predet;; + 'gefs') FV3_GEFS_predet;; +esac +[[ $cplflx = .true. ]] && MOM6_predet +#[[ $cplwav = .true. ]] && WW3_predet #no WW3_predet at this time +[[ $cplice = .true. ]] && CICE_predet +[[ $cplchem = .true. ]] && GSD_predet + +case $RUN in + 'gfs') FV3_GFS_det;; + 'gdas') FV3_GFS_det;; + 'gefs') FV3_GEFS_det;; +esac #no run type determination for data atmosphere +[[ $cplflx = .true. ]] && MOM6_det +[[ $cplwav = .true. ]] && WW3_det +[[ $cplice = .true. ]] && CICE_det +[[ $cplchem = .true. ]] && GSD_det + +echo "MAIN: RUN Type Determined" + +echo "MAIN: Post-determination set up of run type" +echo $RUN +case $RUN in + 'data') DATM_postdet;; + 'gfs') FV3_GFS_postdet;; + 'gdas') FV3_GFS_postdet;; + 'gefs') FV3_GEFS_postdet;; +esac #no post determination set up for data atmosphere +[[ $cplflx = .true. ]] && MOM6_postdet +[[ $cplwav = .true. ]] && WW3_postdet +[[ $cplice = .true. ]] && CICE_postdet +[[ $cplchem = .true. ]] && GSD_postdet +echo "MAIN: Post-determination set up of run type finished" + +echo "MAIN: Writing name lists and model configuration" +case $RUN in + 'data') DATM_nml;; + 'gfs') FV3_GFS_nml;; + 'gdas') FV3_GFS_nml;; + 'gefs') FV3_GEFS_nml;; +esac #no namelist for data atmosphere +[[ $cplflx = .true. ]] && MOM6_nml +[[ $cplwav = .true. ]] && WW3_nml +[[ $cplice = .true. ]] && CICE_nml +[[ $cplchem = .true. ]] && GSD_nml +[[ $cplgocart = .true. ]] && GOCART_rc + +case $RUN in + 'data') DATM_model_configure;; + 'gfs') FV3_model_configure;; + 'gdas') FV3_model_configure;; + 'gefs') FV3_model_configure;; +esac +echo "MAIN: Name lists and model configuration written" + +echo "MAIN: Writing NEMS Configure file" +writing_nems_configure +echo "MAIN: NEMS configured" -else ## cold start - - for file in $(ls $memdir/INPUT/*.nc); do - file2=$(echo $(basename $file)) - fsuf=$(echo $file2 | cut -c1-3) - if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - -#------------------------------------------------------- -fi -#------------------------------------------------------- - -nfiles=$(ls -1 $DATA/INPUT/* | wc -l) -if [ $nfiles -le 0 ]; then - echo "Initial conditions must exist in $DATA/INPUT, ABORT!" - msg="Initial conditions must exist in $DATA/INPUT, ABORT!" - postmsg "$jlogfile" "$msg" - exit 1 -fi - -# If doing IAU, change forecast hours -if [[ "$DOIAU" = "YES" ]]; then - FHMAX=$((FHMAX+6)) - if [ $FHMAX_HF -gt 0 ]; then - FHMAX_HF=$((FHMAX_HF+6)) - fi -fi - -#-------------------------------------------------------------------------- -# Grid and orography data -for n in $(seq 1 $ntiles); do - $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc - $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc -done -$NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc - -# GFS standard input data -IAER=${IAER:-111} -ICO2=${ICO2:-2} - -if [ ${new_o3forc:-YES} = YES ]; then - O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 -else - O3FORC=global_o3prdlos.f77 -fi -H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} -$NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 -$NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 -$NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt -$NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt - -## merra2 aerosol climo -for n in 01 02 03 04 05 06 07 08 09 10 11 12; do -$NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc -done -$NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat -$NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat -$NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat -$NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat -$NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat - -$NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt -$NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt -if [ $ICO2 -gt 0 ]; then - for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done -fi - -$NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat -if [ $IAER -gt 0 ] ; then - for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done -fi - -#-------------wavewave---------------------- -if [ $cplwav = ".true." ]; then - - for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do - $NLN $file $DATA/ - done - $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp - - array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) - grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` - - for wavGRD in ${grdALL}; do - $NLN $COMINwave/rundata/${CDUMPwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD - done - - export WAVHCYC=${WAVHCYC:-6} - export WRDATE=`$NDATE -${WAVHCYC} $CDATE` - export WRPDY=`echo $WRDATE | cut -c1-8` - export WRcyc=`echo $WRDATE | cut -c9-10` - export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart - export datwave=$COMOUTwave/rundata - export wavprfx=${CDUMPwave}${WAV_MEMBER} - - for wavGRD in $waveGRD ; do - if [ $RERUN = "NO" ]; then - if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - else - if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - fi - eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} - done - - if [ "$WW3ICEINP" = "YES" ]; then - wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice - if [ ! -f $wavicefile ]; then - echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" - echo "Abort!" - exit 1 - fi - $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} - fi - - if [ "$WW3CURINP" = "YES" ]; then - wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur - if [ ! -f $wavcurfile ]; then - echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" - echo "Abort!" - exit 1 - fi - $NLN $wavcurfile $DATA/current.${WAVECUR_FID} - fi - - # Link output files - cd $DATA - eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 - - # Loop for gridded output (uses FHINC) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - for wavGRD in ${waveGRD} ; do - eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_grd.${wavGRD} - done - FHINC=$FHOUT_WAV - if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then - FHINC=$FHOUT_HF_WAV - fi - fhr=$((fhr+FHINC)) - done - - # Loop for point output (uses DTPNT) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_pnt.${waveuoutpGRD} - FHINC=$FHINCP_WAV - fhr=$((fhr+FHINC)) - done - -fi #cplwav=true -#-------------wavewave---------------------- - -# inline post fix files -if [ $WRITE_DOPOST = ".true." ]; then - $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag - $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt - $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt - $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new -fi #------------------------------------------------------------------ +# run the executable -# changeable parameters -# dycore definitions -res=$(echo $CASE |cut -c2-5) -resp=$((res+1)) -npx=$resp -npy=$resp -npz=$((LEVS-1)) -io_layout=${io_layout:-"1,1"} -#ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - -# spectral truncation and regular grid resolution based on FV3 resolution -JCAP_CASE=$((2*res-2)) -LONB_CASE=$((4*res)) -LATB_CASE=$((2*res)) - -JCAP=${JCAP:-$JCAP_CASE} -LONB=${LONB:-$LONB_CASE} -LATB=${LATB:-$LATB_CASE} - -LONB_IMO=${LONB_IMO:-$LONB_CASE} -LATB_JMO=${LATB_JMO:-$LATB_CASE} - -# Fix files -FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} -FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} -FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} -FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} -FNZORC=${FNZORC:-"igbp"} -FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} -FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} -FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} -FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} -FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} -FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} -FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} -FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} -FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} - -# If the appropriate resolution fix file is not present, use the highest resolution available (T1534) -[[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" -[[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" -[[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" -[[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" -[[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" - -# NSST Options -# nstf_name contains the NSST related parameters -# nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled -# nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, -# nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON -# nstf_name(4) : ZSEA1 (in mm) : 0 -# nstf_name(5) : ZSEA2 (in mm) : 0 -# nst_anl : .true. or .false., NSST analysis over lake -NST_MODEL=${NST_MODEL:-0} -NST_SPINUP=${NST_SPINUP:-0} -NST_RESV=${NST_RESV-0} -ZSEA1=${ZSEA1:-0} -ZSEA2=${ZSEA2:-0} -nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} -nst_anl=${nst_anl:-".false."} - - -# blocking factor used for threading and general physics performance -#nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` -#nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` -#if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi -blocksize=${blocksize:-32} - -# the pre-conditioning of the solution -# =0 implies no pre-conditioning -# >0 means new adiabatic pre-conditioning -# <0 means older adiabatic pre-conditioning -na_init=${na_init:-1} -[[ $warm_start = ".true." ]] && na_init=0 - -# variables for controlling initialization of NCEP/NGGPS ICs -filtered_terrain=${filtered_terrain:-".true."} -gfs_dwinds=${gfs_dwinds:-".true."} - -# various debug options -no_dycore=${no_dycore:-".false."} -dycore_only=${adiabatic:-".false."} -chksum_debug=${chksum_debug:-".false."} -print_freq=${print_freq:-6} - -if [ ${TYPE} = "nh" ]; then # non-hydrostatic options - - hydrostatic=".false." - phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation - use_hydro_pressure=".false." # use hydrostatic pressure for physics - if [ $warm_start = ".true." ]; then - make_nh=".false." # restarts contain non-hydrostatic state - else - make_nh=".true." # re-initialize non-hydrostatic state - fi - -else # hydrostatic options - - hydrostatic=".true." - phys_hydrostatic=".false." # ignored when hydrostatic = T - use_hydro_pressure=".false." # ignored when hydrostatic = T - make_nh=".false." # running in hydrostatic mode - -fi - -# Conserve total energy as heat globally -consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics - -# time step parameters in FV3 -k_split=${k_split:-2} -n_split=${n_split:-6} - -if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options - - d_con=${d_con_mono:-"0."} - do_vort_damp=".false." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_mono:-"10"} - hord_xx=${hord_xx_nh_mono:-"10"} - else # hydrostatic - hord_mt=${hord_mt_hydro_mono:-"10"} - hord_xx=${hord_xx_hydro_mono:-"10"} - fi - -else # non-monotonic options - - d_con=${d_con_nonmono:-"1."} - do_vort_damp=".true." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_nonmono:-"5"} - hord_xx=${hord_xx_nh_nonmono:-"5"} - else # hydrostatic - hord_mt=${hord_mt_hydro_nonmono:-"10"} - hord_xx=${hord_xx_hydro_nonmono:-"10"} - fi - -fi - -if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then - vtdm4=${vtdm4_nh_nonmono:-"0.06"} -else - vtdm4=${vtdm4:-"0.05"} -fi - -if [ $warm_start = ".true." ]; then # warm start from restart file - - nggps_ic=".false." - ncep_ic=".false." - external_ic=".false." - mountain=".true." - if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts - res_latlon_dynamics="fv_increment.nc" - else - res_latlon_dynamics='""' - fi - -else # CHGRES'd GFS analyses - - nggps_ic=${nggps_ic:-".true."} - ncep_ic=${ncep_ic:-".false."} - external_ic=".true." - mountain=".false." - read_increment=".false." - res_latlon_dynamics='""' - +if [ $esmf_profile ]; then + export ESMF_RUNTIME_PROFILE=ON + export ESMF_RUNTIME_PROFILE_OUTPUT=SUMMARY fi -# Stochastic Physics Options -if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then - ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) - ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) - ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) +if [ $machine != 'sandbox' ]; then + $NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. + export OMP_NUM_THREADS=$NTHREADS_FV3 + $APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 + export ERR=$? + export err=$ERR + $ERRSCRIPT || exit $err else - ISEED=${ISEED:-0} -fi -DO_SKEB=${DO_SKEB:-"NO"} -DO_SPPT=${DO_SPPT:-"NO"} -DO_SHUM=${DO_SHUM:-"NO"} - -if [ $DO_SKEB = "YES" ]; then - do_skeb=".true." -fi -if [ $DO_SHUM = "YES" ]; then - do_shum=".true." -fi -if [ $DO_SPPT = "YES" ]; then - do_sppt=".true." -fi - -# copy over the tables -DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table} -DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} -FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table} - -# build the diag_table with the experiment name and date stamp -if [ $DOIAU = "YES" ]; then -cat > diag_table << EOF -FV3 Forecast -${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table + echo "MAIN: mpirun launch here" +fi + +if [ $machine != 'sandbox' ]; then + case $RUN in + 'data') data_out_Data_ATM;; + 'gfs') data_out_GFS;; + 'gdas') data_out_GFS;; + 'gefs') data_out_GEFS;; + esac + [[ $cplflx = .true. ]] && MOM6_out + [[ $cplwav = .true. ]] && WW3_out + [[ $cplice = .true. ]] && CICE_out + [[ $cplchem = .true. ]] && GSD_out + [[ $esmf_profile = .true. ]] && CPL_out else -cat > diag_table << EOF -FV3 Forecast -${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table -fi - -$NCP $DATA_TABLE data_table -$NCP $FIELD_TABLE field_table - -# copy CCN_ACTIVATE.BIN for Thompson microphysics -if [ $RUN_CCPP = "YES" ]; then -if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then - $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN - $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat - $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat - $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat -fi + echo "MAIN: Running on sandbox mode, no output linking" fi +echo "MAIN: Output copied to COMROT" #------------------------------------------------------------------ -rm -f nems.configure - -if [ $cplwav = ".true." ]; then -#### ww3 version of nems.configure - -# Switch on cpl flag - cpl=.true. - -NTASKS_FV3m1=$((NTASKS_FV3-1)) -atm_petlist_bounds=" 0 $((NTASKS_FV3-1))" -wav_petlist_bounds=" $((NTASKS_FV3)) $((NTASKS_FV3m1+npe_wav))" -### atm_petlist_bounds=" 0 1511" -### atm_petlist_bounds=$atm_petlist_bounds -### wav_petlist_bounds="1512 1691" -### wav_petlist_bounds=$wav_petlist_bounds - coupling_interval_sec=${coupling_interval_sec:-1800} - rm -f nems.configure -cat > nems.configure < WAV :SrcTermProcessing=0:TermOrder=SrcSeq - WAV - @ -:: -EOF -else -#### fv3 standalone version of nems.configure -cat > nems.configure < model_configure < input.nml <> input.nml << EOF - iovr = ${iovr:-"3"} - ltaerosol = ${ltaerosol:-".false."} - lradar = ${lradar:-".false."} - ttendlim = ${ttendlim:-"0.005"} - oz_phys = ${oz_phys:-".false."} - oz_phys_2015 = ${oz_phys_2015:-".true."} - lsoil_lsm = ${lsoil_lsm:-"4"} - do_mynnedmf = ${do_mynnedmf:-".false."} - do_mynnsfclay = ${do_mynnsfclay:-".false."} - icloud_bl = ${icloud_bl:-"1"} - bl_mynn_edmf = ${bl_mynn_edmf:-"1"} - bl_mynn_tkeadvect = ${bl_mynn_tkeadvect:-".true."} - bl_mynn_edmf_mom = ${bl_mynn_edmf_mom:-"1"} - min_lakeice = ${min_lakeice:-"0.15"} - min_seaice = ${min_seaice:-"0.15"} -EOF -else - cat >> input.nml << EOF - iovr_lw = ${iovr_lw:-"3"} - iovr_sw = ${iovr_sw:-"3"} -EOF -fi - -# Add namelist for IAU -if [ $DOIAU = "YES" ]; then - cat >> input.nml << EOF - iaufhrs = ${IAUFHRS} - iau_delthrs = ${IAU_DELTHRS} - iau_inc_files= ${IAU_INC_FILES} - iau_drymassfixer = .false. -EOF -fi - -cat >> input.nml <> input.nml - -cat >> input.nml <> input.nml -if [ $MEMBER -gt 0 ]; then - - cat >> input.nml << EOF -&nam_stochy -EOF - - if [ $DO_SKEB = "YES" ]; then - cat >> input.nml << EOF - skeb = $SKEB - iseed_skeb = ${ISEED_SKEB:-$ISEED} - skeb_tau = ${SKEB_TAU:-"-999."} - skeb_lscale = ${SKEB_LSCALE:-"-999."} - skebnorm = ${SKEBNORM:-"1"} - skeb_npass = ${SKEB_nPASS:-"30"} - skeb_vdof = ${SKEB_VDOF:-"5"} -EOF - fi - - if [ $DO_SHUM = "YES" ]; then - cat >> input.nml << EOF - shum = $SHUM - iseed_shum = ${ISEED_SHUM:-$ISEED} - shum_tau = ${SHUM_TAU:-"-999."} - shum_lscale = ${SHUM_LSCALE:-"-999."} -EOF - fi - - if [ $DO_SPPT = "YES" ]; then - cat >> input.nml << EOF - sppt = $SPPT - iseed_sppt = ${ISEED_SPPT:-$ISEED} - sppt_tau = ${SPPT_TAU:-"-999."} - sppt_lscale = ${SPPT_LSCALE:-"-999."} - sppt_logit = ${SPPT_LOGIT:-".true."} - sppt_sfclimit = ${SPPT_SFCLIMIT:-".true."} - use_zmtnblck = ${use_zmtnblck:-".true."} -EOF - fi - - cat >> input.nml << EOF - $nam_stochy_nml -/ -EOF - - - cat >> input.nml << EOF -&nam_sfcperts - $nam_sfcperts_nml -/ -EOF - -else - - cat >> input.nml << EOF -&nam_stochy -/ -&nam_sfcperts -/ -EOF - +if [ $VERBOSE = "YES" ] ; then + echo $(date) EXITING $0 with return code $err >&2 fi - -#------------------------------------------------------------------ -# make symbolic links to write forecast files directly in memdir -cd $DATA -if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then - fhr=$FHMIN - while [ $fhr -le $FHMAX ]; do - FH3=$(printf %03i $fhr) - FH2=$(printf %02i $fhr) - atmi=atmf${FH3}.$affix - sfci=sfcf${FH3}.$affix - logi=logf${FH3} - pgbi=GFSPRS.GrbF${FH2} - flxi=GFSFLX.GrbF${FH2} - atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix - sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix - logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt - pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} - flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 - eval $NLN $atmo $atmi - eval $NLN $sfco $sfci - eval $NLN $logo $logi - if [ $WRITE_DOPOST = ".true." ]; then - eval $NLN $pgbo $pgbi - eval $NLN $flxo $flxi - fi - FHINC=$FHOUT - if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then - FHINC=$FHOUT_HF - fi - fhr=$((fhr+FHINC)) - done +if [ $err != 0 ]; then + echo "MAIN: $confignamevarfornems Forecast failed" + exit $err else - for n in $(seq 1 $ntiles); do - eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc - eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc - eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc - eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc - eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc - done -fi - -# Copy namelist file -$NCP input.nml $memdir - -#------------------------------------------------------------------ -# run the executable - -$NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. -export OMP_NUM_THREADS=$NTHREADS_FV3 -$APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 -export ERR=$? -export err=$ERR -$ERRSCRIPT || exit $err - -#------------------------------------------------------------------ -if [ $SEND = "YES" ]; then - - # Copy gdas and enkf member restart files - if [ $CDUMP = "gdas" -a $rst_invt1 -gt 0 ]; then - cd $DATA/RESTART - mkdir -p $memdir/RESTART - for rst_int in $restart_interval ; do - if [ $rst_int -ge 0 ]; then - RDATE=$($NDATE +$rst_int $CDATE) - rPDY=$(echo $RDATE | cut -c1-8) - rcyc=$(echo $RDATE | cut -c9-10) - for file in $(ls ${rPDY}.${rcyc}0000.*) ; do - $NCP $file $memdir/RESTART/$file - done - fi - done - if [ $DOIAU = "YES" ] || [ $DOIAU_coldstart = "YES" ]; then - # if IAU is on, save restart at start of IAU window - rst_iau=$(( ${IAU_OFFSET} - (${IAU_DELTHRS}/2) )) - if [ $rst_iau -lt 0 ];then - rst_iau=$(( (${IAU_DELTHRS}) - ${IAU_OFFSET} )) - fi - RDATE=$($NDATE +$rst_iau $CDATE) - rPDY=$(echo $RDATE | cut -c1-8) - rcyc=$(echo $RDATE | cut -c9-10) - for file in $(ls ${rPDY}.${rcyc}0000.*) ; do - $NCP $file $memdir/RESTART/$file - done - fi - fi -fi - -#------------------------------------------------------------------ -# Clean up before leaving -if [ $mkdata = "YES" ]; then rm -rf $DATA; fi - -#------------------------------------------------------------------ -set +x -if [ $VERBOSE = "YES" ] ; then - echo $(date) EXITING $0 with return code $err >&2 + echo "MAIN: $confignamevarfornems Forecast completed at normal status" + if [ $KEEPDATA != "YES" ]; then rm -rf $DATA; fi + exit 0 fi -exit 0 diff --git a/scripts/exglobal_forecast.sh_bk b/scripts/exglobal_forecast.sh_bk new file mode 100755 index 00000000000..564c0c798a3 --- /dev/null +++ b/scripts/exglobal_forecast.sh_bk @@ -0,0 +1,1422 @@ +#!/bin/ksh +################################################################################ +# UNIX Script Documentation Block +# Script name: exglobal_forecast.sh +# Script description: Runs a global FV3GFS model forecast +# +# Author: Fanglin Yang Org: NCEP/EMC Date: 2016-11-15 +# Abstract: This script runs a single GFS forecast with FV3 dynamical core. +# This script is created based on a C-shell script that GFDL wrote +# for the NGGPS Phase-II Dycore Comparison Project. +# +# Script history log: +# 2016-11-15 Fanglin Yang First Version. +# 2017-02-09 Rahul Mahajan Added warm start and restructured the code. +# 2017-03-10 Fanglin Yang Updated for running forecast on Cray. +# 2017-03-24 Fanglin Yang Updated to use NEMS FV3GFS with IPD4 +# 2017-05-24 Rahul Mahajan Updated for cycling with NEMS FV3GFS +# 2017-09-13 Fanglin Yang Updated for using GFDL MP and Write Component +# 2019-03-05 Rahul Mahajan Implemented IAU +# 2019-03-21 Fanglin Yang Add restart capability for running gfs fcst from a break point. +# 2019-12-12 Henrique Alves Added wave model blocks for coupled run +# 2020-01-31 Henrique Alves Added IAU capability for wave component +# 2020-06-02 Fanglin Yang restore restart capability when IAU is turned on. +# +# $Id$ +# +# Attributes: +# Language: Portable Operating System Interface (POSIX) Shell +# Machine: WCOSS-CRAY, Theia +################################################################################ + +# Set environment. +VERBOSE=${VERBOSE:-"YES"} +if [ $VERBOSE = "YES" ] ; then + echo $(date) EXECUTING $0 $* >&2 + set -x +fi + +machine=${machine:-"WCOSS_C"} +machine=$(echo $machine | tr '[a-z]' '[A-Z]') + +# Cycling and forecast hour specific parameters +CDUMPwave="${CDUMP}wave" +CASE=${CASE:-C768} +CDATE=${CDATE:-2017032500} +CDUMP=${CDUMP:-gdas} +FHMIN=${FHMIN:-0} +FHMAX=${FHMAX:-9} +FHOUT=${FHOUT:-3} +FHZER=${FHZER:-6} +FHCYC=${FHCYC:-24} +FHMAX_HF=${FHMAX_HF:-0} +FHOUT_HF=${FHOUT_HF:-1} +NSOUT=${NSOUT:-"-1"} +FDIAG=$FHOUT +if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi +WRITE_DOPOST=${WRITE_DOPOST:-".false."} +restart_interval=${restart_interval:-0} +rst_invt1=`echo $restart_interval |cut -d " " -f 1` + +PDY=$(echo $CDATE | cut -c1-8) +cyc=$(echo $CDATE | cut -c9-10) + +# Directories. +pwd=$(pwd) +NWPROD=${NWPROD:-${NWROOT:-$pwd}} +HOMEgfs=${HOMEgfs:-$NWPROD} +FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} +FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} +export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} +export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} +FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} +DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory +ROTDIR=${ROTDIR:-$pwd} # rotating archive directory +ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions +DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis + +# Model resolution specific parameters +DELTIM=${DELTIM:-225} +layout_x=${layout_x:-8} +layout_y=${layout_y:-16} +LEVS=${LEVS:-65} + +# Utilities +NCP=${NCP:-"/bin/cp -p"} +NLN=${NLN:-"/bin/ln -sf"} +NMV=${NMV:-"/bin/mv"} +SEND=${SEND:-"YES"} #move final result to rotating directory +ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} +KEEPDATA=${KEEPDATA:-"NO"} + +# Other options +MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER +ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) +PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment + +# IAU options +DOIAU=${DOIAU:-"NO"} +IAUFHRS=${IAUFHRS:-0} +IAU_DELTHRS=${IAU_DELTHRS:-0} +IAU_OFFSET=${IAU_OFFSET:-0} + +# Model specific stuff +FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} +FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} +PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} +PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} + +# Wave coupling parameter defaults to false +cplwav=${cplwav:-.false.} + +# Model config options +APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} +NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} +cores_per_node=${cores_per_node:-${npe_node_max:-24}} +ntiles=${ntiles:-6} +NTASKS_FV3=${NTASKS_FV3:-$npe_fv3} + +TYPE=${TYPE:-"nh"} # choices: nh, hydro +MONO=${MONO:-"non-mono"} # choices: mono, non-mono +RUN_CCPP=${RUN_CCPP:-"NO"} + +QUILTING=${QUILTING:-".true."} +OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} +OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} +WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} +WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} +affix="nemsio" +[[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" + +rCDUMP=${rCDUMP:-$CDUMP} + +#------------------------------------------------------------------ +# setup the runtime environment +if [ $machine = "WCOSS_C" ] ; then + HUGEPAGES=${HUGEPAGES:-hugepages4M} + . $MODULESHOME/init/sh 2>/dev/null + module load iobuf craype-$HUGEPAGES 2>/dev/null + export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} + export MKL_CBWR=AVX2 + export WRTIOBUF=${WRTIOBUF:-"4M"} + export NC_BLKSZ=${NC_BLKSZ:-"4M"} + export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" +fi + +#------------------------------------------------------- +if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi +mkdata=NO +if [ ! -d $DATA ]; then + mkdata=YES + mkdir -p $DATA +fi +cd $DATA || exit 8 +mkdir -p $DATA/INPUT + +if [ $cplwav = ".true." ]; then + if [ $CDUMP = "gdas" ]; then + RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart + else + RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} + fi + if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi + $NLN $RSTDIR_WAVE restart_wave +fi + +if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then + RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART + if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi + $NLN $RSTDIR_ATM RESTART +else + mkdir -p $DATA/RESTART +fi + +#------------------------------------------------------- +# determine if restart IC exists to continue from a previous forecast +RERUN="NO" +filecount=$(find $RSTDIR_ATM -type f | wc -l) +if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then + reverse=$(echo "${restart_interval[@]} " | tac -s ' ') + for xfh in $reverse ; do + yfh=$((xfh-(IAU_OFFSET/2))) + SDATE=$($NDATE +$yfh $CDATE) + PDYS=$(echo $SDATE | cut -c1-8) + cycs=$(echo $SDATE | cut -c9-10) + flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res + flag2=$RSTDIR_ATM/coupler.res + if [ -s $flag1 ]; then + CDATE_RST=$SDATE + [[ $RERUN = "YES" ]] && break + mv $flag1 ${flag1}.old + if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi + RERUN="YES" + [[ $xfh = $rst_invt1 ]] && RERUN="NO" + fi + done +fi + +#------------------------------------------------------- +# member directory +if [ $MEMBER -lt 0 ]; then + prefix=$CDUMP + rprefix=$rCDUMP + memchar="" +else + prefix=enkf$CDUMP + rprefix=enkf$rCDUMP + memchar=mem$(printf %03i $MEMBER) +fi +memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar +if [ ! -d $memdir ]; then mkdir -p $memdir; fi + +GDATE=$($NDATE -$assim_freq $CDATE) +gPDY=$(echo $GDATE | cut -c1-8) +gcyc=$(echo $GDATE | cut -c9-10) +gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar +sCDATE=$($NDATE -3 $CDATE) + +if [[ "$DOIAU" = "YES" ]]; then + sCDATE=$($NDATE -3 $CDATE) + sPDY=$(echo $sCDATE | cut -c1-8) + scyc=$(echo $sCDATE | cut -c9-10) + tPDY=$gPDY + tcyc=$gcyc +else + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc +fi + +#------------------------------------------------------- +# initial conditions +warm_start=${warm_start:-".false."} +read_increment=${read_increment:-".false."} +res_latlon_dynamics="''" + +# Determine if this is a warm start or cold start +if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then + export warm_start=".true." +fi + +# turn IAU off for cold start +DOIAU_coldstart=${DOIAU_coldstart:-"NO"} +if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then + export DOIAU="NO" + echo "turning off IAU" + DOIAU_coldstart="YES" + IAU_OFFSET=0 + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc +fi + +#------------------------------------------------------- +if [ $warm_start = ".true." -o $RERUN = "YES" ]; then +#------------------------------------------------------- +#............................. + if [ $RERUN = "NO" ]; then +#............................. + + # Link all (except sfc_data) restart files from $gmemdir + for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsuf=$(echo $file2 | cut -d. -f1) + if [ $fsuf != "sfc_data" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Link sfcanl_data restart files from $memdir + for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsufanl=$(echo $file2 | cut -d. -f1) + if [ $fsufanl = "sfcanl_data" ]; then + file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Need a coupler.res when doing IAU + if [ $DOIAU = "YES" ]; then + rm -f $DATA/INPUT/coupler.res + cat >> $DATA/INPUT/coupler.res << EOF + 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) + ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second + ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second +EOF + fi + + # Link increments + if [ $DOIAU = "YES" ]; then + for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do + incfhr=$(printf %03i $i) + if [ $incfhr = "006" ]; then + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc + fi + if [ ! -f $increment_file ]; then + echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" + echo "Abort!" + exit 1 + fi + $NLN $increment_file $DATA/INPUT/fv_increment$i.nc + IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" + done + read_increment=".false." + res_latlon_dynamics="" + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc + if [ -f $increment_file ]; then + $NLN $increment_file $DATA/INPUT/fv_increment.nc + read_increment=".true." + res_latlon_dynamics="fv_increment.nc" + fi + fi + +#............................. + else ##RERUN + + export warm_start=".true." + PDYT=$(echo $CDATE_RST | cut -c1-8) + cyct=$(echo $CDATE_RST | cut -c9-10) + for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) + $NLN $file $DATA/INPUT/$file2 + done + + hour_rst=`$NHOUR $CDATE_RST $CDATE` + IAU_FHROT=$((IAU_OFFSET+hour_rst)) + if [ $DOIAU = "YES" ]; then + IAUFHRS=-1 + IAU_DELTHRS=0 + IAU_INC_FILES="''" + fi + + rst_list_rerun="" + xfh=$restart_interval_gfs + while [ $xfh -le $FHMAX_GFS ]; do + rst_list_rerun="$rst_list_rerun $xfh" + xfh=$((xfh+restart_interval_gfs)) + done + restart_interval="$rst_list_rerun" + + fi +#............................. + +else ## cold start + + for file in $(ls $memdir/INPUT/*.nc); do + file2=$(echo $(basename $file)) + fsuf=$(echo $file2 | cut -c1-3) + if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + +#------------------------------------------------------- +fi +#------------------------------------------------------- + +nfiles=$(ls -1 $DATA/INPUT/* | wc -l) +if [ $nfiles -le 0 ]; then + echo "Initial conditions must exist in $DATA/INPUT, ABORT!" + msg="Initial conditions must exist in $DATA/INPUT, ABORT!" + postmsg "$jlogfile" "$msg" + exit 1 +fi + +# If doing IAU, change forecast hours +if [[ "$DOIAU" = "YES" ]]; then + FHMAX=$((FHMAX+6)) + if [ $FHMAX_HF -gt 0 ]; then + FHMAX_HF=$((FHMAX_HF+6)) + fi +fi + +#-------------------------------------------------------------------------- +# Grid and orography data +for n in $(seq 1 $ntiles); do + $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc + $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc +done +$NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc + +# GFS standard input data +IAER=${IAER:-111} +ICO2=${ICO2:-2} + +if [ ${new_o3forc:-YES} = YES ]; then + O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 +else + O3FORC=global_o3prdlos.f77 +fi +H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} +$NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 +$NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 +$NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt +$NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt + +## merra2 aerosol climo +for n in 01 02 03 04 05 06 07 08 09 10 11 12; do +$NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc +done +$NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat +$NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat +$NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat +$NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat +$NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat + +$NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt +$NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt +if [ $ICO2 -gt 0 ]; then + for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done +fi + +$NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat +if [ $IAER -gt 0 ] ; then + for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done +fi + +#-------------wavewave---------------------- +if [ $cplwav = ".true." ]; then + + for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do + $NLN $file $DATA/ + done + $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp + + array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) + grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + + for wavGRD in ${grdALL}; do + $NLN $COMINwave/rundata/${CDUMPwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD + done + + export WAVHCYC=${WAVHCYC:-6} + export WRDATE=`$NDATE -${WAVHCYC} $CDATE` + export WRPDY=`echo $WRDATE | cut -c1-8` + export WRcyc=`echo $WRDATE | cut -c9-10` + export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart + export datwave=$COMOUTwave/rundata + export wavprfx=${CDUMPwave}${WAV_MEMBER} + + for wavGRD in $waveGRD ; do + if [ $RERUN = "NO" ]; then + if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + else + if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + fi + eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} + done + + if [ "$WW3ICEINP" = "YES" ]; then + wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice + if [ ! -f $wavicefile ]; then + echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" + echo "Abort!" + exit 1 + fi + $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} + fi + + if [ "$WW3CURINP" = "YES" ]; then + wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur + if [ ! -f $wavcurfile ]; then + echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" + echo "Abort!" + exit 1 + fi + $NLN $wavcurfile $DATA/current.${WAVECUR_FID} + fi + + # Link output files + cd $DATA + eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 + + # Loop for gridded output (uses FHINC) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + for wavGRD in ${waveGRD} ; do + eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_grd.${wavGRD} + done + FHINC=$FHOUT_WAV + if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then + FHINC=$FHOUT_HF_WAV + fi + fhr=$((fhr+FHINC)) + done + + # Loop for point output (uses DTPNT) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_pnt.${waveuoutpGRD} + FHINC=$FHINCP_WAV + fhr=$((fhr+FHINC)) + done + +fi #cplwav=true +#-------------wavewave---------------------- + +# inline post fix files +if [ $WRITE_DOPOST = ".true." ]; then + $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag + $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt + $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt + $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new +fi +#------------------------------------------------------------------ + +# changeable parameters +# dycore definitions +res=$(echo $CASE |cut -c2-5) +resp=$((res+1)) +npx=$resp +npy=$resp +npz=$((LEVS-1)) +io_layout=${io_layout:-"1,1"} +#ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) + +# spectral truncation and regular grid resolution based on FV3 resolution +JCAP_CASE=$((2*res-2)) +LONB_CASE=$((4*res)) +LATB_CASE=$((2*res)) + +JCAP=${JCAP:-$JCAP_CASE} +LONB=${LONB:-$LONB_CASE} +LATB=${LATB:-$LATB_CASE} + +LONB_IMO=${LONB_IMO:-$LONB_CASE} +LATB_JMO=${LATB_JMO:-$LATB_CASE} + +# Fix files +FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} +FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} +FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} +FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} +FNZORC=${FNZORC:-"igbp"} +FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} +FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} +FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} +FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} +FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} +FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} +FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} +FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} +FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} +FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} +FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} +FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} +FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} + +# If the appropriate resolution fix file is not present, use the highest resolution available (T1534) +[[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" +[[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" +[[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" +[[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" +[[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" + +# NSST Options +# nstf_name contains the NSST related parameters +# nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled +# nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, +# nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON +# nstf_name(4) : ZSEA1 (in mm) : 0 +# nstf_name(5) : ZSEA2 (in mm) : 0 +# nst_anl : .true. or .false., NSST analysis over lake +NST_MODEL=${NST_MODEL:-0} +NST_SPINUP=${NST_SPINUP:-0} +NST_RESV=${NST_RESV-0} +ZSEA1=${ZSEA1:-0} +ZSEA2=${ZSEA2:-0} +nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} +nst_anl=${nst_anl:-".false."} + + +# blocking factor used for threading and general physics performance +#nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` +#nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` +#if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi +blocksize=${blocksize:-32} + +# the pre-conditioning of the solution +# =0 implies no pre-conditioning +# >0 means new adiabatic pre-conditioning +# <0 means older adiabatic pre-conditioning +na_init=${na_init:-1} +[[ $warm_start = ".true." ]] && na_init=0 + +# variables for controlling initialization of NCEP/NGGPS ICs +filtered_terrain=${filtered_terrain:-".true."} +gfs_dwinds=${gfs_dwinds:-".true."} + +# various debug options +no_dycore=${no_dycore:-".false."} +dycore_only=${adiabatic:-".false."} +chksum_debug=${chksum_debug:-".false."} +print_freq=${print_freq:-6} + +if [ ${TYPE} = "nh" ]; then # non-hydrostatic options + + hydrostatic=".false." + phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation + use_hydro_pressure=".false." # use hydrostatic pressure for physics + if [ $warm_start = ".true." ]; then + make_nh=".false." # restarts contain non-hydrostatic state + else + make_nh=".true." # re-initialize non-hydrostatic state + fi + +else # hydrostatic options + + hydrostatic=".true." + phys_hydrostatic=".false." # ignored when hydrostatic = T + use_hydro_pressure=".false." # ignored when hydrostatic = T + make_nh=".false." # running in hydrostatic mode + +fi + +# Conserve total energy as heat globally +consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics + +# time step parameters in FV3 +k_split=${k_split:-2} +n_split=${n_split:-6} + +if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options + + d_con=${d_con_mono:-"0."} + do_vort_damp=".false." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_mono:-"10"} + hord_xx=${hord_xx_nh_mono:-"10"} + else # hydrostatic + hord_mt=${hord_mt_hydro_mono:-"10"} + hord_xx=${hord_xx_hydro_mono:-"10"} + fi + +else # non-monotonic options + + d_con=${d_con_nonmono:-"1."} + do_vort_damp=".true." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_nonmono:-"5"} + hord_xx=${hord_xx_nh_nonmono:-"5"} + else # hydrostatic + hord_mt=${hord_mt_hydro_nonmono:-"10"} + hord_xx=${hord_xx_hydro_nonmono:-"10"} + fi + +fi + +if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then + vtdm4=${vtdm4_nh_nonmono:-"0.06"} +else + vtdm4=${vtdm4:-"0.05"} +fi + +if [ $warm_start = ".true." ]; then # warm start from restart file + + nggps_ic=".false." + ncep_ic=".false." + external_ic=".false." + mountain=".true." + if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts + res_latlon_dynamics="fv_increment.nc" + else + res_latlon_dynamics='""' + fi + +else # CHGRES'd GFS analyses + + nggps_ic=${nggps_ic:-".true."} + ncep_ic=${ncep_ic:-".false."} + external_ic=".true." + mountain=".false." + read_increment=".false." + res_latlon_dynamics='""' + +fi + +# Stochastic Physics Options +if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then + ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) + ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) + ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) +else + ISEED=${ISEED:-0} +fi +DO_SKEB=${DO_SKEB:-"NO"} +DO_SPPT=${DO_SPPT:-"NO"} +DO_SHUM=${DO_SHUM:-"NO"} + +if [ $DO_SKEB = "YES" ]; then + do_skeb=".true." +fi +if [ $DO_SHUM = "YES" ]; then + do_shum=".true." +fi +if [ $DO_SPPT = "YES" ]; then + do_sppt=".true." +fi + +# copy over the tables +DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table} +DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} +FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table} + +# build the diag_table with the experiment name and date stamp +if [ $DOIAU = "YES" ]; then +cat > diag_table << EOF +FV3 Forecast +${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +else +cat > diag_table << EOF +FV3 Forecast +${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +fi + +$NCP $DATA_TABLE data_table +$NCP $FIELD_TABLE field_table + +# copy CCN_ACTIVATE.BIN for Thompson microphysics +if [ $RUN_CCPP = "YES" ]; then +if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then + $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat + $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat + $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat +fi +fi + +#------------------------------------------------------------------ +rm -f nems.configure + +if [ $cplwav = ".true." ]; then +#### ww3 version of nems.configure + +# Switch on cpl flag + cpl=.true. + +NTASKS_FV3m1=$((NTASKS_FV3-1)) +atm_petlist_bounds=" 0 $((NTASKS_FV3-1))" +wav_petlist_bounds=" $((NTASKS_FV3)) $((NTASKS_FV3m1+npe_wav))" +### atm_petlist_bounds=" 0 1511" +### atm_petlist_bounds=$atm_petlist_bounds +### wav_petlist_bounds="1512 1691" +### wav_petlist_bounds=$wav_petlist_bounds + coupling_interval_sec=${coupling_interval_sec:-1800} + rm -f nems.configure +cat > nems.configure < WAV :SrcTermProcessing=0:TermOrder=SrcSeq + WAV + @ +:: +EOF +else +#### fv3 standalone version of nems.configure +cat > nems.configure < model_configure < input.nml <> input.nml << EOF + iovr = ${iovr:-"3"} + ltaerosol = ${ltaerosol:-".false."} + lradar = ${lradar:-".false."} + ttendlim = ${ttendlim:-"0.005"} + oz_phys = ${oz_phys:-".false."} + oz_phys_2015 = ${oz_phys_2015:-".true."} + lsoil_lsm = ${lsoil_lsm:-"4"} + do_mynnedmf = ${do_mynnedmf:-".false."} + do_mynnsfclay = ${do_mynnsfclay:-".false."} + icloud_bl = ${icloud_bl:-"1"} + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} + bl_mynn_tkeadvect = ${bl_mynn_tkeadvect:-".true."} + bl_mynn_edmf_mom = ${bl_mynn_edmf_mom:-"1"} + min_lakeice = ${min_lakeice:-"0.15"} + min_seaice = ${min_seaice:-"0.15"} +EOF +else + cat >> input.nml << EOF + iovr_lw = ${iovr_lw:-"3"} + iovr_sw = ${iovr_sw:-"3"} +EOF +fi + +# Add namelist for IAU +if [ $DOIAU = "YES" ]; then + cat >> input.nml << EOF + iaufhrs = ${IAUFHRS} + iau_delthrs = ${IAU_DELTHRS} + iau_inc_files= ${IAU_INC_FILES} + iau_drymassfixer = .false. +EOF +fi + +cat >> input.nml <> input.nml + +cat >> input.nml <> input.nml +if [ $MEMBER -gt 0 ]; then + + cat >> input.nml << EOF +&nam_stochy +EOF + + if [ $DO_SKEB = "YES" ]; then + cat >> input.nml << EOF + skeb = $SKEB + iseed_skeb = ${ISEED_SKEB:-$ISEED} + skeb_tau = ${SKEB_TAU:-"-999."} + skeb_lscale = ${SKEB_LSCALE:-"-999."} + skebnorm = ${SKEBNORM:-"1"} + skeb_npass = ${SKEB_nPASS:-"30"} + skeb_vdof = ${SKEB_VDOF:-"5"} +EOF + fi + + if [ $DO_SHUM = "YES" ]; then + cat >> input.nml << EOF + shum = $SHUM + iseed_shum = ${ISEED_SHUM:-$ISEED} + shum_tau = ${SHUM_TAU:-"-999."} + shum_lscale = ${SHUM_LSCALE:-"-999."} +EOF + fi + + if [ $DO_SPPT = "YES" ]; then + cat >> input.nml << EOF + sppt = $SPPT + iseed_sppt = ${ISEED_SPPT:-$ISEED} + sppt_tau = ${SPPT_TAU:-"-999."} + sppt_lscale = ${SPPT_LSCALE:-"-999."} + sppt_logit = ${SPPT_LOGIT:-".true."} + sppt_sfclimit = ${SPPT_SFCLIMIT:-".true."} + use_zmtnblck = ${use_zmtnblck:-".true."} +EOF + fi + + cat >> input.nml << EOF + $nam_stochy_nml +/ +EOF + + + cat >> input.nml << EOF +&nam_sfcperts + $nam_sfcperts_nml +/ +EOF + +else + + cat >> input.nml << EOF +&nam_stochy +/ +&nam_sfcperts +/ +EOF + +fi + + +#------------------------------------------------------------------ +# make symbolic links to write forecast files directly in memdir +cd $DATA +if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then + fhr=$FHMIN + while [ $fhr -le $FHMAX ]; do + FH3=$(printf %03i $fhr) + FH2=$(printf %02i $fhr) + atmi=atmf${FH3}.$affix + sfci=sfcf${FH3}.$affix + logi=logf${FH3} + pgbi=GFSPRS.GrbF${FH2} + flxi=GFSFLX.GrbF${FH2} + atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix + sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix + logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt + pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} + flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 + eval $NLN $atmo $atmi + eval $NLN $sfco $sfci + eval $NLN $logo $logi + if [ $WRITE_DOPOST = ".true." ]; then + eval $NLN $pgbo $pgbi + eval $NLN $flxo $flxi + fi + FHINC=$FHOUT + if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then + FHINC=$FHOUT_HF + fi + fhr=$((fhr+FHINC)) + done +else + for n in $(seq 1 $ntiles); do + eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc + eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc + eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc + eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc + eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc + done +fi + +# Copy namelist file +$NCP input.nml $memdir + +#------------------------------------------------------------------ +# run the executable + +$NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. +export OMP_NUM_THREADS=$NTHREADS_FV3 +$APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 +export ERR=$? +export err=$ERR +$ERRSCRIPT || exit $err + +#------------------------------------------------------------------ +if [ $SEND = "YES" ]; then + + # Copy gdas and enkf member restart files + if [ $CDUMP = "gdas" -a $rst_invt1 -gt 0 ]; then + cd $DATA/RESTART + mkdir -p $memdir/RESTART + for rst_int in $restart_interval ; do + if [ $rst_int -ge 0 ]; then + RDATE=$($NDATE +$rst_int $CDATE) + rPDY=$(echo $RDATE | cut -c1-8) + rcyc=$(echo $RDATE | cut -c9-10) + for file in $(ls ${rPDY}.${rcyc}0000.*) ; do + $NCP $file $memdir/RESTART/$file + done + fi + done + if [ $DOIAU = "YES" ] || [ $DOIAU_coldstart = "YES" ]; then + # if IAU is on, save restart at start of IAU window + rst_iau=$(( ${IAU_OFFSET} - (${IAU_DELTHRS}/2) )) + if [ $rst_iau -lt 0 ];then + rst_iau=$(( (${IAU_DELTHRS}) - ${IAU_OFFSET} )) + fi + RDATE=$($NDATE +$rst_iau $CDATE) + rPDY=$(echo $RDATE | cut -c1-8) + rcyc=$(echo $RDATE | cut -c9-10) + for file in $(ls ${rPDY}.${rcyc}0000.*) ; do + $NCP $file $memdir/RESTART/$file + done + fi + fi +fi + +#------------------------------------------------------------------ +# Clean up before leaving +if [ $mkdata = "YES" ]; then rm -rf $DATA; fi + +#------------------------------------------------------------------ +set +x +if [ $VERBOSE = "YES" ] ; then + echo $(date) EXITING $0 with return code $err >&2 +fi +exit 0 diff --git a/ush/forecast_det.sh b/ush/forecast_det.sh new file mode 100755 index 00000000000..4b152019d29 --- /dev/null +++ b/ush/forecast_det.sh @@ -0,0 +1,82 @@ +#! /bin/sh + +##### +## "forecast_def.sh" +## This script sets value of all variables +## +## This is the child script of ex-global forecast, +## This script is a definition of functions. +##### + + +# For all non-evironment variables +# Cycling and forecast hour specific parameters + +FV3_GFS_det(){ + #------------------------------------------------------- + # warm start? + warm_start=${warm_start:-".false."} + read_increment=${read_increment:-".false."} + res_latlon_dynamics="''" + + # Determine if this is a warm start or cold start + if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then + export warm_start=".true." + fi + + # turn IAU off for cold start + DOIAU_coldstart=${DOIAU_coldstart:-"NO"} + if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then + export DOIAU="NO" + echo "turning off IAU since warm_start = $warm_start" + DOIAU_coldstart="YES" + IAU_OFFSET=0 + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc + fi + + #------------------------------------------------------- + # determine if restart IC exists to continue from a previous forecast + RERUN="NO" + filecount=$(find $RSTDIR_ATM -type f | wc -l) + if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then + reverse=$(echo "${restart_interval[@]} " | tac -s ' ') + for xfh in $reverse ; do + yfh=$((xfh-(IAU_OFFSET/2))) + SDATE=$($NDATE +$yfh $CDATE) + PDYS=$(echo $SDATE | cut -c1-8) + cycs=$(echo $SDATE | cut -c9-10) + flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res + flag2=$RSTDIR_ATM/coupler.res + if [ -s $flag1 ]; then + CDATE_RST=$SDATE + [[ $RERUN = "YES" ]] && break + mv $flag1 ${flag1}.old + if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi + RERUN="YES" + [[ $xfh = $rst_invt1 ]] && RERUN="NO" + fi + done + fi + + #------------------------------------------------------- +} + +FV3_GEFS_det(){ + echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GEFS" +} + +WW3_det(){ + echo "SUB ${FUNCNAME[0]}: Run type determination for WW3" +} + +CICE_det(){ + echo "SUB ${FUNCNAME[0]}: Run type determination for CICE" +} + +MOM6_det(){ + echo "SUB ${FUNCNAME[0]}: Run type determination for MOM6" +} diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh new file mode 100755 index 00000000000..7bdde50324f --- /dev/null +++ b/ush/forecast_postdet.sh @@ -0,0 +1,880 @@ +#!/bin/sh + +##### +## This script defines functions for data I/O and namelist. +## different applications could share the same function +## or have their own. +## +## This is a child script of modular +## forecast script. This script is function definition. +## need to call these functions in the parent script +## for execution. +##### + +FV3_GEFS_postdet(){ + echo SUB ${FUNCNAME[0]}: Linking input data for FV3 $RUN + # soft link commands insert here +} + +DATM_postdet(){ + ###################################################################### + # Link DATM inputs (ie forcing files) # + ###################################################################### + + #TODO: This should be some loop through CDATE-> CDATE+ FORECAST length + #and get input from either CFSR or GEFS or Whatever... + #Currently assumes you only need the month of DATM input for IC date + #DATMINPUTDIR should be machine specific + + # DATM forcing file name convention is ${DATM_FILENAME_BASE}.$YYYYMMDDHH.nc + echo "Link DATM forcing files" + DATMINPUTDIR="/scratch2/NCEPDEV/marineda/DATM_INPUT/CFSR/${SYEAR}${SMONTH}" + $NLN -sf ${DATMINPUTDIR}/${DATM_FILENAME_BASE}*.nc $DATA/DATM_INPUT/ +} + +FV3_GFS_postdet(){ + echo "SUB ${FUNCNAME[0]}: $RERUN and $warm_start determined for $RUN" + + echo $warm_start + echo $RERUN + + if [ ${TYPE} = "nh" ]; then # non-hydrostatic options + hydrostatic=".false." + phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation + use_hydro_pressure=".false." # use hydrostatic pressure for physics + if [ $warm_start = ".true." ]; then + make_nh=".false." # restarts contain non-hydrostatic state + else + make_nh=".true." # re-initialize non-hydrostatic state + fi + else # hydrostatic options + hydrostatic=".true." + phys_hydrostatic=".false." # ignored when hydrostatic = T + use_hydro_pressure=".false." # ignored when hydrostatic = T + make_nh=".false." # running in hydrostatic mode + fi + + #------------------------------------------------------- + if [ $warm_start = ".true." -o $RERUN = "YES" ]; then + #------------------------------------------------------- + #............................. + if [ $RERUN = "NO" ]; then + #............................. + + # Link all (except sfc_data) restart files from $gmemdir + for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsuf=$(echo $file2 | cut -d. -f1) + if [ $fsuf != "sfc_data" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Link sfcanl_data restart files from $memdir + for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsufanl=$(echo $file2 | cut -d. -f1) + if [ $fsufanl = "sfcanl_data" ]; then + file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Need a coupler.res when doing IAU + # if [ $DOIAU = "YES" ]; then + # rm -f $DATA/INPUT/coupler.res + # cat >> $DATA/INPUT/coupler.res << EOF + # 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) + # ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second + # ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second + #EOF + # fi + + # Link increments + if [ $DOIAU = "YES" ]; then + for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do + incfhr=$(printf %03i $i) + if [ $incfhr = "006" ]; then + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc + fi + if [ ! -f $increment_file ]; then + echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" + echo "Abort!" + exit 1 + fi + $NLN $increment_file $DATA/INPUT/fv_increment$i.nc + IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" + done + read_increment=".false." + res_latlon_dynamics="" + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc + if [ -f $increment_file ]; then + $NLN $increment_file $DATA/INPUT/fv3_increment.nc + read_increment=".true." + res_latlon_dynamics="fv3_increment.nc" + fi + fi + + #............................. + else ##RERUN + + export warm_start=".true." + PDYT=$(echo $CDATE_RST | cut -c1-8) + cyct=$(echo $CDATE_RST | cut -c9-10) + for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) + $NLN $file $DATA/INPUT/$file2 + done + + hour_rst=`$NHOUR $CDATE_RST $CDATE` + IAU_FHROT=$((IAU_OFFSET+hour_rst)) + if [ $DOIAU = "YES" ]; then + IAUFHRS=-1 + IAU_DELTHRS=0 + IAU_INC_FILES="''" + fi + + fi + #............................. + + else ## cold start + + for file in $(ls $memdir/INPUT/*.nc); do + file2=$(echo $(basename $file)) + fsuf=$(echo $file2 | cut -c1-3) + if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + + fi + + if [ $machine = 'sandbox' ]; then + echo SUB ${FUNCNAME[0]}: Checking initial condition, overriden in sandbox mode! + else + nfiles=$(ls -1 $DATA/INPUT/* | wc -l) + if [ $nfiles -le 0 ]; then + echo SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT! + msg=”"SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT!" + postmsg "$jlogfile" "$msg" + exit 1 + fi + fi + + # If doing IAU, change forecast hours + if [[ "$DOIAU" = "YES" ]]; then + FHMAX=$((FHMAX+6)) + if [ $FHMAX_HF -gt 0 ]; then + FHMAX_HF=$((FHMAX_HF+6)) + fi + fi + + #-------------------------------------------------------------------------- + # Grid and orography data + if [ -z ${GRDFIX} ] ; then + FIXgrd=$FIXfv3/$CASE + else + FIXgrd=${GRDFIX} + fi + for n in $(seq 1 $ntiles); do + $NLN ${FIXgrd}/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc + done + + if [ -f ${FIXgrd}/${CASE}_mosaic.nc ] ; then + src_grid_spec=${FIXgrd}/${CASE}_mosaic.nc + else + src_grid_spec=${FIXgrd}/grid_spec.nc + fi + + if [ $cplflx = ".false." ] ; then + $NLN ${src_grid_spec} $DATA/INPUT/grid_spec.nc + else + $NLN ${src_grid_spec} $DATA/INPUT/${CASE}_mosaic.nc + fi + + if [ -z ${OROFIX} ]; then + if [ $FRAC_GRID ]; then + FIXoro=${FIXoro:-$FIX_DIR/fix_fv3_fracoro}/${CASE}.mx${OCNRES}_frac/${CASE}.mx${OCNRES}_ + else + FIXoro=$FIXfv3/$CASE/${CASE}_oro_data. + fi + else + FIXoro=${OROFIX}/oro_data. + fi + for n in $(seq 1 $ntiles); do + $NLN ${FIXoro}tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc + done + + # GFS standard input data + + IALB=${IALB:-1} + IEMS=${IEMS:-1} + ISOL=${ISOL:-2} + IAER=${IAER:-111} + ICO2=${ICO2:-2} + + if [ ${new_o3forc:-YES} = YES ]; then + O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 + else + O3FORC=global_o3prdlos.f77 + fi + H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} + #### + # copy CCN_ACTIVATE.BIN for Thompson microphysics + if [ $imp_physics -eq 8 ]; then + $NCP $FV3INP/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + #### + $NCP $FIX_AM/freezeH2O.dat . + $NCP $FIX_AM/qr_acr_qg.dat . + $NCP $FIX_AM/qr_acr_qs.dat . + sleep 60 + fi + $NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 + $NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 + $NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt + $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt + + $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt + $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt + if [ $ICO2 -gt 0 ]; then + for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done + fi + + $NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat + if [ $IAER -gt 0 ] ; then + for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done + fi + + # inline post fix files + if [ $WRITE_DOPOST = ".true." ]; then + $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag + $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt + $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt + $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new + fi + + #------------------------------------------------------------------ + # changeable parameters + # dycore definitions + res=$(echo $CASE |cut -c2-5) + resp=$((res+1)) + npx=$resp + npy=$resp + npz=$((LEVS-1)) + io_layout="1,1" + #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) + + # spectral truncation and regular grid resolution based on FV3 resolution + JCAP_CASE=$((2*res-2)) + LONB_CASE=$((4*res)) + LATB_CASE=$((2*res)) + if [ $LATB_CASE -eq 192 ]; then + LATB_CASE=190 # berror file is at this resolution + fi + + JCAP=${JCAP:-$JCAP_CASE} + LONB=${LONB:-$LONB_CASE} + LATB=${LATB:-$LATB_CASE} + + LONB_IMO=${LONB_IMO:-$LONB_CASE} + LATB_JMO=${LATB_JMO:-$LATB_CASE} + + # Fix files + FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} + FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} + FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} + FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} + FNZORC=${FNZORC:-"igbp"} + FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} + FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} + FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} + FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} + #if [ $cpl = ".true." ]; then + # export FNMSKH=${FNMSKH:-"$FIX_AM/seaice_newland.grb"} + #else + export FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} + #fi + FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} + FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} + FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} + FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} + + # If the appropriate resolution fix file is not present, use the highest resolution available (T1534) + [[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" + [[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" + [[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" + [[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" + [[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" + + # NSST Options + # nstf_name contains the NSST related parameters + # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled + # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, + # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON + # nstf_name(4) : ZSEA1 (in mm) : 0 + # nstf_name(5) : ZSEA2 (in mm) : 0 + # nst_anl : .true. or .false., NSST analysis over lake + NST_MODEL=${NST_MODEL:-0} + NST_SPINUP=${NST_SPINUP:-0} + NST_RESV=${NST_RESV-0} + ZSEA1=${ZSEA1:-0} + ZSEA2=${ZSEA2:-0} + nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} + nst_anl=${nst_anl:-".false."} + + # blocking factor used for threading and general physics performance + #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` + #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi + blocksize=${blocksize:-32} + + # the pre-conditioning of the solution + # =0 implies no pre-conditioning + # >0 means new adiabatic pre-conditioning + # <0 means older adiabatic pre-conditioning + na_init=${na_init:-1} + [[ $warm_start = ".true." ]] && na_init=0 + + # variables for controlling initialization of NCEP/NGGPS ICs + filtered_terrain=${filtered_terrain:-".true."} + gfs_dwinds=${gfs_dwinds:-".true."} + + # various debug options + no_dycore=${no_dycore:-".false."} + dycore_only=${adiabatic:-".false."} + chksum_debug=${chksum_debug:-".false."} + print_freq=${print_freq:-6} + + # Conserve total energy as heat globally + consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics + + # time step parameters in FV3 + k_split=${k_split:-2} + n_split=${n_split:-6} + + if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options + + d_con=${d_con_mono:-"0."} + do_vort_damp=".false." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_mono:-"10"} + hord_xx=${hord_xx_nh_mono:-"10"} + else # hydrostatic + hord_mt=${hord_mt_hydro_mono:-"10"} + hord_xx=${hord_xx_hydro_mono:-"10"} + fi + + else # non-monotonic options + + d_con=${d_con_nonmono:-"1."} + do_vort_damp=".true." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_nonmono:-"5"} + hord_xx=${hord_xx_nh_nonmono:-"5"} + else # hydrostatic + hord_mt=${hord_mt_hydro_nonmono:-"10"} + hord_xx=${hord_xx_hydro_nonmono:-"10"} + fi + + fi + + if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then + vtdm4=${vtdm4_nh_nonmono:-"0.06"} + else + vtdm4=${vtdm4:-"0.05"} + fi + + if [ $warm_start = ".true." ]; then # warm start from restart file + + nggps_ic=".false." + ncep_ic=".false." + external_ic=".false." + mountain=".true." + if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts + res_latlon_dynamics="fv3_increment.nc" + else + res_latlon_dynamics='""' + fi + + else # CHGRES'd GFS analyses + + nggps_ic=${nggps_ic:-".true."} + ncep_ic=${ncep_ic:-".false."} + external_ic=".true." + mountain=".false." + read_increment=".false." + res_latlon_dynamics='""' + + fi + + # Stochastic Physics Options + if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then + ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) + ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) + ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) + else + ISEED=${ISEED:-0} + fi + DO_SKEB=${DO_SKEB:-".false."} + DO_SPPT=${DO_SPPT:-".false."} + DO_SHUM=${DO_SHUM:-".false."} + JCAP_STP=${JCAP_STP:-$JCAP_CASE} + LONB_STP=${LONB_STP:-$LONB_CASE} + LATB_STP=${LATB_STP:-$LATB_CASE} + + #------------------------------------------------------------------ + # make symbolic links to write forecast files directly in memdir + cd $DATA + if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then + $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat + $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat + $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat + fi + + affix="nc" + if [ "$OUTPUT_FILE" = "nemsio" ]; then + affix="nemsio" + fi + + if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then + fhr=$FHMIN + while [ $fhr -le $FHMAX ]; do + FH3=$(printf %03i $fhr) + FH2=$(printf %02i $fhr) + atmi=atmf${FH3}.$affix + sfci=sfcf${FH3}.$affix + logi=logf${FH3} + pgbi=GFSPRS.GrbF${FH2} + flxi=GFSFLX.GrbF${FH2} + atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix + sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix + logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt + pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} + flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 + eval $NLN $atmo $atmi + eval $NLN $sfco $sfci + eval $NLN $logo $logi + if [ $WRITE_DOPOST = ".true." ]; then + eval $NLN $pgbo $pgbi + eval $NLN $flxo $flxi + fi + FHINC=$FHOUT + if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then + FHINC=$FHOUT_HF + fi + fhr=$((fhr+FHINC)) + done + else + for n in $(seq 1 $ntiles); do + eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc + eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc + eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc + eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc + eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc + done + fi +} + +FV3_GFS_nml(){ + # namelist output for a certain component + echo SUB ${FUNCNAME[0]}: Creating name lists and model configure file for FV3 + if [ $machine = 'sandbox' ]; then + cd $SCRIPTDIR + echo "MAIN: !!!Sandbox mode, writing to current directory!!!" + fi + # Call child scripts in current script directory + if [ $cplgocart = .true. ]; then + source $SCRIPTDIR/parsing_namelists_FV3_GOCART.sh + else + source $SCRIPTDIR/parsing_namelists_FV3.sh + fi + FV3_namelists + echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created +} + +DATM_nml(){ + source $SCRIPTDIR/parsing_namelists_DATM.sh + DATM_namelists + echo SUB ${FUNCNAME[0]}: DATM name lists and model configure file created +} + +data_out_GFS() { + # data in take for FV3GFS + # Arguments: None + # + #------------------------------------------------------------------ + # make symbolic links to write forecast files directly in memdir + echo "SUB ${FUNCNAME[0]}: copying output data for FV3" + #------------------------------------------------------------------ + + if [ $SEND = "YES" ]; then + # Copy model restart files + if [ $CDUMP = "gdas" -a $restart_interval -gt 0 ]; then + cd $DATA/RESTART + mkdir -p $memdir/RESTART + # Only save restarts at single time in RESTART directory + # Either at restart_interval or at end of the forecast + # if [ $restart_interval -eq 0 -o $restart_interval -eq $FHMAX ]; then + + # Add time-stamp to restart files at FHMAX + # RDATE=$($NDATE +$FHMAX $CDATE) + # rPDY=$(echo $RDATE | cut -c1-8) + # rcyc=$(echo $RDATE | cut -c9-10) + # for file in $(ls * | grep -v 0000); do + # $NMV $file ${rPDY}.${rcyc}0000.$file + # done + # else + # time-stamp exists at restart_interval time, just copy + RDATE=$($NDATE +$restart_interval $CDATE) + rPDY=$(echo $RDATE | cut -c1-8) + rcyc=$(echo $RDATE | cut -c9-10) + for file in ${rPDY}.${rcyc}0000.* ; do + $NCP $file $memdir/RESTART/$file + done + fi + fi + + $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/ + + echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied" +} + +WW3_postdet() { + echo "SUB ${FUNCNAME[0]}: Linking input data for WW3" + COMPONENTwave=${COMPONENTwave:-${RUN}wave} + + #Link mod_def files for wave grids + array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) + echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" + grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + for wavGRD in ${grdALL}; do + $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD + done + + #Copy initial condition files: + for wavGRD in $waveGRD ; do + # Link wave IC for current cycle + # $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + # Link IC for S2S benchmarks: + $NCP -pf $ICSDIR/$CDATE/wav/${PDY}.${cyc}0000.restart.$wavGRD $DATA/restart.$wavGRD + # Link log files for computational grids: + eval $NLN $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}${WAV_MEMBER}.log.${wavGRD}.${PDY}${cyc} $DATA/log.${wavGRD} + done + + #link more log files: + eval $NLN $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}${WAV_MEMBER}.log.mww3.${PDY}${cyc} $DATA/log.mww3 + + datwave=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata + wavprfx=${COMPONENTwave}${WAV_MEMBER} + # Loop for gridded output (uses FHINC) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + for wavGRD in ${waveGRD} ; do + eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_grd.${wavGRD} + done + FHINC=$FHOUT_WAV + if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then + FHINC=$FHOUT_HF_WAV + fi + fhr=$((fhr+FHINC)) + done + # Loop for point output (uses DTPNT) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_pnt.${waveuoutpGRD} + FHINC=$FHINCP_WAV + fhr=$((fhr+FHINC)) + done + +} + +WW3_nml() { + echo "SUB ${FUNCNAME[0]}: Copying input files for WW3" + WAV_MOD_TAG=${CDUMP}wave${waveMEMB} + $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/ww3_multi.${WAV_MOD_TAG}.${cycle}.inp $DATA/ww3_multi.inp +} + +WW3_out() { + echo "SUB ${FUNCNAME[0]}: Copying output data for WW3" +} + + +CPL_out() { + echo "SUB ${FUNCNAME[0]}: Copying output data for general cpl fields" + if [ $esmf_profile = ".true." ]; then + $NCP $DATA/ESMF_Profile.summary $ROTDIR/$CDUMP.$PDY/$cyc/ + fi +} + +MOM6_postdet() { + echo "SUB ${FUNCNAME[0]}: MOM6 after run type determination" + + OCNRES=${OCNRES:-"025"} + + # Copy MOM6 ICs + $NCP -pf $ICSDIR/$CDATE/ocn/MOM*nc $DATA/INPUT/ + + # Copy MOM6 fixed files + $NCP -pf $FIXmom/$OCNRES/* $DATA/INPUT/ + + # Copy coupled grid_spec + $NCP -pf $FIX_DIR/fix_cpl/a${CASE}o${OCNRES}/grid_spec.nc $DATA/INPUT/ + + # Copy mediator restart files to RUNDIR + if [ $inistep = 'restart' ]; then + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/ufs.cpld*.nc $DATA/ + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/rpointer.cpl $DATA/ + fi + + echo "SUB ${FUNCNAME[0]}: MOM6 input data linked/copied" +} + +MOM6_nml() { + echo "SUB ${FUNCNAME[0]}: Creating name list for MOM6" + source $SCRIPTDIR/parsing_namelists_MOM6.sh + MOM6_namelists +} + +MOM6_out() { + echo "SUB ${FUNCNAME[0]}: Copying output data for MOM6" + + export ENSMEM=${ENSMEM:-01} + + export IDATE=$CDATE + + if [ $RUN_ENVIR = "nco" ]; then + export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc} + export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc} + else + export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc" + export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc" + fi + [[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT + + if [ $inistep = 'cold' ]; then + cp $DATA/ufs.cpld.cold.cpl.r.*.nc $COMOUT/ + cp $DATA/rpointer.cpl $COMOUT/ + status=$? + exit $status + else + if [ $FHRGRP -eq 0 ]; then + fhrlst="anl" + else + fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') + fi + + # copy ocn files + for fhr in $fhrlst; do + export fhr=$fhr + if [[ 10#$fhr -ge 6 ]]; then + hh_inc_m=$((10#$FHOUT/2)) + hh_inc_o=$((10#$FHOUT )) + + # ------------------------------------------------------ + # adjust the dates on the mom filenames and save + # ------------------------------------------------------ + VDATE=$($NDATE $fhr $IDATE) + YYYY=`echo $VDATE | cut -c1-4` + MM=`echo $VDATE | cut -c5-6` + DD=`echo $VDATE | cut -c7-8` + HH=`echo $VDATE | cut -c9-10` + SS=$((10#$HH*3600)) + + m_date=$($NDATE -$hh_inc_m $VDATE) + p_date=$VDATE + + year=`echo $m_date | cut -c1-4` + month=`echo $m_date | cut -c5-6` + day=`echo $m_date | cut -c7-8` + hh=`echo $m_date | cut -c9-10` + + export ocnfile=ocn_${year}_${month}_${day}_${hh}.nc + + echo "$NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc" + $NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + + fi + + done + $NCP -p $DATA/ocn_daily*nc $COMOUT/ + $NCP -p $DATA/wavocn*nc $COMOUT/ #temporary for p4 + $NCP -p $DATA/INPUT/MOM_input $COMOUT/ + fi +} + +CICE_postdet() { + echo "SUB ${FUNCNAME[0]}: CICE after run type determination" + + year=$(echo $CDATE|cut -c 1-4) + stepsperhr=$((3600/$ICETIM)) + nhours=$($NHOUR $CDATE ${year}010100) + istep0=$((nhours*stepsperhr)) + steps=$((nhours*stepsperhr)) + npt=$((FHMAX*$stepsperhr)) # Need this in order for dump_last to work + + histfreq_n=${histfreq_n:-6} + if [ $inistep = 'cold' ]; then + dumpfreq_n=${dumpfreq_n:-3600} # restart write interval in seconds, default 1 hour + dumpfreq="s" + else + dumpfreq_n=${dumpfreq_n:-3024000} # restart write interval in seconds, default 35 days + dumpfreq=${dumpfreq:-"s"} # "s" or "d" or "m" for restarts at intervals of "seconds", "days" or "months" + fi + cice_hist_avg=${cice_hist_avg:-".true."} + + FRAZIL_FWSALT=${FRAZIL_FWSALT:-".true."} + tr_pond_lvl=${tr_pond_lvl:-".true."} # Use level melt ponds tr_pond_lvl=true + + # restart_pond_lvl (if tr_pond_lvl=true): + # -- if true, initialize the level ponds from restart (if runtype=continue) + # -- if false, re-initialize level ponds to zero (if runtype=initial or continue) + + #TODO: Determine the proper way to determine if it's a 'hot start' or not + #note this is not mediator cold start or not + #if [ hotstart ]; then + # #continuing run "hot start" + # RUNTYPE='continue' + # USE_RESTART_TIME='.true.' + #fi + RUNTYPE='initial' + USE_RESTART_TIME='.false.' + restart_pond_lvl=${restart_pond_lvl:-".false."} + + ICERES=${ICERES:-"025"} + if [ $ICERES = '025' ]; then + ICERESdec="0.25" + fi + if [ $ICERES = '050' ]; then + ICERESdec="0.50" + fi + if [ $ICERES = '100' ]; then + ICERESdec="1.00" + fi + + ice_grid_file=${ice_grid_file:-"grid_cice_NEMS_mx${ICERES}.nc"} + ice_kmt_file=${ice_kmt_file:-"kmtu_cice_NEMS_mx${ICERES}.nc"} + + iceic="cice_model.res_$CDATE.nc" + + # Copy CICE IC + $NCP -p $ICSDIR/$CDATE/ice/cice_model_${ICERESdec}.res_$CDATE.nc $DATA/$iceic + + echo "Link CICE fixed files" + $NLN -sf $FIXcice/$ICERES/${ice_grid_file} $DATA/ + $NLN -sf $FIXcice/$ICERES/${ice_kmt_file} $DATA/ + $NLN -sf $FIXcice/$ICERES/$MESHICE $DATA/ +} + +CICE_nml() { + echo "SUB ${FUNCNAME[0]}: Creating name list for CICE" + source $SCRIPTDIR/parsing_namelists_CICE.sh + CICE_namelists +} + +CICE_out() { + echo "SUB ${FUNCNAME[0]}: Copying output data for CICE" + if [ $inistep = 'cold' ]; then + echo "mediator cold start, no copying of data for CICE" + else + export ENSMEM=${ENSMEM:-01} + export IDATE=$CDATE + $NCP -p $DATA/ice_in $COMOUT/ + if [ $FHRGRP -eq 0 ]; then + fhrlst="anl" + else + fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') + fi + + for fhr in $fhrlst; do + export fhr=$fhr + # -------------------------------------- + # cp cice data to COMOUT directory + # -------------------------------------- + YYYY0=`echo $IDATE | cut -c1-4` + MM0=`echo $IDATE | cut -c5-6` + DD0=`echo $IDATE | cut -c7-8` + HH0=`echo $IDATE | cut -c9-10` + SS0=$((10#$HH0*3600)) + + VDATE=$($NDATE $fhr $IDATE) + YYYY=`echo $VDATE | cut -c1-4` + MM=`echo $VDATE | cut -c5-6` + DD=`echo $VDATE | cut -c7-8` + HH=`echo $VDATE | cut -c9-10` + SS=$((10#$HH*3600)) + + if [[ 10#$fhr -eq 0 ]]; then + $NCP -p $DATA/history/iceh_ic.${YYYY0}-${MM0}-${DD0}-`printf "%5.5d" ${SS0}`.nc $COMOUT/iceic$VDATE.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + echo "fhr is 0, only copying ice initial conditions... exiting" + else + $NCP -p $DATA/history/iceh_`printf "%0.2d" $FHOUT`h.${YYYY}-${MM}-${DD}-`printf "%5.5d" ${SS}`.nc $COMOUT/ice$VDATE.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + fi + + done + fi +} + +GOCART_rc() { + echo "SUB ${FUNCNAME[0]}: Linking input data and copying config files for GOCART" + # set input directory containing GOCART input data and configuration files + # this variable is platform-dependent and should be set via a YAML file + + # link directory containing GOCART input dataset, if provided + if [ ! -z "${CHM_INPDIR}" ]; then + $NLN -sf ${CHM_INPDIR} $DATA + status=$? + [[ $status -ne 0 ]] && exit $status + fi + + # copying GOCART configuration files + if [ ! -z "${CHM_CFGDIR}" ]; then + $NCP ${CHM_CFGDIR}/*.rc $DATA + status=$? + [[ $status -ne 0 ]] && exit $status + fi +} + +GSD_in() { + echo "SUB ${FUNCNAME[0]}: Linking input data for GSD" + # soft link commands insert here +} + +GSD_nml() { + echo "SUB ${FUNCNAME[0]}: Creating name list for GSD" + sh parsing_namelists_GSD.sh +} + +GSD_out() { + echo "SUB ${FUNCNAME[0]}: Copying output data for GSD" + # soft link commands insert here +} + + + diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh new file mode 100755 index 00000000000..4cd5763b365 --- /dev/null +++ b/ush/forecast_predet.sh @@ -0,0 +1,294 @@ +#! /bin/sh + +##### +## "forecast_def.sh" +## This script sets value of all variables +## +## This is the child script of ex-global forecast, +## This script is a definition of functions. +##### + + +# For all non-evironment variables +# Cycling and forecast hour specific parameters +common_predet(){ + echo "SUB ${FUNCNAME[0]}: Defining variables for shared through models" + pwd=$(pwd) + machine=${machine:-"WCOSS_C"} + machine=$(echo $machine | tr '[a-z]' '[A-Z]') + CASE=${CASE:-C768} + CDATE=${CDATE:-2017032500} + DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory + ROTDIR=${ROTDIR:-$pwd} # rotating archive directory + ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions +} + +DATM_predet(){ + SYEAR=$(echo $CDATE | cut -c1-4) + SMONTH=$(echo $CDATE | cut -c5-6) + SDAY=$(echo $CDATE | cut -c7-8) + SHOUR=$(echo $CDATE | cut -c9-10) + # directory set up + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/DATM_INPUT ]; then mkdir -p $DATA/DATM_INPUT; fi + FHMAX=${FHMAX:-9} + # Go to Run Directory (DATA) + cd $DATA +} + +FV3_GFS_predet(){ + echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GFS" + CDUMP=${CDUMP:-gdas} + CDUMPwave="${CDUMP}wave" + FHMIN=${FHMIN:-0} + FHMAX=${FHMAX:-9} + FHOUT=${FHOUT:-3} + FHZER=${FHZER:-6} + FHCYC=${FHCYC:-24} + FHMAX_HF=${FHMAX_HF:-0} + FHOUT_HF=${FHOUT_HF:-1} + NSOUT=${NSOUT:-"-1"} + FDIAG=$FHOUT + if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi + + WRITE_DOPOST=${WRITE_DOPOST:-".false."} + restart_interval=${restart_interval:-0} + rst_invt1=`echo $restart_interval |cut -d " " -f 1` + + PDY=$(echo $CDATE | cut -c1-8) + cyc=$(echo $CDATE | cut -c9-10) + + # Directories. + pwd=$(pwd) + NWPROD=${NWPROD:-${NWROOT:-$pwd}} + HOMEgfs=${HOMEgfs:-$NWPROD} + FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} + FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} + FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} + DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory + ROTDIR=${ROTDIR:-$pwd} # rotating archive directory + ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions + DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis + + # Model resolution specific parameters + DELTIM=${DELTIM:-225} + layout_x=${layout_x:-8} + layout_y=${layout_y:-16} + LEVS=${LEVS:-65} + + # Utilities + NCP=${NCP:-"/bin/cp -p"} + NLN=${NLN:-"/bin/ln -sf"} + NMV=${NMV:-"/bin/mv"} + SEND=${SEND:-"YES"} #move final result to rotating directory + ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} + KEEPDATA=${KEEPDATA:-"NO"} + NEMSIOCHGDATE=${NEMSIOCHGDATE:-"${HOMEgfs}/exec/nemsio_chgdate"} + IAU_CHGDATE=${IAU_CHGDATE:-"YES"} + + # Other options + MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER + ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) + PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment + + # IAU options + DOIAU=${DOIAU:-"NO"} + IAUFHRS=${IAUFHRS:-0} + IAU_DELTHRS=${IAU_DELTHRS:-0} + IAU_OFFSET=${IAU_OFFSET:-0} + + # Model specific stuff + FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} + FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} + PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} + PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} + + # Model config options + APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} + #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined + #and because NTHREADS_FV3 gets overwritten by what is in the env/${macine}.env + #file and the value of npe_node_fcst is not correctly defined when using more than + #one thread and sets NTHREADS_FV3=1 even when the number of threads is appropraitely >1 + #NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} + NTHREADS_FV3=${nth_fv3:-1} + cores_per_node=${cores_per_node:-${npe_node_fcst:-24}} + ntiles=${ntiles:-6} + if [ $MEMBER -lt 0 ]; then + NTASKS_TOT=${NTASKS_TOT:-$npe_fcst_gfs} + else + NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} + fi + + TYPE=${TYPE:-"nh"} # choices: nh, hydro + MONO=${MONO:-"non-mono"} # choices: mono, non-mono + + QUILTING=${QUILTING:-".true."} + OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} + OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} + WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} + WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} + + rCDUMP=${rCDUMP:-$CDUMP} + + #------------------------------------------------------------------ + # setup the runtime environment + if [ $machine = "WCOSS_C" ] ; then + HUGEPAGES=${HUGEPAGES:-hugepages4M} + . $MODULESHOME/init/sh 2>/dev/null + module load iobuf craype-$HUGEPAGES 2>/dev/null + export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} + export MKL_CBWR=AVX2 + export WRTIOBUF=${WRTIOBUF:-"4M"} + export NC_BLKSZ=${NC_BLKSZ:-"4M"} + export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" + fi + #------------------------------------------------------- + + #------------------------------------------------------------------ + # changeable parameters + # dycore definitions + res=$(echo $CASE |cut -c2-5) + resp=$((res+1)) + npx=$resp + npy=$resp + npz=$((LEVS-1)) + io_layout="1,1" + #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) + + # spectral truncation and regular grid resolution based on FV3 resolution + JCAP_CASE=$((2*res-2)) + LONB_CASE=$((4*res)) + LATB_CASE=$((2*res)) + if [ $LATB_CASE -eq 192 ]; then + LATB_CASE=190 # berror file is at this resolution + fi + + JCAP=${JCAP:-$JCAP_CASE} + LONB=${LONB:-$LONB_CASE} + LATB=${LATB:-$LATB_CASE} + + LONB_IMO=${LONB_IMO:-$LONB_CASE} + LATB_JMO=${LATB_JMO:-$LATB_CASE} + + # NSST Options + # nstf_name contains the NSST related parameters + # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled + # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, + # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON + # nstf_name(4) : ZSEA1 (in mm) : 0 + # nstf_name(5) : ZSEA2 (in mm) : 0 + # nst_anl : .true. or .false., NSST analysis over lake + NST_MODEL=${NST_MODEL:-0} + NST_SPINUP=${NST_SPINUP:-0} + NST_RESV=${NST_RESV-0} + ZSEA1=${ZSEA1:-0} + ZSEA2=${ZSEA2:-0} + nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} + nst_anl=${nst_anl:-".false."} + + + # blocking factor used for threading and general physics performance + #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` + #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi + blocksize=${blocksize:-32} + + # variables for controlling initialization of NCEP/NGGPS ICs + filtered_terrain=${filtered_terrain:-".true."} + gfs_dwinds=${gfs_dwinds:-".true."} + + # various debug options + no_dycore=${no_dycore:-".false."} + dycore_only=${adiabatic:-".false."} + chksum_debug=${chksum_debug:-".false."} + print_freq=${print_freq:-6} + + #------------------------------------------------------- + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + mkdata=NO + if [ ! -d $DATA ]; then + mkdata=YES + mkdir -p $DATA ; + fi + cd $DATA || exit 8 + mkdir -p $DATA/INPUT + if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then + RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART + if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi + $NLN $RSTDIR_ATM RESTART + else + mkdir -p $DATA/RESTART + fi + + #------------------------------------------------------- + # member directory + if [ $MEMBER -lt 0 ]; then + prefix=$CDUMP + rprefix=$rCDUMP + memchar="" + else + prefix=enkf$CDUMP + rprefix=enkf$rCDUMP + memchar=mem$(printf %03i $MEMBER) + fi + memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar + if [ ! -d $memdir ]; then mkdir -p $memdir; fi + + GDATE=$($NDATE -$assim_freq $CDATE) + gPDY=$(echo $GDATE | cut -c1-8) + gcyc=$(echo $GDATE | cut -c9-10) + gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar + sCDATE=$($NDATE -3 $CDATE) + + if [[ "$DOIAU" = "YES" ]]; then + sCDATE=$($NDATE -3 $CDATE) + sPDY=$(echo $sCDATE | cut -c1-8) + scyc=$(echo $sCDATE | cut -c9-10) + tPDY=$gPDY + tcyc=$gcyc + else + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc + fi + + echo "SUB ${FUNCNAME[0]}: pre-determination variables set" +} + +WW3_predet(){ + echo "SUB ${FUNCNAME[0]}: Defining variables for WW3" + if [ $CDUMP = "gdas" ]; then + RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart + else + RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} + fi + if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi + $NLN $RSTDIR_WAVE restart_wave +} + +CICE_predet(){ + echo "SUB ${FUNCNAME[0]}: CICE before run type determination" + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi + if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi + if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi + if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi + if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi +} + +MOM6_predet(){ + echo "SUB ${FUNCNAME[0]}: MOM6 before run type determination" + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi + if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi + if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi + if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi + if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi + if [ ! -d $DATA/MOM6_OUTPUT ]; then mkdir -p $DATA/MOM6_OUTPUT; fi + if [ ! -d $DATA/MOM6_RESTART ]; then mkdir -p $DATA/MOM6_RESTART; fi + cd $DATA || exit 8 +} diff --git a/ush/parsing_model_configure_DATM.sh b/ush/parsing_model_configure_DATM.sh new file mode 100755 index 00000000000..c3fb5d1ac52 --- /dev/null +++ b/ush/parsing_model_configure_DATM.sh @@ -0,0 +1,40 @@ +#! /bin/sh + +##### +## "parsing_model_configure_DATM.sh" +## This script writes model configure file +## for DATM model +## +## This is the child script of ex-global forecast, +## writing model configure file for DATM +## This script is a direct execution. +##### + +DATM_model_configure(){ + +rm -f model_configure +cat > model_configure <> model_configure <> model_configure < ice_in < diag_table << EOF +FV3 Forecast +${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +else +cat > diag_table << EOF +FV3 Forecast +${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +fi + +$NCP $DATA_TABLE data_table +$NCP $FIELD_TABLE field_table + +cat > input.nml <> input.nml << EOF + oz_phys = .false. + oz_phys_2015 = .true. +EOF +elif [ $CCPP_SUITE = "FV3_GSD_v0" ]; then + cat >> input.nml << EOF + iovr = ${iovr:-"3"} + ltaerosol = ${ltaerosol:-".F."} ! In config.fcst + lradar = ${lradar:-".F."} ! In config.fcst + ttendlim = ${ttendlim:-0.005} ! In config.fcst + oz_phys = ${oz_phys:-".false."} + oz_phys_2015 = ${oz_phys_2015:-".true."} + lsoil_lsm = ${lsoil_lsm:-"4"} + do_mynnedmf = ${do_mynnedmf:-".false."} + do_mynnsfclay = ${do_mynnsfclay:-".false."} + icloud_bl = ${icloud_bl:-"1"} ! In config.fcst + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} ! In config.fcst + bl_mynn_tkeadvect=${bl_mynn_tkeadvect:-".true."} ! In config.fcst + bl_mynn_edmf_mom=${bl_mynn_edmf_mom:-"1"} ! In config.fcst + min_lakeice = ${min_lakeice:-"0.15"} + min_seaice = ${min_seaice:-"0.15"} +EOF +elif [ $CCPP_SUITE = "FV3_GFS_v16_coupled" ]; then + cat >> input.nml << EOF + iovr = ${iovr:-"3"} + ltaerosol = ${ltaerosol:-".false."} + lradar = ${lradar:-".false."} + ttendlim = ${ttendlim:-"0.005"} + oz_phys = ${oz_phys:-".false."} + oz_phys_2015 = ${oz_phys_2015:-".true."} + lsoil_lsm = ${lsoil_lsm:-"4"} + do_mynnedmf = ${do_mynnedmf:-".false."} + do_mynnsfclay = ${do_mynnsfclay:-".false."} + icloud_bl = ${icloud_bl:-"1"} + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} + bl_mynn_tkeadvect = ${bl_mynn_tkeadvect:-".true."} + bl_mynn_edmf_mom = ${bl_mynn_edmf_mom:-"1"} + min_lakeice = ${min_lakeice:-"0.15"} + min_seaice = ${min_seaice:-"0.15"} +EOF +else + cat >> input.nml << EOF + iovr_lw = ${iovr_lw:-"3"} + iovr_sw = ${iovr_sw:-"3"} +EOF +fi + +cat >> input.nml <> input.nml << EOF + cplflx = $cplflx + cplwav2atm = ${cplwav2atm} ! CROW configured +EOF +fi + +# Add namelist for IAU +if [ $DOIAU = "YES" ]; then + cat >> input.nml << EOF + iaufhrs = ${IAUFHRS} + iau_delthrs = ${IAU_DELTHRS} + iau_inc_files= ${IAU_INC_FILES} + iau_drymassfixer = .false. +EOF +fi + +cat >> input.nml <> input.nml + +cat >> input.nml <> input.nml +#if [ $MEMBER -gt 0 ]; then +if [ $DO_SPPT = .true. -o $DO_SHUM = .true. -o $DO_SKEB = .true. ]; then + + cat >> input.nml << EOF +&nam_stochy + new_lscale = .true. + ntrunc = $JCAP_STP + lon_s = $LONB_STP + lat_s = $LATB_STP +EOF + + if [ $DO_SKEB = ".true." ]; then + cat >> input.nml << EOF + skeb = $SKEB + iseed_skeb = ${ISEED_SKEB:-$ISEED} + skeb_tau = ${SKEB_TAU:-"-999."} + skeb_lscale = ${SKEB_LSCALE:-"-999."} + skebnorm = ${SKEBNORM:-"1"} + skeb_npass = ${SKEB_nPASS:-"30"} + skeb_vdof = ${SKEB_VDOF:-"5"} +EOF + fi + + if [ $DO_SHUM = ".true." ]; then + cat >> input.nml << EOF + shum = $SHUM + iseed_shum = ${ISEED_SHUM:-$ISEED} + shum_tau = ${SHUM_TAU:-"-999."} + shum_lscale = ${SHUM_LSCALE:-"-999."} +EOF + fi + + if [ $DO_SPPT = ".true." ]; then + cat >> input.nml << EOF + sppt = $SPPT + iseed_sppt = ${ISEED_SPPT:-$ISEED} + sppt_tau = ${SPPT_TAU:-"-999."} + sppt_lscale = ${SPPT_LSCALE:-"-999."} + sppt_logit = ${SPPT_LOGIT:-".true."} + sppt_sfclimit = ${SPPT_SFCLIMIT:-".true."} + use_zmtnblck = ${use_zmtnblck:-".true."} +EOF + fi + + cat >> input.nml << EOF + $nam_stochy_nml +/ +EOF + + + cat >> input.nml << EOF +&nam_sfcperts + $nam_sfcperts_nml +/ +EOF + +else + + cat >> input.nml << EOF +&nam_stochy +/ +&nam_sfcperts +/ +EOF + +fi + +echo "$(cat input.nml)" +} diff --git a/ush/parsing_namelists_FV3_GOCART.sh b/ush/parsing_namelists_FV3_GOCART.sh new file mode 100755 index 00000000000..0d2390515c3 --- /dev/null +++ b/ush/parsing_namelists_FV3_GOCART.sh @@ -0,0 +1,364 @@ +#! /bin/sh +##### +## "parsing_namelist_FV3.sh" +## This script writes namelist for FV3 model +## +## This is the child script of ex-global forecast, +## writing namelist for FV3 +## This script is a direct execution. +##### + +FV3_namelists(){ + +# copy over the tables +DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table_aer} +DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} +FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table_aer} + +# build the diag_table with the experiment name and date stamp +if [ $DOIAU = "YES" ]; then +cat > diag_table << EOF +FV3 Forecast +${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +else +cat > diag_table << EOF +FV3 Forecast +${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 +EOF +cat $DIAG_TABLE >> diag_table +fi + +$NCP $DATA_TABLE data_table +$NCP $FIELD_TABLE field_table + +cat > input.nml <> input.nml <> input.nml + +cat >> input.nml <> input.nml << EOF +&nam_stochy +/ +&nam_sfcperts +/ +EOF + +echo "$(cat input.nml)" +} diff --git a/ush/parsing_namelists_MOM6.sh b/ush/parsing_namelists_MOM6.sh new file mode 100644 index 00000000000..2af5e1d457d --- /dev/null +++ b/ush/parsing_namelists_MOM6.sh @@ -0,0 +1,88 @@ + +MOM6_namelists(){ + +# MOM6 namelists generation + +OCNRES=${OCNRES:-"025"} +MOM_INPUT=MOM_input_template_$OCNRES + +#TODO: Make these variables configurable + +#Set to False for restart reproducibility +MOM6_REPRO_LA='True' +MOM6_THERMO_SPAN='False' + +if [ $cplwav = ".true." ] ; then + MOM6_USE_WAVES='True' +else + MOM6_USE_WAVES='False' +fi + +if [ $OCNRES = '025' ]; then + NX_GLB=1440 + NY_GLB=1080 + DT_DYNAM_MOM6='900' + DT_THERM_MOM6='1800' + CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc" + FRUNOFF="runoff.daitren.clim.${NX_GLB}x${NY_GLB}.v20180328.nc" + MOM6_RIVER_RUNOFF='True' + MOM6_RESTART_SETTING="r" +elif [ $OCNRES = '050' ]; then + NX_GLB=720 + NY_GLB=576 + DT_DYNAM_MOM6='1800' + DT_THERM_MOM6='3600' + CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc" + FRUNOFF="runoff.daitren.clim.${NX_GLB}x${NY_GLB}.v20180328.nc" + MOM6_RESTART_SETTING='n' + MOM6_RIVER_RUNOFF='True' +elif [ $OCNRES = '100' ]; then + NX_GLB=360 + NY_GLB=320 + DT_DYNAM_MOM6='1800' + DT_THERM_MOM6='3600' + FRUNOFF="" + CHLCLIM="seawifs_1998-2006_smoothed_2X.nc" + MOM6_RESTART_SETTING='n' + MOM6_RIVER_RUNOFF='False' +else + echo "FATAL ERROR: do not have MOM6 settings defined for desired OCNRES=$OCNRES" + exit 1 +fi + + + cat >> input.nml < $DATA/INPUT/MOM_input +rm $DATA/INPUT/MOM_input_template_$OCNRES + +#data table for runoff: +DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} +$NCP $DATA_TABLE $DATA/data_table_template +sed -e "s/FRUNOFF/$FRUNOFF/g" $DATA/data_table_template > $DATA/data_table +rm $DATA/data_table_template + +} From 09fde48fde9cc922ee889b46b260f9f0c245aaa0 Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 19 Jul 2021 19:21:24 -0500 Subject: [PATCH 02/33] incremental update of modularized script --- ush/forecast_predet.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 4cd5763b365..9c20266a38c 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -50,7 +50,6 @@ FV3_GFS_predet(){ NSOUT=${NSOUT:-"-1"} FDIAG=$FHOUT if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi - WRITE_DOPOST=${WRITE_DOPOST:-".false."} restart_interval=${restart_interval:-0} rst_invt1=`echo $restart_interval |cut -d " " -f 1` @@ -64,6 +63,8 @@ FV3_GFS_predet(){ HOMEgfs=${HOMEgfs:-$NWPROD} FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} + export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} + export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory ROTDIR=${ROTDIR:-$pwd} # rotating archive directory From e3c3c18222a2b7659ba05a2f694ca929515161a3 Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 21 Jul 2021 12:26:17 -0500 Subject: [PATCH 03/33] incremental update --- ush/forecast_postdet.sh | 57 ++++++++++++++++++++++++----------------- ush/forecast_predet.sh | 24 +++++++++-------- 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 7bdde50324f..bdb14b5f2a4 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -38,22 +38,6 @@ FV3_GFS_postdet(){ echo $warm_start echo $RERUN - if [ ${TYPE} = "nh" ]; then # non-hydrostatic options - hydrostatic=".false." - phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation - use_hydro_pressure=".false." # use hydrostatic pressure for physics - if [ $warm_start = ".true." ]; then - make_nh=".false." # restarts contain non-hydrostatic state - else - make_nh=".true." # re-initialize non-hydrostatic state - fi - else # hydrostatic options - hydrostatic=".true." - phys_hydrostatic=".false." # ignored when hydrostatic = T - use_hydro_pressure=".false." # ignored when hydrostatic = T - make_nh=".false." # running in hydrostatic mode - fi - #------------------------------------------------------- if [ $warm_start = ".true." -o $RERUN = "YES" ]; then #------------------------------------------------------- @@ -83,14 +67,14 @@ FV3_GFS_postdet(){ done # Need a coupler.res when doing IAU - # if [ $DOIAU = "YES" ]; then - # rm -f $DATA/INPUT/coupler.res - # cat >> $DATA/INPUT/coupler.res << EOF - # 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) - # ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second - # ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second - #EOF - # fi + if [ $DOIAU = "YES" ]; then + rm -f $DATA/INPUT/coupler.res + cat >> $DATA/INPUT/coupler.res << EOF + 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) + ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second + ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second +EOF + fi # Link increments if [ $DOIAU = "YES" ]; then @@ -140,6 +124,14 @@ FV3_GFS_postdet(){ IAU_INC_FILES="''" fi + rst_list_rerun="" + xfh=$restart_interval_gfs + while [ $xfh -le $FHMAX_GFS ]; do + rst_list_rerun="$rst_list_rerun $xfh" + xfh=$((xfh+restart_interval_gfs)) + done + restart_interval="$rst_list_rerun" + fi #............................. @@ -359,6 +351,23 @@ FV3_GFS_postdet(){ chksum_debug=${chksum_debug:-".false."} print_freq=${print_freq:-6} + if [ ${TYPE} = "nh" ]; then # non-hydrostatic options + hydrostatic=".false." + phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation + use_hydro_pressure=".false." # use hydrostatic pressure for physics + if [ $warm_start = ".true." ]; then + make_nh=".false." # restarts contain non-hydrostatic state + else + make_nh=".true." # re-initialize non-hydrostatic state + fi + + else # hydrostatic options + hydrostatic=".true." + phys_hydrostatic=".false." # ignored when hydrostatic = T + use_hydro_pressure=".false." # ignored when hydrostatic = T + make_nh=".false." # running in hydrostatic mode + fi + # Conserve total energy as heat globally consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 9c20266a38c..c4beb6bdd4e 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -84,8 +84,6 @@ FV3_GFS_predet(){ SEND=${SEND:-"YES"} #move final result to rotating directory ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} KEEPDATA=${KEEPDATA:-"NO"} - NEMSIOCHGDATE=${NEMSIOCHGDATE:-"${HOMEgfs}/exec/nemsio_chgdate"} - IAU_CHGDATE=${IAU_CHGDATE:-"YES"} # Other options MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER @@ -104,6 +102,9 @@ FV3_GFS_predet(){ PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} + # Wave coupling parameter defaults to false + cplwav=${cplwav:-.false.} + # Model config options APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined @@ -128,6 +129,8 @@ FV3_GFS_predet(){ OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} + affix="nemsio" + [[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" rCDUMP=${rCDUMP:-$CDUMP} @@ -143,7 +146,16 @@ FV3_GFS_predet(){ export NC_BLKSZ=${NC_BLKSZ:-"4M"} export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" fi + #------------------------------------------------------- + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + mkdata=NO + if [ ! -d $DATA ]; then + mkdata=YES + mkdir -p $DATA ; + fi + cd $DATA || exit 8 + mkdir -p $DATA/INPUT #------------------------------------------------------------------ # changeable parameters @@ -205,14 +217,6 @@ FV3_GFS_predet(){ print_freq=${print_freq:-6} #------------------------------------------------------- - if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi - mkdata=NO - if [ ! -d $DATA ]; then - mkdata=YES - mkdir -p $DATA ; - fi - cd $DATA || exit 8 - mkdir -p $DATA/INPUT if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi From 92ccfa3de8ecf63b32e150d83343dce0077a3b15 Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 21 Jul 2021 16:33:14 -0500 Subject: [PATCH 04/33] incremental update --- ush/forecast_postdet.sh | 114 +++++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 47 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index bdb14b5f2a4..e508dad2748 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -169,40 +169,17 @@ EOF #-------------------------------------------------------------------------- # Grid and orography data - if [ -z ${GRDFIX} ] ; then - FIXgrd=$FIXfv3/$CASE - else - FIXgrd=${GRDFIX} - fi for n in $(seq 1 $ntiles); do - $NLN ${FIXgrd}/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc + $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc + $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc done - if [ -f ${FIXgrd}/${CASE}_mosaic.nc ] ; then - src_grid_spec=${FIXgrd}/${CASE}_mosaic.nc - else - src_grid_spec=${FIXgrd}/grid_spec.nc - fi - if [ $cplflx = ".false." ] ; then - $NLN ${src_grid_spec} $DATA/INPUT/grid_spec.nc + $NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc else - $NLN ${src_grid_spec} $DATA/INPUT/${CASE}_mosaic.nc + $NLN $FIXfv3/${CASE}_mosaic.nc $DATA/INPUT/${CASE}_mosaic.nc fi - if [ -z ${OROFIX} ]; then - if [ $FRAC_GRID ]; then - FIXoro=${FIXoro:-$FIX_DIR/fix_fv3_fracoro}/${CASE}.mx${OCNRES}_frac/${CASE}.mx${OCNRES}_ - else - FIXoro=$FIXfv3/$CASE/${CASE}_oro_data. - fi - else - FIXoro=${OROFIX}/oro_data. - fi - for n in $(seq 1 $ntiles); do - $NLN ${FIXoro}tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc - done - # GFS standard input data IALB=${IALB:-1} @@ -232,6 +209,16 @@ EOF $NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt + ## merra2 aerosol climo + for n in 01 02 03 04 05 06 07 08 09 10 11 12; do + $NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc + done + $NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat + $NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat + $NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat + $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat + $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat + $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt if [ $ICO2 -gt 0 ]; then @@ -270,9 +257,6 @@ EOF JCAP_CASE=$((2*res-2)) LONB_CASE=$((4*res)) LATB_CASE=$((2*res)) - if [ $LATB_CASE -eq 192 ]; then - LATB_CASE=190 # berror file is at this resolution - fi JCAP=${JCAP:-$JCAP_CASE} LONB=${LONB:-$LONB_CASE} @@ -291,11 +275,7 @@ EOF FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} - #if [ $cpl = ".true." ]; then - # export FNMSKH=${FNMSKH:-"$FIX_AM/seaice_newland.grb"} - #else - export FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} - #fi + FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} @@ -448,12 +428,14 @@ EOF #------------------------------------------------------------------ # make symbolic links to write forecast files directly in memdir cd $DATA + if [ $RUN_CCPP = "YES" ]; then if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat fi + fi affix="nc" if [ "$OUTPUT_FILE" = "nemsio" ]; then @@ -463,7 +445,7 @@ EOF if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then fhr=$FHMIN while [ $fhr -le $FHMAX ]; do - FH3=$(printf %03i $fhr) + FH3=$(printf %03i $fhr) FH2=$(printf %02i $fhr) atmi=atmf${FH3}.$affix sfci=sfcf${FH3}.$affix @@ -571,25 +553,59 @@ WW3_postdet() { array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + for wavGRD in ${grdALL}; do $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD done + export WAVHCYC=${WAVHCYC:-6} + export WRDATE=`$NDATE -${WAVHCYC} $CDATE` + export WRPDY=`echo $WRDATE | cut -c1-8` + export WRcyc=`echo $WRDATE | cut -c9-10` + export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart + export datwave=$COMOUTwave/rundata + export wavprfx=${CDUMPwave}${WAV_MEMBER} + #Copy initial condition files: for wavGRD in $waveGRD ; do - # Link wave IC for current cycle - # $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - # Link IC for S2S benchmarks: - $NCP -pf $ICSDIR/$CDATE/wav/${PDY}.${cyc}0000.restart.$wavGRD $DATA/restart.$wavGRD - # Link log files for computational grids: - eval $NLN $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}${WAV_MEMBER}.log.${wavGRD}.${PDY}${cyc} $DATA/log.${wavGRD} + if [ $RERUN = "NO" ]; then + if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + else + if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + fi + eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} done - #link more log files: - eval $NLN $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}${WAV_MEMBER}.log.mww3.${PDY}${cyc} $DATA/log.mww3 + if [ "$WW3ICEINP" = "YES" ]; then + wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice + if [ ! -f $wavicefile ]; then + echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" + echo "Abort!" + exit 1 + fi + $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} + fi + + if [ "$WW3CURINP" = "YES" ]; then + wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur + if [ ! -f $wavcurfile ]; then + echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" + echo "Abort!" + exit 1 + fi + $NLN $wavcurfile $DATA/current.${WAVECUR_FID} + fi + + # Link output files + cd $DATA + eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 - datwave=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata - wavprfx=${COMPONENTwave}${WAV_MEMBER} # Loop for gridded output (uses FHINC) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do @@ -605,6 +621,7 @@ WW3_postdet() { fi fhr=$((fhr+FHINC)) done + # Loop for point output (uses DTPNT) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do @@ -621,7 +638,10 @@ WW3_postdet() { WW3_nml() { echo "SUB ${FUNCNAME[0]}: Copying input files for WW3" WAV_MOD_TAG=${CDUMP}wave${waveMEMB} - $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/ww3_multi.${WAV_MOD_TAG}.${cycle}.inp $DATA/ww3_multi.inp + for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do + $NLN $file $DATA/ + done + $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp } WW3_out() { From f3d1f7f1f73b43a7719328f3808a366472d97b02 Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 21 Jul 2021 19:49:12 -0500 Subject: [PATCH 05/33] incremental update --- .gitignore | 1 + ush/nems.configure.atm.IN | 5 + ush/nems.configure.atm_aer.IN | 34 ++++ ush/nems.configure.blocked_atm_wav.IN | 35 ++++ ush/nems.configure.cpld.IN | 102 +++++++++++ ush/nems.configure.cpld_wave.IN | 116 +++++++++++++ ush/nems.configure.leapfrog_atm_wav.IN | 35 ++++ ush/nems.configure.medcold_atm_ocn_ice.IN | 102 +++++++++++ ush/nems.configure.medcold_atm_ocn_ice_wav.IN | 115 ++++++++++++ ush/nems_configure.sh | 164 ++++++++++++++++++ ush/parsing_namelists_FV3.sh | 19 +- 11 files changed, 720 insertions(+), 8 deletions(-) create mode 100755 ush/nems.configure.atm.IN create mode 100755 ush/nems.configure.atm_aer.IN create mode 100755 ush/nems.configure.blocked_atm_wav.IN create mode 100644 ush/nems.configure.cpld.IN create mode 100644 ush/nems.configure.cpld_wave.IN create mode 100755 ush/nems.configure.leapfrog_atm_wav.IN create mode 100644 ush/nems.configure.medcold_atm_ocn_ice.IN create mode 100644 ush/nems.configure.medcold_atm_ocn_ice_wav.IN create mode 100755 ush/nems_configure.sh diff --git a/.gitignore b/.gitignore index 49c4b1e78a4..3da7f4256c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Ignore all compiled files #-------------------------- +sorc/nceplibs-ncio/ __pycache__ *.pyc *.[aox] diff --git a/ush/nems.configure.atm.IN b/ush/nems.configure.atm.IN new file mode 100755 index 00000000000..5fbecb03cde --- /dev/null +++ b/ush/nems.configure.atm.IN @@ -0,0 +1,5 @@ +EARTH_component_list: ATM +ATM_model: fv3 +runSeq:: + ATM +:: diff --git a/ush/nems.configure.atm_aer.IN b/ush/nems.configure.atm_aer.IN new file mode 100755 index 00000000000..0e19ff9b4a7 --- /dev/null +++ b/ush/nems.configure.atm_aer.IN @@ -0,0 +1,34 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: ATM CHM +EARTH_attributes:: + Verbosity = max +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = max +:: + +# CHM # +CHM_model: @[chm_model] +CHM_petlist_bounds: @[chm_petlist_bounds] +CHM_attributes:: + Verbosity = max +:: + +# Run Sequence # +runSeq:: + @@[coupling_interval_fast_sec] + ATM phase1 + ATM -> CHM + CHM + CHM -> ATM + ATM phase2 + @ +:: diff --git a/ush/nems.configure.blocked_atm_wav.IN b/ush/nems.configure.blocked_atm_wav.IN new file mode 100755 index 00000000000..8883d8dc222 --- /dev/null +++ b/ush/nems.configure.blocked_atm_wav.IN @@ -0,0 +1,35 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: ATM WAV +EARTH_attributes:: + Verbosity = max +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = max + DumpFields = true +:: + +# WAV # +WAV_model: @[wav_model] +WAV_petlist_bounds: @[wav_petlist_bounds] +WAV_attributes:: + Verbosity = max +:: + + + +# Run Sequence # +runSeq:: + @@[coupling_interval_sec] + ATM -> WAV + ATM + WAV + @ +:: diff --git a/ush/nems.configure.cpld.IN b/ush/nems.configure.cpld.IN new file mode 100644 index 00000000000..08d40044c09 --- /dev/null +++ b/ush/nems.configure.cpld.IN @@ -0,0 +1,102 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: MED ATM OCN ICE +EARTH_attributes:: + Verbosity = 0 +:: + +# MED # +MED_model: @[med_model] +MED_petlist_bounds: @[med_petlist_bounds] +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# OCN # +OCN_model: @[ocn_model] +OCN_petlist_bounds: @[ocn_petlist_bounds] +OCN_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# ICE # +ICE_model: @[ice_model] +ICE_petlist_bounds: @[ice_petlist_bounds] +ICE_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + mesh_ice = @[MESHICE] + stop_n = @[RESTART_N] + stop_option = nhours + stop_ymd = -999 +:: + +# CMEPS warm run sequence +runSeq:: +@@[coupling_interval_slow_sec] + MED med_phases_prep_ocn_avg + MED -> OCN :remapMethod=redist + OCN + @@[coupling_interval_fast_sec] + MED med_phases_prep_atm + MED med_phases_prep_ice + MED -> ATM :remapMethod=redist + MED -> ICE :remapMethod=redist + ATM + ICE + ATM -> MED :remapMethod=redist + MED med_phases_post_atm + ICE -> MED :remapMethod=redist + MED med_phases_post_ice + MED med_phases_prep_ocn_accum + @ + OCN -> MED :remapMethod=redist + MED med_phases_post_ocn + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = @[use_coldstart] +:: +MED_attributes:: + ATM_model = @[atm_model] + ICE_model = @[ice_model] + OCN_model = @[ocn_model] + history_n = 0 + history_option = nhours + history_ymd = -999 + coupling_mode = @[CPLMODE] +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = @[RUNTYPE] + restart_dir = RESTART/ + case_name = ufs.cpld + restart_n = @[RESTART_N] + restart_option = nhours + restart_ymd = -999 + dbug_flag = @[cap_dbug_flag] + use_coldstart = @[use_coldstart] +:: diff --git a/ush/nems.configure.cpld_wave.IN b/ush/nems.configure.cpld_wave.IN new file mode 100644 index 00000000000..ee4443f2d90 --- /dev/null +++ b/ush/nems.configure.cpld_wave.IN @@ -0,0 +1,116 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: MED ATM OCN ICE WAV +EARTH_attributes:: + Verbosity = 0 +:: + +# MED # +MED_model: @[med_model] +MED_petlist_bounds: @[med_petlist_bounds] +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# OCN # +OCN_model: @[ocn_model] +OCN_petlist_bounds: @[ocn_petlist_bounds] +OCN_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# ICE # +ICE_model: @[ice_model] +ICE_petlist_bounds: @[ice_petlist_bounds] +ICE_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + mesh_ice = @[MESHICE] + stop_n = @[RESTART_N] + stop_option = nhours + stop_ymd = -999 +:: + +# WAV # +WAV_model: @[wav_model] +WAV_petlist_bounds: @[wav_petlist_bounds] +WAV_attributes:: + Verbosity = 0 + OverwriteSlice = false +:: + +# CMEPS warm run sequence +runSeq:: +@@[coupling_interval_slow_sec] + MED med_phases_prep_ocn_avg + MED -> OCN :remapMethod=redist + OCN -> WAV + WAV -> OCN :srcMaskValues=1 + OCN + @@[coupling_interval_fast_sec] + MED med_phases_prep_atm + MED med_phases_prep_ice + MED -> ATM :remapMethod=redist + MED -> ICE :remapMethod=redist + WAV -> ATM :srcMaskValues=1 + ATM -> WAV + ICE -> WAV + ATM + ICE + WAV + ATM -> MED :remapMethod=redist + MED med_phases_post_atm + ICE -> MED :remapMethod=redist + MED med_phases_post_ice + MED med_phases_prep_ocn_accum + @ + OCN -> MED :remapMethod=redist + MED med_phases_post_ocn + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = @[use_coldstart] +:: +MED_attributes:: + ATM_model = @[atm_model] + ICE_model = @[ice_model] + OCN_model = @[ocn_model] + history_n = 0 + history_option = nhours + history_ymd = -999 + coupling_mode = @[CPLMODE] +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = @[RUNTYPE] + restart_dir = RESTART/ + case_name = ufs.cpld + restart_n = @[RESTART_N] + restart_option = nhours + restart_ymd = -999 + dbug_flag = @[cap_dbug_flag] + use_coldstart = @[use_coldstart] +:: diff --git a/ush/nems.configure.leapfrog_atm_wav.IN b/ush/nems.configure.leapfrog_atm_wav.IN new file mode 100755 index 00000000000..a34cf0247ae --- /dev/null +++ b/ush/nems.configure.leapfrog_atm_wav.IN @@ -0,0 +1,35 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: ATM WAV +EARTH_attributes:: + Verbosity = max +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = max + DumpFields = true +:: + +# WAV # +WAV_model: @[wav_model] +WAV_petlist_bounds: @[wav_petlist_bounds] +WAV_attributes:: + Verbosity = max +:: + + + +# Run Sequence # +runSeq:: + @@[coupling_interval_sec] + ATM + ATM -> WAV + WAV + @ +:: diff --git a/ush/nems.configure.medcold_atm_ocn_ice.IN b/ush/nems.configure.medcold_atm_ocn_ice.IN new file mode 100644 index 00000000000..d54f6596a6f --- /dev/null +++ b/ush/nems.configure.medcold_atm_ocn_ice.IN @@ -0,0 +1,102 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: MED ATM OCN ICE +EARTH_attributes:: + Verbosity = 0 +:: + +# MED # +MED_model: @[med_model] +MED_petlist_bounds: @[med_petlist_bounds] +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# OCN # +OCN_model: @[ocn_model] +OCN_petlist_bounds: @[ocn_petlist_bounds] +OCN_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + dbug_flag = 0 +:: + +# ICE # +ICE_model: @[ice_model] +ICE_petlist_bounds: @[ice_petlist_bounds] +ICE_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + mesh_ice = @[MESHICE] + stop_n = @[FHMAX] + stop_option = nhours + stop_ymd = -999 +:: + +# CMEPS cold run sequence + +runSeq:: + @@[coupling_interval_slow_sec] + @@[coupling_interval_fast_sec] + MED med_phases_prep_atm + MED -> ATM :remapMethod=redist + ATM + ATM -> MED :remapMethod=redist + MED med_phases_prep_ice + MED -> ICE :remapMethod=redist + ICE + ICE -> MED :remapMethod=redist + MED med_fraction_set + MED med_phases_prep_ocn_map + MED med_phases_prep_ocn_merge + MED med_phases_prep_ocn_accum_fast + @ + MED med_phases_prep_ocn_accum_avg + MED -> OCN :remapMethod=redist + OCN + OCN -> MED :remapMethod=redist + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = .false. +:: +MED_attributes:: + ATM_model = @[atm_model] + ICE_model = @[ice_model] + OCN_model = @[ocn_model] + history_n = 1 + history_option = nhours + history_ymd = -999 + coupling_mode = nems_orig +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = startup + case_name = ufs.cpld.cold + restart_n = 1 + restart_option = nhours + restart_ymd = -999 + dbug_flag = 0 +:: diff --git a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN new file mode 100644 index 00000000000..53cfc8c09d4 --- /dev/null +++ b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN @@ -0,0 +1,115 @@ +############################################# +#### NEMS Run-Time Configuration File ##### +############################################# + +# EARTH # +EARTH_component_list: MED ATM OCN ICE WAV +EARTH_attributes:: + Verbosity = 0 +:: + +# MED # +MED_model: @[med_model] +MED_petlist_bounds: @[med_petlist_bounds] +:: + +# ATM # +ATM_model: @[atm_model] +ATM_petlist_bounds: @[atm_petlist_bounds] +ATM_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# OCN # +OCN_model: @[ocn_model] +OCN_petlist_bounds: @[ocn_petlist_bounds] +OCN_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true +:: + +# ICE # +ICE_model: @[ice_model] +ICE_petlist_bounds: @[ice_petlist_bounds] +ICE_attributes:: + Verbosity = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + mesh_ice = @[MESHICE] + stop_n = @[FHMAX] + stop_option = nhours + stop_ymd = -999 +:: + +# WAV # +WAV_model: @[wav_model] +WAV_petlist_bounds: @[wav_petlist_bounds] +WAV_attributes:: + Verbosity = 0 + OverwriteSlice = false +:: + +# CMEPS cold run sequence + +runSeq:: + @@[coupling_interval_slow_sec] + OCN -> WAV + WAV -> OCN ::srcMaskValues=1 + @@[coupling_interval_fast_sec] + MED med_phases_prep_atm + MED -> ATM :remapMethod=redist + WAV -> ATM :srcMaskValues=1 + ATM + ATM -> WAV + ATM -> MED :remapMethod=redist + MED med_phases_prep_ice + MED -> ICE :remapMethod=redist + ICE + ICE -> WAV + WAV + ICE -> MED :remapMethod=redist + MED med_fraction_set + MED med_phases_prep_ocn_map + MED med_phases_prep_ocn_merge + MED med_phases_prep_ocn_accum_fast + @ + MED med_phases_prep_ocn_accum_avg + MED -> OCN :remapMethod=redist + OCN + OCN -> MED :remapMethod=redist + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = .false. +:: +MED_attributes:: + ATM_model = @[atm_model] + ICE_model = @[ice_model] + OCN_model = @[ocn_model] + history_n = 1 + history_option = nhours + history_ymd = -999 + coupling_mode = nems_orig +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = startup + case_name = ufs.cpld.cold + restart_n = 1 + restart_option = nhours + restart_ymd = -999 + dbug_flag = 0 +:: diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh new file mode 100755 index 00000000000..8e446271458 --- /dev/null +++ b/ush/nems_configure.sh @@ -0,0 +1,164 @@ +#!/bin/sh + +##### +## This script writes nems.configure file +## first, select a "*.IN" templates based on +## $confignamevarfornems and parse values based on +## $cpl** switches. +## +## This is a child script of modular +## forecast script. This script is definition only +##### +writing_nems_configure() +{ +echo "SUB ${FUNCNAME[0]}: parsing_nems_configure begins" +if [ -e $SCRIPTDIR/nems.configure ]; then + rm -f $SCRIPTDIR/nems.configure +fi + +# Setup nems.configure +DumpFields=${NEMSDumpFields:-false} +cap_dbug_flag=${cap_dbug_flag:-0} +if [ $warm_start = ".true." ]; then + cmeps_run_type='continue' +else + cmeps_run_type='startup' +fi +if [[ $inistep = "cold" ]]; then + restart_interval=0 + coldstart=true # this is the correct setting +else + restart_interval=${restart_interval:-3024000} # Interval in seconds to write restarts + coldstart=false +fi + +ATM_model=${ATM_model:-'fv3'} +OCN_model=${OCN_model:-'mom6'} +ICE_model=${ICE_model:-'cice'} +WAV_model=${WAV_model:-'ww3'} +CHM_model=${CHM_model:-'gsdchem'} + +ATMPETS=${ATMPETS:-8} +MEDPETS=${MEDPETS:-8} +OCNPETS=${OCNPETS:-8} +ICEPETS=${ICEPETS:-8} +WAVPETS=${WAVPETS:-8} +CHMPETS=${CHMPETS:-${ATMPETS}} + +rm -f $DATA/nems.configure + +med_petlist_bounds=${med_petlist_bounds:-"0 $(( $MEDPETS-1 ))"} +atm_petlist_bounds=${atm_petlist_bounds:-"0 $(( $ATMPETS-1 ))"} +ocn_petlist_bounds=${ocn_petlist_bounds:-"$ATMPETS $(( $ATMPETS+$OCNPETS-1 ))"} +ice_petlist_bounds=${ice_petlist_bounds:-"$(( $ATMPETS+$OCNPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS-1 ))"} +wav_petlist_bounds=${wav_petlist_bounds:-"$(( $ATMPETS+$OCNPETS+$ICEPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS+$WAVPETS-1 ))"} +chm_petlist_bounds=${chm_petlist_bounds:-"0 $(( $CHMPETS-1 ))"} + +# Copy the selected template into run directory +cp $SCRIPTDIR/nems.configure.$confignamevarfornems.IN tmp1 +sed -i -e "s;@\[med_model\];nems;g" tmp1 +sed -i -e "s;@\[atm_model\];$ATM_model;g" tmp1 +sed -i -e "s;@\[med_petlist_bounds\];$med_petlist_bounds;g" tmp1 +sed -i -e "s;@\[atm_petlist_bounds\];$atm_petlist_bounds;g" tmp1 + +if [ $cplflx = .true. ]; then + if [ $restart_interval -gt 0 ]; then + restart_interval_nems=$restart_interval + else + restart_interval_nems=$FHMAX + fi + sed -i -e "s;@\[ocn_model\];$OCN_model;g" tmp1 + sed -i -e "s;@\[ocn_petlist_bounds\];$ocn_petlist_bounds;g" tmp1 + sed -i -e "s;@\[DumpFields\];$DumpFields;g" tmp1 + sed -i -e "s;@\[cap_dbug_flag\];$cap_dbug_flag;g" tmp1 + sed -i -e "s;@\[coldstart\];$coldstart;g" tmp1 + sed -i -e "s;@\[use_coldstart\];$use_coldstart;g" tmp1 + sed -i -e "s;@\[RUNTYPE\];$cmeps_run_type;g" tmp1 + sed -i -e "s;@\[CPLMODE\];$cplmode;g" tmp1 + sed -i -e "s;@\[restart_interval\];$restart_interval;g" tmp1 + sed -i -e "s;@\[coupling_interval_slow_sec\];$CPL_SLOW;g" tmp1 + sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 + sed -i -e "s;@\[RESTART_N\];$restart_interval_nems;g" tmp1 +fi +if [ $cplwav = .true. ]; then + sed -i -e "s;@\[wav_model\];ww3;g" tmp1 + sed -i -e "s;@\[wav_petlist_bounds\];$wav_petlist_bounds;g" tmp1 +fi +if [ $cplice = .true. ]; then + sed -i -e "s;@\[ice_model\];$ICE_model;g" tmp1 + sed -i -e "s;@\[ice_petlist_bounds\];$ice_petlist_bounds;g" tmp1 + sed -i -e "s;@\[MESHICE\];$MESHICE;g" tmp1 + sed -i -e "s;@\[FHMAX\];$FHMAX_GFS;g" tmp1 +fi +if [ $cplchem = .true. -o $cplgocart = .true. ]; then + sed -i -e "s;@\[chm_model\];$CHM_model;g" tmp1 + sed -i -e "s;@\[chm_petlist_bounds\];$chm_petlist_bounds;g" tmp1 + sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 +fi + +mv tmp1 nems.configure + +echo "$(cat nems.configure)" + +if [ $cplflx = .true. ]; then + +#Create other CMEPS mediator related files +cat > pio_in << EOF +&papi_inparm + papi_ctr1_str = "PAPI_FP_OPS" + papi_ctr2_str = "PAPI_NO_CTR" + papi_ctr3_str = "PAPI_NO_CTR" + papi_ctr4_str = "PAPI_NO_CTR" +/ +&pio_default_inparm + pio_async_interface = .false. + pio_blocksize = -1 + pio_buffer_size_limit = -1 + pio_debug_level = 0 + pio_rearr_comm_enable_hs_comp2io = .true. + pio_rearr_comm_enable_hs_io2comp = .false. + pio_rearr_comm_enable_isend_comp2io = .false. + pio_rearr_comm_enable_isend_io2comp = .true. + pio_rearr_comm_fcd = "2denable" + pio_rearr_comm_max_pend_req_comp2io = 0 + pio_rearr_comm_max_pend_req_io2comp = 64 + pio_rearr_comm_type = "p2p" +/ +&prof_inparm + profile_add_detail = .false. + profile_barrier = .false. + profile_depth_limit = 4 + profile_detail_limit = 2 + profile_disable = .false. + profile_global_stats = .true. + profile_outpe_num = 1 + profile_outpe_stride = 0 + profile_ovhd_measurement = .false. + profile_papi_enable = .false. + profile_single_file = .false. + profile_timer = 4 +/ +EOF + +echo "$(cat pio_in)" + +cat > med_modelio.nml << EOF +&pio_inparm + pio_netcdf_format = "64bit_offset" + pio_numiotasks = -99 + pio_rearranger = 1 + pio_root = 1 + pio_stride = 36 + pio_typename = "netcdf" +/ +EOF + +echo "$(cat med_modelio.nml)" + +cp $HOMEgfs/sorc/ufs_coupled.fd/CMEPS-interface/CMEPS/mediator/fd_nems.yaml fd_nems.yaml + +fi + +echo "SUB ${FUNCNAME[0]}: Nems configured for $confignamevarfornems" + +} diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index ddcca3a2412..84df284df3c 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -88,8 +88,16 @@ cat > input.nml <> input.nml << EOF + dz_min = ${dz_min:-"6"} ! no longer in develop branch + psm_bc = ${psm_bc:-"0"} ! no longer in develop branch +EOF +fi + +cat >> input.nml << EOF grid_type = -1 make_nh = $make_nh fv_debug = ${fv_debug:-".false."} @@ -437,15 +445,10 @@ EOF # Add namelist for stochastic physics options echo "" >> input.nml -#if [ $MEMBER -gt 0 ]; then -if [ $DO_SPPT = .true. -o $DO_SHUM = .true. -o $DO_SKEB = .true. ]; then +if [ $MEMBER -gt 0 ]; then cat >> input.nml << EOF &nam_stochy - new_lscale = .true. - ntrunc = $JCAP_STP - lon_s = $LONB_STP - lat_s = $LATB_STP EOF if [ $DO_SKEB = ".true." ]; then From f58fa536d27a7f6ff3a0a7982d7409dfc1b7812b Mon Sep 17 00:00:00 2001 From: jikuang Date: Sun, 25 Jul 2021 09:22:51 -0500 Subject: [PATCH 06/33] namelist update, set up script match develop --- ush/parsing_namelists_FV3.sh | 3 +- ush/rocoto/setup_expt_fcstonly.py | 40 ++--- ush/rocoto/setup_workflow_fcstonly.py | 216 +++++++++++++------------- ush/rocoto/workflow_utils.py | 132 ++++++++-------- 4 files changed, 198 insertions(+), 193 deletions(-) diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 84df284df3c..89023e3b4df 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -243,8 +243,7 @@ elif [ $CCPP_SUITE = "FV3_GFS_v16_coupled" ]; then EOF else cat >> input.nml << EOF - iovr_lw = ${iovr_lw:-"3"} - iovr_sw = ${iovr_sw:-"3"} + iovr = ${iovr:-"3"} EOF fi diff --git a/ush/rocoto/setup_expt_fcstonly.py b/ush/rocoto/setup_expt_fcstonly.py index f9e5b2c4808..94fc27d32cf 100755 --- a/ush/rocoto/setup_expt_fcstonly.py +++ b/ush/rocoto/setup_expt_fcstonly.py @@ -28,9 +28,9 @@ def makedirs_if_missing(d): def create_EXPDIR(): makedirs_if_missing(expdir) - configs = glob.glob('%s/config.*' % configdir) + configs = glob.glob(f'{configdir}/config.*') if len(configs) == 0: - msg = 'no config files found in %s' % configdir + msg = f'no config files found in {configdir}' raise IOError(msg) for config in configs: shutil.copy(config, expdir) @@ -47,7 +47,7 @@ def create_COMROT(): def edit_baseconfig(): - base_config = '%s/config.base' % expdir + base_config = f'{expdir}/config.base' here = os.path.dirname(__file__) top = os.path.abspath(os.path.join(os.path.abspath(here), '../..')) @@ -55,7 +55,7 @@ def edit_baseconfig(): # make a copy of the default before editing shutil.copy(base_config, base_config + '.default') - print '\nSDATE = %s\nEDATE = %s' % (idate, edate) + print(f'\nSDATE = {idate}\nEDATE = {edate}') with open(base_config + '.default', 'rt') as fi: with open(base_config + '.new', 'wt') as fo: for line in fi: @@ -64,7 +64,7 @@ def edit_baseconfig(): .replace('@SDATE@', idate.strftime('%Y%m%d%H')) \ .replace('@FDATE@', fdate.strftime('%Y%m%d%H')) \ .replace('@EDATE@', edate.strftime('%Y%m%d%H')) \ - .replace('@CASECTL@', 'C%d' % res) \ + .replace('@CASECTL@', f'C{res}') \ .replace('@HOMEgfs@', top) \ .replace('@BASE_GIT@', base_git) \ .replace('@DMPDIR@', dmpdir) \ @@ -83,7 +83,7 @@ def edit_baseconfig(): .replace('@CHGRP_RSTPROD@', chgrp_rstprod) \ .replace('@CHGRP_CMD@', chgrp_cmd) \ .replace('@HPSSARCH@', hpssarch) \ - .replace('@gfs_cyc@', '%d' % gfs_cyc) + .replace('@gfs_cyc@', f'{gfs_cyc}') if expdir is not None: line = line.replace('@EXPDIR@', os.path.dirname(expdir)) if comrot is not None: @@ -93,11 +93,11 @@ def edit_baseconfig(): os.unlink(base_config) os.rename(base_config + '.new', base_config) - print '' - print 'EDITED: %s/config.base as per user input.' % expdir - print 'DEFAULT: %s/config.base.default is for reference only.' % expdir - print 'Please verify and delete the default file before proceeding.' - print '' + print('') + print(f'EDITED: {expdir}/config.base as per user input.') + print(f'DEFAULT: {expdir}/config.base.default is for reference only.') + print('Please verify and delete the default file before proceeding.') + print('') return @@ -195,7 +195,7 @@ def edit_baseconfig(): base_svn = '/scratch1/NCEPDEV/global/glopara/svn' dmpdir = '/scratch1/NCEPDEV/global/glopara/dump' nwprod = '/scratch1/NCEPDEV/global/glopara/nwpara' - comroot = '/scratch1/NCEPDEV/global/glopara/com' + comroot = '/scratch1/NCEPDEV/rstprod/com' homedir = '/scratch1/NCEPDEV/global/$USER' stmp = '/scratch1/NCEPDEV/stmp2/$USER' ptmp = '/scratch1/NCEPDEV/stmp4/$USER' @@ -228,10 +228,10 @@ def edit_baseconfig(): # COMROT directory create_comrot = True if os.path.exists(comrot): - print - print 'COMROT already exists in %s' % comrot - print - overwrite_comrot = raw_input('Do you wish to over-write COMROT [y/N]: ') + print() + print(f'COMROT already exists in {comrot}') + print() + overwrite_comrot = input('Do you wish to over-write COMROT [y/N]: ') create_comrot = True if overwrite_comrot in ['y', 'yes', 'Y', 'YES'] else False if create_comrot: shutil.rmtree(comrot) @@ -242,10 +242,10 @@ def edit_baseconfig(): # EXP directory create_expdir = True if os.path.exists(expdir): - print - print 'EXPDIR already exists in %s' % expdir - print - overwrite_expdir = raw_input('Do you wish to over-write EXPDIR [y/N]: ') + print() + print(f'EXPDIR already exists in {expdir}') + print() + overwrite_expdir = input('Do you wish to over-write EXPDIR [y/N]: ') create_expdir = True if overwrite_expdir in ['y', 'yes', 'Y', 'YES'] else False if create_expdir: shutil.rmtree(expdir) diff --git a/ush/rocoto/setup_workflow_fcstonly.py b/ush/rocoto/setup_workflow_fcstonly.py index f25ec53f1c5..c4a47ef708c 100755 --- a/ush/rocoto/setup_workflow_fcstonly.py +++ b/ush/rocoto/setup_workflow_fcstonly.py @@ -41,9 +41,9 @@ def main(): _base = wfu.config_parser([wfu.find_config('config.base', configs)]) if not os.path.samefile(args.expdir,_base['EXPDIR']): - print 'MISMATCH in experiment directories!' - print 'config.base: EXPDIR = %s' % repr(_base['EXPDIR']) - print 'input arg: --expdir = %s' % repr(args.expdir) + print('MISMATCH in experiment directories!') + print(f'''config.base: EXPDIR = {repr(_base['EXPDIR'])}''') + print(f'input arg: --expdir = {repr(args.expdir)}') sys.exit(1) dict_configs = wfu.source_configs(configs, taskplan) @@ -78,7 +78,7 @@ def get_preamble(): strings.append('\t\trahul.mahajan@noaa.gov\n') strings.append('\n') strings.append('\tNOTES:\n') - strings.append('\t\tThis workflow was automatically generated at %s\n' % datetime.now()) + strings.append(f'\t\tThis workflow was automatically generated at {datetime.now()}\n') strings.append('\t-->\n') return ''.join(strings) @@ -97,42 +97,42 @@ def get_definitions(base): strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['PSLOT']) - strings.append('\t\n' % base['CDUMP']) - strings.append('\t\n' % base['CASE']) + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['SDATE'].strftime('%Y%m%d%H%M')) - strings.append('\t\n' % base['EDATE'].strftime('%Y%m%d%H%M')) + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') if base['INTERVAL'] is None: - print 'cycle INTERVAL cannot be None' + print('cycle INTERVAL cannot be None') sys.exit(1) - strings.append('\t\n' % base['INTERVAL']) + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['RUN_ENVIR']) + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['EXPDIR']) - strings.append('\t\n' % base['ROTDIR']) - strings.append('\t\n' % base['ICSDIR']) + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['HOMEgfs']) - strings.append('\t\n' % base['BASE_JOB']) + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['ACCOUNT']) - strings.append('\t\n' % base['QUEUE']) - strings.append('\t\n' % base['QUEUE_SERVICE']) + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') + strings.append(f'''\t\n''') if scheduler in ['slurm'] and machine in ['ORION']: - strings.append('\t\n' % base['PARTITION_BATCH']) + strings.append(f'''\t\n''') if scheduler in ['slurm']: - strings.append('\t\n' % base['QUEUE_SERVICE']) - strings.append('\t\n' % scheduler) + strings.append(f'''\t\n''') + strings.append(f'\t\n') strings.append('\n') strings.append('\t\n') - strings.append('\t\n' % base['HPSSARCH']) + strings.append(f'''\t\n''') strings.append('\n') strings.append('\t\n') strings.append('\t\n') @@ -170,18 +170,18 @@ def get_resources(dict_configs, cdump='gdas'): wtimestr, resstr, queuestr, memstr, natstr = wfu.get_resources(machine, cfg, task, reservation, cdump=cdump) - taskstr = '%s_%s' % (task.upper(), cdump.upper()) + taskstr = f'{task.upper()}_{cdump.upper()}' - strings.append('\t\n' % (taskstr, queuestr)) + strings.append(f'\t\n') if scheduler in ['slurm'] and machine in ['ORION'] and task not in ['getic', 'arch']: - strings.append('\t\n' % taskstr ) + strings.append(f'\t\n') if scheduler in ['slurm'] and task in ['getic', 'arch']: - strings.append('\t\n' % taskstr ) - strings.append('\t\n' % (taskstr, wtimestr)) - strings.append('\t\n' % (taskstr, resstr)) + strings.append(f'\t\n') + strings.append(f'\t\n') + strings.append(f'\t\n') if len(memstr) != 0: - strings.append('\t\n' % (taskstr, memstr)) - strings.append('\t\n' % (taskstr, natstr)) + strings.append(f'\t\n') + strings.append(f'\t\n') strings.append('\n') @@ -198,23 +198,23 @@ def get_postgroups(post, cdump='gdas'): # Get a list of all forecast hours if cdump in ['gdas']: - fhrs = range(fhmin, fhmax+fhout, fhout) + fhrs = list(range(fhmin, fhmax+fhout, fhout)) elif cdump in ['gfs']: fhmax = np.max([post['FHMAX_GFS_00'],post['FHMAX_GFS_06'],post['FHMAX_GFS_12'],post['FHMAX_GFS_18']]) fhout = post['FHOUT_GFS'] fhmax_hf = post['FHMAX_HF_GFS'] fhout_hf = post['FHOUT_HF_GFS'] - fhrs_hf = range(fhmin, fhmax_hf+fhout_hf, fhout_hf) - fhrs = fhrs_hf + range(fhrs_hf[-1]+fhout, fhmax+fhout, fhout) + fhrs_hf = list(range(fhmin, fhmax_hf+fhout_hf, fhout_hf)) + fhrs = fhrs_hf + list(range(fhrs_hf[-1]+fhout, fhmax+fhout, fhout)) npostgrp = post['NPOSTGRP'] ngrps = npostgrp if len(fhrs) > npostgrp else len(fhrs) - fhrs = ['f%03d' % f for f in fhrs] + fhrs = [f'f{f:03d}' for f in fhrs] fhrs = np.array_split(fhrs, ngrps) fhrs = [f.tolist() for f in fhrs] - fhrgrp = ' '.join(['%03d' % x for x in range(1, ngrps+1)]) + fhrgrp = ' '.join([f'{x:03d}' for x in range(1, ngrps+1)]) fhrdep = ' '.join([f[-1] for f in fhrs]) fhrlst = ' '.join(['_'.join(f) for f in fhrs]) @@ -284,7 +284,7 @@ def get_workflow(dict_configs, cdump='gdas'): if hpssarch in ['YES']: deps = [] - dep_dict = {'type': 'task', 'name': '%sgetic' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}getic'} deps.append(rocoto.add_dependency(dep_dict)) dependencies2 = rocoto.create_dependency(dep=deps) @@ -307,9 +307,9 @@ def get_workflow(dict_configs, cdump='gdas'): # waveprep if do_wave in ['Y', 'YES'] and do_wave_cdump in ['GFS', 'BOTH']: deps = [] - dep_dict = {'type': 'task', 'name': '%swaveinit' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}waveinit'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': '%sinit' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}init'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) task = wfu.create_wf_task('waveprep', cdump=cdump, envar=envars, dependency=dependencies) @@ -328,7 +328,7 @@ def get_workflow(dict_configs, cdump='gdas'): if do_wave in ['Y', 'YES'] and do_wave_cdump in ['GFS', 'BOTH']: deps = [] - dep_dict = {'type': 'task', 'name': '%swaveprep' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}waveprep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies2 = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -344,7 +344,7 @@ def get_workflow(dict_configs, cdump='gdas'): # post deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.log#dep#.txt' % (cdump, cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.log#dep#.txt' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -363,13 +363,13 @@ def get_workflow(dict_configs, cdump='gdas'): # wavepostsbs if do_wave in ['Y', 'YES'] and do_wave_cdump in ['GFS', 'BOTH']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/wave/rundata/%swave.out_grd.gnh_10m.@Y@m@d.@H0000' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/wave/rundata/{cdump}wave.out_grd.gnh_10m.@Y@m@d.@H0000' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/wave/rundata/%swave.out_grd.aoc_9km.@Y@m@d.@H0000' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/wave/rundata/{cdump}wave.out_grd.aoc_9km.@Y@m@d.@H0000' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/wave/rundata/%swave.out_grd.gsh_15m.@Y@m@d.@H0000' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/wave/rundata/{cdump}wave.out_grd.gsh_15m.@Y@m@d.@H0000' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -380,7 +380,7 @@ def get_workflow(dict_configs, cdump='gdas'): # wavepostbndpnt if do_wave in ['Y', 'YES']: deps = [] - dep_dict = {'type':'task', 'name':'%sfcst' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('wavepostbndpnt', cdump=cdump, envar=envars, dependency=dependencies) @@ -390,7 +390,7 @@ def get_workflow(dict_configs, cdump='gdas'): # wavepostbndpntbll if do_wave in ['Y', 'YES']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.logf180.txt' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.logf180.txt' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -401,9 +401,9 @@ def get_workflow(dict_configs, cdump='gdas'): # wavepostpnt if do_wave in ['Y', 'YES']: deps = [] - dep_dict = {'type':'task', 'name':'%sfcst' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}fcst'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type':'task', 'name':'%swavepostbndpntbll' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}wavepostbndpntbll'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) task = wfu.create_wf_task('wavepostpnt', cdump=cdump, envar=envars, dependency=dependencies) @@ -413,7 +413,7 @@ def get_workflow(dict_configs, cdump='gdas'): # wavegempak if do_wave in ['Y', 'YES'] and do_gempak in ['Y', 'YES']: deps = [] - dep_dict = {'type':'task', 'name':'%swavepostsbs' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('wavegempak', cdump=cdump, envar=envars, dependency=dependencies) @@ -423,9 +423,9 @@ def get_workflow(dict_configs, cdump='gdas'): # waveawipsbulls if do_wave in ['Y', 'YES'] and do_awips in ['Y', 'YES']: deps = [] - dep_dict = {'type':'task', 'name':'%swavepostsbs' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type':'task', 'name':'%swavepostpnt' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) task = wfu.create_wf_task('waveawipsbulls', cdump=cdump, envar=envars, dependency=dependencies) @@ -435,7 +435,7 @@ def get_workflow(dict_configs, cdump='gdas'): # waveawipsgridded if do_wave in ['Y', 'YES'] and do_awips in ['Y', 'YES']: deps = [] - dep_dict = {'type':'task', 'name':'%swavepostsbs' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('waveawipsgridded', cdump=cdump, envar=envars, dependency=dependencies) @@ -445,34 +445,34 @@ def get_workflow(dict_configs, cdump='gdas'): # wafs if do_wafs in ['Y', 'YES']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if006' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if006' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if012' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if012' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if015' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if015' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if018' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if018' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if021' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if021' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if024' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if024' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if027' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if027' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if030' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if030' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if033' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if033' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if036' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if036' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -483,34 +483,34 @@ def get_workflow(dict_configs, cdump='gdas'): # wafsgcip if do_wafs in ['Y', 'YES']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if006' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if006' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if012' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if012' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if015' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if015' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if018' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if018' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if021' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if021' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if024' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if024' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if027' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if027' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if030' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if030' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if033' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if033' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if036' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if036' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -521,34 +521,34 @@ def get_workflow(dict_configs, cdump='gdas'): # wafsgrib2 if do_wafs in ['Y', 'YES']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if006' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if006' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if012' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if012' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if015' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if015' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if018' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if018' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if021' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if021' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if024' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if024' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if027' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if027' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if030' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if030' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if033' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if033' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if036' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if036' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -559,34 +559,34 @@ def get_workflow(dict_configs, cdump='gdas'): # wafsgrib20p25 if do_wafs in ['Y', 'YES']: deps = [] - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if006' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if006' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if012' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if012' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if015' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if015' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if018' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if018' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if021' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if021' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if024' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if024' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if027' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if027' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if030' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if030' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if033' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if033' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - data = '&ROTDIR;/%s.@Y@m@d/@H/atmos/%s.t@Hz.wafs.grb2if036' % (cdump,cdump) + data = f'&ROTDIR;/{cdump}.@Y@m@d/@H/atmos/{cdump}.t@Hz.wafs.grb2if036' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -597,7 +597,7 @@ def get_workflow(dict_configs, cdump='gdas'): # wafsblending if do_wafs in ['Y', 'YES']: deps = [] - dep_dict = {'type': 'task', 'name': '%swafsgrib2' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}wafsgrib2'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('wafsblending', cdump=cdump, envar=envars, dependency=dependencies) @@ -607,7 +607,7 @@ def get_workflow(dict_configs, cdump='gdas'): # wafsblending0p25 if do_wafs in ['Y', 'YES']: deps = [] - dep_dict = {'type': 'task', 'name': '%swafsgrib20p25' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}wafsgrib20p25'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('wafsblending0p25', cdump=cdump, envar=envars, dependency=dependencies) @@ -617,7 +617,7 @@ def get_workflow(dict_configs, cdump='gdas'): #postsnd if do_bufrsnd in ['Y', 'YES']: deps = [] - dep_dict = {'type': 'task', 'name': '%sfcst' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('postsnd', cdump=cdump, envar=envars, dependency=dependencies) @@ -627,7 +627,7 @@ def get_workflow(dict_configs, cdump='gdas'): # awips if do_awips in ['Y', 'YES']: deps = [] - dep_dict = {'type': 'metatask', 'name': '%spost' % cdump} + dep_dict = {'type': 'metatask', 'name': f'{cdump}post'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) fhrgrp = rocoto.create_envar(name='FHRGRP', value='#grp#') @@ -645,7 +645,7 @@ def get_workflow(dict_configs, cdump='gdas'): # gempak if do_gempak in ['Y', 'YES']: deps = [] - dep_dict = {'type': 'metatask', 'name': '%spost' % cdump} + dep_dict = {'type': 'metatask', 'name': f'{cdump}post'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('gempak', cdump=cdump, envar=envars, dependency=dependencies) @@ -654,7 +654,7 @@ def get_workflow(dict_configs, cdump='gdas'): # vrfy deps = [] - dep_dict = {'type':'metatask', 'name':'%spost' % cdump} + dep_dict = {'type':'metatask', 'name':f'{cdump}post'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) task = wfu.create_wf_task('vrfy', cdump=cdump, envar=envars, dependency=dependencies) @@ -664,9 +664,9 @@ def get_workflow(dict_configs, cdump='gdas'): # metp if do_metp in ['Y', 'YES']: deps = [] - dep_dict = {'type':'metatask', 'name':'%spost' % cdump} + dep_dict = {'type':'metatask', 'name':f'{cdump}post'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type':'task', 'name':'%sarch' % cdump, 'offset':'-&INTERVAL;'} + dep_dict = {'type':'task', 'name':f'{cdump}arch', 'offset':'-&INTERVAL;'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) sdate_gfs = rocoto.create_envar(name='SDATE_GFS', value='&SDATE;') @@ -681,16 +681,16 @@ def get_workflow(dict_configs, cdump='gdas'): # arch deps = [] - dep_dict = {'type':'metatask', 'name':'%spost' % cdump} + dep_dict = {'type':'metatask', 'name':f'{cdump}post'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type':'task', 'name':'%svrfy' % cdump} + dep_dict = {'type':'task', 'name':f'{cdump}vrfy'} deps.append(rocoto.add_dependency(dep_dict)) if do_wave in ['Y', 'YES']: - dep_dict = {'type': 'task', 'name': '%swavepostsbs' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': '%swavepostpnt' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': '%swavepostbndpnt' % cdump} + dep_dict = {'type': 'task', 'name': f'{cdump}wavepostbndpnt'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) task = wfu.create_wf_task('arch', cdump=cdump, envar=envars, dependency=dependencies, final=True) @@ -715,7 +715,7 @@ def get_workflow_body(dict_configs, cdump='gdas'): strings.append('\t&EXPDIR;/logs/@Y@m@d@H.log\n') strings.append('\n') strings.append('\t\n') - strings.append('\t&SDATE; &EDATE; &INTERVAL;\n' % cdump) + strings.append(f'\t&SDATE; &EDATE; &INTERVAL;\n') strings.append('\n') strings.append(get_workflow(dict_configs, cdump=cdump)) strings.append('\n') @@ -754,7 +754,7 @@ def create_xml(dict_configs): workflow = temp_workflow # Start writing the XML file - fh = open('%s/%s.xml' % (base['EXPDIR'], base['PSLOT']), 'w') + fh = open(f'{base["EXPDIR"]}/{base["PSLOT"]}.xml', 'w') fh.write(preamble) fh.write(definitions) diff --git a/ush/rocoto/workflow_utils.py b/ush/rocoto/workflow_utils.py index e8bb16ddd1c..1918badb004 100755 --- a/ush/rocoto/workflow_utils.py +++ b/ush/rocoto/workflow_utils.py @@ -34,13 +34,14 @@ def __init__(self,scripts,errors): def get_shell_env(scripts): vars=dict() - runme=''.join([ 'source %s ; '%(s,) for s in scripts ]) - magic='--- ENVIRONMENT BEGIN %d ---'%random.randint(0,64**5) - runme+='/bin/echo -n "%s" ; /usr/bin/env -0'%(magic,) - with open('/dev/null','wb+') as null: + runme=''.join([ f'source {s} ; ' for s in scripts ]) + magic=f'--- ENVIRONMENT BEGIN {random.randint(0,64**5)} ---' + runme+=f'/bin/echo -n "{(magic,)}" ; /usr/bin/env -0' + with open('/dev/null','w') as null: env=subprocess.Popen(runme,shell=True,stdin=null.fileno(), stdout=subprocess.PIPE) (out,err)=env.communicate() + out = out.decode() begin=out.find(magic) if begin<0: raise ShellScriptException(scripts,'Cannot find magic string; ' @@ -70,7 +71,7 @@ def get_configs(expdir): return a list of configs minus the ones ending with ".default" """ result=list() - for config in glob.glob('%s/config.*' % expdir): + for config in glob.glob(f'{expdir}/config.*'): if not config.endswith('.default'): result.append(config) return result @@ -81,8 +82,7 @@ def find_config(config_name, configs): if config_name == os.path.basename(config): return config - raise UnknownConfigError("%s does not exist (known: %s), ABORT!" % ( - config_name,repr(config_name))) + raise UnknownConfigError(f'{config_name} does not exist (known: {repr(config_name)}), ABORT!') def source_configs(configs, tasks): ''' @@ -113,9 +113,9 @@ def source_configs(configs, tasks): files.append(find_config('config.fcst', configs)) files.append(find_config('config.efcs', configs)) else: - files.append(find_config('config.%s' % task, configs)) + files.append(find_config(f'config.{task}', configs)) - print 'sourcing config.%s' % task + print(f'sourcing config.{task}') dict_configs[task] = config_parser(files) return dict_configs @@ -130,10 +130,10 @@ def config_parser(files): in the script. :rtype: dict """ - if isinstance(files,basestring): + if isinstance(files,(str, bytes)): files=[files] varbles=dict() - for key,value in get_script_env(files).iteritems(): + for key,value in get_script_env(files).items(): if key in DATE_ENV_VARS: # likely a date, convert to datetime varbles[key] = datetime.strptime(value,'%Y%m%d%H') elif '.' in value: # Likely a number and that too a float @@ -145,7 +145,7 @@ def config_parser(files): def detectMachine(): - machines = ['HERA', 'ORION' 'WCOSS_C', 'WCOSS_DELL_P3'] + machines = ['HERA', 'ORION', 'WCOSS_C', 'WCOSS_DELL_P3'] if os.path.exists('/scratch1/NCEPDEV'): return 'HERA' @@ -156,44 +156,44 @@ def detectMachine(): elif os.path.exists('/gpfs/dell2'): return 'WCOSS_DELL_P3' else: - print 'workflow is currently only supported on: %s' % ' '.join(machines) + print(f'workflow is currently only supported on: {machines}') raise NotImplementedError('Cannot auto-detect platform, ABORT!') def get_scheduler(machine): try: return SCHEDULER_MAP[machine] except KeyError: - raise UnknownMachineError('Unknown machine: %s, ABORT!' % machine) + raise UnknownMachineError(f'Unknown machine: {machine}, ABORT!') def create_wf_task(task, cdump='gdas', cycledef=None, envar=None, dependency=None, \ metatask=None, varname=None, varval=None, vardict=None, \ final=False): if metatask is None: - taskstr = '%s' % task + taskstr = f'{task}' else: - taskstr = '%s#%s#' % (task, varname) - metataskstr = '%s%s' % (cdump, metatask) + taskstr = f'{task}#{varname}#' + metataskstr = f'{cdump}{metatask}' metatask_dict = {'metataskname': metataskstr, \ - 'varname': '%s' % varname, \ - 'varval': '%s' % varval, \ + 'varname': f'{varname}', \ + 'varval': f'{varval}', \ 'vardict': vardict} - taskstr = '%s%s' % (cdump, taskstr) + taskstr = f'{cdump}{taskstr}' cycledefstr = cdump if cycledef is None else cycledef - task_dict = {'taskname': '%s' % taskstr, \ - 'cycledef': '%s' % cycledefstr, \ + task_dict = {'taskname': f'{taskstr}', \ + 'cycledef': f'{cycledefstr}', \ 'maxtries': '&MAXTRIES;', \ - 'command': '&JOBS_DIR;/%s.sh' % task, \ - 'jobname': '&PSLOT;_%s_@H' % taskstr, \ + 'command': f'&JOBS_DIR;/{task}.sh', \ + 'jobname': f'&PSLOT;_{taskstr}_@H', \ 'account': '&ACCOUNT;', \ - 'queue': '&QUEUE_%s_%s;' % (task.upper(), cdump.upper()), \ - 'walltime': '&WALLTIME_%s_%s;' % (task.upper(), cdump.upper()), \ - 'native': '&NATIVE_%s_%s;' % (task.upper(), cdump.upper()), \ - 'memory': '&MEMORY_%s_%s;' % (task.upper(), cdump.upper()), \ - 'resources': '&RESOURCES_%s_%s;' % (task.upper(), cdump.upper()), \ - 'log': '&ROTDIR;/logs/@Y@m@d@H/%s.log' % taskstr, \ + 'queue': f'&QUEUE_{task.upper()}_{cdump.upper()};', \ + 'walltime': f'&WALLTIME_{task.upper()}_{cdump.upper()};', \ + 'native': f'&NATIVE_{task.upper()}_{cdump.upper()};', \ + 'memory': f'&MEMORY_{task.upper()}_{cdump.upper()};', \ + 'resources': f'&RESOURCES_{task.upper()}_{cdump.upper()};', \ + 'log': f'&ROTDIR;/logs/@Y@m@d@H/{taskstr}.log', \ 'envar': envar, \ 'dependency': dependency, \ 'final': final} @@ -203,7 +203,7 @@ def create_wf_task(task, cdump='gdas', cycledef=None, envar=None, dependency=Non task_dict['partition'] = '&PARTITION_BATCH;' # Add PARTITION_SERVICE to all service jobs (SLURM) if get_scheduler(detectMachine()) in ['slurm'] and task in ['getic','arch','earc']: - task_dict['partition'] = '&PARTITION_%s_%s;' % (task.upper(),cdump.upper()) + task_dict['partition'] = f'&PARTITION_{task.upper()}_{cdump.upper()};' if metatask is None: task = rocoto.create_task(task_dict) @@ -220,7 +220,7 @@ def create_firstcyc_task(cdump='gdas'): ''' task = 'firstcyc' - taskstr = '%s' % task + taskstr = f'{task}' deps = [] data = '&EXPDIR;/logs/@Y@m@d@H.log' @@ -230,18 +230,18 @@ def create_firstcyc_task(cdump='gdas'): deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) - task_dict = {'taskname': '%s' % taskstr, \ + task_dict = {'taskname': f'{taskstr}' , \ 'cycledef': 'first', \ 'maxtries': '&MAXTRIES;', \ 'final' : True, \ 'command': 'sleep 1', \ - 'jobname': '&PSLOT;_%s_@H' % taskstr, \ + 'jobname': f'&PSLOT;_{taskstr}_@H', \ 'account': '&ACCOUNT;', \ 'queue': '&QUEUE_SERVICE;', \ - 'walltime': '&WALLTIME_ARCH_%s;' % cdump.upper(), \ - 'native': '&NATIVE_ARCH_%s;' % cdump.upper(), \ - 'resources': '&RESOURCES_ARCH_%s;' % cdump.upper(), \ - 'log': '&ROTDIR;/logs/@Y@m@d@H/%s.log' % taskstr, \ + 'walltime': f'&WALLTIME_ARCH_{cdump.upper()};', \ + 'native': f'&NATIVE_ARCH_{cdump.upper()};', \ + 'resources': f'&RESOURCES_ARCH_{cdump.upper()};', \ + 'log': f'&ROTDIR;/logs/@Y@m@d@H/{taskstr}.log', \ 'dependency': dependencies} if get_scheduler(detectMachine()) in ['slurm']: @@ -275,27 +275,33 @@ def get_resources(machine, cfg, task, reservation, cdump='gdas'): scheduler = get_scheduler(machine) - if cdump in ['gfs'] and 'wtime_%s_gfs' % task in cfg.keys(): - wtimestr = cfg['wtime_%s_gfs' % task] + if cdump in ['gfs'] and f'wtime_{task}_gfs' in cfg.keys(): + wtimestr = cfg[f'wtime_{task}_gfs'] else: - wtimestr = cfg['wtime_%s' % task] + wtimestr = cfg[f'wtime_{task}'] ltask = 'eobs' if task in ['eomg'] else task - memory = cfg.get('memory_%s' % ltask, None) + memory = cfg.get(f'memory_{ltask}', None) - if cdump in ['gfs'] and 'npe_%s_gfs' % task in cfg.keys(): - tasks = cfg['npe_%s_gfs' % ltask] + if cdump in ['gfs'] and f'npe_{task}_gfs' in cfg.keys(): + tasks = cfg[f'npe_{ltask}_gfs'] else: - tasks = cfg['npe_%s' % ltask] + try: + tasks = cfg[f'npe_{ltask}'] + except KeyError: + tasks = cfg["',)npe_waveawipsgridded"] - if cdump in ['gfs'] and 'npe_node_%s_gfs' % task in cfg.keys(): - ppn = cfg['npe_node_%s_gfs' % ltask] - else: - ppn = cfg['npe_node_%s' % ltask] + if cdump in ['gfs'] and f'npe_node_{task}_gfs' in cfg.keys(): + ppn = cfg[f'npe_node_{ltask}_gfs'] + else: + ppn = cfg[f'npe_node_{ltask}'] if machine in [ 'WCOSS_DELL_P3', 'HERA', 'ORION']: - threads = cfg['nth_%s' % ltask] + try: + threads = cfg[f'nth_{ltask}'] + except KeyError: + threads = cfg["',)nth_epos"] nodes = np.int(np.ceil(np.float(tasks) / np.float(ppn))) @@ -308,25 +314,25 @@ def get_resources(machine, cfg, task, reservation, cdump='gdas'): if machine in ['HERA', 'ORION', 'WCOSS_C', 'WCOSS_DELL_P3']: if machine in ['HERA', 'ORION']: - resstr = '%d:ppn=%d:tpp=%d' % (nodes, ppn, threads) + resstr = f'{nodes}:ppn={ppn}:tpp={threads}' else: - resstr = '%d:ppn=%d' % (nodes, ppn) + resstr = f'{nodes}:ppn={ppn}' if machine in ['WCOSS_C'] and task in ['arch', 'earc', 'getic']: resstr += '' if machine in ['WCOSS_DELL_P3']: if not reservation in ['NONE']: - natstr = "-U %s -R 'affinity[core(%d)]'" % (reservation, threads) + natstr = f"-U {reservation} -R 'affinity[core({threads})]'" else: - natstr = "-R 'affinity[core(%d)]'" % (threads) + natstr = f"-R 'affinity[core({threads})]'" if task in ['arch', 'earc', 'getic']: natstr = "-R 'affinity[core(1)]'" elif machine in ['WCOSS']: - resstr = '%d' % tasks + resstr = f'{tasks}' if task in ['arch', 'earc', 'getic']: queuestr = '&QUEUE;' if scheduler in ['slurm'] else '&QUEUE_SERVICE;' @@ -344,7 +350,7 @@ def create_crontab(base, cronint=5): # No point creating a crontab if rocotorun is not available. rocotoruncmd = find_executable('rocotorun') if rocotoruncmd is None: - print 'Failed to find rocotorun, crontab will not be created' + print('Failed to find rocotorun, crontab will not be created') return # Leaving the code for a wrapper around crontab file if needed again later @@ -373,13 +379,13 @@ def create_crontab(base, cronint=5): # # else: - rocotorunstr = '%s -d %s/%s.db -w %s/%s.xml' % (rocotoruncmd, base['EXPDIR'], base['PSLOT'], base['EXPDIR'], base['PSLOT']) - cronintstr = '*/%d * * * *' % cronint + rocotorunstr = f'''{rocotoruncmd} -d {base['EXPDIR']}/{base['PSLOT']}.db -w {base['EXPDIR']}/{base['PSLOT']}.xml''' + cronintstr = f'*/{cronint} * * * *' # On WCOSS, rocoto module needs to be loaded everytime cron runs if base['machine'] in ['WCOSS']: rocotoloadstr = '. /usrx/local/Modules/default/init/sh; module use -a /usrx/local/emc_rocoto/modulefiles; module load rocoto/1.3.0rc2)' - rocotorunstr = '(%s %s)' % (rocotoloadstr, rocotorunstr) + rocotorunstr = f'({rocotoloadstr} {rocotorunstr})' try: REPLYTO = os.environ['REPLYTO'] @@ -389,13 +395,13 @@ def create_crontab(base, cronint=5): strings = [] strings.append('\n') - strings.append('#################### %s ####################\n' % base['PSLOT']) - strings.append('MAILTO="%s"\n' % REPLYTO) - strings.append('%s %s\n' % (cronintstr, rocotorunstr)) + strings.append(f'''#################### {base['PSLOT']} ####################\n''') + strings.append(f'MAILTO="{REPLYTO}"\n') + strings.append(f'{cronintstr} {rocotorunstr}\n') strings.append('#################################################################\n') strings.append('\n') - fh = open(os.path.join(base['EXPDIR'], '%s.crontab' % base['PSLOT']), 'w') + fh = open(os.path.join(base['EXPDIR'], f'''{base['PSLOT']}.crontab'''), 'w') fh.write(''.join(strings)) fh.close() From e133e1fb865317aa4cd5874c22c027f0d077a93b Mon Sep 17 00:00:00 2001 From: JianKuang-UMD <51758200+JianKuang-UMD@users.noreply.github.com> Date: Tue, 27 Jul 2021 19:36:14 -0400 Subject: [PATCH 07/33] Update ush/forecast_det.sh Co-authored-by: Rahul Mahajan --- ush/forecast_det.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/forecast_det.sh b/ush/forecast_det.sh index 4b152019d29..75fbf9ab9f5 100755 --- a/ush/forecast_det.sh +++ b/ush/forecast_det.sh @@ -1,7 +1,7 @@ #! /bin/sh ##### -## "forecast_def.sh" +## "forecast_det.sh" ## This script sets value of all variables ## ## This is the child script of ex-global forecast, From 7473e3857d30ad05271d78770a57c1c3162174a7 Mon Sep 17 00:00:00 2001 From: jikuang Date: Tue, 27 Jul 2021 20:56:00 -0500 Subject: [PATCH 08/33] 2-space update for exglobal_forecast.sh; forecast_predet, det and postdet --- scripts/exglobal_forecast.sh | 96 +- ush/forecast_det.sh | 101 ++- ush/forecast_postdet.sh | 1647 +++++++++++++++++----------------- ush/forecast_predet.sh | 538 +++++------ 4 files changed, 1184 insertions(+), 1198 deletions(-) diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 9efed80ef46..7290c1d7e0b 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -78,8 +78,8 @@ VERBOSE=${VERBOSE:-"YES"} if [ $VERBOSE = "YES" ] ; then - echo $(date) EXECUTING $0 $* >&2 - set -x + echo $(date) EXECUTING $0 $* >&2 + set -x fi SCRIPTDIR=$(dirname $(readlink -f "$0") )/../ush @@ -126,10 +126,10 @@ common_predet echo $RUN case $RUN in - 'data') DATM_predet;; - 'gfs') FV3_GFS_predet;; - 'gdas') FV3_GFS_predet;; - 'gefs') FV3_GEFS_predet;; + 'data') DATM_predet;; + 'gfs') FV3_GFS_predet;; + 'gdas') FV3_GFS_predet;; + 'gefs') FV3_GEFS_predet;; esac [[ $cplflx = .true. ]] && MOM6_predet #[[ $cplwav = .true. ]] && WW3_predet #no WW3_predet at this time @@ -137,9 +137,9 @@ esac [[ $cplchem = .true. ]] && GSD_predet case $RUN in - 'gfs') FV3_GFS_det;; - 'gdas') FV3_GFS_det;; - 'gefs') FV3_GEFS_det;; + 'gfs') FV3_GFS_det;; + 'gdas') FV3_GFS_det;; + 'gefs') FV3_GEFS_det;; esac #no run type determination for data atmosphere [[ $cplflx = .true. ]] && MOM6_det [[ $cplwav = .true. ]] && WW3_det @@ -151,10 +151,10 @@ echo "MAIN: RUN Type Determined" echo "MAIN: Post-determination set up of run type" echo $RUN case $RUN in - 'data') DATM_postdet;; - 'gfs') FV3_GFS_postdet;; - 'gdas') FV3_GFS_postdet;; - 'gefs') FV3_GEFS_postdet;; + 'data') DATM_postdet;; + 'gfs') FV3_GFS_postdet;; + 'gdas') FV3_GFS_postdet;; + 'gefs') FV3_GEFS_postdet;; esac #no post determination set up for data atmosphere [[ $cplflx = .true. ]] && MOM6_postdet [[ $cplwav = .true. ]] && WW3_postdet @@ -164,10 +164,10 @@ echo "MAIN: Post-determination set up of run type finished" echo "MAIN: Writing name lists and model configuration" case $RUN in - 'data') DATM_nml;; - 'gfs') FV3_GFS_nml;; - 'gdas') FV3_GFS_nml;; - 'gefs') FV3_GEFS_nml;; + 'data') DATM_nml;; + 'gfs') FV3_GFS_nml;; + 'gdas') FV3_GFS_nml;; + 'gefs') FV3_GEFS_nml;; esac #no namelist for data atmosphere [[ $cplflx = .true. ]] && MOM6_nml [[ $cplwav = .true. ]] && WW3_nml @@ -176,10 +176,10 @@ esac #no namelist for data atmosphere [[ $cplgocart = .true. ]] && GOCART_rc case $RUN in - 'data') DATM_model_configure;; - 'gfs') FV3_model_configure;; - 'gdas') FV3_model_configure;; - 'gefs') FV3_model_configure;; + 'data') DATM_model_configure;; + 'gfs') FV3_model_configure;; + 'gdas') FV3_model_configure;; + 'gefs') FV3_model_configure;; esac echo "MAIN: Name lists and model configuration written" @@ -191,48 +191,48 @@ echo "MAIN: NEMS configured" # run the executable if [ $esmf_profile ]; then - export ESMF_RUNTIME_PROFILE=ON - export ESMF_RUNTIME_PROFILE_OUTPUT=SUMMARY + export ESMF_RUNTIME_PROFILE=ON + export ESMF_RUNTIME_PROFILE_OUTPUT=SUMMARY fi if [ $machine != 'sandbox' ]; then - $NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. - export OMP_NUM_THREADS=$NTHREADS_FV3 - $APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 - export ERR=$? - export err=$ERR - $ERRSCRIPT || exit $err + $NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. + export OMP_NUM_THREADS=$NTHREADS_FV3 + $APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 + export ERR=$? + export err=$ERR + $ERRSCRIPT || exit $err else - echo "MAIN: mpirun launch here" + echo "MAIN: mpirun launch here" fi if [ $machine != 'sandbox' ]; then - case $RUN in - 'data') data_out_Data_ATM;; - 'gfs') data_out_GFS;; - 'gdas') data_out_GFS;; - 'gefs') data_out_GEFS;; - esac - [[ $cplflx = .true. ]] && MOM6_out - [[ $cplwav = .true. ]] && WW3_out - [[ $cplice = .true. ]] && CICE_out - [[ $cplchem = .true. ]] && GSD_out - [[ $esmf_profile = .true. ]] && CPL_out + case $RUN in + 'data') data_out_Data_ATM;; + 'gfs') data_out_GFS;; + 'gdas') data_out_GFS;; + 'gefs') data_out_GEFS;; + esac + [[ $cplflx = .true. ]] && MOM6_out + [[ $cplwav = .true. ]] && WW3_out + [[ $cplice = .true. ]] && CICE_out + [[ $cplchem = .true. ]] && GSD_out + [[ $esmf_profile = .true. ]] && CPL_out else - echo "MAIN: Running on sandbox mode, no output linking" + echo "MAIN: Running on sandbox mode, no output linking" fi echo "MAIN: Output copied to COMROT" #------------------------------------------------------------------ if [ $VERBOSE = "YES" ] ; then - echo $(date) EXITING $0 with return code $err >&2 + echo $(date) EXITING $0 with return code $err >&2 fi if [ $err != 0 ]; then - echo "MAIN: $confignamevarfornems Forecast failed" - exit $err + echo "MAIN: $confignamevarfornems Forecast failed" + exit $err else - echo "MAIN: $confignamevarfornems Forecast completed at normal status" - if [ $KEEPDATA != "YES" ]; then rm -rf $DATA; fi - exit 0 + echo "MAIN: $confignamevarfornems Forecast completed at normal status" + if [ $KEEPDATA != "YES" ]; then rm -rf $DATA; fi + exit 0 fi diff --git a/ush/forecast_det.sh b/ush/forecast_det.sh index 75fbf9ab9f5..2dac45f527e 100755 --- a/ush/forecast_det.sh +++ b/ush/forecast_det.sh @@ -13,70 +13,69 @@ # Cycling and forecast hour specific parameters FV3_GFS_det(){ - #------------------------------------------------------- - # warm start? - warm_start=${warm_start:-".false."} - read_increment=${read_increment:-".false."} - res_latlon_dynamics="''" + #------------------------------------------------------- + # warm start? + warm_start=${warm_start:-".false."} + read_increment=${read_increment:-".false."} + res_latlon_dynamics="''" - # Determine if this is a warm start or cold start - if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then - export warm_start=".true." - fi + # Determine if this is a warm start or cold start + if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then + export warm_start=".true." + fi - # turn IAU off for cold start - DOIAU_coldstart=${DOIAU_coldstart:-"NO"} - if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then - export DOIAU="NO" - echo "turning off IAU since warm_start = $warm_start" - DOIAU_coldstart="YES" - IAU_OFFSET=0 - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc - fi + # turn IAU off for cold start + DOIAU_coldstart=${DOIAU_coldstart:-"NO"} + if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then + export DOIAU="NO" + echo "turning off IAU since warm_start = $warm_start" + DOIAU_coldstart="YES" + IAU_OFFSET=0 + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc + fi - #------------------------------------------------------- - # determine if restart IC exists to continue from a previous forecast - RERUN="NO" - filecount=$(find $RSTDIR_ATM -type f | wc -l) - if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then - reverse=$(echo "${restart_interval[@]} " | tac -s ' ') - for xfh in $reverse ; do - yfh=$((xfh-(IAU_OFFSET/2))) - SDATE=$($NDATE +$yfh $CDATE) - PDYS=$(echo $SDATE | cut -c1-8) - cycs=$(echo $SDATE | cut -c9-10) - flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res - flag2=$RSTDIR_ATM/coupler.res - if [ -s $flag1 ]; then - CDATE_RST=$SDATE - [[ $RERUN = "YES" ]] && break - mv $flag1 ${flag1}.old - if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi - RERUN="YES" - [[ $xfh = $rst_invt1 ]] && RERUN="NO" - fi - done - fi - - #------------------------------------------------------- + #------------------------------------------------------- + # determine if restart IC exists to continue from a previous forecast + RERUN="NO" + filecount=$(find $RSTDIR_ATM -type f | wc -l) + if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then + reverse=$(echo "${restart_interval[@]} " | tac -s ' ') + for xfh in $reverse ; do + yfh=$((xfh-(IAU_OFFSET/2))) + SDATE=$($NDATE +$yfh $CDATE) + PDYS=$(echo $SDATE | cut -c1-8) + cycs=$(echo $SDATE | cut -c9-10) + flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res + flag2=$RSTDIR_ATM/coupler.res + if [ -s $flag1 ]; then + CDATE_RST=$SDATE + [[ $RERUN = "YES" ]] && break + mv $flag1 ${flag1}.old + if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi + RERUN="YES" + [[ $xfh = $rst_invt1 ]] && RERUN="NO" + fi + done + fi + #------------------------------------------------------- } FV3_GEFS_det(){ - echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GEFS" + echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GEFS" } WW3_det(){ - echo "SUB ${FUNCNAME[0]}: Run type determination for WW3" + echo "SUB ${FUNCNAME[0]}: Run type determination for WW3" } CICE_det(){ - echo "SUB ${FUNCNAME[0]}: Run type determination for CICE" + echo "SUB ${FUNCNAME[0]}: Run type determination for CICE" } MOM6_det(){ - echo "SUB ${FUNCNAME[0]}: Run type determination for MOM6" + echo "SUB ${FUNCNAME[0]}: Run type determination for MOM6" } diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index e508dad2748..a33927e3eb0 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -12,897 +12,884 @@ ##### FV3_GEFS_postdet(){ - echo SUB ${FUNCNAME[0]}: Linking input data for FV3 $RUN - # soft link commands insert here + echo SUB ${FUNCNAME[0]}: Linking input data for FV3 $RUN + # soft link commands insert here } DATM_postdet(){ - ###################################################################### - # Link DATM inputs (ie forcing files) # - ###################################################################### - - #TODO: This should be some loop through CDATE-> CDATE+ FORECAST length - #and get input from either CFSR or GEFS or Whatever... - #Currently assumes you only need the month of DATM input for IC date - #DATMINPUTDIR should be machine specific - - # DATM forcing file name convention is ${DATM_FILENAME_BASE}.$YYYYMMDDHH.nc - echo "Link DATM forcing files" - DATMINPUTDIR="/scratch2/NCEPDEV/marineda/DATM_INPUT/CFSR/${SYEAR}${SMONTH}" - $NLN -sf ${DATMINPUTDIR}/${DATM_FILENAME_BASE}*.nc $DATA/DATM_INPUT/ + ###################################################################### + # Link DATM inputs (ie forcing files) # + ###################################################################### + + #TODO: This should be some loop through CDATE-> CDATE+ FORECAST length + #and get input from either CFSR or GEFS or Whatever... + #Currently assumes you only need the month of DATM input for IC date + #DATMINPUTDIR should be machine specific + + # DATM forcing file name convention is ${DATM_FILENAME_BASE}.$YYYYMMDDHH.nc + echo "Link DATM forcing files" + DATMINPUTDIR="/scratch2/NCEPDEV/marineda/DATM_INPUT/CFSR/${SYEAR}${SMONTH}" + $NLN -sf ${DATMINPUTDIR}/${DATM_FILENAME_BASE}*.nc $DATA/DATM_INPUT/ } FV3_GFS_postdet(){ - echo "SUB ${FUNCNAME[0]}: $RERUN and $warm_start determined for $RUN" - - echo $warm_start - echo $RERUN - - #------------------------------------------------------- - if [ $warm_start = ".true." -o $RERUN = "YES" ]; then - #------------------------------------------------------- - #............................. - if [ $RERUN = "NO" ]; then - #............................. - - # Link all (except sfc_data) restart files from $gmemdir - for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsuf=$(echo $file2 | cut -d. -f1) - if [ $fsuf != "sfc_data" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Link sfcanl_data restart files from $memdir - for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsufanl=$(echo $file2 | cut -d. -f1) - if [ $fsufanl = "sfcanl_data" ]; then - file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Need a coupler.res when doing IAU - if [ $DOIAU = "YES" ]; then - rm -f $DATA/INPUT/coupler.res - cat >> $DATA/INPUT/coupler.res << EOF - 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) - ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second - ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second + echo "SUB ${FUNCNAME[0]}: $RERUN and $warm_start determined for $RUN" + + echo $warm_start + echo $RERUN + + #------------------------------------------------------- + if [ $warm_start = ".true." -o $RERUN = "YES" ]; then + #------------------------------------------------------- + #............................. + if [ $RERUN = "NO" ]; then + #............................. + + # Link all (except sfc_data) restart files from $gmemdir + for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsuf=$(echo $file2 | cut -d. -f1) + if [ $fsuf != "sfc_data" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Link sfcanl_data restart files from $memdir + for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) # remove the date from file + fsufanl=$(echo $file2 | cut -d. -f1) + if [ $fsufanl = "sfcanl_data" ]; then + file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") + $NLN $file $DATA/INPUT/$file2 + fi + done + + # Need a coupler.res when doing IAU + if [ $DOIAU = "YES" ]; then + rm -f $DATA/INPUT/coupler.res + cat >> $DATA/INPUT/coupler.res << EOF + 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) + ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second + ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second EOF - fi - - # Link increments - if [ $DOIAU = "YES" ]; then - for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do - incfhr=$(printf %03i $i) - if [ $incfhr = "006" ]; then - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc - fi - if [ ! -f $increment_file ]; then - echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" - echo "Abort!" - exit 1 - fi - $NLN $increment_file $DATA/INPUT/fv_increment$i.nc - IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" - done - read_increment=".false." - res_latlon_dynamics="" - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc - if [ -f $increment_file ]; then - $NLN $increment_file $DATA/INPUT/fv3_increment.nc - read_increment=".true." - res_latlon_dynamics="fv3_increment.nc" - fi - fi - - #............................. - else ##RERUN - - export warm_start=".true." - PDYT=$(echo $CDATE_RST | cut -c1-8) - cyct=$(echo $CDATE_RST | cut -c9-10) - for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) - $NLN $file $DATA/INPUT/$file2 - done - - hour_rst=`$NHOUR $CDATE_RST $CDATE` - IAU_FHROT=$((IAU_OFFSET+hour_rst)) - if [ $DOIAU = "YES" ]; then - IAUFHRS=-1 - IAU_DELTHRS=0 - IAU_INC_FILES="''" - fi - - rst_list_rerun="" - xfh=$restart_interval_gfs - while [ $xfh -le $FHMAX_GFS ]; do - rst_list_rerun="$rst_list_rerun $xfh" - xfh=$((xfh+restart_interval_gfs)) - done - restart_interval="$rst_list_rerun" - - fi - #............................. - - else ## cold start - - for file in $(ls $memdir/INPUT/*.nc); do - file2=$(echo $(basename $file)) - fsuf=$(echo $file2 | cut -c1-3) - if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - - fi - - if [ $machine = 'sandbox' ]; then - echo SUB ${FUNCNAME[0]}: Checking initial condition, overriden in sandbox mode! - else - nfiles=$(ls -1 $DATA/INPUT/* | wc -l) - if [ $nfiles -le 0 ]; then - echo SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT! - msg=”"SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT!" - postmsg "$jlogfile" "$msg" - exit 1 - fi - fi - - # If doing IAU, change forecast hours - if [[ "$DOIAU" = "YES" ]]; then - FHMAX=$((FHMAX+6)) - if [ $FHMAX_HF -gt 0 ]; then - FHMAX_HF=$((FHMAX_HF+6)) - fi - fi - - #-------------------------------------------------------------------------- - # Grid and orography data - for n in $(seq 1 $ntiles); do - $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc - $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc - done - - if [ $cplflx = ".false." ] ; then - $NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc - else - $NLN $FIXfv3/${CASE}_mosaic.nc $DATA/INPUT/${CASE}_mosaic.nc - fi - - # GFS standard input data - - IALB=${IALB:-1} - IEMS=${IEMS:-1} - ISOL=${ISOL:-2} - IAER=${IAER:-111} - ICO2=${ICO2:-2} - - if [ ${new_o3forc:-YES} = YES ]; then - O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 - else - O3FORC=global_o3prdlos.f77 - fi - H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} - #### - # copy CCN_ACTIVATE.BIN for Thompson microphysics - if [ $imp_physics -eq 8 ]; then - $NCP $FV3INP/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN - #### - $NCP $FIX_AM/freezeH2O.dat . - $NCP $FIX_AM/qr_acr_qg.dat . - $NCP $FIX_AM/qr_acr_qs.dat . - sleep 60 - fi - $NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 - $NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 - $NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt - $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt - - ## merra2 aerosol climo - for n in 01 02 03 04 05 06 07 08 09 10 11 12; do - $NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc + fi + + # Link increments + if [ $DOIAU = "YES" ]; then + for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do + incfhr=$(printf %03i $i) + if [ $incfhr = "006" ]; then + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc + fi + if [ ! -f $increment_file ]; then + echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" + echo "Abort!" + exit 1 + fi + $NLN $increment_file $DATA/INPUT/fv_increment$i.nc + IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" done - $NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat - $NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat - $NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat - $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat - $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat - - $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt - $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt - if [ $ICO2 -gt 0 ]; then - for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done - fi - - $NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat - if [ $IAER -gt 0 ] ; then - for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done - fi - - # inline post fix files - if [ $WRITE_DOPOST = ".true." ]; then - $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag - $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt - $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt - $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new - fi - - #------------------------------------------------------------------ - # changeable parameters - # dycore definitions - res=$(echo $CASE |cut -c2-5) - resp=$((res+1)) - npx=$resp - npy=$resp - npz=$((LEVS-1)) - io_layout="1,1" - #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - - # spectral truncation and regular grid resolution based on FV3 resolution - JCAP_CASE=$((2*res-2)) - LONB_CASE=$((4*res)) - LATB_CASE=$((2*res)) - - JCAP=${JCAP:-$JCAP_CASE} - LONB=${LONB:-$LONB_CASE} - LATB=${LATB:-$LATB_CASE} - - LONB_IMO=${LONB_IMO:-$LONB_CASE} - LATB_JMO=${LATB_JMO:-$LATB_CASE} - - # Fix files - FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} - FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} - FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} - FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} - FNZORC=${FNZORC:-"igbp"} - FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} - FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} - FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} - FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} - FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} - FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} - FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} - FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} - FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} - - # If the appropriate resolution fix file is not present, use the highest resolution available (T1534) - [[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" - [[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" - [[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" - [[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" - [[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" - - # NSST Options - # nstf_name contains the NSST related parameters - # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled - # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, - # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON - # nstf_name(4) : ZSEA1 (in mm) : 0 - # nstf_name(5) : ZSEA2 (in mm) : 0 - # nst_anl : .true. or .false., NSST analysis over lake - NST_MODEL=${NST_MODEL:-0} - NST_SPINUP=${NST_SPINUP:-0} - NST_RESV=${NST_RESV-0} - ZSEA1=${ZSEA1:-0} - ZSEA2=${ZSEA2:-0} - nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} - nst_anl=${nst_anl:-".false."} - - # blocking factor used for threading and general physics performance - #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` - #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` - #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi - blocksize=${blocksize:-32} - - # the pre-conditioning of the solution - # =0 implies no pre-conditioning - # >0 means new adiabatic pre-conditioning - # <0 means older adiabatic pre-conditioning - na_init=${na_init:-1} - [[ $warm_start = ".true." ]] && na_init=0 - - # variables for controlling initialization of NCEP/NGGPS ICs - filtered_terrain=${filtered_terrain:-".true."} - gfs_dwinds=${gfs_dwinds:-".true."} - - # various debug options - no_dycore=${no_dycore:-".false."} - dycore_only=${adiabatic:-".false."} - chksum_debug=${chksum_debug:-".false."} - print_freq=${print_freq:-6} - - if [ ${TYPE} = "nh" ]; then # non-hydrostatic options - hydrostatic=".false." - phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation - use_hydro_pressure=".false." # use hydrostatic pressure for physics - if [ $warm_start = ".true." ]; then - make_nh=".false." # restarts contain non-hydrostatic state - else - make_nh=".true." # re-initialize non-hydrostatic state - fi - - else # hydrostatic options - hydrostatic=".true." - phys_hydrostatic=".false." # ignored when hydrostatic = T - use_hydro_pressure=".false." # ignored when hydrostatic = T - make_nh=".false." # running in hydrostatic mode + read_increment=".false." + res_latlon_dynamics="" + else + increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc + if [ -f $increment_file ]; then + $NLN $increment_file $DATA/INPUT/fv3_increment.nc + read_increment=".true." + res_latlon_dynamics="fv3_increment.nc" fi - - # Conserve total energy as heat globally - consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics - - # time step parameters in FV3 - k_split=${k_split:-2} - n_split=${n_split:-6} - - if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options - - d_con=${d_con_mono:-"0."} - do_vort_damp=".false." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_mono:-"10"} - hord_xx=${hord_xx_nh_mono:-"10"} - else # hydrostatic - hord_mt=${hord_mt_hydro_mono:-"10"} - hord_xx=${hord_xx_hydro_mono:-"10"} - fi - - else # non-monotonic options - - d_con=${d_con_nonmono:-"1."} - do_vort_damp=".true." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_nonmono:-"5"} - hord_xx=${hord_xx_nh_nonmono:-"5"} - else # hydrostatic - hord_mt=${hord_mt_hydro_nonmono:-"10"} - hord_xx=${hord_xx_hydro_nonmono:-"10"} - fi - - fi - - if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then - vtdm4=${vtdm4_nh_nonmono:-"0.06"} - else - vtdm4=${vtdm4:-"0.05"} - fi - - if [ $warm_start = ".true." ]; then # warm start from restart file - - nggps_ic=".false." - ncep_ic=".false." - external_ic=".false." - mountain=".true." - if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts - res_latlon_dynamics="fv3_increment.nc" - else - res_latlon_dynamics='""' - fi - - else # CHGRES'd GFS analyses - - nggps_ic=${nggps_ic:-".true."} - ncep_ic=${ncep_ic:-".false."} - external_ic=".true." - mountain=".false." - read_increment=".false." - res_latlon_dynamics='""' - - fi - - # Stochastic Physics Options - if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then - ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) - ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) - ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) - else - ISEED=${ISEED:-0} - fi - DO_SKEB=${DO_SKEB:-".false."} - DO_SPPT=${DO_SPPT:-".false."} - DO_SHUM=${DO_SHUM:-".false."} - JCAP_STP=${JCAP_STP:-$JCAP_CASE} - LONB_STP=${LONB_STP:-$LONB_CASE} - LATB_STP=${LATB_STP:-$LATB_CASE} - - #------------------------------------------------------------------ - # make symbolic links to write forecast files directly in memdir - cd $DATA - if [ $RUN_CCPP = "YES" ]; then - if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then - $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN - $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat - $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat - $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat - fi - fi - - affix="nc" - if [ "$OUTPUT_FILE" = "nemsio" ]; then - affix="nemsio" - fi - - if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then - fhr=$FHMIN - while [ $fhr -le $FHMAX ]; do - FH3=$(printf %03i $fhr) - FH2=$(printf %02i $fhr) - atmi=atmf${FH3}.$affix - sfci=sfcf${FH3}.$affix - logi=logf${FH3} - pgbi=GFSPRS.GrbF${FH2} - flxi=GFSFLX.GrbF${FH2} - atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix - sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix - logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt - pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} - flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 - eval $NLN $atmo $atmi - eval $NLN $sfco $sfci - eval $NLN $logo $logi - if [ $WRITE_DOPOST = ".true." ]; then - eval $NLN $pgbo $pgbi - eval $NLN $flxo $flxi - fi - FHINC=$FHOUT - if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then - FHINC=$FHOUT_HF - fi - fhr=$((fhr+FHINC)) - done - else - for n in $(seq 1 $ntiles); do - eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc - eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc - eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc - eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc - eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc - done - fi + fi + + #............................. + else ##RERUN + export warm_start=".true." + PDYT=$(echo $CDATE_RST | cut -c1-8) + cyct=$(echo $CDATE_RST | cut -c9-10) + for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do + file2=$(echo $(basename $file)) + file2=$(echo $file2 | cut -d. -f3-) + $NLN $file $DATA/INPUT/$file2 + done + + hour_rst=`$NHOUR $CDATE_RST $CDATE` + IAU_FHROT=$((IAU_OFFSET+hour_rst)) + if [ $DOIAU = "YES" ]; then + IAUFHRS=-1 + IAU_DELTHRS=0 + IAU_INC_FILES="''" + fi + + rst_list_rerun="" + xfh=$restart_interval_gfs + while [ $xfh -le $FHMAX_GFS ]; do + rst_list_rerun="$rst_list_rerun $xfh" + xfh=$((xfh+restart_interval_gfs)) + done + restart_interval="$rst_list_rerun" + fi + #............................. + + else ## cold start + for file in $(ls $memdir/INPUT/*.nc); do + file2=$(echo $(basename $file)) + fsuf=$(echo $file2 | cut -c1-3) + if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then + $NLN $file $DATA/INPUT/$file2 + fi + done + + fi + + if [ $machine = 'sandbox' ]; then + echo SUB ${FUNCNAME[0]}: Checking initial condition, overriden in sandbox mode! + else + nfiles=$(ls -1 $DATA/INPUT/* | wc -l) + if [ $nfiles -le 0 ]; then + echo SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT! + msg=”"SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT!" + postmsg "$jlogfile" "$msg" + exit 1 + fi + fi + + # If doing IAU, change forecast hours + if [[ "$DOIAU" = "YES" ]]; then + FHMAX=$((FHMAX+6)) + if [ $FHMAX_HF -gt 0 ]; then + FHMAX_HF=$((FHMAX_HF+6)) + fi + fi + + #-------------------------------------------------------------------------- + # Grid and orography data + for n in $(seq 1 $ntiles); do + $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc + $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc + done + + if [ $cplflx = ".false." ] ; then + $NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc + else + $NLN $FIXfv3/${CASE}_mosaic.nc $DATA/INPUT/${CASE}_mosaic.nc + fi + + # GFS standard input data + + IALB=${IALB:-1} + IEMS=${IEMS:-1} + ISOL=${ISOL:-2} + IAER=${IAER:-111} + ICO2=${ICO2:-2} + + if [ ${new_o3forc:-YES} = YES ]; then + O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 + else + O3FORC=global_o3prdlos.f77 + fi + H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} + #### + # copy CCN_ACTIVATE.BIN for Thompson microphysics + if [ $imp_physics -eq 8 ]; then + $NCP $FV3INP/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + #### + $NCP $FIX_AM/freezeH2O.dat . + $NCP $FIX_AM/qr_acr_qg.dat . + $NCP $FIX_AM/qr_acr_qs.dat . + sleep 60 + fi + $NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 + $NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 + $NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt + $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt + + ## merra2 aerosol climo + for n in 01 02 03 04 05 06 07 08 09 10 11 12; do + $NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc + done + $NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat + $NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat + $NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat + $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat + $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat + + $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt + $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt + if [ $ICO2 -gt 0 ]; then + for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done + fi + + $NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat + if [ $IAER -gt 0 ] ; then + for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do + $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") + done + fi + + # inline post fix files + if [ $WRITE_DOPOST = ".true." ]; then + $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag + $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt + $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt + $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new + fi + + #------------------------------------------------------------------ + # changeable parameters + # dycore definitions + res=$(echo $CASE |cut -c2-5) + resp=$((res+1)) + npx=$resp + npy=$resp + npz=$((LEVS-1)) + io_layout="1,1" + #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) + + # spectral truncation and regular grid resolution based on FV3 resolution + JCAP_CASE=$((2*res-2)) + LONB_CASE=$((4*res)) + LATB_CASE=$((2*res)) + + JCAP=${JCAP:-$JCAP_CASE} + LONB=${LONB:-$LONB_CASE} + LATB=${LATB:-$LATB_CASE} + + LONB_IMO=${LONB_IMO:-$LONB_CASE} + LATB_JMO=${LATB_JMO:-$LATB_CASE} + + # Fix files + FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} + FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} + FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} + FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} + FNZORC=${FNZORC:-"igbp"} + FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} + FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} + FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} + FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} + FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} + FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} + FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} + FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} + FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} + + # If the appropriate resolution fix file is not present, use the highest resolution available (T1534) + [[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" + [[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" + [[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" + [[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" + [[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" + + # NSST Options + # nstf_name contains the NSST related parameters + # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled + # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, + # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON + # nstf_name(4) : ZSEA1 (in mm) : 0 + # nstf_name(5) : ZSEA2 (in mm) : 0 + # nst_anl : .true. or .false., NSST analysis over lake + NST_MODEL=${NST_MODEL:-0} + NST_SPINUP=${NST_SPINUP:-0} + NST_RESV=${NST_RESV-0} + ZSEA1=${ZSEA1:-0} + ZSEA2=${ZSEA2:-0} + nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} + nst_anl=${nst_anl:-".false."} + + # blocking factor used for threading and general physics performance + #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` + #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi + blocksize=${blocksize:-32} + + # the pre-conditioning of the solution + # =0 implies no pre-conditioning + # >0 means new adiabatic pre-conditioning + # <0 means older adiabatic pre-conditioning + na_init=${na_init:-1} + [[ $warm_start = ".true." ]] && na_init=0 + + # variables for controlling initialization of NCEP/NGGPS ICs + filtered_terrain=${filtered_terrain:-".true."} + gfs_dwinds=${gfs_dwinds:-".true."} + + # various debug options + no_dycore=${no_dycore:-".false."} + dycore_only=${adiabatic:-".false."} + chksum_debug=${chksum_debug:-".false."} + print_freq=${print_freq:-6} + + if [ ${TYPE} = "nh" ]; then # non-hydrostatic options + hydrostatic=".false." + phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation + use_hydro_pressure=".false." # use hydrostatic pressure for physics + if [ $warm_start = ".true." ]; then + make_nh=".false." # restarts contain non-hydrostatic state + else + make_nh=".true." # re-initialize non-hydrostatic state + fi + + else # hydrostatic options + hydrostatic=".true." + phys_hydrostatic=".false." # ignored when hydrostatic = T + use_hydro_pressure=".false." # ignored when hydrostatic = T + make_nh=".false." # running in hydrostatic mode + fi + + # Conserve total energy as heat globally + consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics + + # time step parameters in FV3 + k_split=${k_split:-2} + n_split=${n_split:-6} + + if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options + d_con=${d_con_mono:-"0."} + do_vort_damp=".false." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_mono:-"10"} + hord_xx=${hord_xx_nh_mono:-"10"} + else # hydrostatic + hord_mt=${hord_mt_hydro_mono:-"10"} + hord_xx=${hord_xx_hydro_mono:-"10"} + fi + + else # non-monotonic options + d_con=${d_con_nonmono:-"1."} + do_vort_damp=".true." + if [ ${TYPE} = "nh" ]; then # non-hydrostatic + hord_mt=${hord_mt_nh_nonmono:-"5"} + hord_xx=${hord_xx_nh_nonmono:-"5"} + else # hydrostatic + hord_mt=${hord_mt_hydro_nonmono:-"10"} + hord_xx=${hord_xx_hydro_nonmono:-"10"} + fi + fi + + if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then + vtdm4=${vtdm4_nh_nonmono:-"0.06"} + else + vtdm4=${vtdm4:-"0.05"} + fi + + if [ $warm_start = ".true." ]; then # warm start from restart file + nggps_ic=".false." + ncep_ic=".false." + external_ic=".false." + mountain=".true." + if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts + res_latlon_dynamics="fv3_increment.nc" + else + res_latlon_dynamics='""' + fi + + else # CHGRES'd GFS analyses + nggps_ic=${nggps_ic:-".true."} + ncep_ic=${ncep_ic:-".false."} + external_ic=".true." + mountain=".false." + read_increment=".false." + res_latlon_dynamics='""' + fi + + # Stochastic Physics Options + if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then + ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) + ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) + ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) + else + ISEED=${ISEED:-0} + fi + DO_SKEB=${DO_SKEB:-".false."} + DO_SPPT=${DO_SPPT:-".false."} + DO_SHUM=${DO_SHUM:-".false."} + JCAP_STP=${JCAP_STP:-$JCAP_CASE} + LONB_STP=${LONB_STP:-$LONB_CASE} + LATB_STP=${LATB_STP:-$LATB_CASE} + + #------------------------------------------------------------------ + # make symbolic links to write forecast files directly in memdir + cd $DATA + if [ $RUN_CCPP = "YES" ]; then + if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then + $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat + $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat + $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat + fi + fi + + affix="nc" + if [ "$OUTPUT_FILE" = "nemsio" ]; then + affix="nemsio" + fi + + if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then + fhr=$FHMIN + while [ $fhr -le $FHMAX ]; do + FH3=$(printf %03i $fhr) + FH2=$(printf %02i $fhr) + atmi=atmf${FH3}.$affix + sfci=sfcf${FH3}.$affix + logi=logf${FH3} + pgbi=GFSPRS.GrbF${FH2} + flxi=GFSFLX.GrbF${FH2} + atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix + sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix + logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt + pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} + flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 + eval $NLN $atmo $atmi + eval $NLN $sfco $sfci + eval $NLN $logo $logi + if [ $WRITE_DOPOST = ".true." ]; then + eval $NLN $pgbo $pgbi + eval $NLN $flxo $flxi + fi + FHINC=$FHOUT + if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then + FHINC=$FHOUT_HF + fi + fhr=$((fhr+FHINC)) + done + else + for n in $(seq 1 $ntiles); do + eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc + eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc + eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc + eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc + eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc + done + fi } FV3_GFS_nml(){ - # namelist output for a certain component - echo SUB ${FUNCNAME[0]}: Creating name lists and model configure file for FV3 - if [ $machine = 'sandbox' ]; then - cd $SCRIPTDIR - echo "MAIN: !!!Sandbox mode, writing to current directory!!!" - fi - # Call child scripts in current script directory - if [ $cplgocart = .true. ]; then - source $SCRIPTDIR/parsing_namelists_FV3_GOCART.sh - else - source $SCRIPTDIR/parsing_namelists_FV3.sh - fi - FV3_namelists - echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created + # namelist output for a certain component + echo SUB ${FUNCNAME[0]}: Creating name lists and model configure file for FV3 + if [ $machine = 'sandbox' ]; then + cd $SCRIPTDIR + echo "MAIN: !!!Sandbox mode, writing to current directory!!!" + fi + # Call child scripts in current script directory + if [ $cplgocart = .true. ]; then + source $SCRIPTDIR/parsing_namelists_FV3_GOCART.sh + else + source $SCRIPTDIR/parsing_namelists_FV3.sh + fi + FV3_namelists + echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created } DATM_nml(){ - source $SCRIPTDIR/parsing_namelists_DATM.sh - DATM_namelists - echo SUB ${FUNCNAME[0]}: DATM name lists and model configure file created + source $SCRIPTDIR/parsing_namelists_DATM.sh + DATM_namelists + echo SUB ${FUNCNAME[0]}: DATM name lists and model configure file created } data_out_GFS() { - # data in take for FV3GFS - # Arguments: None - # - #------------------------------------------------------------------ - # make symbolic links to write forecast files directly in memdir - echo "SUB ${FUNCNAME[0]}: copying output data for FV3" - #------------------------------------------------------------------ - - if [ $SEND = "YES" ]; then - # Copy model restart files - if [ $CDUMP = "gdas" -a $restart_interval -gt 0 ]; then - cd $DATA/RESTART - mkdir -p $memdir/RESTART - # Only save restarts at single time in RESTART directory - # Either at restart_interval or at end of the forecast - # if [ $restart_interval -eq 0 -o $restart_interval -eq $FHMAX ]; then - - # Add time-stamp to restart files at FHMAX - # RDATE=$($NDATE +$FHMAX $CDATE) - # rPDY=$(echo $RDATE | cut -c1-8) - # rcyc=$(echo $RDATE | cut -c9-10) - # for file in $(ls * | grep -v 0000); do - # $NMV $file ${rPDY}.${rcyc}0000.$file - # done - # else - # time-stamp exists at restart_interval time, just copy - RDATE=$($NDATE +$restart_interval $CDATE) - rPDY=$(echo $RDATE | cut -c1-8) - rcyc=$(echo $RDATE | cut -c9-10) - for file in ${rPDY}.${rcyc}0000.* ; do - $NCP $file $memdir/RESTART/$file - done - fi - fi - - $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/ - - echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied" + # data in take for FV3GFS + # Arguments: None + # + #------------------------------------------------------------------ + # make symbolic links to write forecast files directly in memdir + echo "SUB ${FUNCNAME[0]}: copying output data for FV3" + #------------------------------------------------------------------ + + if [ $SEND = "YES" ]; then + # Copy model restart files + if [ $CDUMP = "gdas" -a $restart_interval -gt 0 ]; then + cd $DATA/RESTART + mkdir -p $memdir/RESTART + # Only save restarts at single time in RESTART directory + # Either at restart_interval or at end of the forecast + # if [ $restart_interval -eq 0 -o $restart_interval -eq $FHMAX ]; then + + # Add time-stamp to restart files at FHMAX + # RDATE=$($NDATE +$FHMAX $CDATE) + # rPDY=$(echo $RDATE | cut -c1-8) + # rcyc=$(echo $RDATE | cut -c9-10) + # for file in $(ls * | grep -v 0000); do + # $NMV $file ${rPDY}.${rcyc}0000.$file + # done + # else + # time-stamp exists at restart_interval time, just copy + RDATE=$($NDATE +$restart_interval $CDATE) + rPDY=$(echo $RDATE | cut -c1-8) + rcyc=$(echo $RDATE | cut -c9-10) + for file in ${rPDY}.${rcyc}0000.* ; do + $NCP $file $memdir/RESTART/$file + done + fi + fi + + $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/ + + echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied" } WW3_postdet() { - echo "SUB ${FUNCNAME[0]}: Linking input data for WW3" - COMPONENTwave=${COMPONENTwave:-${RUN}wave} - - #Link mod_def files for wave grids - array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) - echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" - grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` - - for wavGRD in ${grdALL}; do - $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD - done - - export WAVHCYC=${WAVHCYC:-6} - export WRDATE=`$NDATE -${WAVHCYC} $CDATE` - export WRPDY=`echo $WRDATE | cut -c1-8` - export WRcyc=`echo $WRDATE | cut -c9-10` - export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart - export datwave=$COMOUTwave/rundata - export wavprfx=${CDUMPwave}${WAV_MEMBER} - - #Copy initial condition files: - for wavGRD in $waveGRD ; do - if [ $RERUN = "NO" ]; then - if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - else - if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - fi - eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} - done - - if [ "$WW3ICEINP" = "YES" ]; then - wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice - if [ ! -f $wavicefile ]; then - echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" - echo "Abort!" - exit 1 - fi - $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} - fi - - if [ "$WW3CURINP" = "YES" ]; then - wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur - if [ ! -f $wavcurfile ]; then - echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" - echo "Abort!" - exit 1 - fi - $NLN $wavcurfile $DATA/current.${WAVECUR_FID} - fi - - # Link output files - cd $DATA - eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 - - # Loop for gridded output (uses FHINC) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - for wavGRD in ${waveGRD} ; do - eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_grd.${wavGRD} - done - FHINC=$FHOUT_WAV - if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then - FHINC=$FHOUT_HF_WAV - fi - fhr=$((fhr+FHINC)) - done - - # Loop for point output (uses DTPNT) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_pnt.${waveuoutpGRD} - FHINC=$FHINCP_WAV - fhr=$((fhr+FHINC)) - done - + echo "SUB ${FUNCNAME[0]}: Linking input data for WW3" + COMPONENTwave=${COMPONENTwave:-${RUN}wave} + + #Link mod_def files for wave grids + array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) + echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" + grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + + for wavGRD in ${grdALL}; do + $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD + done + + export WAVHCYC=${WAVHCYC:-6} + export WRDATE=`$NDATE -${WAVHCYC} $CDATE` + export WRPDY=`echo $WRDATE | cut -c1-8` + export WRcyc=`echo $WRDATE | cut -c9-10` + export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart + export datwave=$COMOUTwave/rundata + export wavprfx=${CDUMPwave}${WAV_MEMBER} + + #Copy initial condition files: + for wavGRD in $waveGRD ; do + if [ $RERUN = "NO" ]; then + if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + else + if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then + echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" + fi + $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} + fi + eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} + done + + if [ "$WW3ICEINP" = "YES" ]; then + wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice + if [ ! -f $wavicefile ]; then + echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" + echo "Abort!" + exit 1 + fi + $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} + fi + + if [ "$WW3CURINP" = "YES" ]; then + wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur + if [ ! -f $wavcurfile ]; then + echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" + echo "Abort!" + exit 1 + fi + $NLN $wavcurfile $DATA/current.${WAVECUR_FID} + fi + + # Link output files + cd $DATA + eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 + + # Loop for gridded output (uses FHINC) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + for wavGRD in ${waveGRD} ; do + eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_grd.${wavGRD} + done + FHINC=$FHOUT_WAV + if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then + FHINC=$FHOUT_HF_WAV + fi + fhr=$((fhr+FHINC)) + done + + # Loop for point output (uses DTPNT) + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV ]; do + YMDH=`$NDATE $fhr $CDATE` + YMD=$(echo $YMDH | cut -c1-8) + HMS="$(echo $YMDH | cut -c9-10)0000" + eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_pnt.${waveuoutpGRD} + FHINC=$FHINCP_WAV + fhr=$((fhr+FHINC)) + done } WW3_nml() { - echo "SUB ${FUNCNAME[0]}: Copying input files for WW3" - WAV_MOD_TAG=${CDUMP}wave${waveMEMB} - for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do - $NLN $file $DATA/ - done - $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp + echo "SUB ${FUNCNAME[0]}: Copying input files for WW3" + WAV_MOD_TAG=${CDUMP}wave${waveMEMB} + for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do + $NLN $file $DATA/ + done + $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp } WW3_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for WW3" + echo "SUB ${FUNCNAME[0]}: Copying output data for WW3" } CPL_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for general cpl fields" - if [ $esmf_profile = ".true." ]; then - $NCP $DATA/ESMF_Profile.summary $ROTDIR/$CDUMP.$PDY/$cyc/ - fi + echo "SUB ${FUNCNAME[0]}: Copying output data for general cpl fields" + if [ $esmf_profile = ".true." ]; then + $NCP $DATA/ESMF_Profile.summary $ROTDIR/$CDUMP.$PDY/$cyc/ + fi } MOM6_postdet() { - echo "SUB ${FUNCNAME[0]}: MOM6 after run type determination" - - OCNRES=${OCNRES:-"025"} - - # Copy MOM6 ICs - $NCP -pf $ICSDIR/$CDATE/ocn/MOM*nc $DATA/INPUT/ - - # Copy MOM6 fixed files - $NCP -pf $FIXmom/$OCNRES/* $DATA/INPUT/ - - # Copy coupled grid_spec - $NCP -pf $FIX_DIR/fix_cpl/a${CASE}o${OCNRES}/grid_spec.nc $DATA/INPUT/ - - # Copy mediator restart files to RUNDIR - if [ $inistep = 'restart' ]; then - $NCP $ROTDIR/$CDUMP.$PDY/$cyc/ufs.cpld*.nc $DATA/ - $NCP $ROTDIR/$CDUMP.$PDY/$cyc/rpointer.cpl $DATA/ - fi - - echo "SUB ${FUNCNAME[0]}: MOM6 input data linked/copied" + echo "SUB ${FUNCNAME[0]}: MOM6 after run type determination" + + OCNRES=${OCNRES:-"025"} + + # Copy MOM6 ICs + $NCP -pf $ICSDIR/$CDATE/ocn/MOM*nc $DATA/INPUT/ + + # Copy MOM6 fixed files + $NCP -pf $FIXmom/$OCNRES/* $DATA/INPUT/ + + # Copy coupled grid_spec + $NCP -pf $FIX_DIR/fix_cpl/a${CASE}o${OCNRES}/grid_spec.nc $DATA/INPUT/ + + # Copy mediator restart files to RUNDIR + if [ $inistep = 'restart' ]; then + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/ufs.cpld*.nc $DATA/ + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/rpointer.cpl $DATA/ + fi + + echo "SUB ${FUNCNAME[0]}: MOM6 input data linked/copied" } MOM6_nml() { - echo "SUB ${FUNCNAME[0]}: Creating name list for MOM6" - source $SCRIPTDIR/parsing_namelists_MOM6.sh - MOM6_namelists + echo "SUB ${FUNCNAME[0]}: Creating name list for MOM6" + source $SCRIPTDIR/parsing_namelists_MOM6.sh + MOM6_namelists } MOM6_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for MOM6" - - export ENSMEM=${ENSMEM:-01} - - export IDATE=$CDATE - - if [ $RUN_ENVIR = "nco" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc} - else - export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc" - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc" - fi - [[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT - - if [ $inistep = 'cold' ]; then - cp $DATA/ufs.cpld.cold.cpl.r.*.nc $COMOUT/ - cp $DATA/rpointer.cpl $COMOUT/ - status=$? - exit $status - else - if [ $FHRGRP -eq 0 ]; then - fhrlst="anl" - else - fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') - fi - - # copy ocn files - for fhr in $fhrlst; do - export fhr=$fhr - if [[ 10#$fhr -ge 6 ]]; then - hh_inc_m=$((10#$FHOUT/2)) - hh_inc_o=$((10#$FHOUT )) - - # ------------------------------------------------------ - # adjust the dates on the mom filenames and save - # ------------------------------------------------------ - VDATE=$($NDATE $fhr $IDATE) - YYYY=`echo $VDATE | cut -c1-4` - MM=`echo $VDATE | cut -c5-6` - DD=`echo $VDATE | cut -c7-8` - HH=`echo $VDATE | cut -c9-10` - SS=$((10#$HH*3600)) - - m_date=$($NDATE -$hh_inc_m $VDATE) - p_date=$VDATE - - year=`echo $m_date | cut -c1-4` - month=`echo $m_date | cut -c5-6` - day=`echo $m_date | cut -c7-8` - hh=`echo $m_date | cut -c9-10` - - export ocnfile=ocn_${year}_${month}_${day}_${hh}.nc - - echo "$NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc" - $NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc - status=$? - [[ $status -ne 0 ]] && exit $status - - fi - - done - $NCP -p $DATA/ocn_daily*nc $COMOUT/ - $NCP -p $DATA/wavocn*nc $COMOUT/ #temporary for p4 - $NCP -p $DATA/INPUT/MOM_input $COMOUT/ - fi + echo "SUB ${FUNCNAME[0]}: Copying output data for MOM6" + + export ENSMEM=${ENSMEM:-01} + + export IDATE=$CDATE + + if [ $RUN_ENVIR = "nco" ]; then + export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc} + export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc} + else + export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc" + export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc" + fi + [[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT + + if [ $inistep = 'cold' ]; then + cp $DATA/ufs.cpld.cold.cpl.r.*.nc $COMOUT/ + cp $DATA/rpointer.cpl $COMOUT/ + status=$? + exit $status + else + if [ $FHRGRP -eq 0 ]; then + fhrlst="anl" + else + fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') + fi + + # copy ocn files + for fhr in $fhrlst; do + export fhr=$fhr + if [[ 10#$fhr -ge 6 ]]; then + hh_inc_m=$((10#$FHOUT/2)) + hh_inc_o=$((10#$FHOUT )) + + # ------------------------------------------------------ + # adjust the dates on the mom filenames and save + # ------------------------------------------------------ + VDATE=$($NDATE $fhr $IDATE) + YYYY=`echo $VDATE | cut -c1-4` + MM=`echo $VDATE | cut -c5-6` + DD=`echo $VDATE | cut -c7-8` + HH=`echo $VDATE | cut -c9-10` + SS=$((10#$HH*3600)) + + m_date=$($NDATE -$hh_inc_m $VDATE) + p_date=$VDATE + + year=`echo $m_date | cut -c1-4` + month=`echo $m_date | cut -c5-6` + day=`echo $m_date | cut -c7-8` + hh=`echo $m_date | cut -c9-10` + + export ocnfile=ocn_${year}_${month}_${day}_${hh}.nc + + echo "$NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc" + $NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + fi + done + $NCP -p $DATA/ocn_daily*nc $COMOUT/ + $NCP -p $DATA/wavocn*nc $COMOUT/ #temporary for p4 + $NCP -p $DATA/INPUT/MOM_input $COMOUT/ + fi } CICE_postdet() { - echo "SUB ${FUNCNAME[0]}: CICE after run type determination" - - year=$(echo $CDATE|cut -c 1-4) - stepsperhr=$((3600/$ICETIM)) - nhours=$($NHOUR $CDATE ${year}010100) - istep0=$((nhours*stepsperhr)) - steps=$((nhours*stepsperhr)) - npt=$((FHMAX*$stepsperhr)) # Need this in order for dump_last to work - - histfreq_n=${histfreq_n:-6} - if [ $inistep = 'cold' ]; then - dumpfreq_n=${dumpfreq_n:-3600} # restart write interval in seconds, default 1 hour - dumpfreq="s" - else - dumpfreq_n=${dumpfreq_n:-3024000} # restart write interval in seconds, default 35 days - dumpfreq=${dumpfreq:-"s"} # "s" or "d" or "m" for restarts at intervals of "seconds", "days" or "months" - fi - cice_hist_avg=${cice_hist_avg:-".true."} - - FRAZIL_FWSALT=${FRAZIL_FWSALT:-".true."} - tr_pond_lvl=${tr_pond_lvl:-".true."} # Use level melt ponds tr_pond_lvl=true - - # restart_pond_lvl (if tr_pond_lvl=true): - # -- if true, initialize the level ponds from restart (if runtype=continue) - # -- if false, re-initialize level ponds to zero (if runtype=initial or continue) - - #TODO: Determine the proper way to determine if it's a 'hot start' or not - #note this is not mediator cold start or not - #if [ hotstart ]; then - # #continuing run "hot start" - # RUNTYPE='continue' - # USE_RESTART_TIME='.true.' - #fi - RUNTYPE='initial' - USE_RESTART_TIME='.false.' - restart_pond_lvl=${restart_pond_lvl:-".false."} - - ICERES=${ICERES:-"025"} - if [ $ICERES = '025' ]; then - ICERESdec="0.25" - fi - if [ $ICERES = '050' ]; then - ICERESdec="0.50" - fi - if [ $ICERES = '100' ]; then - ICERESdec="1.00" - fi - - ice_grid_file=${ice_grid_file:-"grid_cice_NEMS_mx${ICERES}.nc"} - ice_kmt_file=${ice_kmt_file:-"kmtu_cice_NEMS_mx${ICERES}.nc"} - - iceic="cice_model.res_$CDATE.nc" - - # Copy CICE IC - $NCP -p $ICSDIR/$CDATE/ice/cice_model_${ICERESdec}.res_$CDATE.nc $DATA/$iceic - - echo "Link CICE fixed files" - $NLN -sf $FIXcice/$ICERES/${ice_grid_file} $DATA/ - $NLN -sf $FIXcice/$ICERES/${ice_kmt_file} $DATA/ - $NLN -sf $FIXcice/$ICERES/$MESHICE $DATA/ + echo "SUB ${FUNCNAME[0]}: CICE after run type determination" + + year=$(echo $CDATE|cut -c 1-4) + stepsperhr=$((3600/$ICETIM)) + nhours=$($NHOUR $CDATE ${year}010100) + istep0=$((nhours*stepsperhr)) + steps=$((nhours*stepsperhr)) + npt=$((FHMAX*$stepsperhr)) # Need this in order for dump_last to work + + histfreq_n=${histfreq_n:-6} + if [ $inistep = 'cold' ]; then + dumpfreq_n=${dumpfreq_n:-3600} # restart write interval in seconds, default 1 hour + dumpfreq="s" + else + dumpfreq_n=${dumpfreq_n:-3024000} # restart write interval in seconds, default 35 days + dumpfreq=${dumpfreq:-"s"} # "s" or "d" or "m" for restarts at intervals of "seconds", "days" or "months" + fi + cice_hist_avg=${cice_hist_avg:-".true."} + + FRAZIL_FWSALT=${FRAZIL_FWSALT:-".true."} + tr_pond_lvl=${tr_pond_lvl:-".true."} # Use level melt ponds tr_pond_lvl=true + + # restart_pond_lvl (if tr_pond_lvl=true): + # -- if true, initialize the level ponds from restart (if runtype=continue) + # -- if false, re-initialize level ponds to zero (if runtype=initial or continue) + + #TODO: Determine the proper way to determine if it's a 'hot start' or not + #note this is not mediator cold start or not + #if [ hotstart ]; then + # #continuing run "hot start" + # RUNTYPE='continue' + # USE_RESTART_TIME='.true.' + #fi + RUNTYPE='initial' + USE_RESTART_TIME='.false.' + restart_pond_lvl=${restart_pond_lvl:-".false."} + + ICERES=${ICERES:-"025"} + if [ $ICERES = '025' ]; then + ICERESdec="0.25" + fi + if [ $ICERES = '050' ]; then + ICERESdec="0.50" + fi + if [ $ICERES = '100' ]; then + ICERESdec="1.00" + fi + + ice_grid_file=${ice_grid_file:-"grid_cice_NEMS_mx${ICERES}.nc"} + ice_kmt_file=${ice_kmt_file:-"kmtu_cice_NEMS_mx${ICERES}.nc"} + + iceic="cice_model.res_$CDATE.nc" + + # Copy CICE IC + $NCP -p $ICSDIR/$CDATE/ice/cice_model_${ICERESdec}.res_$CDATE.nc $DATA/$iceic + + echo "Link CICE fixed files" + $NLN -sf $FIXcice/$ICERES/${ice_grid_file} $DATA/ + $NLN -sf $FIXcice/$ICERES/${ice_kmt_file} $DATA/ + $NLN -sf $FIXcice/$ICERES/$MESHICE $DATA/ } CICE_nml() { - echo "SUB ${FUNCNAME[0]}: Creating name list for CICE" - source $SCRIPTDIR/parsing_namelists_CICE.sh - CICE_namelists + echo "SUB ${FUNCNAME[0]}: Creating name list for CICE" + source $SCRIPTDIR/parsing_namelists_CICE.sh + CICE_namelists } CICE_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for CICE" - if [ $inistep = 'cold' ]; then - echo "mediator cold start, no copying of data for CICE" - else - export ENSMEM=${ENSMEM:-01} - export IDATE=$CDATE - $NCP -p $DATA/ice_in $COMOUT/ - if [ $FHRGRP -eq 0 ]; then - fhrlst="anl" - else - fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') - fi - - for fhr in $fhrlst; do - export fhr=$fhr - # -------------------------------------- - # cp cice data to COMOUT directory - # -------------------------------------- - YYYY0=`echo $IDATE | cut -c1-4` - MM0=`echo $IDATE | cut -c5-6` - DD0=`echo $IDATE | cut -c7-8` - HH0=`echo $IDATE | cut -c9-10` - SS0=$((10#$HH0*3600)) - - VDATE=$($NDATE $fhr $IDATE) - YYYY=`echo $VDATE | cut -c1-4` - MM=`echo $VDATE | cut -c5-6` - DD=`echo $VDATE | cut -c7-8` - HH=`echo $VDATE | cut -c9-10` - SS=$((10#$HH*3600)) - - if [[ 10#$fhr -eq 0 ]]; then - $NCP -p $DATA/history/iceh_ic.${YYYY0}-${MM0}-${DD0}-`printf "%5.5d" ${SS0}`.nc $COMOUT/iceic$VDATE.$ENSMEM.$IDATE.nc - status=$? - [[ $status -ne 0 ]] && exit $status - echo "fhr is 0, only copying ice initial conditions... exiting" - else - $NCP -p $DATA/history/iceh_`printf "%0.2d" $FHOUT`h.${YYYY}-${MM}-${DD}-`printf "%5.5d" ${SS}`.nc $COMOUT/ice$VDATE.$ENSMEM.$IDATE.nc - status=$? - [[ $status -ne 0 ]] && exit $status - fi - - done - fi + echo "SUB ${FUNCNAME[0]}: Copying output data for CICE" + if [ $inistep = 'cold' ]; then + echo "mediator cold start, no copying of data for CICE" + else + export ENSMEM=${ENSMEM:-01} + export IDATE=$CDATE + $NCP -p $DATA/ice_in $COMOUT/ + if [ $FHRGRP -eq 0 ]; then + fhrlst="anl" + else + fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') + fi + + for fhr in $fhrlst; do + export fhr=$fhr + # -------------------------------------- + # cp cice data to COMOUT directory + # -------------------------------------- + YYYY0=`echo $IDATE | cut -c1-4` + MM0=`echo $IDATE | cut -c5-6` + DD0=`echo $IDATE | cut -c7-8` + HH0=`echo $IDATE | cut -c9-10` + SS0=$((10#$HH0*3600)) + + VDATE=$($NDATE $fhr $IDATE) + YYYY=`echo $VDATE | cut -c1-4` + MM=`echo $VDATE | cut -c5-6` + DD=`echo $VDATE | cut -c7-8` + HH=`echo $VDATE | cut -c9-10` + SS=$((10#$HH*3600)) + + if [[ 10#$fhr -eq 0 ]]; then + $NCP -p $DATA/history/iceh_ic.${YYYY0}-${MM0}-${DD0}-`printf "%5.5d" ${SS0}`.nc $COMOUT/iceic$VDATE.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + echo "fhr is 0, only copying ice initial conditions... exiting" + else + $NCP -p $DATA/history/iceh_`printf "%0.2d" $FHOUT`h.${YYYY}-${MM}-${DD}-`printf "%5.5d" ${SS}`.nc $COMOUT/ice$VDATE.$ENSMEM.$IDATE.nc + status=$? + [[ $status -ne 0 ]] && exit $status + fi + done + fi } GOCART_rc() { - echo "SUB ${FUNCNAME[0]}: Linking input data and copying config files for GOCART" - # set input directory containing GOCART input data and configuration files - # this variable is platform-dependent and should be set via a YAML file - - # link directory containing GOCART input dataset, if provided - if [ ! -z "${CHM_INPDIR}" ]; then - $NLN -sf ${CHM_INPDIR} $DATA - status=$? - [[ $status -ne 0 ]] && exit $status - fi - - # copying GOCART configuration files - if [ ! -z "${CHM_CFGDIR}" ]; then - $NCP ${CHM_CFGDIR}/*.rc $DATA - status=$? - [[ $status -ne 0 ]] && exit $status - fi + echo "SUB ${FUNCNAME[0]}: Linking input data and copying config files for GOCART" + # set input directory containing GOCART input data and configuration files + # this variable is platform-dependent and should be set via a YAML file + + # link directory containing GOCART input dataset, if provided + if [ ! -z "${CHM_INPDIR}" ]; then + $NLN -sf ${CHM_INPDIR} $DATA + status=$? + [[ $status -ne 0 ]] && exit $status + fi + + # copying GOCART configuration files + if [ ! -z "${CHM_CFGDIR}" ]; then + $NCP ${CHM_CFGDIR}/*.rc $DATA + status=$? + [[ $status -ne 0 ]] && exit $status + fi } GSD_in() { - echo "SUB ${FUNCNAME[0]}: Linking input data for GSD" - # soft link commands insert here + echo "SUB ${FUNCNAME[0]}: Linking input data for GSD" + # soft link commands insert here } GSD_nml() { - echo "SUB ${FUNCNAME[0]}: Creating name list for GSD" - sh parsing_namelists_GSD.sh + echo "SUB ${FUNCNAME[0]}: Creating name list for GSD" + sh parsing_namelists_GSD.sh } GSD_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for GSD" - # soft link commands insert here + echo "SUB ${FUNCNAME[0]}: Copying output data for GSD" + # soft link commands insert here } diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index c4beb6bdd4e..8637091363e 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -12,288 +12,288 @@ # For all non-evironment variables # Cycling and forecast hour specific parameters common_predet(){ - echo "SUB ${FUNCNAME[0]}: Defining variables for shared through models" - pwd=$(pwd) - machine=${machine:-"WCOSS_C"} - machine=$(echo $machine | tr '[a-z]' '[A-Z]') - CASE=${CASE:-C768} - CDATE=${CDATE:-2017032500} - DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory - ROTDIR=${ROTDIR:-$pwd} # rotating archive directory - ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions + echo "SUB ${FUNCNAME[0]}: Defining variables for shared through models" + pwd=$(pwd) + machine=${machine:-"WCOSS_C"} + machine=$(echo $machine | tr '[a-z]' '[A-Z]') + CASE=${CASE:-C768} + CDATE=${CDATE:-2017032500} + DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory + ROTDIR=${ROTDIR:-$pwd} # rotating archive directory + ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions } DATM_predet(){ - SYEAR=$(echo $CDATE | cut -c1-4) - SMONTH=$(echo $CDATE | cut -c5-6) - SDAY=$(echo $CDATE | cut -c7-8) - SHOUR=$(echo $CDATE | cut -c9-10) - # directory set up - if [ ! -d $DATA ]; then mkdir -p $DATA; fi - if [ ! -d $DATA/DATM_INPUT ]; then mkdir -p $DATA/DATM_INPUT; fi - FHMAX=${FHMAX:-9} - # Go to Run Directory (DATA) - cd $DATA + SYEAR=$(echo $CDATE | cut -c1-4) + SMONTH=$(echo $CDATE | cut -c5-6) + SDAY=$(echo $CDATE | cut -c7-8) + SHOUR=$(echo $CDATE | cut -c9-10) + # directory set up + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/DATM_INPUT ]; then mkdir -p $DATA/DATM_INPUT; fi + FHMAX=${FHMAX:-9} + # Go to Run Directory (DATA) + cd $DATA } FV3_GFS_predet(){ - echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GFS" - CDUMP=${CDUMP:-gdas} - CDUMPwave="${CDUMP}wave" - FHMIN=${FHMIN:-0} - FHMAX=${FHMAX:-9} - FHOUT=${FHOUT:-3} - FHZER=${FHZER:-6} - FHCYC=${FHCYC:-24} - FHMAX_HF=${FHMAX_HF:-0} - FHOUT_HF=${FHOUT_HF:-1} - NSOUT=${NSOUT:-"-1"} - FDIAG=$FHOUT - if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi - WRITE_DOPOST=${WRITE_DOPOST:-".false."} - restart_interval=${restart_interval:-0} - rst_invt1=`echo $restart_interval |cut -d " " -f 1` - - PDY=$(echo $CDATE | cut -c1-8) - cyc=$(echo $CDATE | cut -c9-10) - - # Directories. - pwd=$(pwd) - NWPROD=${NWPROD:-${NWROOT:-$pwd}} - HOMEgfs=${HOMEgfs:-$NWPROD} - FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} - FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} - export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} - export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} - FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} - DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory - ROTDIR=${ROTDIR:-$pwd} # rotating archive directory - ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions - DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis - - # Model resolution specific parameters - DELTIM=${DELTIM:-225} - layout_x=${layout_x:-8} - layout_y=${layout_y:-16} - LEVS=${LEVS:-65} - - # Utilities - NCP=${NCP:-"/bin/cp -p"} - NLN=${NLN:-"/bin/ln -sf"} - NMV=${NMV:-"/bin/mv"} - SEND=${SEND:-"YES"} #move final result to rotating directory - ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} - KEEPDATA=${KEEPDATA:-"NO"} - - # Other options - MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER - ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) - PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment - - # IAU options - DOIAU=${DOIAU:-"NO"} - IAUFHRS=${IAUFHRS:-0} - IAU_DELTHRS=${IAU_DELTHRS:-0} - IAU_OFFSET=${IAU_OFFSET:-0} - - # Model specific stuff - FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} - FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} - PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} - PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} - - # Wave coupling parameter defaults to false - cplwav=${cplwav:-.false.} - - # Model config options - APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} - #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined - #and because NTHREADS_FV3 gets overwritten by what is in the env/${macine}.env - #file and the value of npe_node_fcst is not correctly defined when using more than - #one thread and sets NTHREADS_FV3=1 even when the number of threads is appropraitely >1 - #NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} - NTHREADS_FV3=${nth_fv3:-1} - cores_per_node=${cores_per_node:-${npe_node_fcst:-24}} - ntiles=${ntiles:-6} - if [ $MEMBER -lt 0 ]; then - NTASKS_TOT=${NTASKS_TOT:-$npe_fcst_gfs} - else - NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} - fi - - TYPE=${TYPE:-"nh"} # choices: nh, hydro - MONO=${MONO:-"non-mono"} # choices: mono, non-mono - - QUILTING=${QUILTING:-".true."} - OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} - OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} - WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} - WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} - affix="nemsio" - [[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" - - rCDUMP=${rCDUMP:-$CDUMP} - - #------------------------------------------------------------------ - # setup the runtime environment - if [ $machine = "WCOSS_C" ] ; then - HUGEPAGES=${HUGEPAGES:-hugepages4M} - . $MODULESHOME/init/sh 2>/dev/null - module load iobuf craype-$HUGEPAGES 2>/dev/null - export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} - export MKL_CBWR=AVX2 - export WRTIOBUF=${WRTIOBUF:-"4M"} - export NC_BLKSZ=${NC_BLKSZ:-"4M"} - export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" - fi - - #------------------------------------------------------- - if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi - mkdata=NO - if [ ! -d $DATA ]; then - mkdata=YES - mkdir -p $DATA ; - fi - cd $DATA || exit 8 - mkdir -p $DATA/INPUT - - #------------------------------------------------------------------ - # changeable parameters - # dycore definitions - res=$(echo $CASE |cut -c2-5) - resp=$((res+1)) - npx=$resp - npy=$resp - npz=$((LEVS-1)) - io_layout="1,1" - #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - - # spectral truncation and regular grid resolution based on FV3 resolution - JCAP_CASE=$((2*res-2)) - LONB_CASE=$((4*res)) - LATB_CASE=$((2*res)) - if [ $LATB_CASE -eq 192 ]; then - LATB_CASE=190 # berror file is at this resolution - fi - - JCAP=${JCAP:-$JCAP_CASE} - LONB=${LONB:-$LONB_CASE} - LATB=${LATB:-$LATB_CASE} - - LONB_IMO=${LONB_IMO:-$LONB_CASE} - LATB_JMO=${LATB_JMO:-$LATB_CASE} - - # NSST Options - # nstf_name contains the NSST related parameters - # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled - # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, - # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON - # nstf_name(4) : ZSEA1 (in mm) : 0 - # nstf_name(5) : ZSEA2 (in mm) : 0 - # nst_anl : .true. or .false., NSST analysis over lake - NST_MODEL=${NST_MODEL:-0} - NST_SPINUP=${NST_SPINUP:-0} - NST_RESV=${NST_RESV-0} - ZSEA1=${ZSEA1:-0} - ZSEA2=${ZSEA2:-0} - nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} - nst_anl=${nst_anl:-".false."} - - - # blocking factor used for threading and general physics performance - #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` - #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` - #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi - blocksize=${blocksize:-32} - - # variables for controlling initialization of NCEP/NGGPS ICs - filtered_terrain=${filtered_terrain:-".true."} - gfs_dwinds=${gfs_dwinds:-".true."} - - # various debug options - no_dycore=${no_dycore:-".false."} - dycore_only=${adiabatic:-".false."} - chksum_debug=${chksum_debug:-".false."} - print_freq=${print_freq:-6} - - #------------------------------------------------------- - if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then - RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART - if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi - $NLN $RSTDIR_ATM RESTART - else - mkdir -p $DATA/RESTART - fi - - #------------------------------------------------------- - # member directory - if [ $MEMBER -lt 0 ]; then - prefix=$CDUMP - rprefix=$rCDUMP - memchar="" - else - prefix=enkf$CDUMP - rprefix=enkf$rCDUMP - memchar=mem$(printf %03i $MEMBER) - fi - memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar - if [ ! -d $memdir ]; then mkdir -p $memdir; fi - - GDATE=$($NDATE -$assim_freq $CDATE) - gPDY=$(echo $GDATE | cut -c1-8) - gcyc=$(echo $GDATE | cut -c9-10) - gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar - sCDATE=$($NDATE -3 $CDATE) - - if [[ "$DOIAU" = "YES" ]]; then - sCDATE=$($NDATE -3 $CDATE) - sPDY=$(echo $sCDATE | cut -c1-8) - scyc=$(echo $sCDATE | cut -c9-10) - tPDY=$gPDY - tcyc=$gcyc - else - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc - fi - - echo "SUB ${FUNCNAME[0]}: pre-determination variables set" + echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GFS" + CDUMP=${CDUMP:-gdas} + CDUMPwave="${CDUMP}wave" + FHMIN=${FHMIN:-0} + FHMAX=${FHMAX:-9} + FHOUT=${FHOUT:-3} + FHZER=${FHZER:-6} + FHCYC=${FHCYC:-24} + FHMAX_HF=${FHMAX_HF:-0} + FHOUT_HF=${FHOUT_HF:-1} + NSOUT=${NSOUT:-"-1"} + FDIAG=$FHOUT + if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi + WRITE_DOPOST=${WRITE_DOPOST:-".false."} + restart_interval=${restart_interval:-0} + rst_invt1=`echo $restart_interval |cut -d " " -f 1` + + PDY=$(echo $CDATE | cut -c1-8) + cyc=$(echo $CDATE | cut -c9-10) + + # Directories. + pwd=$(pwd) + NWPROD=${NWPROD:-${NWROOT:-$pwd}} + HOMEgfs=${HOMEgfs:-$NWPROD} + FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} + FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} + export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} + export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} + FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} + DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory + ROTDIR=${ROTDIR:-$pwd} # rotating archive directory + ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions + DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis + + # Model resolution specific parameters + DELTIM=${DELTIM:-225} + layout_x=${layout_x:-8} + layout_y=${layout_y:-16} + LEVS=${LEVS:-65} + + # Utilities + NCP=${NCP:-"/bin/cp -p"} + NLN=${NLN:-"/bin/ln -sf"} + NMV=${NMV:-"/bin/mv"} + SEND=${SEND:-"YES"} #move final result to rotating directory + ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} + KEEPDATA=${KEEPDATA:-"NO"} + + # Other options + MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER + ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) + PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment + + # IAU options + DOIAU=${DOIAU:-"NO"} + IAUFHRS=${IAUFHRS:-0} + IAU_DELTHRS=${IAU_DELTHRS:-0} + IAU_OFFSET=${IAU_OFFSET:-0} + + # Model specific stuff + FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} + FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} + PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} + PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} + + # Wave coupling parameter defaults to false + cplwav=${cplwav:-.false.} + + # Model config options + APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} + #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined + #and because NTHREADS_FV3 gets overwritten by what is in the env/${macine}.env + #file and the value of npe_node_fcst is not correctly defined when using more than + #one thread and sets NTHREADS_FV3=1 even when the number of threads is appropraitely >1 + #NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} + NTHREADS_FV3=${nth_fv3:-1} + cores_per_node=${cores_per_node:-${npe_node_fcst:-24}} + ntiles=${ntiles:-6} + if [ $MEMBER -lt 0 ]; then + NTASKS_TOT=${NTASKS_TOT:-$npe_fcst_gfs} + else + NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} + fi + + TYPE=${TYPE:-"nh"} # choices: nh, hydro + MONO=${MONO:-"non-mono"} # choices: mono, non-mono + + QUILTING=${QUILTING:-".true."} + OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} + OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} + WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} + WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} + affix="nemsio" + [[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" + + rCDUMP=${rCDUMP:-$CDUMP} + + #------------------------------------------------------------------ + # setup the runtime environment + if [ $machine = "WCOSS_C" ] ; then + HUGEPAGES=${HUGEPAGES:-hugepages4M} + . $MODULESHOME/init/sh 2>/dev/null + module load iobuf craype-$HUGEPAGES 2>/dev/null + export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} + export MKL_CBWR=AVX2 + export WRTIOBUF=${WRTIOBUF:-"4M"} + export NC_BLKSZ=${NC_BLKSZ:-"4M"} + export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" + fi + + #------------------------------------------------------- + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + mkdata=NO + if [ ! -d $DATA ]; then + mkdata=YES + mkdir -p $DATA ; + fi + cd $DATA || exit 8 + mkdir -p $DATA/INPUT + + #------------------------------------------------------------------ + # changeable parameters + # dycore definitions + res=$(echo $CASE |cut -c2-5) + resp=$((res+1)) + npx=$resp + npy=$resp + npz=$((LEVS-1)) + io_layout="1,1" + #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) + + # spectral truncation and regular grid resolution based on FV3 resolution + JCAP_CASE=$((2*res-2)) + LONB_CASE=$((4*res)) + LATB_CASE=$((2*res)) + if [ $LATB_CASE -eq 192 ]; then + LATB_CASE=190 # berror file is at this resolution + fi + + JCAP=${JCAP:-$JCAP_CASE} + LONB=${LONB:-$LONB_CASE} + LATB=${LATB:-$LATB_CASE} + + LONB_IMO=${LONB_IMO:-$LONB_CASE} + LATB_JMO=${LATB_JMO:-$LATB_CASE} + + # NSST Options + # nstf_name contains the NSST related parameters + # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled + # nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, + # nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON + # nstf_name(4) : ZSEA1 (in mm) : 0 + # nstf_name(5) : ZSEA2 (in mm) : 0 + # nst_anl : .true. or .false., NSST analysis over lake + NST_MODEL=${NST_MODEL:-0} + NST_SPINUP=${NST_SPINUP:-0} + NST_RESV=${NST_RESV-0} + ZSEA1=${ZSEA1:-0} + ZSEA2=${ZSEA2:-0} + nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} + nst_anl=${nst_anl:-".false."} + + + # blocking factor used for threading and general physics performance + #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` + #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi + blocksize=${blocksize:-32} + + # variables for controlling initialization of NCEP/NGGPS ICs + filtered_terrain=${filtered_terrain:-".true."} + gfs_dwinds=${gfs_dwinds:-".true."} + + # various debug options + no_dycore=${no_dycore:-".false."} + dycore_only=${adiabatic:-".false."} + chksum_debug=${chksum_debug:-".false."} + print_freq=${print_freq:-6} + + #------------------------------------------------------- + if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then + RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART + if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi + $NLN $RSTDIR_ATM RESTART + else + mkdir -p $DATA/RESTART + fi + + #------------------------------------------------------- + # member directory + if [ $MEMBER -lt 0 ]; then + prefix=$CDUMP + rprefix=$rCDUMP + memchar="" + else + prefix=enkf$CDUMP + rprefix=enkf$rCDUMP + memchar=mem$(printf %03i $MEMBER) + fi + memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar + if [ ! -d $memdir ]; then mkdir -p $memdir; fi + + GDATE=$($NDATE -$assim_freq $CDATE) + gPDY=$(echo $GDATE | cut -c1-8) + gcyc=$(echo $GDATE | cut -c9-10) + gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar + sCDATE=$($NDATE -3 $CDATE) + + if [[ "$DOIAU" = "YES" ]]; then + sCDATE=$($NDATE -3 $CDATE) + sPDY=$(echo $sCDATE | cut -c1-8) + scyc=$(echo $sCDATE | cut -c9-10) + tPDY=$gPDY + tcyc=$gcyc + else + sCDATE=$CDATE + sPDY=$PDY + scyc=$cyc + tPDY=$sPDY + tcyc=$cyc + fi + + echo "SUB ${FUNCNAME[0]}: pre-determination variables set" } WW3_predet(){ - echo "SUB ${FUNCNAME[0]}: Defining variables for WW3" - if [ $CDUMP = "gdas" ]; then - RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart - else - RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} - fi - if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi - $NLN $RSTDIR_WAVE restart_wave + echo "SUB ${FUNCNAME[0]}: Defining variables for WW3" + if [ $CDUMP = "gdas" ]; then + RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart + else + RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} + fi + if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi + $NLN $RSTDIR_WAVE restart_wave } CICE_predet(){ - echo "SUB ${FUNCNAME[0]}: CICE before run type determination" - if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi - if [ ! -d $DATA ]; then mkdir -p $DATA; fi - if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi - if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi - if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi - if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi - if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi + echo "SUB ${FUNCNAME[0]}: CICE before run type determination" + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi + if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi + if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi + if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi + if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi } MOM6_predet(){ - echo "SUB ${FUNCNAME[0]}: MOM6 before run type determination" - if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi - if [ ! -d $DATA ]; then mkdir -p $DATA; fi - if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi - if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi - if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi - if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi - if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi - if [ ! -d $DATA/MOM6_OUTPUT ]; then mkdir -p $DATA/MOM6_OUTPUT; fi - if [ ! -d $DATA/MOM6_RESTART ]; then mkdir -p $DATA/MOM6_RESTART; fi - cd $DATA || exit 8 + echo "SUB ${FUNCNAME[0]}: MOM6 before run type determination" + if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi + if [ ! -d $DATA ]; then mkdir -p $DATA; fi + if [ ! -d $DATA/RESTART ]; then mkdir -p $DATA/RESTART; fi + if [ ! -d $DATA/INPUT ]; then mkdir -p $DATA/INPUT; fi + if [ ! -d $DATA/restart ]; then mkdir -p $DATA/restart; fi + if [ ! -d $DATA/history ]; then mkdir -p $DATA/history; fi + if [ ! -d $DATA/OUTPUT ]; then mkdir -p $DATA/OUTPUT; fi + if [ ! -d $DATA/MOM6_OUTPUT ]; then mkdir -p $DATA/MOM6_OUTPUT; fi + if [ ! -d $DATA/MOM6_RESTART ]; then mkdir -p $DATA/MOM6_RESTART; fi + cd $DATA || exit 8 } From bd8b8bb306230a7044effee9b74dd78d243d12eb Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 28 Jul 2021 23:33:16 -0500 Subject: [PATCH 09/33] update script files under script/ and ush/ to the newest version of feature/coupled-crow, tag: coupled-sprint-0728 Updated template files in parm and ush to the newest version of feature/coupled-crow, tag: coupled-sprint-0728 --- parm/chem/gocart_tracer.list | 25 + parm/mom6/MOM_input_template_025 | 870 +++++++++++++++++ parm/mom6/MOM_input_template_050 | 921 ++++++++++++++++++ parm/mom6/MOM_input_template_100 | 839 ++++++++++++++++ parm/parm_fv3diag/diag_table_aer | 366 +++++++ parm/parm_fv3diag/diag_table_aod | 209 +--- parm/parm_fv3diag/field_table_aer | 169 ++++ scripts/exgfs_wave_prep.sh | 61 +- scripts/exglobal_forecast.sh | 8 +- sorc/build_ufs_coupled.sh | 44 + sorc/build_ww3prepost.sh | 46 +- ush/cplvalidate.sh | 40 + ush/forecast_postdet.sh | 117 ++- ush/get_platform.sh | 44 + ush/nems.configure.cpld.IN | 5 +- ush/nems.configure.cpld_wave.IN | 5 +- ush/nems.configure.medcold_atm_ocn_ice.IN | 4 +- ush/nems.configure.medcold_atm_ocn_ice_wav.IN | 4 +- ush/nems_configure.sh | 17 +- ush/parsing_namelists_CICE.sh | 299 +----- ush/parsing_namelists_FV3.sh | 137 ++- ush/parsing_namelists_FV3_GOCART.sh | 364 ------- ush/parsing_namelists_MOM6.sh | 6 +- 23 files changed, 3669 insertions(+), 931 deletions(-) create mode 100644 parm/chem/gocart_tracer.list create mode 100644 parm/mom6/MOM_input_template_025 create mode 100644 parm/mom6/MOM_input_template_050 create mode 100644 parm/mom6/MOM_input_template_100 create mode 100644 parm/parm_fv3diag/diag_table_aer create mode 100644 parm/parm_fv3diag/field_table_aer create mode 100755 sorc/build_ufs_coupled.sh create mode 100755 ush/cplvalidate.sh create mode 100644 ush/get_platform.sh delete mode 100755 ush/parsing_namelists_FV3_GOCART.sh diff --git a/parm/chem/gocart_tracer.list b/parm/chem/gocart_tracer.list new file mode 100644 index 00000000000..8b0202e2c4e --- /dev/null +++ b/parm/chem/gocart_tracer.list @@ -0,0 +1,25 @@ +so2 +so4 +dms +msa +bc1 +bc2 +oc1 +oc2 +dust1 +dust2 +dust3 +dust4 +dust5 +seas1 +seas2 +seas3 +seas4 +seas5 +nh3 +nh4a +no3an1 +no3an2 +no3an3 +pm25 +pm10 diff --git a/parm/mom6/MOM_input_template_025 b/parm/mom6/MOM_input_template_025 new file mode 100644 index 00000000000..1340db5b66b --- /dev/null +++ b/parm/mom6/MOM_input_template_025 @@ -0,0 +1,870 @@ +! This input file provides the adjustable run-time parameters for version 6 of the Modular Ocean Model (MOM6). +! Where appropriate, parameters use usually given in MKS units. + +! This particular file is for the example in ice_ocean_SIS2/OM4_025. + +! This MOM_input file typically contains only the non-default values that are needed to reproduce this example. +! A full list of parameters for this example can be found in the corresponding MOM_parameter_doc.all file +! which is generated by the model at run-time. + +! === module MOM_domains === +TRIPOLAR_N = True ! [Boolean] default = False + ! Use tripolar connectivity at the northern edge of the domain. With + ! TRIPOLAR_N, NIGLOBAL must be even. +NIGLOBAL = NX_GLB ! + ! The total number of thickness grid points in the x-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NJGLOBAL = NY_GLB ! + ! The total number of thickness grid points in the y-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NIHALO = 4 ! default = 4 + ! The number of halo points on each side in the x-direction. With + ! STATIC_MEMORY_ this is set as NIHALO_ in MOM_memory.h at compile time; without + ! STATIC_MEMORY_ the default is NIHALO_ in MOM_memory.h (if defined) or 2. +NJHALO = 4 ! default = 4 + ! The number of halo points on each side in the y-direction. With + ! STATIC_MEMORY_ this is set as NJHALO_ in MOM_memory.h at compile time; without + ! STATIC_MEMORY_ the default is NJHALO_ in MOM_memory.h (if defined) or 2. +! LAYOUT = 32, 18 ! + ! The processor layout that was actually used. +! IO_LAYOUT = 1, 1 ! default = 1 + ! The processor layout to be used, or 0,0 to automatically set the io_layout to + ! be the same as the layout. + +! === module MOM === +USE_REGRIDDING = True ! [Boolean] default = False + ! If True, use the ALE algorithm (regridding/remapping). If False, use the + ! layered isopycnal algorithm. +THICKNESSDIFFUSE = True ! [Boolean] default = False + ! If true, interface heights are diffused with a coefficient of KHTH. +THICKNESSDIFFUSE_FIRST = True ! [Boolean] default = False + ! If true, do thickness diffusion before dynamics. This is only used if + ! THICKNESSDIFFUSE is true. +DT = DT_DYNAM_MOM6 ! [s] + ! The (baroclinic) dynamics time step. The time-step that is actually used will + ! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode + ! or the coupling timestep in coupled mode.) +DT_THERM = DT_THERM_MOM6 ! [s] default = 900.0 + ! The thermodynamic and tracer advection time step. Ideally DT_THERM should be + ! an integer multiple of DT and less than the forcing or coupling time-step, + ! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer + ! multiple of the coupling timestep. By default DT_THERM is set to DT. +THERMO_SPANS_COUPLING = MOM6_THERMO_SPAN ! [Boolean] default = False + ! If true, the MOM will take thermodynamic and tracer timesteps that can be + ! longer than the coupling timestep. The actual thermodynamic timestep that is + ! used in this case is the largest integer multiple of the coupling timestep + ! that is less than or equal to DT_THERM. +HFREEZE = 20.0 ! [m] default = -1.0 + ! If HFREEZE > 0, melt potential will be computed. The actual depth + ! over which melt potential is computed will be min(HFREEZE, OBLD) + ! where OBLD is the boundary layer depth. If HFREEZE <= 0 (default) +USE_PSURF_IN_EOS = False ! [Boolean] default = False + ! If true, always include the surface pressure contributions in equation of + ! state calculations. +FRAZIL = True ! [Boolean] default = False + ! If true, water freezes if it gets too cold, and the accumulated heat deficit + ! is returned in the surface state. FRAZIL is only used if + ! ENABLE_THERMODYNAMICS is true. +DO_GEOTHERMAL = True ! [Boolean] default = False + ! If true, apply geothermal heating. +BOUND_SALINITY = True ! [Boolean] default = False + ! If true, limit salinity to being positive. (The sea-ice model may ask for more + ! salt than is available and drive the salinity negative otherwise.) +MIN_SALINITY = 0.01 ! [PPT] default = 0.01 + ! The minimum value of salinity when BOUND_SALINITY=True. The default is 0.01 + ! for backward compatibility but ideally should be 0. +C_P = 3992.0 ! [J kg-1 K-1] default = 3991.86795711963 + ! The heat capacity of sea water, approximated as a constant. This is only used + ! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10 + ! definition of conservative temperature. +CHECK_BAD_SURFACE_VALS = True ! [Boolean] default = False + ! If true, check the surface state for ridiculous values. +BAD_VAL_SSH_MAX = 50.0 ! [m] default = 20.0 + ! The value of SSH above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SSS_MAX = 75.0 ! [PPT] default = 45.0 + ! The value of SSS above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MAX = 55.0 ! [deg C] default = 45.0 + ! The value of SST above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MIN = -3.0 ! [deg C] default = -2.1 + ! The value of SST below which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +DEFAULT_2018_ANSWERS = True ! [Boolean] default = True + ! This sets the default value for the various _2018_ANSWERS parameters. +WRITE_GEOM = 2 ! default = 1 + ! If =0, never write the geometry and vertical grid files. If =1, write the + ! geometry and vertical grid files only for a new simulation. If =2, always + ! write the geometry and vertical grid files. Other values are invalid. +SAVE_INITIAL_CONDS = True ! [Boolean] default = False + ! If true, write the initial conditions to a file given by IC_OUTPUT_FILE. + +! === module MOM_hor_index === +! Sets the horizontal array index types. + +! === module MOM_fixed_initialization === +INPUTDIR = "INPUT" ! default = "." + ! The directory in which input files are found. + +! === module MOM_grid_init === +GRID_CONFIG = "mosaic" ! + ! A character string that determines the method for defining the horizontal + ! grid. Current options are: + ! mosaic - read the grid from a mosaic (supergrid) + ! file set by GRID_FILE. + ! cartesian - use a (flat) Cartesian grid. + ! spherical - use a simple spherical grid. + ! mercator - use a Mercator spherical grid. +GRID_FILE = "ocean_hgrid.nc" ! + ! Name of the file from which to read horizontal grid data. +TOPO_CONFIG = "file" ! + ! This specifies how bathymetry is specified: + ! file - read bathymetric information from the file + ! specified by (TOPO_FILE). + ! flat - flat bottom set to MAXIMUM_DEPTH. + ! bowl - an analytically specified bowl-shaped basin + ! ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. + ! spoon - a similar shape to 'bowl', but with an vertical + ! wall at the southern face. + ! halfpipe - a zonally uniform channel with a half-sine + ! profile in the meridional direction. + ! benchmark - use the benchmark test case topography. + ! Neverland - use the Neverland test case topography. + ! DOME - use a slope and channel configuration for the + ! DOME sill-overflow test case. + ! ISOMIP - use a slope and channel configuration for the + ! ISOMIP test case. + ! DOME2D - use a shelf and slope configuration for the + ! DOME2D gravity current/overflow test case. + ! Kelvin - flat but with rotated land mask. + ! seamount - Gaussian bump for spontaneous motion test case. + ! dumbbell - Sloshing channel with reservoirs on both ends. + ! shelfwave - exponential slope for shelfwave test case. + ! Phillips - ACC-like idealized topography used in the Phillips config. + ! dense - Denmark Strait-like dense water formation and overflow. + ! USER - call a user modified routine. +TOPO_FILE = "ocean_topog.nc" ! default = "topog.nc" + ! The file from which the bathymetry is read. +TOPO_EDITS_FILE = "All_edits.nc" ! default = "" + ! The file from which to read a list of i,j,z topography overrides. +ALLOW_LANDMASK_CHANGES = MOM6_ALLOW_LANDMASK_CHANGES ! default = "False" + ! If true, allow topography overrides to change ocean points to land +MAXIMUM_DEPTH = 6500.0 ! [m] + ! The maximum depth of the ocean. +MINIMUM_DEPTH = 9.5 ! [m] default = 0.0 + ! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is + ! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is + ! specified, then all depths shallower than MINIMUM_DEPTH but deeper than + ! MASKING_DEPTH are rounded to MINIMUM_DEPTH. +GRID_ROTATION_ANGLE_BUGS = False ! [Boolean] default = True + ! If true, use an older algorithm to calculate the sine and + ! cosines needed rotate between grid-oriented directions and + ! true north and east. Differences arise at the tripolar fold +USE_TRIPOLAR_GEOLONB_BUG = False ! [Boolean] default = True + ! If true, use older code that incorrectly sets the longitude + ! in some points along the tripolar fold to be off by 360 degrees + +! === module MOM_open_boundary === +! Controls where open boundaries are located, what kind of boundary condition to impose, and what data to apply, +! if any. +MASKING_DEPTH = 0.0 ! [m] default = -9999.0 + ! The depth below which to mask points as land points, for which all fluxes are + ! zeroed out. MASKING_DEPTH is ignored if negative. +CHANNEL_CONFIG = "list" ! default = "none" + ! A parameter that determines which set of channels are + ! restricted to specific widths. Options are: + ! none - All channels have the grid width. + ! global_1deg - Sets 16 specific channels appropriate + ! for a 1-degree model, as used in CM2G. + ! list - Read the channel locations and widths from a + ! text file, like MOM_channel_list in the MOM_SIS + ! test case. + ! file - Read open face widths everywhere from a + ! NetCDF file on the model grid. +CHANNEL_LIST_FILE = "MOM_channels_global_025" ! default = "MOM_channel_list" + ! The file from which the list of narrowed channels is read. + +! === module MOM_verticalGrid === +! Parameters providing information about the vertical grid. +NK = 75 ! [nondim] + ! The number of model layers. + +! === module MOM_tracer_registry === + +! === module MOM_EOS === +DTFREEZE_DP = -7.75E-08 ! [deg C Pa-1] default = 0.0 + ! When TFREEZE_FORM=LINEAR, this is the derivative of the freezing potential + ! temperature with pressure. + +! === module MOM_restart === +PARALLEL_RESTARTFILES = True ! [Boolean] default = False + ! If true, each processor writes its own restart file, otherwise a single + ! restart file is generated + +! === module MOM_tracer_flow_control === +USE_IDEAL_AGE_TRACER = False ! [Boolean] default = False + ! If true, use the ideal_age_example tracer package. + +! === module ideal_age_example === + +! === module MOM_coord_initialization === +COORD_CONFIG = "file" ! + ! This specifies how layers are to be defined: + ! ALE or none - used to avoid defining layers in ALE mode + ! file - read coordinate information from the file + ! specified by (COORD_FILE). + ! BFB - Custom coords for buoyancy-forced basin case + ! based on SST_S, T_BOT and DRHO_DT. + ! linear - linear based on interfaces not layers + ! layer_ref - linear based on layer densities + ! ts_ref - use reference temperature and salinity + ! ts_range - use range of temperature and salinity + ! (T_REF and S_REF) to determine surface density + ! and GINT calculate internal densities. + ! gprime - use reference density (RHO_0) for surface + ! density and GINT calculate internal densities. + ! ts_profile - use temperature and salinity profiles + ! (read from COORD_FILE) to set layer densities. + ! USER - call a user modified routine. +COORD_FILE = "layer_coord.nc" ! + ! The file from which the coordinate densities are read. +REMAP_UV_USING_OLD_ALG = True ! [Boolean] default = True + ! If true, uses the old remapping-via-a-delta-z method for remapping u and v. If + ! false, uses the new method that remaps between grids described by an old and + ! new thickness. +REGRIDDING_COORDINATE_MODE = "HYCOM1" ! default = "LAYER" + ! Coordinate mode for vertical regridding. Choose among the following + ! possibilities: LAYER - Isopycnal or stacked shallow water layers + ! ZSTAR, Z* - stretched geopotential z* + ! SIGMA_SHELF_ZSTAR - stretched geopotential z* ignoring shelf + ! SIGMA - terrain following coordinates + ! RHO - continuous isopycnal + ! HYCOM1 - HyCOM-like hybrid coordinate + ! SLIGHT - stretched coordinates above continuous isopycnal + ! ADAPTIVE - optimize for smooth neutral density surfaces +BOUNDARY_EXTRAPOLATION = True ! [Boolean] default = False + ! When defined, a proper high-order reconstruction scheme is used within + ! boundary cells rather than PCM. E.g., if PPM is used for remapping, a PPM + ! reconstruction will also be used within boundary cells. +ALE_COORDINATE_CONFIG = "HYBRID:hycom1_75_800m.nc,sigma2,FNC1:2,4000,4.5,.01" ! default = "UNIFORM" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter ALE_RESOLUTION + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz +!ALE_RESOLUTION = 7*2.0, 2*2.01, 2.02, 2.03, 2.05, 2.08, 2.11, 2.15, 2.21, 2.2800000000000002, 2.37, 2.48, 2.61, 2.77, 2.95, 3.17, 3.4299999999999997, 3.74, 4.09, 4.49, 4.95, 5.48, 6.07, 6.74, 7.5, 8.34, 9.280000000000001, 10.33, 11.49, 12.77, 14.19, 15.74, 17.450000000000003, 19.31, 21.35, 23.56, 25.97, 28.580000000000002, 31.41, 34.47, 37.77, 41.32, 45.14, 49.25, 53.65, 58.370000000000005, 63.42, 68.81, 74.56, 80.68, 87.21000000000001, 94.14, 101.51, 109.33, 117.62, 126.4, 135.68, 145.5, 155.87, 166.81, 178.35, 190.51, 203.31, 216.78, 230.93, 245.8, 261.42, 277.83 ! [m] + ! The distribution of vertical resolution for the target + ! grid used for Eulerian-like coordinates. For example, + ! in z-coordinate mode, the parameter is a list of level + ! thicknesses (in m). In sigma-coordinate mode, the list + ! is of non-dimensional fractions of the water column. +!TARGET_DENSITIES = 1010.0, 1014.3034, 1017.8088, 1020.843, 1023.5566, 1025.813, 1027.0275, 1027.9114, 1028.6422, 1029.2795, 1029.852, 1030.3762, 1030.8626, 1031.3183, 1031.7486, 1032.1572, 1032.5471, 1032.9207, 1033.2798, 1033.6261, 1033.9608, 1034.2519, 1034.4817, 1034.6774, 1034.8508, 1035.0082, 1035.1533, 1035.2886, 1035.4159, 1035.5364, 1035.6511, 1035.7608, 1035.8661, 1035.9675, 1036.0645, 1036.1554, 1036.2411, 1036.3223, 1036.3998, 1036.4739, 1036.5451, 1036.6137, 1036.68, 1036.7441, 1036.8062, 1036.8526, 1036.8874, 1036.9164, 1036.9418, 1036.9647, 1036.9857, 1037.0052, 1037.0236, 1037.0409, 1037.0574, 1037.0738, 1037.0902, 1037.1066, 1037.123, 1037.1394, 1037.1558, 1037.1722, 1037.1887, 1037.206, 1037.2241, 1037.2435, 1037.2642, 1037.2866, 1037.3112, 1037.3389, 1037.3713, 1037.4118, 1037.475, 1037.6332, 1037.8104, 1038.0 ! [m] + ! HYBRID target densities for interfaces +REGRID_COMPRESSIBILITY_FRACTION = 0.01 ! [nondim] default = 0.0 + ! When interpolating potential density profiles we can add some artificial + ! compressibility solely to make homogeneous regions appear stratified. +MAXIMUM_INT_DEPTH_CONFIG = "FNC1:5,8000.0,1.0,.01" ! default = "NONE" + ! Determines how to specify the maximum interface depths. + ! Valid options are: + ! NONE - there are no maximum interface depths + ! PARAM - use the vector-parameter MAXIMUM_INTERFACE_DEPTHS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAXIMUM_INT_DEPTHS = 0.0, 5.0, 12.75, 23.25, 36.49, 52.480000000000004, 71.22, 92.71000000000001, 116.94000000000001, 143.92000000000002, 173.65, 206.13, 241.36, 279.33000000000004, 320.05000000000007, 363.5200000000001, 409.7400000000001, 458.7000000000001, 510.4100000000001, 564.8700000000001, 622.0800000000002, 682.0300000000002, 744.7300000000002, 810.1800000000003, 878.3800000000003, 949.3300000000004, 1023.0200000000004, 1099.4600000000005, 1178.6500000000005, 1260.5900000000006, 1345.2700000000007, 1432.7000000000007, 1522.8800000000008, 1615.8100000000009, 1711.490000000001, 1809.910000000001, 1911.080000000001, 2015.0000000000011, 2121.670000000001, 2231.080000000001, 2343.2400000000007, 2458.1500000000005, 2575.8100000000004, 2696.2200000000003, 2819.3700000000003, 2945.2700000000004, 3073.9200000000005, 3205.3200000000006, 3339.4600000000005, 3476.3500000000004, 3615.9900000000002, 3758.38, 3903.52, 4051.4, 4202.03, 4355.41, 4511.54, 4670.41, 4832.03, 4996.4, 5163.5199999999995, 5333.379999999999, 5505.989999999999, 5681.3499999999985, 5859.459999999998, 6040.319999999998, 6223.919999999998, 6410.269999999999, 6599.369999999999, 6791.219999999999, 6985.8099999999995, 7183.15, 7383.24, 7586.08, 7791.67, 8000.0 + ! The list of maximum depths for each interface. +MAX_LAYER_THICKNESS_CONFIG = "FNC1:400,31000.0,0.1,.01" ! default = "NONE" + ! Determines how to specify the maximum layer thicknesses. + ! Valid options are: + ! NONE - there are no maximum layer thicknesses + ! PARAM - use the vector-parameter MAX_LAYER_THICKNESS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAX_LAYER_THICKNESS = 400.0, 409.63, 410.32, 410.75, 411.07, 411.32, 411.52, 411.7, 411.86, 412.0, 412.13, 412.24, 412.35, 412.45, 412.54, 412.63, 412.71, 412.79, 412.86, 412.93, 413.0, 413.06, 413.12, 413.18, 413.24, 413.29, 413.34, 413.39, 413.44, 413.49, 413.54, 413.58, 413.62, 413.67, 413.71, 413.75, 413.78, 413.82, 413.86, 413.9, 413.93, 413.97, 414.0, 414.03, 414.06, 414.1, 414.13, 414.16, 414.19, 414.22, 414.24, 414.27, 414.3, 414.33, 414.35, 414.38, 414.41, 414.43, 414.46, 414.48, 414.51, 414.53, 414.55, 414.58, 414.6, 414.62, 414.65, 414.67, 414.69, 414.71, 414.73, 414.75, 414.77, 414.79, 414.83 ! [m] + ! The list of maximum thickness for each layer. +REMAPPING_SCHEME = "PPM_H4" ! default = "PLM" + ! This sets the reconstruction scheme used for vertical remapping for all + ! variables. It can be one of the following schemes: PCM (1st-order + ! accurate) + ! PLM (2nd-order accurate) + ! PPM_H4 (3rd-order accurate) + ! PPM_IH4 (3rd-order accurate) + ! PQM_IH4IH3 (4th-order accurate) + ! PQM_IH6IH5 (5th-order accurate) + +! === module MOM_grid === +! Parameters providing information about the lateral grid. + +! === module MOM_state_initialization === +INIT_LAYERS_FROM_Z_FILE = True ! [Boolean] default = False + ! If true, initialize the layer thicknesses, temperatures, and salinities from a + ! Z-space file on a latitude-longitude grid. + +! === module MOM_initialize_layers_from_Z === +TEMP_SALT_Z_INIT_FILE = "MOM6_IC_TS.nc" ! default = "temp_salt_z.nc" + ! The name of the z-space input file used to initialize + ! temperatures (T) and salinities (S). If T and S are not + ! in the same file, TEMP_Z_INIT_FILE and SALT_Z_INIT_FILE + ! must be set. +Z_INIT_FILE_PTEMP_VAR = "temp" ! default = "ptemp" + ! The name of the potential temperature variable in + ! TEMP_Z_INIT_FILE. +Z_INIT_FILE_SALT_VAR = "salt" ! default = "salt" + ! The name of the salinity variable in + ! SALT_Z_INIT_FILE. +Z_INIT_ALE_REMAPPING = True ! [Boolean] default = False + ! If True, then remap straight to model coordinate from file. +Z_INIT_REMAP_OLD_ALG = True ! [Boolean] default = True + ! If false, uses the preferred remapping algorithm for initialization. If true, + ! use an older, less robust algorithm for remapping. + +! === module MOM_diag_mediator === +!Jiande NUM_DIAG_COORDS = 2 ! default = 1 +NUM_DIAG_COORDS = 1 + ! The number of diagnostic vertical coordinates to use. + ! For each coordinate, an entry in DIAG_COORDS must be provided. +!Jiande DIAG_COORDS = "z Z ZSTAR", "rho2 RHO2 RHO" ! +DIAG_COORDS = "z Z ZSTAR" + ! A list of string tuples associating diag_table modules to + ! a coordinate definition used for diagnostics. Each string + ! is of the form "MODULE_SUFFIX,PARAMETER_SUFFIX,COORDINATE_NAME". +DIAG_COORD_DEF_Z="FILE:interpolate_zgrid_40L.nc,interfaces=zw" +DIAG_MISVAL = -1e34 +!DIAG_COORD_DEF_RHO2 = "FILE:diag_rho2.nc,interfaces=rho2" ! default = "WOA09" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter DIAG_COORD_RES_RHO2 + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz + +! === module MOM_MEKE === +USE_MEKE = True ! [Boolean] default = False + ! If true, turns on the MEKE scheme which calculates a sub-grid mesoscale eddy + ! kinetic energy budget. +MEKE_GMCOEFF = 1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of potential energy into MEKE by the + ! thickness mixing parameterization. If MEKE_GMCOEFF is negative, this + ! conversion is not used or calculated. +MEKE_BGSRC = 1.0E-13 ! [W kg-1] default = 0.0 + ! A background energy source for MEKE. +MEKE_KHMEKE_FAC = 1.0 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to Kh for MEKE itself. +MEKE_ALPHA_RHINES = 0.15 ! [nondim] default = 0.05 + ! If positive, is a coefficient weighting the Rhines scale in the expression for + ! mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_EADY = 0.15 ! [nondim] default = 0.05 + ! If positive, is a coefficient weighting the Eady length scale in the + ! expression for mixing length used in MEKE-derived diffusivity. + +! === module MOM_lateral_mixing_coeffs === +USE_VARIABLE_MIXING = True ! [Boolean] default = False + ! If true, the variable mixing code will be called. This allows diagnostics to + ! be created even if the scheme is not used. If KHTR_SLOPE_CFF>0 or + ! KhTh_Slope_Cff>0, this is set to true regardless of what is in the parameter + ! file. +RESOLN_SCALED_KH = True ! [Boolean] default = False + ! If true, the Laplacian lateral viscosity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_SCALED_KHTH = True ! [Boolean] default = False + ! If true, the interface depth diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. +KHTR_SLOPE_CFF = 0.25 ! [nondim] default = 0.0 + ! The nondimensional coefficient in the Visbeck formula for the epipycnal tracer + ! diffusivity +USE_STORED_SLOPES = True ! [Boolean] default = False + ! If true, the isopycnal slopes are calculated once and stored for re-use. This + ! uses more memory but avoids calling the equation of state more times than + ! should be necessary. +INTERPOLATE_RES_FN = False ! [Boolean] default = True + ! If true, interpolate the resolution function to the velocity points from the + ! thickness points; otherwise interpolate the wave speed and calculate the + ! resolution function independently at each point. +GILL_EQUATORIAL_LD = True ! [Boolean] default = False + ! If true, uses Gill's definition of the baroclinic equatorial deformation + ! radius, otherwise, if false, use Pedlosky's definition. These definitions + ! differ by a factor of 2 in front of the beta term in the denominator. Gill's + ! is the more appropriate definition. + +! === module MOM_set_visc === +CHANNEL_DRAG = True ! [Boolean] default = False + ! If true, the bottom drag is exerted directly on each layer proportional to the + ! fraction of the bottom it overlies. +PRANDTL_TURB = 1.25 ! [nondim] default = 1.0 + ! The turbulent Prandtl number applied to shear instability. +HBBL = 10.0 ! [m] + ! The thickness of a bottom boundary layer with a viscosity of KVBBL if + ! BOTTOMDRAGLAW is not defined, or the thickness over which near-bottom + ! velocities are averaged for the drag law if BOTTOMDRAGLAW is defined but + ! LINEAR_DRAG is not. +DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0 + ! DRAG_BG_VEL is either the assumed bottom velocity (with LINEAR_DRAG) or an + ! unresolved velocity that is combined with the resolved velocity to estimate + ! the velocity magnitude. DRAG_BG_VEL is only used when BOTTOMDRAGLAW is + ! defined. +BBL_USE_EOS = True ! [Boolean] default = False + ! If true, use the equation of state in determining the properties of the bottom + ! boundary layer. Otherwise use the layer target potential densities. +BBL_THICK_MIN = 0.1 ! [m] default = 0.0 + ! The minimum bottom boundary layer thickness that can be used with + ! BOTTOMDRAGLAW. This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum + ! near-bottom viscosity. +KV = 1.0E-04 ! [m2 s-1] + ! The background kinematic viscosity in the interior. The molecular value, ~1e-6 + ! m2 s-1, may be used. +KV_BBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the bottom boundary layer. +KV_TBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the top boundary layer. + +! === module MOM_thickness_diffuse === +KHTH_MAX_CFL = 0.1 ! [nondimensional] default = 0.8 + ! The maximum value of the local diffusive CFL ratio that is permitted for the + ! thickness diffusivity. 1.0 is the marginally unstable value in a pure layered + ! model, but much smaller numbers (e.g. 0.1) seem to work better for ALE-based + ! models. +USE_GM_WORK_BUG = True ! [Boolean] default = True + ! If true, compute the top-layer work tendency on the u-grid with the incorrect + ! sign, for legacy reproducibility. + +! === module MOM_continuity === + +! === module MOM_continuity_PPM === +ETA_TOLERANCE = 1.0E-06 ! [m] default = 3.75E-09 + ! The tolerance for the differences between the barotropic and baroclinic + ! estimates of the sea surface height due to the fluxes through each face. The + ! total tolerance for SSH is 4 times this value. The default is + ! 0.5*NK*ANGSTROM, and this should not be set less than about + ! 10^-15*MAXIMUM_DEPTH. +ETA_TOLERANCE_AUX = 0.001 ! [m] default = 1.0E-06 + ! The tolerance for free-surface height discrepancies between the barotropic + ! solution and the sum of the layer thicknesses when calculating the auxiliary + ! corrected velocities. By default, this is the same as ETA_TOLERANCE, but can + ! be made larger for efficiency. + +! === module MOM_CoriolisAdv === +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the Coriolis terms. Valid + ! values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy +BOUND_CORIOLIS = True ! [Boolean] default = False + ! If true, the Coriolis terms at u-points are bounded by the four estimates of + ! (f+rv)v from the four neighboring v-points, and similarly at v-points. This + ! option would have no effect on the SADOURNY Coriolis scheme if it were + ! possible to use centered difference thickness fluxes. + +! === module MOM_PressureForce === + +! === module MOM_PressureForce_AFV === +MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False + ! If true, use mass weighting when interpolating T/S for integrals near the + ! bathymetry in AFV pressure gradient calculations. + +! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +AH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the cube of the grid spacing to + ! calculate the biharmonic viscosity. The final viscosity is the largest of this + ! scaled viscosity, the Smagorinsky and Leith viscosities, and AH. +SMAGORINSKY_AH = True ! [Boolean] default = False + ! If true, use a biharmonic Smagorinsky nonlinear eddy viscosity. +SMAG_BI_CONST = 0.06 ! [nondim] default = 0.0 + ! The nondimensional biharmonic Smagorinsky constant, typically 0.015 - 0.06. +USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False + ! If true, use Use the land mask for the computation of thicknesses at velocity + ! locations. This eliminates the dependence on arbitrary values over land or + ! outside of the domain. Default is False in order to maintain answers with + ! legacy experiments but should be changed to True for new experiments. + +! === module MOM_vert_friction === +HMIX_FIXED = 0.5 ! [m] + ! The prescribed depth over which the near-surface viscosity and diffusivity are + ! elevated when the bulk mixed layer is not used. +MAXVEL = 6.0 ! [m s-1] default = 3.0E+08 + ! The maximum velocity allowed before the velocity components are truncated. + +! === module MOM_PointAccel === +U_TRUNC_FILE = "U_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to zonal + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. +V_TRUNC_FILE = "V_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to meridional + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. + +! === module MOM_barotropic === +BOUND_BT_CORRECTION = True ! [Boolean] default = False + ! If true, the corrective pseudo mass-fluxes into the barotropic solver are + ! limited to values that require less than maxCFL_BT_cont to be accommodated. +BT_PROJECT_VELOCITY = True ! [Boolean] default = False + ! If true, step the barotropic velocity first and project out the velocity + ! tendency by 1+BEBT when calculating the transport. The default (false) is to + ! use a predictor continuity step to find the pressure field, and then to do a + ! corrector continuity step using a weighted average of the old and new + ! velocities, with weights of (1-BEBT) and BEBT. +DYNAMIC_SURFACE_PRESSURE = True ! [Boolean] default = False + ! If true, add a dynamic pressure due to a viscous ice shelf, for instance. +BEBT = 0.2 ! [nondim] default = 0.1 + ! BEBT determines whether the barotropic time stepping uses the forward-backward + ! time-stepping scheme or a backward Euler scheme. BEBT is valid in the range + ! from 0 (for a forward-backward treatment of nonrotating gravity waves) to 1 + ! (for a backward Euler treatment). In practice, BEBT must be greater than about + ! 0.05. +DTBT = -0.9 ! [s or nondim] default = -0.98 + ! The barotropic time step, in s. DTBT is only used with the split explicit time + ! stepping. To set the time step automatically based the maximum stable value + ! use 0, or a negative value gives the fraction of the stable value. Setting + ! DTBT to 0 is the same as setting it to -0.98. The value of DTBT that will + ! actually be used is an integer fraction of DT, rounding down. +BT_USE_OLD_CORIOLIS_BRACKET_BUG = True ! [Boolean] default = False + ! If True, use an order of operations that is not bitwise rotationally symmetric + ! in the meridional Coriolis term of the barotropic solver. + +! === module MOM_mixed_layer_restrat === +MIXEDLAYER_RESTRAT = True ! [Boolean] default = False + ! If true, a density-gradient dependent re-stratifying flow is imposed in the + ! mixed layer. Can be used in ALE mode without restriction but in layer mode can + ! only be used if BULKMIXEDLAYER is true. +FOX_KEMPER_ML_RESTRAT_COEF = 1.0 ! [nondim] default = 0.0 + ! A nondimensional coefficient that is proportional to the ratio of the + ! deformation radius to the dominant lengthscale of the submesoscale mixed layer + ! instabilities, times the minimum of the ratio of the mesoscale eddy kinetic + ! energy to the large-scale geostrophic kinetic energy or 1 plus the square of + ! the grid spacing over the deformation radius, as detailed by Fox-Kemper et al. + ! (2010) +MLE_FRONT_LENGTH = 500.0 ! [m] default = 0.0 + ! If non-zero, is the frontal-length scale used to calculate the upscaling of + ! buoyancy gradients that is otherwise represented by the parameter + ! FOX_KEMPER_ML_RESTRAT_COEF. If MLE_FRONT_LENGTH is non-zero, it is recommended + ! to set FOX_KEMPER_ML_RESTRAT_COEF=1.0. +MLE_USE_PBL_MLD = True ! [Boolean] default = False + ! If true, the MLE parameterization will use the mixed-layer depth provided by + ! the active PBL parameterization. If false, MLE will estimate a MLD based on a + ! density difference with the surface using the parameter MLE_DENSITY_DIFF. +MLE_MLD_DECAY_TIME = 2.592E+06 ! [s] default = 0.0 + ! The time-scale for a running-mean filter applied to the mixed-layer depth used + ! in the MLE restratification parameterization. When the MLD deepens below the + ! current running-mean the running-mean is instantaneously set to the current + ! MLD. + +! === module MOM_diabatic_driver === +! The following parameters are used for diabatic processes. +ENERGETICS_SFC_PBL = True ! [Boolean] default = False + ! If true, use an implied energetics planetary boundary layer scheme to + ! determine the diffusivity and viscosity in the surface boundary layer. +EPBL_IS_ADDITIVE = False ! [Boolean] default = True + ! If true, the diffusivity from ePBL is added to all other diffusivities. + ! Otherwise, the larger of kappa-shear and ePBL diffusivities are used. + +! === module MOM_CVMix_KPP === +! This is the MOM wrapper to CVMix:KPP +! See http://cvmix.github.io/ + +! === module MOM_tidal_mixing === +! Vertical Tidal Mixing Parameterization +INT_TIDE_DISSIPATION = True ! [Boolean] default = False + ! If true, use an internal tidal dissipation scheme to drive diapycnal mixing, + ! along the lines of St. Laurent et al. (2002) and Simmons et al. (2004). +INT_TIDE_PROFILE = "POLZIN_09" ! default = "STLAURENT_02" + ! INT_TIDE_PROFILE selects the vertical profile of energy dissipation with + ! INT_TIDE_DISSIPATION. Valid values are: + ! STLAURENT_02 - Use the St. Laurent et al exponential + ! decay profile. + ! POLZIN_09 - Use the Polzin WKB-stretched algebraic + ! decay profile. +INT_TIDE_DECAY_SCALE = 300.3003003003003 ! [m] default = 500.0 + ! The decay scale away from the bottom for tidal TKE with the new coding when + ! INT_TIDE_DISSIPATION is used. +KAPPA_ITIDES = 6.28319E-04 ! [m-1] default = 6.283185307179586E-04 + ! A topographic wavenumber used with INT_TIDE_DISSIPATION. The default is 2pi/10 + ! km, as in St.Laurent et al. 2002. +KAPPA_H2_FACTOR = 0.84 ! [nondim] default = 1.0 + ! A scaling factor for the roughness amplitude with INT_TIDE_DISSIPATION. +TKE_ITIDE_MAX = 0.1 ! [W m-2] default = 1000.0 + ! The maximum internal tide energy source available to mix above the bottom + ! boundary layer with INT_TIDE_DISSIPATION. +READ_TIDEAMP = True ! [Boolean] default = False + ! If true, read a file (given by TIDEAMP_FILE) containing the tidal amplitude + ! with INT_TIDE_DISSIPATION. +TIDEAMP_FILE = "tidal_amplitude.v20140616.nc" ! default = "tideamp.nc" + ! The path to the file containing the spatially varying tidal amplitudes with + ! INT_TIDE_DISSIPATION. +H2_FILE = "ocean_topog.nc" ! + ! The path to the file containing the sub-grid-scale topographic roughness + ! amplitude with INT_TIDE_DISSIPATION. + +! === module MOM_CVMix_conv === +! Parameterization of enhanced mixing due to convection via CVMix + +! === module MOM_geothermal === +GEOTHERMAL_SCALE = 1.0 ! [W m-2 or various] default = 0.0 + ! The constant geothermal heat flux, a rescaling factor for the heat flux read + ! from GEOTHERMAL_FILE, or 0 to disable the geothermal heating. +GEOTHERMAL_FILE = "geothermal_davies2013_v1.nc" ! default = "" + ! The file from which the geothermal heating is to be read, or blank to use a + ! constant heating rate. +GEOTHERMAL_VARNAME = "geothermal_hf" ! default = "geo_heat" + ! The name of the geothermal heating variable in GEOTHERMAL_FILE. + +! === module MOM_set_diffusivity === +BBL_MIXING_AS_MAX = False ! [Boolean] default = True + ! If true, take the maximum of the diffusivity from the BBL mixing and the other + ! diffusivities. Otherwise, diffusivity from the BBL_mixing is simply added. +USE_LOTW_BBL_DIFFUSIVITY = True ! [Boolean] default = False + ! If true, uses a simple, imprecise but non-coordinate dependent, model of BBL + ! mixing diffusivity based on Law of the Wall. Otherwise, uses the original BBL + ! scheme. +SIMPLE_TKE_TO_KD = True ! [Boolean] default = False + ! If true, uses a simple estimate of Kd/TKE that will work for arbitrary + ! vertical coordinates. If false, calculates Kd/TKE and bounds based on exact + ! energetics for an isopycnal layer-formulation. + +! === module MOM_bkgnd_mixing === +! Adding static vertical background mixing coefficients +KD = 1.5E-05 ! [m2 s-1] + ! The background diapycnal diffusivity of density in the interior. Zero or the + ! molecular value, ~1e-7 m2 s-1, may be used. +KD_MIN = 2.0E-06 ! [m2 s-1] default = 1.5E-07 + ! The minimum diapycnal diffusivity. +HENYEY_IGW_BACKGROUND = True ! [Boolean] default = False + ! If true, use a latitude-dependent scaling for the near surface background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +KD_MAX = 0.1 ! [m2 s-1] default = -1.0 + ! The maximum permitted increment for the diapycnal diffusivity from TKE-based + ! parameterizations, or a negative value for no limit. + +! === module MOM_kappa_shear === +! Parameterization of shear-driven turbulence following Jackson, Hallberg and Legg, JPO 2008 +USE_JACKSON_PARAM = True ! [Boolean] default = False + ! If true, use the Jackson-Hallberg-Legg (JPO 2008) shear mixing + ! parameterization. +MAX_RINO_IT = 25 ! [nondim] default = 50 + ! The maximum number of iterations that may be used to estimate the Richardson + ! number driven mixing. +VERTEX_SHEAR = False ! [Boolean] default = False + ! If true, do the calculations of the shear-driven mixing + ! at the cell vertices (i.e., the vorticity points). + +KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True + ! If true, use an older, dimensionally inconsistent estimate of the derivative + ! of diffusivity with energy in the Newton's method iteration. The bug causes + ! undercorrections when dz > 1 m. +KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True + ! If true, report back the latest estimate of TKE instead of the time average + ! TKE when there is mass in all layers. Otherwise always report the time + ! averaged TKE, as is currently done when there are some massless layers. + +! === module MOM_CVMix_shear === +! Parameterization of shear-driven turbulence via CVMix (various options) + +! === module MOM_CVMix_ddiff === +! Parameterization of mixing due to double diffusion processes via CVMix + +! === module MOM_diabatic_aux === +! The following parameters are used for auxiliary diabatic processes. +PRESSURE_DEPENDENT_FRAZIL = False ! [Boolean] default = False + ! If true, use a pressure dependent freezing temperature when making frazil. The + ! default is false, which will be faster but is inappropriate with ice-shelf + ! cavities. +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by OPACITY_SCHEME to determine + ! the e-folding depth of incoming short wave radiation. +CHL_FILE = "seawifs-clim-1997-2010.1440x1080.v20180328.nc" ! + ! CHL_FILE is the file containing chl_a concentrations in the variable CHL_A. It + ! is used when VAR_PEN_SW and CHL_FROM_FILE are true. +CHL_VARNAME = "chlor_a" ! default = "CHL_A" + ! Name of CHL_A variable in CHL_FILE. + +! === module MOM_energetic_PBL === +ML_OMEGA_FRAC = 0.001 ! [nondim] default = 0.0 + ! When setting the decay scale for turbulence, use this fraction of the absolute + ! rotation rate blended with the local value of f, as sqrt((1-of)*f^2 + + ! of*4*omega^2). +TKE_DECAY = 0.01 ! [nondim] default = 2.5 + ! TKE_DECAY relates the vertical rate of decay of the TKE available for + ! mechanical entrainment to the natural Ekman depth. +EPBL_MSTAR_SCHEME = "OM4" ! default = "CONSTANT" + ! EPBL_MSTAR_SCHEME selects the method for setting mstar. Valid values are: + ! CONSTANT - Use a fixed mstar given by MSTAR + ! OM4 - Use L_Ekman/L_Obukhov in the sabilizing limit, as in OM4 + ! REICHL_H18 - Use the scheme documented in Reichl & Hallberg, 2018. +MSTAR_CAP = 10.0 ! [nondim] default = -1.0 + ! If this value is positive, it sets the maximum value of mstar allowed in ePBL. + ! (This is not used if EPBL_MSTAR_SCHEME = CONSTANT). +MSTAR2_COEF1 = 0.29 ! [nondim] default = 0.3 + ! Coefficient in computing mstar when rotation and stabilizing effects are both + ! important (used if EPBL_MSTAR_SCHEME = OM4). +MSTAR2_COEF2 = 0.152 ! [nondim] default = 0.085 + ! Coefficient in computing mstar when only rotation limits the total mixing + ! (used if EPBL_MSTAR_SCHEME = OM4) +NSTAR = 0.06 ! [nondim] default = 0.2 + ! The portion of the buoyant potential energy imparted by surface fluxes that is + ! available to drive entrainment at the base of mixed layer when that energy is + ! positive. +MSTAR_CONV_ADJ = 0.667 ! [nondim] default = 0.0 + ! Coefficient used for reducing mstar during convection due to reduction of + ! stable density gradient. +USE_MLD_ITERATION = True ! [Boolean] default = False + ! A logical that specifies whether or not to use the distance to the bottom of + ! the actively turbulent boundary layer to help set the EPBL length scale. +EPBL_TRANSITION_SCALE = 0.01 ! [nondim] default = 0.1 + ! A scale for the mixing length in the transition layer at the edge of the + ! boundary layer as a fraction of the boundary layer thickness. +MIX_LEN_EXPONENT = 1.0 ! [nondim] default = 2.0 + ! The exponent applied to the ratio of the distance to the MLD and the MLD depth + ! which determines the shape of the mixing length. This is only used if + ! USE_MLD_ITERATION is True. +USE_LA_LI2016 = MOM6_REPRO_LA ! [nondim] default = False + ! A logical to use the Li et al. 2016 (submitted) formula to determine the + ! Langmuir number. +LT_ENHANCE = 3 ! [nondim] default = 0 + ! Integer for Langmuir number mode. + ! *Requires USE_LA_LI2016 to be set to True. + ! Options: 0 - No Langmuir + ! 1 - Van Roekel et al. 2014/Li et al., 2016 + ! 2 - Multiplied w/ adjusted La. + ! 3 - Added w/ adjusted La. +USE_WAVES = MOM6_USE_WAVES ! [Boolean] default = False + ! If true, enables surface wave modules. + +WAVE_METHOD = "SURFACE_BANDS" ! default = "EMPTY" + ! Choice of wave method, valid options include: + ! TEST_PROFILE - Prescribed from surface Stokes drift + ! and a decay wavelength. + ! SURFACE_BANDS - Computed from multiple surface values + ! and decay wavelengths. + ! DHH85 - Uses Donelan et al. 1985 empirical + ! wave spectrum with prescribed values. + ! LF17 - Infers Stokes drift profile from wind + ! speed following Li and Fox-Kemper 2017. + +SURFBAND_SOURCE = "COUPLER" ! default = "EMPTY" + ! Choice of SURFACE_BANDS data mode, valid options include: + ! DATAOVERRIDE - Read from NetCDF using FMS DataOverride. + ! COUPLER - Look for variables from coupler pass + ! INPUT - Testing with fixed values. + +STK_BAND_COUPLER = 3 ! default = 1 + ! STK_BAND_COUPLER is the number of Stokes drift bands in the coupler. This has + ! to be consistent with the number of Stokes drift bands in WW3, or the model + ! will fail. + +SURFBAND_WAVENUMBERS = 0.04, 0.11, 0.3305 ! [rad/m] default = 0.12566 +EPBL_LANGMUIR_SCHEME = "ADDITIVE" ! default = "NONE" + ! EPBL_LANGMUIR_SCHEME selects the method for including Langmuir turbulence. + ! Valid values are: + ! NONE - Do not do any extra mixing due to Langmuir turbulence + ! RESCALE - Use a multiplicative rescaling of mstar to account for Langmuir + ! turbulence + ! ADDITIVE - Add a Langmuir turblence contribution to mstar to other + ! contributions +LT_ENHANCE_COEF = 0.044 ! [nondim] default = 0.447 + ! Coefficient for Langmuir enhancement of mstar +LT_ENHANCE_EXP = -1.5 ! [nondim] default = -1.33 + ! Exponent for Langmuir enhancementt of mstar +LT_MOD_LAC1 = 0.0 ! [nondim] default = -0.87 + ! Coefficient for modification of Langmuir number due to MLD approaching Ekman + ! depth. +LT_MOD_LAC4 = 0.0 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! stable Obukhov depth. +LT_MOD_LAC5 = 0.22 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! unstable Obukhov depth. + +! === module MOM_regularize_layers === + +! === module MOM_opacity === +PEN_SW_NBANDS = 3 ! default = 1 + ! The number of bands of penetrating shortwave radiation. + +! === module MOM_tracer_advect === +TRACER_ADVECTION_SCHEME = "PPM:H3" ! default = "PLM" + ! The horizontal transport scheme for tracers: + ! PLM - Piecewise Linear Method + ! PPM:H3 - Piecewise Parabolic Method (Huyhn 3rd order) + ! PPM - Piecewise Parabolic Method (Colella-Woodward) + +! === module MOM_tracer_hor_diff === +CHECK_DIFFUSIVE_CFL = True ! [Boolean] default = False + ! If true, use enough iterations the diffusion to ensure that the diffusive + ! equivalent of the CFL limit is not violated. If false, always use the greater + ! of 1 or MAX_TR_DIFFUSION_CFL iteration. + +! === module MOM_neutral_diffusion === +! This module implements neutral diffusion of tracers + +! === module MOM_lateral_boundary_diffusion === +! This module implements lateral diffusion of tracers near boundaries + +! === module MOM_sum_output === +MAXTRUNC = 100000 ! [truncations save_interval-1] default = 0 + ! The run will be stopped, and the day set to a very large value if the velocity + ! is truncated more than MAXTRUNC times between energy saves. Set MAXTRUNC to 0 + ! to stop if there is any truncation of velocities. +ENERGYSAVEDAYS = 1.00 ! [days] default = 1.0 + ! The interval in units of TIMEUNIT between saves of the energies of the run and + ! other globally summed diagnostics. + +! === module ocean_model_init === +OCEAN_SURFACE_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the surface velocity field that is + ! returned to the coupler. Valid values include + ! 'A', 'B', or 'C'. +! === module MOM_surface_forcing === +MAX_P_SURF = 0.0 ! [Pa] default = -1.0 + ! The maximum surface pressure that can be exerted by the atmosphere and + ! floating sea-ice or ice shelves. This is needed because the FMS coupling + ! structure does not limit the water that can be frozen out of the ocean and the + ! ice-ocean heat fluxes are treated explicitly. No limit is applied if a + ! negative value is used. +WIND_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the input wind stress field. Valid + ! values are 'A', 'B', or 'C'. +CD_TIDES = 0.0018 ! [nondim] default = 1.0E-04 + ! The drag coefficient that applies to the tides. +GUST_CONST = 0.0 ! [Pa] default = 0.02 + ! The background gustiness in the winds. +FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False + ! If true correct a bug in the time-averaging of the gustless wind friction + ! velocity +USE_RIGID_SEA_ICE = True ! [Boolean] default = False + ! If true, sea-ice is rigid enough to exert a nonhydrostatic pressure that + ! resist vertical motion. +SEA_ICE_RIGID_MASS = 100.0 ! [kg m-2] default = 1000.0 + ! The mass of sea-ice per unit area at which the sea-ice starts to exhibit + ! rigidity +LIQUID_RUNOFF_FROM_DATA = MOM6_RIVER_RUNOFF ! [Boolean] default = False + ! If true, allows liquid river runoff to be specified via + ! the data_table using the component name 'OCN'. +! === module MOM_restart === +RESTART_CHECKSUMS_REQUIRED = False +! === module MOM_file_parser === diff --git a/parm/mom6/MOM_input_template_050 b/parm/mom6/MOM_input_template_050 new file mode 100644 index 00000000000..ceff6e98d43 --- /dev/null +++ b/parm/mom6/MOM_input_template_050 @@ -0,0 +1,921 @@ +! This input file provides the adjustable run-time parameters for version 6 of the Modular Ocean Model (MOM6). +! Where appropriate, parameters use usually given in MKS units. + +! This particular file is for the example in ice_ocean_SIS2/OM4_05. + +! This MOM_input file typically contains only the non-default values that are needed to reproduce this example. +! A full list of parameters for this example can be found in the corresponding MOM_parameter_doc.all file +! which is generated by the model at run-time. + +! === module MOM_domains === +TRIPOLAR_N = True ! [Boolean] default = False + ! Use tripolar connectivity at the northern edge of the domain. With + ! TRIPOLAR_N, NIGLOBAL must be even. +NIGLOBAL = NX_GLB ! + ! The total number of thickness grid points in the x-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NJGLOBAL = NY_GLB ! + ! The total number of thickness grid points in the y-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NIHALO = 4 ! default = 4 + ! The number of halo points on each side in the x-direction. With + ! STATIC_MEMORY_ this is set as NIHALO_ in MOM_memory.h at compile time; without + ! STATIC_MEMORY_ the default is NIHALO_ in MOM_memory.h (if defined) or 2. +NJHALO = 4 ! default = 4 + ! The number of halo points on each side in the y-direction. With + ! STATIC_MEMORY_ this is set as NJHALO_ in MOM_memory.h at compile time; without + ! STATIC_MEMORY_ the default is NJHALO_ in MOM_memory.h (if defined) or 2. +! LAYOUT = 21, 20 ! + ! The processor layout that was actually used. +! IO_LAYOUT = 1, 1 ! default = 1 + ! The processor layout to be used, or 0,0 to automatically set the io_layout to + ! be the same as the layout. + +! === module MOM === +USE_REGRIDDING = True ! [Boolean] default = False + ! If True, use the ALE algorithm (regridding/remapping). If False, use the + ! layered isopycnal algorithm. +THICKNESSDIFFUSE = True ! [Boolean] default = False + ! If true, interface heights are diffused with a coefficient of KHTH. +THICKNESSDIFFUSE_FIRST = True ! [Boolean] default = False + ! If true, do thickness diffusion before dynamics. This is only used if + ! THICKNESSDIFFUSE is true. +DT = DT_DYNAM_MOM6 ! [s] + ! The (baroclinic) dynamics time step. The time-step that is actually used will + ! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode + ! or the coupling timestep in coupled mode.) +DT_THERM = DT_THERM_MOM6 ! [s] default = 1800.0 + ! The thermodynamic and tracer advection time step. Ideally DT_THERM should be + ! an integer multiple of DT and less than the forcing or coupling time-step, + ! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer + ! multiple of the coupling timestep. By default DT_THERM is set to DT. +THERMO_SPANS_COUPLING = MOM6_THERMO_SPAN ! [Boolean] default = False + ! If true, the MOM will take thermodynamic and tracer timesteps that can be + ! longer than the coupling timestep. The actual thermodynamic timestep that is + ! used in this case is the largest integer multiple of the coupling timestep + ! that is less than or equal to DT_THERM. +HFREEZE = 20.0 ! [m] default = -1.0 + ! If HFREEZE > 0, melt potential will be computed. The actual depth + ! over which melt potential is computed will be min(HFREEZE, OBLD) + ! where OBLD is the boundary layer depth. If HFREEZE <= 0 (default) + ! melt potential will not be computed. +USE_PSURF_IN_EOS = False ! [Boolean] default = False + ! If true, always include the surface pressure contributions in equation of + ! state calculations. +FRAZIL = True ! [Boolean] default = False + ! If true, water freezes if it gets too cold, and the accumulated heat deficit + ! is returned in the surface state. FRAZIL is only used if + ! ENABLE_THERMODYNAMICS is true. +DO_GEOTHERMAL = True ! [Boolean] default = False + ! If true, apply geothermal heating. +BOUND_SALINITY = True ! [Boolean] default = False + ! If true, limit salinity to being positive. (The sea-ice model may ask for more + ! salt than is available and drive the salinity negative otherwise.) +MIN_SALINITY = 0.01 ! [PPT] default = 0.01 + ! The minimum value of salinity when BOUND_SALINITY=True. The default is 0.01 + ! for backward compatibility but ideally should be 0. +C_P = 3992.0 ! [J kg-1 K-1] default = 3991.86795711963 + ! The heat capacity of sea water, approximated as a constant. This is only used + ! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10 + ! definition of conservative temperature. +CHECK_BAD_SURFACE_VALS = True ! [Boolean] default = False + ! If true, check the surface state for ridiculous values. +BAD_VAL_SSH_MAX = 50.0 ! [m] default = 20.0 + ! The value of SSH above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SSS_MAX = 75.0 ! [PPT] default = 45.0 + ! The value of SSS above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MAX = 55.0 ! [deg C] default = 45.0 + ! The value of SST above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MIN = -3.0 ! [deg C] default = -2.1 + ! The value of SST below which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +DEFAULT_2018_ANSWERS = True ! [Boolean] default = True + ! This sets the default value for the various _2018_ANSWERS parameters. +WRITE_GEOM = 2 ! default = 1 + ! If =0, never write the geometry and vertical grid files. If =1, write the + ! geometry and vertical grid files only for a new simulation. If =2, always + ! write the geometry and vertical grid files. Other values are invalid. +SAVE_INITIAL_CONDS = True ! [Boolean] default = False + ! If true, write the initial conditions to a file given by IC_OUTPUT_FILE. + +! === module MOM_hor_index === +! Sets the horizontal array index types. + +! === module MOM_fixed_initialization === +INPUTDIR = "INPUT" ! default = "." + ! The directory in which input files are found. + +! === module MOM_grid_init === +GRID_CONFIG = "mosaic" ! + ! A character string that determines the method for defining the horizontal + ! grid. Current options are: + ! mosaic - read the grid from a mosaic (supergrid) + ! file set by GRID_FILE. + ! cartesian - use a (flat) Cartesian grid. + ! spherical - use a simple spherical grid. + ! mercator - use a Mercator spherical grid. +GRID_FILE = "ocean_hgrid.nc" ! + ! Name of the file from which to read horizontal grid data. +TOPO_CONFIG = "file" ! + ! This specifies how bathymetry is specified: + ! file - read bathymetric information from the file + ! specified by (TOPO_FILE). + ! flat - flat bottom set to MAXIMUM_DEPTH. + ! bowl - an analytically specified bowl-shaped basin + ! ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. + ! spoon - a similar shape to 'bowl', but with an vertical + ! wall at the southern face. + ! halfpipe - a zonally uniform channel with a half-sine + ! profile in the meridional direction. + ! benchmark - use the benchmark test case topography. + ! Neverland - use the Neverland test case topography. + ! DOME - use a slope and channel configuration for the + ! DOME sill-overflow test case. + ! ISOMIP - use a slope and channel configuration for the + ! ISOMIP test case. + ! DOME2D - use a shelf and slope configuration for the + ! DOME2D gravity current/overflow test case. + ! Kelvin - flat but with rotated land mask. + ! seamount - Gaussian bump for spontaneous motion test case. + ! dumbbell - Sloshing channel with reservoirs on both ends. + ! shelfwave - exponential slope for shelfwave test case. + ! Phillips - ACC-like idealized topography used in the Phillips config. + ! dense - Denmark Strait-like dense water formation and overflow. + ! USER - call a user modified routine. +TOPO_FILE = "ocean_topog.nc" ! default = "topog.nc" + ! The file from which the bathymetry is read. +ALLOW_LANDMASK_CHANGES = MOM6_ALLOW_LANDMASK_CHANGES ! default = "False" + ! If true, allow topography overrides to change ocean points to land +MAXIMUM_DEPTH = 6500.0 ! [m] + ! The maximum depth of the ocean. +MINIMUM_DEPTH = 9.5 ! [m] default = 0.0 + ! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is + ! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is + ! specified, then all depths shallower than MINIMUM_DEPTH but deeper than + ! MASKING_DEPTH are rounded to MINIMUM_DEPTH. +GRID_ROTATION_ANGLE_BUGS = False ! [Boolean] default = True + ! If true, use an older algorithm to calculate the sine and + ! cosines needed rotate between grid-oriented directions and + ! true north and east. Differences arise at the tripolar fold + +USE_TRIPOLAR_GEOLONB_BUG = False ! [Boolean] default = True + ! If true, use older code that incorrectly sets the longitude in some points + ! along the tripolar fold to be off by 360 degrees. +! === module MOM_open_boundary === +! Controls where open boundaries are located, what kind of boundary condition to impose, and what data to apply, +! if any. +MASKING_DEPTH = 0.0 ! [m] default = -9999.0 + ! The depth below which to mask points as land points, for which all fluxes are + ! zeroed out. MASKING_DEPTH is ignored if negative. +CHANNEL_CONFIG = "list" ! default = "none" + ! A parameter that determines which set of channels are + ! restricted to specific widths. Options are: + ! none - All channels have the grid width. + ! global_1deg - Sets 16 specific channels appropriate + ! for a 1-degree model, as used in CM2G. + ! list - Read the channel locations and widths from a + ! text file, like MOM_channel_list in the MOM_SIS + ! test case. + ! file - Read open face widths everywhere from a + ! NetCDF file on the model grid. +CHANNEL_LIST_FILE = "MOM_channels_global_025" ! default = "MOM_channel_list" + ! The file from which the list of narrowed channels is read. +PARALLEL_RESTARTFILES = True ! [Boolean] default = False + ! If true, each processor writes its own restart file, otherwise a single + ! restart file is generated + +! === module MOM_verticalGrid === +! Parameters providing information about the vertical grid. +NK = 75 ! [nondim] + ! The number of model layers. + +! === module MOM_tracer_registry === + +! === module MOM_EOS === +DTFREEZE_DP = -7.75E-08 ! [deg C Pa-1] default = 0.0 + ! When TFREEZE_FORM=LINEAR, this is the derivative of the freezing potential + ! temperature with pressure. + +! === module MOM_restart === + +! === module MOM_tracer_flow_control === +USE_IDEAL_AGE_TRACER = False ! [Boolean] default = False + ! If true, use the ideal_age_example tracer package. + +! === module ideal_age_example === + +! === module MOM_coord_initialization === +COORD_CONFIG = "file" ! + ! This specifies how layers are to be defined: + ! ALE or none - used to avoid defining layers in ALE mode + ! file - read coordinate information from the file + ! specified by (COORD_FILE). + ! BFB - Custom coords for buoyancy-forced basin case + ! based on SST_S, T_BOT and DRHO_DT. + ! linear - linear based on interfaces not layers + ! layer_ref - linear based on layer densities + ! ts_ref - use reference temperature and salinity + ! ts_range - use range of temperature and salinity + ! (T_REF and S_REF) to determine surface density + ! and GINT calculate internal densities. + ! gprime - use reference density (RHO_0) for surface + ! density and GINT calculate internal densities. + ! ts_profile - use temperature and salinity profiles + ! (read from COORD_FILE) to set layer densities. + ! USER - call a user modified routine. +COORD_FILE = "layer_coord.nc" ! + ! The file from which the coordinate densities are read. +REMAP_UV_USING_OLD_ALG = True ! [Boolean] default = True + ! If true, uses the old remapping-via-a-delta-z method for remapping u and v. If + ! false, uses the new method that remaps between grids described by an old and + ! new thickness. +REGRIDDING_COORDINATE_MODE = "HYCOM1" ! default = "LAYER" + ! Coordinate mode for vertical regridding. Choose among the following + ! possibilities: LAYER - Isopycnal or stacked shallow water layers + ! ZSTAR, Z* - stretched geopotential z* + ! SIGMA_SHELF_ZSTAR - stretched geopotential z* ignoring shelf + ! SIGMA - terrain following coordinates + ! RHO - continuous isopycnal + ! HYCOM1 - HyCOM-like hybrid coordinate + ! SLIGHT - stretched coordinates above continuous isopycnal + ! ADAPTIVE - optimize for smooth neutral density surfaces +BOUNDARY_EXTRAPOLATION = True ! [Boolean] default = False + ! When defined, a proper high-order reconstruction scheme is used within + ! boundary cells rather than PCM. E.g., if PPM is used for remapping, a PPM + ! reconstruction will also be used within boundary cells. +ALE_COORDINATE_CONFIG = "HYBRID:hycom1_75_800m.nc,sigma2,FNC1:2,4000,4.5,.01" ! default = "UNIFORM" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter ALE_RESOLUTION + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz +!ALE_RESOLUTION = 7*2.0, 2*2.01, 2.02, 2.03, 2.05, 2.08, 2.11, 2.15, 2.21, 2.2800000000000002, 2.37, 2.48, 2.61, 2.77, 2.95, 3.17, 3.4299999999999997, 3.74, 4.09, 4.49, 4.95, 5.48, 6.07, 6.74, 7.5, 8.34, 9.280000000000001, 10.33, 11.49, 12.77, 14.19, 15.74, 17.450000000000003, 19.31, 21.35, 23.56, 25.97, 28.580000000000002, 31.41, 34.47, 37.77, 41.32, 45.14, 49.25, 53.65, 58.370000000000005, 63.42, 68.81, 74.56, 80.68, 87.21000000000001, 94.14, 101.51, 109.33, 117.62, 126.4, 135.68, 145.5, 155.87, 166.81, 178.35, 190.51, 203.31, 216.78, 230.93, 245.8, 261.42, 277.83 ! [m] + ! The distribution of vertical resolution for the target + ! grid used for Eulerian-like coordinates. For example, + ! in z-coordinate mode, the parameter is a list of level + ! thicknesses (in m). In sigma-coordinate mode, the list + ! is of non-dimensional fractions of the water column. +!TARGET_DENSITIES = 1010.0, 1014.3034, 1017.8088, 1020.843, 1023.5566, 1025.813, 1027.0275, 1027.9114, 1028.6422, 1029.2795, 1029.852, 1030.3762, 1030.8626, 1031.3183, 1031.7486, 1032.1572, 1032.5471, 1032.9207, 1033.2798, 1033.6261, 1033.9608, 1034.2519, 1034.4817, 1034.6774, 1034.8508, 1035.0082, 1035.1533, 1035.2886, 1035.4159, 1035.5364, 1035.6511, 1035.7608, 1035.8661, 1035.9675, 1036.0645, 1036.1554, 1036.2411, 1036.3223, 1036.3998, 1036.4739, 1036.5451, 1036.6137, 1036.68, 1036.7441, 1036.8062, 1036.8526, 1036.8874, 1036.9164, 1036.9418, 1036.9647, 1036.9857, 1037.0052, 1037.0236, 1037.0409, 1037.0574, 1037.0738, 1037.0902, 1037.1066, 1037.123, 1037.1394, 1037.1558, 1037.1722, 1037.1887, 1037.206, 1037.2241, 1037.2435, 1037.2642, 1037.2866, 1037.3112, 1037.3389, 1037.3713, 1037.4118, 1037.475, 1037.6332, 1037.8104, 1038.0 ! [m] + ! HYBRID target densities for interfaces +REGRID_COMPRESSIBILITY_FRACTION = 0.01 ! [nondim] default = 0.0 + ! When interpolating potential density profiles we can add some artificial + ! compressibility solely to make homogeneous regions appear stratified. +MAXIMUM_INT_DEPTH_CONFIG = "FNC1:5,8000.0,1.0,.01" ! default = "NONE" + ! Determines how to specify the maximum interface depths. + ! Valid options are: + ! NONE - there are no maximum interface depths + ! PARAM - use the vector-parameter MAXIMUM_INTERFACE_DEPTHS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAXIMUM_INT_DEPTHS = 0.0, 5.0, 12.75, 23.25, 36.49, 52.480000000000004, 71.22, 92.71000000000001, 116.94000000000001, 143.92000000000002, 173.65, 206.13, 241.36, 279.33000000000004, 320.05000000000007, 363.5200000000001, 409.7400000000001, 458.7000000000001, 510.4100000000001, 564.8700000000001, 622.0800000000002, 682.0300000000002, 744.7300000000002, 810.1800000000003, 878.3800000000003, 949.3300000000004, 1023.0200000000004, 1099.4600000000005, 1178.6500000000005, 1260.5900000000006, 1345.2700000000007, 1432.7000000000007, 1522.8800000000008, 1615.8100000000009, 1711.490000000001, 1809.910000000001, 1911.080000000001, 2015.0000000000011, 2121.670000000001, 2231.080000000001, 2343.2400000000007, 2458.1500000000005, 2575.8100000000004, 2696.2200000000003, 2819.3700000000003, 2945.2700000000004, 3073.9200000000005, 3205.3200000000006, 3339.4600000000005, 3476.3500000000004, 3615.9900000000002, 3758.38, 3903.52, 4051.4, 4202.03, 4355.41, 4511.54, 4670.41, 4832.03, 4996.4, 5163.5199999999995, 5333.379999999999, 5505.989999999999, 5681.3499999999985, 5859.459999999998, 6040.319999999998, 6223.919999999998, 6410.269999999999, 6599.369999999999, 6791.219999999999, 6985.8099999999995, 7183.15, 7383.24, 7586.08, 7791.67, 8000.0 + ! The list of maximum depths for each interface. +MAX_LAYER_THICKNESS_CONFIG = "FNC1:400,31000.0,0.1,.01" ! default = "NONE" + ! Determines how to specify the maximum layer thicknesses. + ! Valid options are: + ! NONE - there are no maximum layer thicknesses + ! PARAM - use the vector-parameter MAX_LAYER_THICKNESS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAX_LAYER_THICKNESS = 400.0, 409.63, 410.32, 410.75, 411.07, 411.32, 411.52, 411.7, 411.86, 412.0, 412.13, 412.24, 412.35, 412.45, 412.54, 412.63, 412.71, 412.79, 412.86, 412.93, 413.0, 413.06, 413.12, 413.18, 413.24, 413.29, 413.34, 413.39, 413.44, 413.49, 413.54, 413.58, 413.62, 413.67, 413.71, 413.75, 413.78, 413.82, 413.86, 413.9, 413.93, 413.97, 414.0, 414.03, 414.06, 414.1, 414.13, 414.16, 414.19, 414.22, 414.24, 414.27, 414.3, 414.33, 414.35, 414.38, 414.41, 414.43, 414.46, 414.48, 414.51, 414.53, 414.55, 414.58, 414.6, 414.62, 414.65, 414.67, 414.69, 414.71, 414.73, 414.75, 414.77, 414.79, 414.83 ! [m] + ! The list of maximum thickness for each layer. +REMAPPING_SCHEME = "PPM_H4" ! default = "PLM" + ! This sets the reconstruction scheme used for vertical remapping for all + ! variables. It can be one of the following schemes: PCM (1st-order + ! accurate) + ! PLM (2nd-order accurate) + ! PPM_H4 (3rd-order accurate) + ! PPM_IH4 (3rd-order accurate) + ! PQM_IH4IH3 (4th-order accurate) + ! PQM_IH6IH5 (5th-order accurate) + +! === module MOM_grid === +! Parameters providing information about the lateral grid. + +! === module MOM_state_initialization === +INIT_LAYERS_FROM_Z_FILE = True ! [Boolean] default = False + ! If true, initialize the layer thicknesses, temperatures, and salinities from a + ! Z-space file on a latitude-longitude grid. + +! === module MOM_initialize_layers_from_Z === +TEMP_SALT_Z_INIT_FILE = "MOM6_IC_TS.nc" ! default = "temp_salt_z.nc" + ! The name of the z-space input file used to initialize + ! temperatures (T) and salinities (S). If T and S are not + ! in the same file, TEMP_Z_INIT_FILE and SALT_Z_INIT_FILE + ! must be set. +Z_INIT_FILE_PTEMP_VAR = "temp" ! default = "ptemp" + ! The name of the potential temperature variable in + ! TEMP_Z_INIT_FILE. +Z_INIT_FILE_SALT_VAR = "salt" ! default = "salt" + ! The name of the salinity variable in + ! SALT_Z_INIT_FILE. + +Z_INIT_ALE_REMAPPING = True ! [Boolean] default = False + ! If True, then remap straight to model coordinate from file. +Z_INIT_REMAP_OLD_ALG = True ! [Boolean] default = True + ! If false, uses the preferred remapping algorithm for initialization. If true, + ! use an older, less robust algorithm for remapping. + +! === module MOM_diag_mediator === +!Jiande NUM_DIAG_COORDS = 2 ! default = 1 +NUM_DIAG_COORDS = 1 ! default = 1 + ! The number of diagnostic vertical coordinates to use. + ! For each coordinate, an entry in DIAG_COORDS must be provided. +!Jiande DIAG_COORDS = "z Z ZSTAR", "rho2 RHO2 RHO" ! +DIAG_COORDS = "z Z ZSTAR" + ! A list of string tuples associating diag_table modules to + ! a coordinate definition used for diagnostics. Each string + ! is of the form "MODULE_SUFFIX,PARAMETER_SUFFIX,COORDINATE_NAME". +DIAG_COORD_DEF_Z="FILE:interpolate_zgrid_40L.nc,interfaces=zw" +DIAG_MISVAL = -1e34 +!DIAG_COORD_DEF_RHO2 = "RFNC1:35,999.5,1028,1028.5,8.,1038.,0.0078125" ! default = "WOA09" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter DIAG_COORD_RES_RHO2 + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz + +! === module MOM_MEKE === +USE_MEKE = True ! [Boolean] default = False + ! If true, turns on the MEKE scheme which calculates a sub-grid mesoscale eddy + ! kinetic energy budget. +MEKE_GMCOEFF = 1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of potential energy into MEKE by the + ! thickness mixing parameterization. If MEKE_GMCOEFF is negative, this + ! conversion is not used or calculated. +MEKE_BGSRC = 1.0E-13 ! [W kg-1] default = 0.0 + ! A background energy source for MEKE. +MEKE_KHTH_FAC = 0.5 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTh. +MEKE_KHTR_FAC = 0.5 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTr. +MEKE_KHMEKE_FAC = 1.0 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to Kh for MEKE itself. +MEKE_VISCOSITY_COEFF_KU = 1.0 ! [nondim] default = 0.0 + ! If non-zero, is the scaling coefficient in the expression forviscosity used to + ! parameterize harmonic lateral momentum mixing byunresolved eddies represented + ! by MEKE. Can be negative torepresent backscatter from the unresolved eddies. +MEKE_ALPHA_RHINES = 0.15 ! [nondim] default = 0.05 + ! If positive, is a coefficient weighting the Rhines scale in the expression for + ! mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_EADY = 0.15 ! [nondim] default = 0.05 + ! If positive, is a coefficient weighting the Eady length scale in the + ! expression for mixing length used in MEKE-derived diffusivity. + +! === module MOM_lateral_mixing_coeffs === +USE_VARIABLE_MIXING = True ! [Boolean] default = False + ! If true, the variable mixing code will be called. This allows diagnostics to + ! be created even if the scheme is not used. If KHTR_SLOPE_CFF>0 or + ! KhTh_Slope_Cff>0, this is set to true regardless of what is in the parameter + ! file. +RESOLN_SCALED_KH = True ! [Boolean] default = False + ! If true, the Laplacian lateral viscosity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_SCALED_KHTH = True ! [Boolean] default = False + ! If true, the interface depth diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. +KHTH_USE_EBT_STRUCT = True ! [Boolean] default = False + ! If true, uses the equivalent barotropic structure as the vertical structure of + ! thickness diffusivity. +KHTR_SLOPE_CFF = 0.25 ! [nondim] default = 0.0 + ! The nondimensional coefficient in the Visbeck formula for the epipycnal tracer + ! diffusivity +USE_STORED_SLOPES = True ! [Boolean] default = False + ! If true, the isopycnal slopes are calculated once and stored for re-use. This + ! uses more memory but avoids calling the equation of state more times than + ! should be necessary. +KH_RES_FN_POWER = 100 ! [nondim] default = 2 + ! The power of dx/Ld in the Kh resolution function. Any positive integer may be + ! used, although even integers are more efficient to calculate. Setting this + ! greater than 100 results in a step-function being used. +INTERPOLATE_RES_FN = False ! [Boolean] default = True + ! If true, interpolate the resolution function to the velocity points from the + ! thickness points; otherwise interpolate the wave speed and calculate the + ! resolution function independently at each point. +GILL_EQUATORIAL_LD = True ! [Boolean] default = False + ! If true, uses Gill's definition of the baroclinic equatorial deformation + ! radius, otherwise, if false, use Pedlosky's definition. These definitions + ! differ by a factor of 2 in front of the beta term in the denominator. Gill's + ! is the more appropriate definition. + +! === module MOM_set_visc === +CHANNEL_DRAG = True ! [Boolean] default = False + ! If true, the bottom drag is exerted directly on each layer proportional to the + ! fraction of the bottom it overlies. +PRANDTL_TURB = 1.25 ! [nondim] default = 1.0 + ! The turbulent Prandtl number applied to shear instability. +HBBL = 10.0 ! [m] + ! The thickness of a bottom boundary layer with a viscosity of KVBBL if + ! BOTTOMDRAGLAW is not defined, or the thickness over which near-bottom + ! velocities are averaged for the drag law if BOTTOMDRAGLAW is defined but + ! LINEAR_DRAG is not. +DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0 + ! DRAG_BG_VEL is either the assumed bottom velocity (with LINEAR_DRAG) or an + ! unresolved velocity that is combined with the resolved velocity to estimate + ! the velocity magnitude. DRAG_BG_VEL is only used when BOTTOMDRAGLAW is + ! defined. +BBL_USE_EOS = True ! [Boolean] default = False + ! If true, use the equation of state in determining the properties of the bottom + ! boundary layer. Otherwise use the layer target potential densities. +BBL_THICK_MIN = 0.1 ! [m] default = 0.0 + ! The minimum bottom boundary layer thickness that can be used with + ! BOTTOMDRAGLAW. This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum + ! near-bottom viscosity. +KV = 1.0E-04 ! [m2 s-1] + ! The background kinematic viscosity in the interior. The molecular value, ~1e-6 + ! m2 s-1, may be used. +KV_BBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the bottom boundary layer. +KV_TBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the top boundary layer. + +! === module MOM_thickness_diffuse === +KHTH_MAX_CFL = 0.1 ! [nondimensional] default = 0.8 + ! The maximum value of the local diffusive CFL ratio that is permitted for the + ! thickness diffusivity. 1.0 is the marginally unstable value in a pure layered + ! model, but much smaller numbers (e.g. 0.1) seem to work better for ALE-based + ! models. +KHTH_USE_FGNV_STREAMFUNCTION = True ! [Boolean] default = False + ! If true, use the streamfunction formulation of Ferrari et al., 2010, which + ! effectively emphasizes graver vertical modes by smoothing in the vertical. +FGNV_FILTER_SCALE = 0.1 ! [nondim] default = 1.0 + ! A coefficient scaling the vertical smoothing term in the Ferrari et al., 2010, + ! streamfunction formulation. +USE_GM_WORK_BUG = True ! [Boolean] default = True + ! If true, compute the top-layer work tendency on the u-grid with the incorrect + ! sign, for legacy reproducibility. + +! === module MOM_continuity === + +! === module MOM_continuity_PPM === +ETA_TOLERANCE = 1.0E-06 ! [m] default = 3.75E-09 + ! The tolerance for the differences between the barotropic and baroclinic + ! estimates of the sea surface height due to the fluxes through each face. The + ! total tolerance for SSH is 4 times this value. The default is + ! 0.5*NK*ANGSTROM, and this should not be set less than about + ! 10^-15*MAXIMUM_DEPTH. +ETA_TOLERANCE_AUX = 0.001 ! [m] default = 1.0E-06 + ! The tolerance for free-surface height discrepancies between the barotropic + ! solution and the sum of the layer thicknesses when calculating the auxiliary + ! corrected velocities. By default, this is the same as ETA_TOLERANCE, but can + ! be made larger for efficiency. + +! === module MOM_CoriolisAdv === +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the Coriolis terms. Valid + ! values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy +BOUND_CORIOLIS = True ! [Boolean] default = False + ! If true, the Coriolis terms at u-points are bounded by the four estimates of + ! (f+rv)v from the four neighboring v-points, and similarly at v-points. This + ! option would have no effect on the SADOURNY Coriolis scheme if it were + ! possible to use centered difference thickness fluxes. + +! === module MOM_PressureForce === + +! === module MOM_PressureForce_AFV === +MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False + ! If true, use mass weighting when interpolating T/S for integrals near the + ! bathymetry in AFV pressure gradient calculations. + +! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid spacing to calculate the + ! Laplacian viscosity. The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. +KH_SIN_LAT = 2000.0 ! [m2 s-1] default = 0.0 + ! The amplitude of a latitudinally-dependent background viscosity of the form + ! KH_SIN_LAT*(SIN(LAT)**KH_PWR_OF_SINE). +SMAGORINSKY_KH = True ! [Boolean] default = False + ! If true, use a Smagorinsky nonlinear eddy viscosity. +SMAG_LAP_CONST = 0.15 ! [nondim] default = 0.0 + ! The nondimensional Laplacian Smagorinsky constant, often 0.15. +AH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the cube of the grid spacing to + ! calculate the biharmonic viscosity. The final viscosity is the largest of this + ! scaled viscosity, the Smagorinsky and Leith viscosities, and AH. +SMAGORINSKY_AH = True ! [Boolean] default = False + ! If true, use a biharmonic Smagorinsky nonlinear eddy viscosity. +SMAG_BI_CONST = 0.06 ! [nondim] default = 0.0 + ! The nondimensional biharmonic Smagorinsky constant, typically 0.015 - 0.06. +USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False + ! If true, use Use the land mask for the computation of thicknesses at velocity + ! locations. This eliminates the dependence on arbitrary values over land or + ! outside of the domain. Default is False in order to maintain answers with + ! legacy experiments but should be changed to True for new experiments. + +! === module MOM_vert_friction === +HMIX_FIXED = 0.5 ! [m] + ! The prescribed depth over which the near-surface viscosity and diffusivity are + ! elevated when the bulk mixed layer is not used. +MAXVEL = 6.0 ! [m s-1] default = 3.0E+08 + ! The maximum velocity allowed before the velocity components are truncated. + +! === module MOM_PointAccel === +U_TRUNC_FILE = "U_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to zonal + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. +V_TRUNC_FILE = "V_velocity_truncations" ! default = "" + ! The absolute path to a file into which the accelerations leading to meridional + ! velocity truncations are written. Undefine this for efficiency if this + ! diagnostic is not needed. + +! === module MOM_barotropic === +BOUND_BT_CORRECTION = True ! [Boolean] default = False + ! If true, the corrective pseudo mass-fluxes into the barotropic solver are + ! limited to values that require less than maxCFL_BT_cont to be accommodated. +BT_PROJECT_VELOCITY = True ! [Boolean] default = False + ! If true, step the barotropic velocity first and project out the velocity + ! tendency by 1+BEBT when calculating the transport. The default (false) is to + ! use a predictor continuity step to find the pressure field, and then to do a + ! corrector continuity step using a weighted average of the old and new + ! velocities, with weights of (1-BEBT) and BEBT. +DYNAMIC_SURFACE_PRESSURE = True ! [Boolean] default = False + ! If true, add a dynamic pressure due to a viscous ice shelf, for instance. +BEBT = 0.2 ! [nondim] default = 0.1 + ! BEBT determines whether the barotropic time stepping uses the forward-backward + ! time-stepping scheme or a backward Euler scheme. BEBT is valid in the range + ! from 0 (for a forward-backward treatment of nonrotating gravity waves) to 1 + ! (for a backward Euler treatment). In practice, BEBT must be greater than about + ! 0.05. +DTBT = -0.9 ! [s or nondim] default = -0.98 + ! The barotropic time step, in s. DTBT is only used with the split explicit time + ! stepping. To set the time step automatically based the maximum stable value + ! use 0, or a negative value gives the fraction of the stable value. Setting + ! DTBT to 0 is the same as setting it to -0.98. The value of DTBT that will + ! actually be used is an integer fraction of DT, rounding down. +BT_USE_OLD_CORIOLIS_BRACKET_BUG = True ! [Boolean] default = False + ! If True, use an order of operations that is not bitwise rotationally symmetric + ! in the meridional Coriolis term of the barotropic solver. + +! === module MOM_mixed_layer_restrat === +MIXEDLAYER_RESTRAT = True ! [Boolean] default = False + ! If true, a density-gradient dependent re-stratifying flow is imposed in the + ! mixed layer. Can be used in ALE mode without restriction but in layer mode can + ! only be used if BULKMIXEDLAYER is true. +FOX_KEMPER_ML_RESTRAT_COEF = 1.0 ! [nondim] default = 0.0 + ! A nondimensional coefficient that is proportional to the ratio of the + ! deformation radius to the dominant lengthscale of the submesoscale mixed layer + ! instabilities, times the minimum of the ratio of the mesoscale eddy kinetic + ! energy to the large-scale geostrophic kinetic energy or 1 plus the square of + ! the grid spacing over the deformation radius, as detailed by Fox-Kemper et al. + ! (2010) +MLE_FRONT_LENGTH = 200.0 ! [m] default = 0.0 + ! If non-zero, is the frontal-length scale used to calculate the upscaling of + ! buoyancy gradients that is otherwise represented by the parameter + ! FOX_KEMPER_ML_RESTRAT_COEF. If MLE_FRONT_LENGTH is non-zero, it is recommended + ! to set FOX_KEMPER_ML_RESTRAT_COEF=1.0. +MLE_USE_PBL_MLD = True ! [Boolean] default = False + ! If true, the MLE parameterization will use the mixed-layer depth provided by + ! the active PBL parameterization. If false, MLE will estimate a MLD based on a + ! density difference with the surface using the parameter MLE_DENSITY_DIFF. +MLE_MLD_DECAY_TIME = 2.592E+06 ! [s] default = 0.0 + ! The time-scale for a running-mean filter applied to the mixed-layer depth used + ! in the MLE restratification parameterization. When the MLD deepens below the + ! current running-mean the running-mean is instantaneously set to the current + ! MLD. + +! === module MOM_diabatic_driver === +! The following parameters are used for diabatic processes. +ENERGETICS_SFC_PBL = True ! [Boolean] default = False + ! If true, use an implied energetics planetary boundary layer scheme to + ! determine the diffusivity and viscosity in the surface boundary layer. +EPBL_IS_ADDITIVE = False ! [Boolean] default = True + ! If true, the diffusivity from ePBL is added to all other diffusivities. + ! Otherwise, the larger of kappa-shear and ePBL diffusivities are used. + +! === module MOM_CVMix_KPP === +! This is the MOM wrapper to CVMix:KPP +! See http://cvmix.github.io/ + +! === module MOM_tidal_mixing === +! Vertical Tidal Mixing Parameterization +INT_TIDE_DISSIPATION = True ! [Boolean] default = False + ! If true, use an internal tidal dissipation scheme to drive diapycnal mixing, + ! along the lines of St. Laurent et al. (2002) and Simmons et al. (2004). +INT_TIDE_PROFILE = "POLZIN_09" ! default = "STLAURENT_02" + ! INT_TIDE_PROFILE selects the vertical profile of energy dissipation with + ! INT_TIDE_DISSIPATION. Valid values are: + ! STLAURENT_02 - Use the St. Laurent et al exponential + ! decay profile. + ! POLZIN_09 - Use the Polzin WKB-stretched algebraic + ! decay profile. +INT_TIDE_DECAY_SCALE = 300.3003003003003 ! [m] default = 500.0 + ! The decay scale away from the bottom for tidal TKE with the new coding when + ! INT_TIDE_DISSIPATION is used. +KAPPA_ITIDES = 6.28319E-04 ! [m-1] default = 6.283185307179586E-04 + ! A topographic wavenumber used with INT_TIDE_DISSIPATION. The default is 2pi/10 + ! km, as in St.Laurent et al. 2002. +KAPPA_H2_FACTOR = 0.84 ! [nondim] default = 1.0 + ! A scaling factor for the roughness amplitude with INT_TIDE_DISSIPATION. +TKE_ITIDE_MAX = 0.1 ! [W m-2] default = 1000.0 + ! The maximum internal tide energy source available to mix above the bottom + ! boundary layer with INT_TIDE_DISSIPATION. +READ_TIDEAMP = True ! [Boolean] default = False + ! If true, read a file (given by TIDEAMP_FILE) containing the tidal amplitude + ! with INT_TIDE_DISSIPATION. +TIDEAMP_FILE = "tidal_amplitude.nc" ! default = "tideamp.nc" + ! The path to the file containing the spatially varying tidal amplitudes with + ! INT_TIDE_DISSIPATION. +H2_FILE = "ocean_topog.nc" ! + ! The path to the file containing the sub-grid-scale topographic roughness + ! amplitude with INT_TIDE_DISSIPATION. + +! === module MOM_CVMix_conv === +! Parameterization of enhanced mixing due to convection via CVMix + +! === module MOM_geothermal === +GEOTHERMAL_SCALE = 1.0 ! [W m-2 or various] default = 0.0 + ! The constant geothermal heat flux, a rescaling factor for the heat flux read + ! from GEOTHERMAL_FILE, or 0 to disable the geothermal heating. +GEOTHERMAL_FILE = "geothermal_davies2013_v1.nc" ! default = "" + ! The file from which the geothermal heating is to be read, or blank to use a + ! constant heating rate. +GEOTHERMAL_VARNAME = "geothermal_hf" ! default = "geo_heat" + ! The name of the geothermal heating variable in GEOTHERMAL_FILE. + +! === module MOM_set_diffusivity === +BBL_MIXING_AS_MAX = False ! [Boolean] default = True + ! If true, take the maximum of the diffusivity from the BBL mixing and the other + ! diffusivities. Otherwise, diffusivity from the BBL_mixing is simply added. +USE_LOTW_BBL_DIFFUSIVITY = True ! [Boolean] default = False + ! If true, uses a simple, imprecise but non-coordinate dependent, model of BBL + ! mixing diffusivity based on Law of the Wall. Otherwise, uses the original BBL + ! scheme. +SIMPLE_TKE_TO_KD = True ! [Boolean] default = False + ! If true, uses a simple estimate of Kd/TKE that will work for arbitrary + ! vertical coordinates. If false, calculates Kd/TKE and bounds based on exact + ! energetics for an isopycnal layer-formulation. + +! === module MOM_bkgnd_mixing === +! Adding static vertical background mixing coefficients +KD = 1.5E-05 ! [m2 s-1] + ! The background diapycnal diffusivity of density in the interior. Zero or the + ! molecular value, ~1e-7 m2 s-1, may be used. +KD_MIN = 2.0E-06 ! [m2 s-1] default = 1.5E-07 + ! The minimum diapycnal diffusivity. +HENYEY_IGW_BACKGROUND = True ! [Boolean] default = False + ! If true, use a latitude-dependent scaling for the near surface background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +KD_MAX = 0.1 ! [m2 s-1] default = -1.0 + ! The maximum permitted increment for the diapycnal diffusivity from TKE-based + ! parameterizations, or a negative value for no limit. + +! === module MOM_kappa_shear === +! Parameterization of shear-driven turbulence following Jackson, Hallberg and Legg, JPO 2008 +USE_JACKSON_PARAM = True ! [Boolean] default = False + ! If true, use the Jackson-Hallberg-Legg (JPO 2008) shear mixing + ! parameterization. +MAX_RINO_IT = 25 ! [nondim] default = 50 + ! The maximum number of iterations that may be used to estimate the Richardson + ! number driven mixing. +VERTEX_SHEAR = False ! [Boolean] default = False + ! If true, do the calculations of the shear-driven mixing + ! at the cell vertices (i.e., the vorticity points). +KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True + ! If true, use an older, dimensionally inconsistent estimate of the derivative + ! of diffusivity with energy in the Newton's method iteration. The bug causes + ! undercorrections when dz > 1 m. +KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True + ! If true, report back the latest estimate of TKE instead of the time average + ! TKE when there is mass in all layers. Otherwise always report the time + ! averaged TKE, as is currently done when there are some massless layers. + +! === module MOM_CVMix_shear === +! Parameterization of shear-driven turbulence via CVMix (various options) + +! === module MOM_CVMix_ddiff === +! Parameterization of mixing due to double diffusion processes via CVMix + +! === module MOM_diabatic_aux === +! The following parameters are used for auxiliary diabatic processes. +PRESSURE_DEPENDENT_FRAZIL = False ! [Boolean] default = False + ! If true, use a pressure dependent freezing temperature when making frazil. The + ! default is false, which will be faster but is inappropriate with ice-shelf + ! cavities. +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by OPACITY_SCHEME to determine + ! the e-folding depth of incoming short wave radiation. +CHL_FILE = CHLCLIM ! CHL_FILE is the file containing chl_a concentrations in the variable CHL_A. It + ! is used when VAR_PEN_SW and CHL_FROM_FILE are true. +CHL_VARNAME = "chlor_a" ! default = "CHL_A" + ! Name of CHL_A variable in CHL_FILE. + +! === module MOM_energetic_PBL === +ML_OMEGA_FRAC = 0.001 ! [nondim] default = 0.0 + ! When setting the decay scale for turbulence, use this fraction of the absolute + ! rotation rate blended with the local value of f, as sqrt((1-of)*f^2 + + ! of*4*omega^2). +TKE_DECAY = 0.01 ! [nondim] default = 2.5 + ! TKE_DECAY relates the vertical rate of decay of the TKE available for + ! mechanical entrainment to the natural Ekman depth. +EPBL_MSTAR_SCHEME = "OM4" ! default = "CONSTANT" + ! EPBL_MSTAR_SCHEME selects the method for setting mstar. Valid values are: + ! CONSTANT - Use a fixed mstar given by MSTAR + ! OM4 - Use L_Ekman/L_Obukhov in the sabilizing limit, as in OM4 + ! REICHL_H18 - Use the scheme documented in Reichl & Hallberg, 2018. +MSTAR_CAP = 10.0 ! [nondim] default = -1.0 + ! If this value is positive, it sets the maximum value of mstar allowed in ePBL. + ! (This is not used if EPBL_MSTAR_SCHEME = CONSTANT). +MSTAR2_COEF1 = 0.29 ! [nondim] default = 0.3 + ! Coefficient in computing mstar when rotation and stabilizing effects are both + ! important (used if EPBL_MSTAR_SCHEME = OM4). +MSTAR2_COEF2 = 0.152 ! [nondim] default = 0.085 + ! Coefficient in computing mstar when only rotation limits the total mixing + ! (used if EPBL_MSTAR_SCHEME = OM4) +NSTAR = 0.06 ! [nondim] default = 0.2 + ! The portion of the buoyant potential energy imparted by surface fluxes that is + ! available to drive entrainment at the base of mixed layer when that energy is + ! positive. +MSTAR_CONV_ADJ = 0.667 ! [nondim] default = 0.0 + ! Coefficient used for reducing mstar during convection due to reduction of + ! stable density gradient. +USE_MLD_ITERATION = True ! [Boolean] default = False + ! A logical that specifies whether or not to use the distance to the bottom of + ! the actively turbulent boundary layer to help set the EPBL length scale. +EPBL_TRANSITION_SCALE = 0.01 ! [nondim] default = 0.1 + ! A scale for the mixing length in the transition layer at the edge of the + ! boundary layer as a fraction of the boundary layer thickness. +MIX_LEN_EXPONENT = 1.0 ! [nondim] default = 2.0 + ! The exponent applied to the ratio of the distance to the MLD and the MLD depth + ! which determines the shape of the mixing length. This is only used if + ! USE_MLD_ITERATION is True. +USE_LA_LI2016 = MOM6_REPRO_LA ! [nondim] default = False + ! A logical to use the Li et al. 2016 (submitted) formula to determine the + ! Langmuir number. +LT_ENHANCE = 3 ! [nondim] default = 0 + ! Integer for Langmuir number mode. + ! *Requires USE_LA_LI2016 to be set to True. + ! Options: 0 - No Langmuir + ! 1 - Van Roekel et al. 2014/Li et al., 2016 + ! 2 - Multiplied w/ adjusted La. + ! 3 - Added w/ adjusted La. +USE_WAVES = MOM6_USE_WAVES ! [Boolean] default = False + ! If true, enables surface wave modules. +WAVE_METHOD = "SURFACE_BANDS" ! default = "EMPTY" + ! Choice of wave method, valid options include: + ! TEST_PROFILE - Prescribed from surface Stokes drift + ! and a decay wavelength. + ! SURFACE_BANDS - Computed from multiple surface values + ! and decay wavelengths. + ! DHH85 - Uses Donelan et al. 1985 empirical + ! wave spectrum with prescribed values. + ! LF17 - Infers Stokes drift profile from wind + ! speed following Li and Fox-Kemper 2017. +SURFBAND_SOURCE = "COUPLER" ! default = "EMPTY" + ! Choice of SURFACE_BANDS data mode, valid options include: + ! DATAOVERRIDE - Read from NetCDF using FMS DataOverride. + ! COUPLER - Look for variables from coupler pass + ! INPUT - Testing with fixed values. +STK_BAND_COUPLER = 3 ! default = 1 + ! STK_BAND_COUPLER is the number of Stokes drift bands in the coupler. This has + ! to be consistent with the number of Stokes drift bands in WW3, or the model + ! will fail. +SURFBAND_WAVENUMBERS = 0.04, 0.11, 0.3305 ! [rad/m] default = 0.12566 + ! Central wavenumbers for surface Stokes drift bands. +EPBL_LANGMUIR_SCHEME = "ADDITIVE" ! default = "NONE" + ! EPBL_LANGMUIR_SCHEME selects the method for including Langmuir turbulence. + ! Valid values are: + ! NONE - Do not do any extra mixing due to Langmuir turbulence + ! RESCALE - Use a multiplicative rescaling of mstar to account for Langmuir + ! turbulence + ! ADDITIVE - Add a Langmuir turblence contribution to mstar to other + ! contributions +LT_ENHANCE_COEF = 0.044 ! [nondim] default = 0.447 + ! Coefficient for Langmuir enhancement of mstar +LT_ENHANCE_EXP = -1.5 ! [nondim] default = -1.33 + ! Exponent for Langmuir enhancementt of mstar +LT_MOD_LAC1 = 0.0 ! [nondim] default = -0.87 + ! Coefficient for modification of Langmuir number due to MLD approaching Ekman + ! depth. +LT_MOD_LAC4 = 0.0 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! stable Obukhov depth. +LT_MOD_LAC5 = 0.22 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! unstable Obukhov depth. + +! === module MOM_regularize_layers === + +! === module MOM_opacity === +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by + ! OPACITY_SCHEME to determine the e-folding depth of + ! incoming short wave radiation. +CHL_FILE = CHLCLIM ! CHL_FILE is the file containing chl_a concentrations in + ! the variable CHL_A. It is used when VAR_PEN_SW and + ! CHL_FROM_FILE are true. +CHL_VARNAME = "chlor_a" ! default = "CHL_A" + ! Name of CHL_A variable in CHL_FILE. +PEN_SW_NBANDS = 3 ! default = 1 + ! The number of bands of penetrating shortwave radiation. + +! === module MOM_tracer_advect === +TRACER_ADVECTION_SCHEME = "PPM:H3" ! default = "PLM" + ! The horizontal transport scheme for tracers: + ! PLM - Piecewise Linear Method + ! PPM:H3 - Piecewise Parabolic Method (Huyhn 3rd order) + ! PPM - Piecewise Parabolic Method (Colella-Woodward) + +! === module MOM_tracer_hor_diff === +KHTR = 50.0 ! [m2 s-1] default = 0.0 + ! The background along-isopycnal tracer diffusivity. +CHECK_DIFFUSIVE_CFL = True ! [Boolean] default = False + ! If true, use enough iterations the diffusion to ensure that the diffusive + ! equivalent of the CFL limit is not violated. If false, always use the greater + ! of 1 or MAX_TR_DIFFUSION_CFL iteration. +MAX_TR_DIFFUSION_CFL = 2.0 ! [nondim] default = -1.0 + ! If positive, locally limit the along-isopycnal tracer diffusivity to keep the + ! diffusive CFL locally at or below this value. The number of diffusive + ! iterations is often this value or the next greater integer. + +! === module MOM_neutral_diffusion === +! This module implements neutral diffusion of tracers +USE_NEUTRAL_DIFFUSION = True ! [Boolean] default = False + ! If true, enables the neutral diffusion module. + +! === module ocean_model_init === +OCEAN_SURFACE_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the surface velocity field that is + ! returned to the coupler. Valid values include + ! 'A', 'B', or 'C'. +RESTART_CHECKSUMS_REQUIRED = False +! === module MOM_lateral_boundary_diffusion === +! This module implements lateral diffusion of tracers near boundaries + +! === module MOM_sum_output === +MAXTRUNC = 100000 ! [truncations save_interval-1] default = 0 + ! The run will be stopped, and the day set to a very large value if the velocity + ! is truncated more than MAXTRUNC times between energy saves. Set MAXTRUNC to 0 + ! to stop if there is any truncation of velocities. +ENERGYSAVEDAYS = 1.0 ! [days] default = 1.0 + ! The interval in units of TIMEUNIT between saves of the energies of the run and + ! other globally summed diagnostics. +ENERGYSAVEDAYS_GEOMETRIC = 0.25 ! [days] default = 0.0 + ! The starting interval in units of TIMEUNIT for the first call to save the + ! energies of the run and other globally summed diagnostics. The interval + ! increases by a factor of 2. after each call to write_energy. + +! === module ocean_model_init === + +! === module MOM_surface_forcing === +MAX_P_SURF = 0.0 ! [Pa] default = -1.0 + ! The maximum surface pressure that can be exerted by the atmosphere and + ! floating sea-ice or ice shelves. This is needed because the FMS coupling + ! structure does not limit the water that can be frozen out of the ocean and the + ! ice-ocean heat fluxes are treated explicitly. No limit is applied if a + ! negative value is used. +WIND_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the input wind stress field. Valid + ! values are 'A', 'B', or 'C'. +CD_TIDES = 0.0018 ! [nondim] default = 1.0E-04 + ! The drag coefficient that applies to the tides. +GUST_CONST = 0.0 ! [Pa] default = 0.02 + ! The background gustiness in the winds. +FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False + ! If true correct a bug in the time-averaging of the gustless wind friction + ! velocity +USE_RIGID_SEA_ICE = True ! [Boolean] default = False + ! If true, sea-ice is rigid enough to exert a nonhydrostatic pressure that + ! resist vertical motion. +SEA_ICE_RIGID_MASS = 100.0 ! [kg m-2] default = 1000.0 + ! The mass of sea-ice per unit area at which the sea-ice starts to exhibit + ! rigidity +LIQUID_RUNOFF_FROM_DATA = MOM6_RIVER_RUNOFF ! [Boolean] default = False + ! If true, allows liquid river runoff to be specified via + ! the data_table using the component name 'OCN'. +! === module MOM_restart === + +! === module MOM_file_parser === diff --git a/parm/mom6/MOM_input_template_100 b/parm/mom6/MOM_input_template_100 new file mode 100644 index 00000000000..24ea3c7c47a --- /dev/null +++ b/parm/mom6/MOM_input_template_100 @@ -0,0 +1,839 @@ +! This file was written by the model and records all non-layout or debugging parameters used at run-time. + +! === module MOM === + +! === module MOM_unit_scaling === +! Parameters for doing unit scaling of variables. +USE_REGRIDDING = True ! [Boolean] default = False + ! If True, use the ALE algorithm (regridding/remapping). If False, use the + ! layered isopycnal algorithm. +THICKNESSDIFFUSE = True ! [Boolean] default = False + ! If true, interface heights are diffused with a coefficient of KHTH. +THICKNESSDIFFUSE_FIRST = True ! [Boolean] default = False + ! If true, do thickness diffusion before dynamics. This is only used if + ! THICKNESSDIFFUSE is true. +DT = DT_DYNAM_MOM6 ! [s] + ! The (baroclinic) dynamics time step. The time-step that is actually used will + ! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode + ! or the coupling timestep in coupled mode.) +DT_THERM = DT_THERM_MOM6 ! [s] default = 1800.0 + ! The thermodynamic and tracer advection time step. Ideally DT_THERM should be + ! an integer multiple of DT and less than the forcing or coupling time-step, + ! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer + ! multiple of the coupling timestep. By default DT_THERM is set to DT. +THERMO_SPANS_COUPLING = MOM6_THERMO_SPAN ! [Boolean] default = False + ! If true, the MOM will take thermodynamic and tracer timesteps that can be + ! longer than the coupling timestep. The actual thermodynamic timestep that is + ! used in this case is the largest integer multiple of the coupling timestep + ! that is less than or equal to DT_THERM. +HFREEZE = 20.0 ! [m] default = -1.0 + ! If HFREEZE > 0, melt potential will be computed. The actual depth + ! over which melt potential is computed will be min(HFREEZE, OBLD) + ! where OBLD is the boundary layer depth. If HFREEZE <= 0 (default) + ! melt potential will not be computed. +DTBT_RESET_PERIOD = -1.0 ! [s] default = 7200.0 + ! The period between recalculations of DTBT (if DTBT <= 0). If DTBT_RESET_PERIOD + ! is negative, DTBT is set based only on information available at + ! initialization. If 0, DTBT will be set every dynamics time step. The default + ! is set by DT_THERM. This is only used if SPLIT is true. +FRAZIL = True ! [Boolean] default = False + ! If true, water freezes if it gets too cold, and the accumulated heat deficit + ! is returned in the surface state. FRAZIL is only used if + ! ENABLE_THERMODYNAMICS is true. +BOUND_SALINITY = True ! [Boolean] default = False + ! If true, limit salinity to being positive. (The sea-ice model may ask for more + ! salt than is available and drive the salinity negative otherwise.) +MIN_SALINITY = 0.01 ! [PPT] default = 0.0 + ! The minimum value of salinity when BOUND_SALINITY=True. +C_P = 3925.0 ! [J kg-1 K-1] default = 3991.86795711963 + ! The heat capacity of sea water, approximated as a constant. This is only used + ! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10 + ! definition of conservative temperature. +USE_PSURF_IN_EOS = False ! [Boolean] default = True + ! If true, always include the surface pressure contributions in equation of + ! state calculations. +CHECK_BAD_SURFACE_VALS = True ! [Boolean] default = False + ! If true, check the surface state for ridiculous values. +BAD_VAL_SSH_MAX = 50.0 ! [m] default = 20.0 + ! The value of SSH above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SSS_MAX = 75.0 ! [PPT] default = 45.0 + ! The value of SSS above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MAX = 55.0 ! [deg C] default = 45.0 + ! The value of SST above which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +BAD_VAL_SST_MIN = -3.0 ! [deg C] default = -2.1 + ! The value of SST below which a bad value message is triggered, if + ! CHECK_BAD_SURFACE_VALS is true. +DEFAULT_2018_ANSWERS = True ! [Boolean] default = False + ! This sets the default value for the various _2018_ANSWERS parameters. +WRITE_GEOM = 2 ! default = 1 + ! If =0, never write the geometry and vertical grid files. If =1, write the + ! geometry and vertical grid files only for a new simulation. If =2, always + ! write the geometry and vertical grid files. Other values are invalid. +SAVE_INITIAL_CONDS = True ! [Boolean] default = False + ! If true, write the initial conditions to a file given by IC_OUTPUT_FILE. + +! === module MOM_domains === +TRIPOLAR_N = True ! [Boolean] default = False + ! Use tripolar connectivity at the northern edge of the domain. With + ! TRIPOLAR_N, NIGLOBAL must be even. +NIGLOBAL = NX_GLB ! + ! The total number of thickness grid points in the x-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. +NJGLOBAL = NY_GLB ! + ! The total number of thickness grid points in the y-direction in the physical + ! domain. With STATIC_MEMORY_ this is set in MOM_memory.h at compile time. + +! === module MOM_hor_index === +! Sets the horizontal array index types. + +! === module MOM_fixed_initialization === +INPUTDIR = "INPUT" ! default = "." + ! The directory in which input files are found. + +! === module MOM_grid_init === +GRID_CONFIG = "mosaic" ! + ! A character string that determines the method for defining the horizontal + ! grid. Current options are: + ! mosaic - read the grid from a mosaic (supergrid) + ! file set by GRID_FILE. + ! cartesian - use a (flat) Cartesian grid. + ! spherical - use a simple spherical grid. + ! mercator - use a Mercator spherical grid. +GRID_FILE = "ocean_hgrid.nc" ! + ! Name of the file from which to read horizontal grid data. +GRID_ROTATION_ANGLE_BUGS = False ! [Boolean] default = True + ! If true, use an older algorithm to calculate the sine and + ! cosines needed rotate between grid-oriented directions and + ! true north and east. Differences arise at the tripolar fold +USE_TRIPOLAR_GEOLONB_BUG = False ! [Boolean] default = True + ! If true, use older code that incorrectly sets the longitude in some points + ! along the tripolar fold to be off by 360 degrees. +TOPO_CONFIG = "file" ! + ! This specifies how bathymetry is specified: + ! file - read bathymetric information from the file + ! specified by (TOPO_FILE). + ! flat - flat bottom set to MAXIMUM_DEPTH. + ! bowl - an analytically specified bowl-shaped basin + ! ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. + ! spoon - a similar shape to 'bowl', but with an vertical + ! wall at the southern face. + ! halfpipe - a zonally uniform channel with a half-sine + ! profile in the meridional direction. + ! bbuilder - build topography from list of functions. + ! benchmark - use the benchmark test case topography. + ! Neverworld - use the Neverworld test case topography. + ! DOME - use a slope and channel configuration for the + ! DOME sill-overflow test case. + ! ISOMIP - use a slope and channel configuration for the + ! ISOMIP test case. + ! DOME2D - use a shelf and slope configuration for the + ! DOME2D gravity current/overflow test case. + ! Kelvin - flat but with rotated land mask. + ! seamount - Gaussian bump for spontaneous motion test case. + ! dumbbell - Sloshing channel with reservoirs on both ends. + ! shelfwave - exponential slope for shelfwave test case. + ! Phillips - ACC-like idealized topography used in the Phillips config. + ! dense - Denmark Strait-like dense water formation and overflow. + ! USER - call a user modified routine. +TOPO_EDITS_FILE = "topo_edits_011818.nc" ! default = "" + ! The file from which to read a list of i,j,z topography overrides. +ALLOW_LANDMASK_CHANGES = MOM6_ALLOW_LANDMASK_CHANGES ! default = "False" + ! If true, allow topography overrides to change ocean points to land +MAXIMUM_DEPTH = 6500.0 ! [m] + ! The maximum depth of the ocean. +MINIMUM_DEPTH = 9.5 ! [m] default = 0.0 + ! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is + ! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is + ! specified, then all depths shallower than MINIMUM_DEPTH but deeper than + ! MASKING_DEPTH are rounded to MINIMUM_DEPTH. + +! === module MOM_open_boundary === +! Controls where open boundaries are located, what kind of boundary condition to impose, and what data to apply, +! if any. +MASKING_DEPTH = 0.0 ! [m] default = -9999.0 + ! The depth below which to mask points as land points, for which all fluxes are + ! zeroed out. MASKING_DEPTH is ignored if negative. +CHANNEL_CONFIG = "list" ! default = "none" + ! A parameter that determines which set of channels are + ! restricted to specific widths. Options are: + ! none - All channels have the grid width. + ! global_1deg - Sets 16 specific channels appropriate + ! for a 1-degree model, as used in CM2G. + ! list - Read the channel locations and widths from a + ! text file, like MOM_channel_list in the MOM_SIS + ! test case. + ! file - Read open face widths everywhere from a + ! NetCDF file on the model grid. +CHANNEL_LIST_FILE = "MOM_channels_SPEAR" ! default = "MOM_channel_list" + ! The file from which the list of narrowed channels is read. +GRID_ROTATION_ANGLE_BUGS = False ! [Boolean] default = False + ! If true, use an older algorithm to calculate the sine and cosines needed + ! rotate between grid-oriented directions and true north and east. Differences + ! arise at the tripolar fold. +USE_TRIPOLAR_GEOLONB_BUG = False ! [Boolean] default = False + ! If true, use older code that incorrectly sets the longitude in some points + ! along the tripolar fold to be off by 360 degrees. + +! === module MOM_verticalGrid === +! Parameters providing information about the vertical grid. +NK = 75 ! [nondim] + ! The number of model layers. + +! === module MOM_tracer_registry === + +! === module MOM_EOS === +TFREEZE_FORM = "MILLERO_78" ! default = "LINEAR" + ! TFREEZE_FORM determines which expression should be used for the freezing + ! point. Currently, the valid choices are "LINEAR", "MILLERO_78", "TEOS10" + +! === module MOM_restart === +PARALLEL_RESTARTFILES = True ! [Boolean] default = False + ! If true, each processor writes its own restart file, otherwise a single + ! restart file is generated + +! === module MOM_tracer_flow_control === +USE_IDEAL_AGE_TRACER = False ! [Boolean] default = False + ! If true, use the ideal_age_example tracer package. + +! === module ideal_age_example === + +! === module MOM_coord_initialization === +COORD_CONFIG = "file" ! default = "none" + ! This specifies how layers are to be defined: + ! ALE or none - used to avoid defining layers in ALE mode + ! file - read coordinate information from the file + ! specified by (COORD_FILE). + ! BFB - Custom coords for buoyancy-forced basin case + ! based on SST_S, T_BOT and DRHO_DT. + ! linear - linear based on interfaces not layers + ! layer_ref - linear based on layer densities + ! ts_ref - use reference temperature and salinity + ! ts_range - use range of temperature and salinity + ! (T_REF and S_REF) to determine surface density + ! and GINT calculate internal densities. + ! gprime - use reference density (RHO_0) for surface + ! density and GINT calculate internal densities. + ! ts_profile - use temperature and salinity profiles + ! (read from COORD_FILE) to set layer densities. + ! USER - call a user modified routine. +COORD_FILE = "layer_coord.nc" ! + ! The file from which the coordinate densities are read. +REMAP_UV_USING_OLD_ALG = True ! [Boolean] default = False + ! If true, uses the old remapping-via-a-delta-z method for remapping u and v. If + ! false, uses the new method that remaps between grids described by an old and + ! new thickness. +REGRIDDING_COORDINATE_MODE = "HYCOM1" ! default = "LAYER" + ! Coordinate mode for vertical regridding. Choose among the following + ! possibilities: LAYER - Isopycnal or stacked shallow water layers + ! ZSTAR, Z* - stretched geopotential z* + ! SIGMA_SHELF_ZSTAR - stretched geopotential z* ignoring shelf + ! SIGMA - terrain following coordinates + ! RHO - continuous isopycnal + ! HYCOM1 - HyCOM-like hybrid coordinate + ! SLIGHT - stretched coordinates above continuous isopycnal + ! ADAPTIVE - optimize for smooth neutral density surfaces +BOUNDARY_EXTRAPOLATION = True ! [Boolean] default = False + ! When defined, a proper high-order reconstruction scheme is used within + ! boundary cells rather than PCM. E.g., if PPM is used for remapping, a PPM + ! reconstruction will also be used within boundary cells. +ALE_COORDINATE_CONFIG = "HYBRID:hycom1_75_800m.nc,sigma2,FNC1:2,4000,4.5,.01" ! default = "UNIFORM" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter ALE_RESOLUTION + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz +!ALE_RESOLUTION = 7*2.0, 2*2.01, 2.02, 2.03, 2.05, 2.08, 2.11, 2.15, 2.21, 2.2800000000000002, 2.37, 2.48, 2.61, 2.77, 2.95, 3.17, 3.4299999999999997, 3.74, 4.09, 4.49, 4.95, 5.48, 6.07, 6.74, 7.5, 8.34, 9.280000000000001, 10.33, 11.49, 12.77, 14.19, 15.74, 17.450000000000003, 19.31, 21.35, 23.56, 25.97, 28.580000000000002, 31.41, 34.47, 37.77, 41.32, 45.14, 49.25, 53.65, 58.370000000000005, 63.42, 68.81, 74.56, 80.68, 87.21000000000001, 94.14, 101.51, 109.33, 117.62, 126.4, 135.68, 145.5, 155.87, 166.81, 178.35, 190.51, 203.31, 216.78, 230.93, 245.8, 261.42, 277.83 ! [m] + ! The distribution of vertical resolution for the target + ! grid used for Eulerian-like coordinates. For example, + ! in z-coordinate mode, the parameter is a list of level + ! thicknesses (in m). In sigma-coordinate mode, the list + ! is of non-dimensional fractions of the water column. +!TARGET_DENSITIES = 1010.0, 1014.3034, 1017.8088, 1020.843, 1023.5566, 1025.813, 1027.0275, 1027.9114, 1028.6422, 1029.2795, 1029.852, 1030.3762, 1030.8626, 1031.3183, 1031.7486, 1032.1572, 1032.5471, 1032.9207, 1033.2798, 1033.6261, 1033.9608, 1034.2519, 1034.4817, 1034.6774, 1034.8508, 1035.0082, 1035.1533, 1035.2886, 1035.4159, 1035.5364, 1035.6511, 1035.7608, 1035.8661, 1035.9675, 1036.0645, 1036.1554, 1036.2411, 1036.3223, 1036.3998, 1036.4739, 1036.5451, 1036.6137, 1036.68, 1036.7441, 1036.8062, 1036.8526, 1036.8874, 1036.9164, 1036.9418, 1036.9647, 1036.9857, 1037.0052, 1037.0236, 1037.0409, 1037.0574, 1037.0738, 1037.0902, 1037.1066, 1037.123, 1037.1394, 1037.1558, 1037.1722, 1037.1887, 1037.206, 1037.2241, 1037.2435, 1037.2642, 1037.2866, 1037.3112, 1037.3389, 1037.3713, 1037.4118, 1037.475, 1037.6332, 1037.8104, 1038.0 ! [m] + ! HYBRID target densities for interfaces +MAXIMUM_INT_DEPTH_CONFIG = "FNC1:5,8000.0,1.0,.01" ! default = "NONE" + ! Determines how to specify the maximum interface depths. + ! Valid options are: + ! NONE - there are no maximum interface depths + ! PARAM - use the vector-parameter MAXIMUM_INTERFACE_DEPTHS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAXIMUM_INT_DEPTHS = 0.0, 5.0, 12.75, 23.25, 36.49, 52.480000000000004, 71.22, 92.71000000000001, 116.94000000000001, 143.92000000000002, 173.65, 206.13, 241.36, 279.33000000000004, 320.05000000000007, 363.5200000000001, 409.7400000000001, 458.7000000000001, 510.4100000000001, 564.8700000000001, 622.0800000000002, 682.0300000000002, 744.7300000000002, 810.1800000000003, 878.3800000000003, 949.3300000000004, 1023.0200000000004, 1099.4600000000005, 1178.6500000000005, 1260.5900000000006, 1345.2700000000007, 1432.7000000000007, 1522.8800000000008, 1615.8100000000009, 1711.490000000001, 1809.910000000001, 1911.080000000001, 2015.0000000000011, 2121.670000000001, 2231.080000000001, 2343.2400000000007, 2458.1500000000005, 2575.8100000000004, 2696.2200000000003, 2819.3700000000003, 2945.2700000000004, 3073.9200000000005, 3205.3200000000006, 3339.4600000000005, 3476.3500000000004, 3615.9900000000002, 3758.38, 3903.52, 4051.4, 4202.03, 4355.41, 4511.54, 4670.41, 4832.03, 4996.4, 5163.5199999999995, 5333.379999999999, 5505.989999999999, 5681.3499999999985, 5859.459999999998, 6040.319999999998, 6223.919999999998, 6410.269999999999, 6599.369999999999, 6791.219999999999, 6985.8099999999995, 7183.15, 7383.24, 7586.08, 7791.67, 8000.0 + ! The list of maximum depths for each interface. +MAX_LAYER_THICKNESS_CONFIG = "FNC1:400,31000.0,0.1,.01" ! default = "NONE" + ! Determines how to specify the maximum layer thicknesses. + ! Valid options are: + ! NONE - there are no maximum layer thicknesses + ! PARAM - use the vector-parameter MAX_LAYER_THICKNESS + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,Z + ! FNC1:string - FNC1:dz_min,H_total,power,precision +!MAX_LAYER_THICKNESS = 400.0, 409.63, 410.32, 410.75, 411.07, 411.32, 411.52, 411.7, 411.86, 412.0, 412.13, 412.24, 412.35, 412.45, 412.54, 412.63, 412.71, 412.79, 412.86, 412.93, 413.0, 413.06, 413.12, 413.18, 413.24, 413.29, 413.34, 413.39, 413.44, 413.49, 413.54, 413.58, 413.62, 413.67, 413.71, 413.75, 413.78, 413.82, 413.86, 413.9, 413.93, 413.97, 414.0, 414.03, 414.06, 414.1, 414.13, 414.16, 414.19, 414.22, 414.24, 414.27, 414.3, 414.33, 414.35, 414.38, 414.41, 414.43, 414.46, 414.48, 414.51, 414.53, 414.55, 414.58, 414.6, 414.62, 414.65, 414.67, 414.69, 414.71, 414.73, 414.75, 414.77, 414.79, 414.83 ! [m] + ! The list of maximum thickness for each layer. +REMAPPING_SCHEME = "PPM_H4" ! default = "PLM" + ! This sets the reconstruction scheme used for vertical remapping for all + ! variables. It can be one of the following schemes: PCM (1st-order + ! accurate) + ! PLM (2nd-order accurate) + ! PPM_H4 (3rd-order accurate) + ! PPM_IH4 (3rd-order accurate) + ! PQM_IH4IH3 (4th-order accurate) + ! PQM_IH6IH5 (5th-order accurate) + +! === module MOM_grid === +! Parameters providing information about the lateral grid. + +! === module MOM_state_initialization === +INIT_LAYERS_FROM_Z_FILE = True ! [Boolean] default = False + ! If true, initialize the layer thicknesses, temperatures, and salinities from a + ! Z-space file on a latitude-longitude grid. + +! === module MOM_initialize_layers_from_Z === +TEMP_SALT_Z_INIT_FILE = "MOM6_IC_TS.nc" ! default = "temp_salt_z.nc" + ! The name of the z-space input file used to initialize + ! temperatures (T) and salinities (S). If T and S are not + ! in the same file, TEMP_Z_INIT_FILE and SALT_Z_INIT_FILE + ! must be set. +Z_INIT_FILE_PTEMP_VAR = "temp" ! default = "ptemp" + ! The name of the potential temperature variable in + ! TEMP_Z_INIT_FILE. +Z_INIT_FILE_SALT_VAR = "salt" ! default = "salt" + ! The name of the salinity variable in + ! SALT_Z_INIT_FILE. +Z_INIT_ALE_REMAPPING = True ! [Boolean] default = False + ! If True, then remap straight to model coordinate from file. +Z_INIT_REMAP_OLD_ALG = True ! [Boolean] default = False + ! If false, uses the preferred remapping algorithm for initialization. If true, + ! use an older, less robust algorithm for remapping. + +! === module MOM_diag_mediator === +!Jiande NUM_DIAG_COORDS = 2 ! default = 1 +NUM_DIAG_COORDS = 1 + ! The number of diagnostic vertical coordinates to use. + ! For each coordinate, an entry in DIAG_COORDS must be provided. +!Jiande DIAG_COORDS = "z Z ZSTAR", "rho2 RHO2 RHO" ! +DIAG_COORDS = "z Z ZSTAR" + ! A list of string tuples associating diag_table modules to + ! a coordinate definition used for diagnostics. Each string + ! is of the form "MODULE_SUFFIX,PARAMETER_SUFFIX,COORDINATE_NAME". +DIAG_COORD_DEF_Z="FILE:interpolate_zgrid_40L.nc,interfaces=zw" +DIAG_MISVAL = -1e34 +!AVAILABLE_DIAGS_FILE = "available_diags.002160" ! default = "available_diags.000000" + ! A file into which to write a list of all available ocean diagnostics that can + ! be included in a diag_table. +!DIAG_COORD_DEF_Z = "FILE:vgrid_75_2m.nc,dz" ! default = "WOA09" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter DIAG_COORD_RES_Z + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz +!DIAG_COORD_DEF_RHO2 = "RFNC1:35,999.5,1028,1028.5,8.,1038.,0.0078125" ! default = "WOA09" + ! Determines how to specify the coordinate resolution. Valid options are: + ! PARAM - use the vector-parameter DIAG_COORD_RES_RHO2 + ! UNIFORM[:N] - uniformly distributed + ! FILE:string - read from a file. The string specifies + ! the filename and variable name, separated + ! by a comma or space, e.g. FILE:lev.nc,dz + ! or FILE:lev.nc,interfaces=zw + ! WOA09[:N] - the WOA09 vertical grid (approximately) + ! FNC1:string - FNC1:dz_min,H_total,power,precision + ! HYBRID:string - read from a file. The string specifies + ! the filename and two variable names, separated + ! by a comma or space, for sigma-2 and dz. e.g. + ! HYBRID:vgrid.nc,sigma2,dz + +! === module MOM_MEKE === +USE_MEKE = True ! [Boolean] default = False + ! If true, turns on the MEKE scheme which calculates a sub-grid mesoscale eddy + ! kinetic energy budget. +MEKE_GMCOEFF = 1.0 ! [nondim] default = -1.0 + ! The efficiency of the conversion of potential energy into MEKE by the + ! thickness mixing parameterization. If MEKE_GMCOEFF is negative, this + ! conversion is not used or calculated. +MEKE_BGSRC = 1.0E-13 ! [W kg-1] default = 0.0 + ! A background energy source for MEKE. +MEKE_KHTH_FAC = 0.8 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTh. +MEKE_KHTR_FAC = 0.8 ! [nondim] default = 0.0 + ! A factor that maps MEKE%Kh to KhTr. +MEKE_ALPHA_RHINES = 0.05 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the Rhines scale in the expression for + ! mixing length used in MEKE-derived diffusivity. +MEKE_ALPHA_EADY = 0.05 ! [nondim] default = 0.0 + ! If positive, is a coefficient weighting the Eady length scale in the + ! expression for mixing length used in MEKE-derived diffusivity. + +! === module MOM_lateral_mixing_coeffs === +USE_VARIABLE_MIXING = True ! [Boolean] default = False + ! If true, the variable mixing code will be called. This allows diagnostics to + ! be created even if the scheme is not used. If KHTR_SLOPE_CFF>0 or + ! KhTh_Slope_Cff>0, this is set to true regardless of what is in the parameter + ! file. +RESOLN_SCALED_KH = True ! [Boolean] default = False + ! If true, the Laplacian lateral viscosity is scaled away when the first + ! baroclinic deformation radius is well resolved. +RESOLN_SCALED_KHTH = True ! [Boolean] default = False + ! If true, the interface depth diffusivity is scaled away when the first + ! baroclinic deformation radius is well resolved. +KHTR_SLOPE_CFF = 0.25 ! [nondim] default = 0.0 + ! The nondimensional coefficient in the Visbeck formula for the epipycnal tracer + ! diffusivity +USE_STORED_SLOPES = True ! [Boolean] default = False + ! If true, the isopycnal slopes are calculated once and stored for re-use. This + ! uses more memory but avoids calling the equation of state more times than + ! should be necessary. +KH_RES_FN_POWER = 100 ! [nondim] default = 2 + ! The power of dx/Ld in the Kh resolution function. Any positive integer may be + ! used, although even integers are more efficient to calculate. Setting this + ! greater than 100 results in a step-function being used. +VISC_RES_FN_POWER = 2 ! [nondim] default = 100 + ! The power of dx/Ld in the Kh resolution function. Any positive integer may be + ! used, although even integers are more efficient to calculate. Setting this + ! greater than 100 results in a step-function being used. This function affects + ! lateral viscosity, Kh, and not KhTh. + +! === module MOM_set_visc === +CHANNEL_DRAG = True ! [Boolean] default = False + ! If true, the bottom drag is exerted directly on each layer proportional to the + ! fraction of the bottom it overlies. +HBBL = 10.0 ! [m] + ! The thickness of a bottom boundary layer with a viscosity of KVBBL if + ! BOTTOMDRAGLAW is not defined, or the thickness over which near-bottom + ! velocities are averaged for the drag law if BOTTOMDRAGLAW is defined but + ! LINEAR_DRAG is not. +DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0 + ! DRAG_BG_VEL is either the assumed bottom velocity (with LINEAR_DRAG) or an + ! unresolved velocity that is combined with the resolved velocity to estimate + ! the velocity magnitude. DRAG_BG_VEL is only used when BOTTOMDRAGLAW is + ! defined. +BBL_USE_EOS = True ! [Boolean] default = False + ! If true, use the equation of state in determining the properties of the bottom + ! boundary layer. Otherwise use the layer target potential densities. +BBL_THICK_MIN = 0.1 ! [m] default = 0.0 + ! The minimum bottom boundary layer thickness that can be used with + ! BOTTOMDRAGLAW. This might be Kv/(cdrag*drag_bg_vel) to give Kv as the minimum + ! near-bottom viscosity. +KV = 1.0E-04 ! [m2 s-1] + ! The background kinematic viscosity in the interior. The molecular value, ~1e-6 + ! m2 s-1, may be used. +KV_BBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the bottom boundary layer. +KV_TBL_MIN = 0.0 ! [m2 s-1] default = 1.0E-04 + ! The minimum viscosities in the top boundary layer. + +! === module MOM_thickness_diffuse === +USE_GM_WORK_BUG = True ! [Boolean] default = False + ! If true, compute the top-layer work tendency on the u-grid with the incorrect + ! sign, for legacy reproducibility. + +! === module MOM_dynamics_split_RK2 === + +! === module MOM_continuity === + +! === module MOM_continuity_PPM === +ETA_TOLERANCE = 1.0E-06 ! [m] default = 3.75E-09 + ! The tolerance for the differences between the barotropic and baroclinic + ! estimates of the sea surface height due to the fluxes through each face. The + ! total tolerance for SSH is 4 times this value. The default is + ! 0.5*NK*ANGSTROM, and this should not be set less than about + ! 10^-15*MAXIMUM_DEPTH. +ETA_TOLERANCE_AUX = 0.001 ! [m] default = 1.0E-06 + ! The tolerance for free-surface height discrepancies between the barotropic + ! solution and the sum of the layer thicknesses when calculating the auxiliary + ! corrected velocities. By default, this is the same as ETA_TOLERANCE, but can + ! be made larger for efficiency. + +! === module MOM_CoriolisAdv === +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the Coriolis terms. Valid + ! values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy +BOUND_CORIOLIS = True ! [Boolean] default = False + ! If true, the Coriolis terms at u-points are bounded by the four estimates of + ! (f+rv)v from the four neighboring v-points, and similarly at v-points. This + ! option would have no effect on the SADOURNY Coriolis scheme if it were + ! possible to use centered difference thickness fluxes. + +! === module MOM_PressureForce === + +! === module MOM_PressureForce_AFV === +MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False + ! If true, use mass weighting when interpolating T/S for integrals near the + ! bathymetry in AFV pressure gradient calculations. + +! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +SMAGORINSKY_KH = True ! [Boolean] default = False + ! If true, use a Smagorinsky nonlinear eddy viscosity. +SMAG_LAP_CONST = 0.15 ! [nondim] default = 0.0 + ! The nondimensional Laplacian Smagorinsky constant, often 0.15. +AH_VEL_SCALE = 0.05 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the cube of the grid spacing to + ! calculate the biharmonic viscosity. The final viscosity is the largest of this + ! scaled viscosity, the Smagorinsky and Leith viscosities, and AH. +SMAGORINSKY_AH = True ! [Boolean] default = False + ! If true, use a biharmonic Smagorinsky nonlinear eddy viscosity. +SMAG_BI_CONST = 0.06 ! [nondim] default = 0.0 + ! The nondimensional biharmonic Smagorinsky constant, typically 0.015 - 0.06. +USE_KH_BG_2D = True ! [Boolean] default = False + ! If true, read a file containing 2-d background harmonic viscosities. The final + ! viscosity is the maximum of the other terms and this background value. + +! === module MOM_vert_friction === +HMIX_FIXED = 0.5 ! [m] + ! The prescribed depth over which the near-surface viscosity and diffusivity are + ! elevated when the bulk mixed layer is not used. +MAXVEL = 6.0 ! [m s-1] default = 3.0E+08 + ! The maximum velocity allowed before the velocity components are truncated. + +! === module MOM_barotropic === +BOUND_BT_CORRECTION = True ! [Boolean] default = False + ! If true, the corrective pseudo mass-fluxes into the barotropic solver are + ! limited to values that require less than maxCFL_BT_cont to be accommodated. +BT_PROJECT_VELOCITY = True ! [Boolean] default = False + ! If true, step the barotropic velocity first and project out the velocity + ! tendency by 1+BEBT when calculating the transport. The default (false) is to + ! use a predictor continuity step to find the pressure field, and then to do a + ! corrector continuity step using a weighted average of the old and new + ! velocities, with weights of (1-BEBT) and BEBT. +BT_STRONG_DRAG = True ! [Boolean] default = False + ! If true, use a stronger estimate of the retarding effects of strong bottom + ! drag, by making it implicit with the barotropic time-step instead of implicit + ! with the baroclinic time-step and dividing by the number of barotropic steps. +BEBT = 0.2 ! [nondim] default = 0.1 + ! BEBT determines whether the barotropic time stepping uses the forward-backward + ! time-stepping scheme or a backward Euler scheme. BEBT is valid in the range + ! from 0 (for a forward-backward treatment of nonrotating gravity waves) to 1 + ! (for a backward Euler treatment). In practice, BEBT must be greater than about + ! 0.05. +DTBT = -0.9 ! [s or nondim] default = -0.98 + ! The barotropic time step, in s. DTBT is only used with the split explicit time + ! stepping. To set the time step automatically based the maximum stable value + ! use 0, or a negative value gives the fraction of the stable value. Setting + ! DTBT to 0 is the same as setting it to -0.98. The value of DTBT that will + ! actually be used is an integer fraction of DT, rounding down. + +! === module MOM_mixed_layer_restrat === +MIXEDLAYER_RESTRAT = True ! [Boolean] default = False + ! If true, a density-gradient dependent re-stratifying flow is imposed in the + ! mixed layer. Can be used in ALE mode without restriction but in layer mode can + ! only be used if BULKMIXEDLAYER is true. +FOX_KEMPER_ML_RESTRAT_COEF = 60.0 ! [nondim] default = 0.0 + ! A nondimensional coefficient that is proportional to the ratio of the + ! deformation radius to the dominant lengthscale of the submesoscale mixed layer + ! instabilities, times the minimum of the ratio of the mesoscale eddy kinetic + ! energy to the large-scale geostrophic kinetic energy or 1 plus the square of + ! the grid spacing over the deformation radius, as detailed by Fox-Kemper et al. + ! (2010) +MLE_USE_PBL_MLD = True ! [Boolean] default = False + ! If true, the MLE parameterization will use the mixed-layer depth provided by + ! the active PBL parameterization. If false, MLE will estimate a MLD based on a + ! density difference with the surface using the parameter MLE_DENSITY_DIFF. +MLE_MLD_DECAY_TIME = 2.592E+06 ! [s] default = 0.0 + ! The time-scale for a running-mean filter applied to the mixed-layer depth used + ! in the MLE restratification parameterization. When the MLD deepens below the + ! current running-mean the running-mean is instantaneously set to the current + ! MLD. + +! === module MOM_diabatic_driver === +! The following parameters are used for diabatic processes. +ENERGETICS_SFC_PBL = True ! [Boolean] default = False + ! If true, use an implied energetics planetary boundary layer scheme to + ! determine the diffusivity and viscosity in the surface boundary layer. +EPBL_IS_ADDITIVE = False ! [Boolean] default = True + ! If true, the diffusivity from ePBL is added to all other diffusivities. + ! Otherwise, the larger of kappa-shear and ePBL diffusivities are used. +KD_MIN_TR = 2.0E-06 ! [m2 s-1] default = 2.0E-06 + ! A minimal diffusivity that should always be applied to tracers, especially in + ! massless layers near the bottom. The default is 0.1*KD. + +! === module MOM_CVMix_KPP === +! This is the MOM wrapper to CVMix:KPP +! See http://cvmix.github.io/ + +! === module MOM_tidal_mixing === +! Vertical Tidal Mixing Parameterization +INT_TIDE_DISSIPATION = True ! [Boolean] default = False + ! If true, use an internal tidal dissipation scheme to drive diapycnal mixing, + ! along the lines of St. Laurent et al. (2002) and Simmons et al. (2004). +INT_TIDE_PROFILE = "POLZIN_09" ! default = "STLAURENT_02" + ! INT_TIDE_PROFILE selects the vertical profile of energy dissipation with + ! INT_TIDE_DISSIPATION. Valid values are: + ! STLAURENT_02 - Use the St. Laurent et al exponential + ! decay profile. + ! POLZIN_09 - Use the Polzin WKB-stretched algebraic + ! decay profile. +KAPPA_ITIDES = 6.28319E-04 ! [m-1] default = 6.283185307179586E-04 + ! A topographic wavenumber used with INT_TIDE_DISSIPATION. The default is 2pi/10 + ! km, as in St.Laurent et al. 2002. +KAPPA_H2_FACTOR = 0.84 ! [nondim] default = 1.0 + ! A scaling factor for the roughness amplitude with INT_TIDE_DISSIPATION. +TKE_ITIDE_MAX = 0.1 ! [W m-2] default = 1000.0 + ! The maximum internal tide energy source available to mix above the bottom + ! boundary layer with INT_TIDE_DISSIPATION. +READ_TIDEAMP = True ! [Boolean] default = False + ! If true, read a file (given by TIDEAMP_FILE) containing the tidal amplitude + ! with INT_TIDE_DISSIPATION. +TIDEAMP_FILE = "tidal_amplitude.nc" ! default = "tideamp.nc" + ! The path to the file containing the spatially varying tidal amplitudes with + ! INT_TIDE_DISSIPATION. +H2_FILE = "topog.nc" ! + ! The path to the file containing the sub-grid-scale topographic roughness + ! amplitude with INT_TIDE_DISSIPATION. + +! === module MOM_CVMix_conv === +! Parameterization of enhanced mixing due to convection via CVMix + +! === module MOM_set_diffusivity === +BBL_MIXING_AS_MAX = False ! [Boolean] default = True + ! If true, take the maximum of the diffusivity from the BBL mixing and the other + ! diffusivities. Otherwise, diffusivity from the BBL_mixing is simply added. +USE_LOTW_BBL_DIFFUSIVITY = True ! [Boolean] default = False + ! If true, uses a simple, imprecise but non-coordinate dependent, model of BBL + ! mixing diffusivity based on Law of the Wall. Otherwise, uses the original BBL + ! scheme. +SIMPLE_TKE_TO_KD = True ! [Boolean] default = False + ! If true, uses a simple estimate of Kd/TKE that will work for arbitrary + ! vertical coordinates. If false, calculates Kd/TKE and bounds based on exact + ! energetics for an isopycnal layer-formulation. + +! === module MOM_bkgnd_mixing === +! Adding static vertical background mixing coefficients +KD = 2.0E-05 ! [m2 s-1] default = 0.0 + ! The background diapycnal diffusivity of density in the interior. Zero or the + ! molecular value, ~1e-7 m2 s-1, may be used. +KD_MIN = 2.0E-06 ! [m2 s-1] default = 2.0E-07 + ! The minimum diapycnal diffusivity. +HENYEY_IGW_BACKGROUND = True ! [Boolean] default = False + ! If true, use a latitude-dependent scaling for the near surface background + ! diffusivity, as described in Harrison & Hallberg, JPO 2008. +KD_MAX = 0.1 ! [m2 s-1] default = -1.0 + ! The maximum permitted increment for the diapycnal diffusivity from TKE-based + ! parameterizations, or a negative value for no limit. + +! === module MOM_kappa_shear === +! Parameterization of shear-driven turbulence following Jackson, Hallberg and Legg, JPO 2008 +USE_JACKSON_PARAM = True ! [Boolean] default = False + ! If true, use the Jackson-Hallberg-Legg (JPO 2008) shear mixing + ! parameterization. +MAX_RINO_IT = 25 ! [nondim] default = 50 + ! The maximum number of iterations that may be used to estimate the Richardson + ! number driven mixing. +VERTEX_SHEAR = False ! [Boolean] default = False + ! If true, do the calculations of the shear-driven mixing + ! at the cell vertices (i.e., the vorticity points). +KD_TRUNC_KAPPA_SHEAR = 2.0E-07 ! [m2 s-1] default = 2.0E-07 + ! The value of shear-driven diffusivity that is considered negligible and is + ! rounded down to 0. The default is 1% of KD_KAPPA_SHEAR_0. +KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = False + ! If true, use an older, dimensionally inconsistent estimate of the derivative + ! of diffusivity with energy in the Newton's method iteration. The bug causes + ! undercorrections when dz > 1 m. +KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = False + ! If true, report back the latest estimate of TKE instead of the time average + ! TKE when there is mass in all layers. Otherwise always report the time + ! averaged TKE, as is currently done when there are some massless layers. + +! === module MOM_CVMix_shear === +! Parameterization of shear-driven turbulence via CVMix (various options) + +! === module MOM_CVMix_ddiff === +! Parameterization of mixing due to double diffusion processes via CVMix + +! === module MOM_diabatic_aux === +! The following parameters are used for auxiliary diabatic processes. +PRESSURE_DEPENDENT_FRAZIL = False ! [Boolean] default = False + ! If true, use a pressure dependent freezing temperature when making frazil. The + ! default is false, which will be faster but is inappropriate with ice-shelf + ! cavities. +VAR_PEN_SW = True ! [Boolean] default = False + ! If true, use one of the CHL_A schemes specified by OPACITY_SCHEME to determine + ! the e-folding depth of incoming short wave radiation. +CHL_FILE = CHLCLIM ! + ! CHL_FILE is the file containing chl_a concentrations in the variable CHL_A. It + ! is used when VAR_PEN_SW and CHL_FROM_FILE are true. + +! === module MOM_energetic_PBL === +ML_OMEGA_FRAC = 0.001 ! [nondim] default = 0.0 + ! When setting the decay scale for turbulence, use this fraction of the absolute + ! rotation rate blended with the local value of f, as sqrt((1-of)*f^2 + + ! of*4*omega^2). +TKE_DECAY = 0.01 ! [nondim] default = 2.5 + ! TKE_DECAY relates the vertical rate of decay of the TKE available for + ! mechanical entrainment to the natural Ekman depth. +EPBL_MSTAR_SCHEME = "OM4" ! default = "CONSTANT" + ! EPBL_MSTAR_SCHEME selects the method for setting mstar. Valid values are: + ! CONSTANT - Use a fixed mstar given by MSTAR + ! OM4 - Use L_Ekman/L_Obukhov in the sabilizing limit, as in OM4 + ! REICHL_H18 - Use the scheme documented in Reichl & Hallberg, 2018. +MSTAR_CAP = 10.0 ! [nondim] default = -1.0 + ! If this value is positive, it sets the maximum value of mstar allowed in ePBL. + ! (This is not used if EPBL_MSTAR_SCHEME = CONSTANT). +MSTAR2_COEF1 = 0.29 ! [nondim] default = 0.3 + ! Coefficient in computing mstar when rotation and stabilizing effects are both + ! important (used if EPBL_MSTAR_SCHEME = OM4). +MSTAR2_COEF2 = 0.152 ! [nondim] default = 0.085 + ! Coefficient in computing mstar when only rotation limits the total mixing + ! (used if EPBL_MSTAR_SCHEME = OM4) +NSTAR = 0.06 ! [nondim] default = 0.2 + ! The portion of the buoyant potential energy imparted by surface fluxes that is + ! available to drive entrainment at the base of mixed layer when that energy is + ! positive. +MSTAR_CONV_ADJ = 0.667 ! [nondim] default = 0.0 + ! Coefficient used for reducing mstar during convection due to reduction of + ! stable density gradient. +USE_MLD_ITERATION = False ! [Boolean] default = True + ! A logical that specifies whether or not to use the distance to the bottom of + ! the actively turbulent boundary layer to help set the EPBL length scale. +EPBL_TRANSITION_SCALE = 0.01 ! [nondim] default = 0.1 + ! A scale for the mixing length in the transition layer at the edge of the + ! boundary layer as a fraction of the boundary layer thickness. +MIX_LEN_EXPONENT = 1.0 ! [nondim] default = 2.0 + ! The exponent applied to the ratio of the distance to the MLD and the MLD depth + ! which determines the shape of the mixing length. This is only used if + ! USE_MLD_ITERATION is True. +USE_LA_LI2016 = MOM6_REPRO_LA ! [nondim] default = False + ! A logical to use the Li et al. 2016 (submitted) formula to determine the + ! Langmuir number. +USE_WAVES = MOM6_USE_WAVES ! [Boolean] default = False + ! If true, enables surface wave modules. +WAVE_METHOD = "SURFACE_BANDS" ! default = "EMPTY" + ! Choice of wave method, valid options include: + ! TEST_PROFILE - Prescribed from surface Stokes drift + ! and a decay wavelength. + ! SURFACE_BANDS - Computed from multiple surface values + ! and decay wavelengths. + ! DHH85 - Uses Donelan et al. 1985 empirical + ! wave spectrum with prescribed values. + ! LF17 - Infers Stokes drift profile from wind + ! speed following Li and Fox-Kemper 2017. +SURFBAND_SOURCE = "COUPLER" ! default = "EMPTY" + ! Choice of SURFACE_BANDS data mode, valid options include: + ! DATAOVERRIDE - Read from NetCDF using FMS DataOverride. + ! COUPLER - Look for variables from coupler pass + ! INPUT - Testing with fixed values. +STK_BAND_COUPLER = 3 ! default = 1 + ! STK_BAND_COUPLER is the number of Stokes drift bands in the coupler. This has + ! to be consistent with the number of Stokes drift bands in WW3, or the model + ! will fail. +SURFBAND_WAVENUMBERS = 0.04, 0.11, 0.3305 ! [rad/m] default = 0.12566 + ! Central wavenumbers for surface Stokes drift bands. +EPBL_LANGMUIR_SCHEME = "ADDITIVE" ! default = "NONE" + ! EPBL_LANGMUIR_SCHEME selects the method for including Langmuir turbulence. + ! Valid values are: + ! NONE - Do not do any extra mixing due to Langmuir turbulence + ! RESCALE - Use a multiplicative rescaling of mstar to account for Langmuir + ! turbulence + ! ADDITIVE - Add a Langmuir turblence contribution to mstar to other + ! contributions +LT_ENHANCE_COEF = 0.044 ! [nondim] default = 0.447 + ! Coefficient for Langmuir enhancement of mstar +LT_ENHANCE_EXP = -1.5 ! [nondim] default = -1.33 + ! Exponent for Langmuir enhancementt of mstar +LT_MOD_LAC1 = 0.0 ! [nondim] default = -0.87 + ! Coefficient for modification of Langmuir number due to MLD approaching Ekman + ! depth. +LT_MOD_LAC4 = 0.0 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! stable Obukhov depth. +LT_MOD_LAC5 = 0.22 ! [nondim] default = 0.95 + ! Coefficient for modification of Langmuir number due to ratio of Ekman to + ! unstable Obukhov depth. + +! === module MOM_regularize_layers === + +! === module MOM_opacity === +PEN_SW_NBANDS = 3 ! default = 1 + ! The number of bands of penetrating shortwave radiation. + +! === module MOM_tracer_advect === +TRACER_ADVECTION_SCHEME = "PPM:H3" ! default = "PLM" + ! The horizontal transport scheme for tracers: + ! PLM - Piecewise Linear Method + ! PPM:H3 - Piecewise Parabolic Method (Huyhn 3rd order) + ! PPM - Piecewise Parabolic Method (Colella-Woodward) + +! === module MOM_tracer_hor_diff === +CHECK_DIFFUSIVE_CFL = True ! [Boolean] default = False + ! If true, use enough iterations the diffusion to ensure that the diffusive + ! equivalent of the CFL limit is not violated. If false, always use the greater + ! of 1 or MAX_TR_DIFFUSION_CFL iteration. + +! === module MOM_neutral_diffusion === +! This module implements neutral diffusion of tracers +USE_NEUTRAL_DIFFUSION = True ! [Boolean] default = False + ! If true, enables the neutral diffusion module. + +! === module MOM_lateral_boundary_diffusion === +! This module implements lateral diffusion of tracers near boundaries + +! === module MOM_sum_output === +CALCULATE_APE = False ! [Boolean] default = True + ! If true, calculate the available potential energy of the interfaces. Setting + ! this to false reduces the memory footprint of high-PE-count models + ! dramatically. +MAXTRUNC = 100000 ! [truncations save_interval-1] default = 0 + ! The run will be stopped, and the day set to a very large value if the velocity + ! is truncated more than MAXTRUNC times between energy saves. Set MAXTRUNC to 0 + ! to stop if there is any truncation of velocities. +ENERGYSAVEDAYS = 0.25 ! [days] default = 1.0 + ! The interval in units of TIMEUNIT between saves of the energies of the run and + ! other globally summed diagnostics. + +! === module ocean_model_init === + +! === module MOM_surface_forcing === +OCEAN_SURFACE_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the surface velocity field that is + ! returned to the coupler. Valid values include + ! 'A', 'B', or 'C'. + +MAX_P_SURF = 0.0 ! [Pa] default = -1.0 + ! The maximum surface pressure that can be exerted by the atmosphere and + ! floating sea-ice or ice shelves. This is needed because the FMS coupling + ! structure does not limit the water that can be frozen out of the ocean and the + ! ice-ocean heat fluxes are treated explicitly. No limit is applied if a + ! negative value is used. +WIND_STAGGER = "A" ! default = "C" + ! A case-insensitive character string to indicate the + ! staggering of the input wind stress field. Valid + ! values are 'A', 'B', or 'C'. +CD_TIDES = 0.0018 ! [nondim] default = 1.0E-04 + ! The drag coefficient that applies to the tides. +GUST_CONST = 0.02 ! [Pa] default = 0.0 + ! The background gustiness in the winds. +FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = True + ! If true correct a bug in the time-averaging of the gustless wind friction + ! velocity + +! === module MOM_restart === + +! === module MOM_file_parser === diff --git a/parm/parm_fv3diag/diag_table_aer b/parm/parm_fv3diag/diag_table_aer new file mode 100644 index 00000000000..f2617c1c560 --- /dev/null +++ b/parm/parm_fv3diag/diag_table_aer @@ -0,0 +1,366 @@ +#20161003.00Z.C96.64bit.non-mono +#2016 10 03 00 0 0 + +"grid_spec", -1, "months", 1, "days", "time" +"atmos_4xdaily", 6, "hours", 1, "days", "time" +"atmos_static", -1, "hours", 1, "hours", "time" +"fv3_history", 0, "hours", 1, "hours", "time" +"fv3_history2d", 0, "hours", 1, "hours", "time" + +# +#======================= +# ATMOSPHERE DIAGNOSTICS +#======================= +### +# grid_spec +### + "dynamics", "grid_lon", "grid_lon", "grid_spec", "all", .false., "none", 2, + "dynamics", "grid_lat", "grid_lat", "grid_spec", "all", .false., "none", 2, + "dynamics", "grid_lont", "grid_lont", "grid_spec", "all", .false., "none", 2, + "dynamics", "grid_latt", "grid_latt", "grid_spec", "all", .false., "none", 2, + "dynamics", "area", "area", "grid_spec", "all", .false., "none", 2, +### +# 4x daily output +### + "dynamics", "slp", "slp", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "vort850", "vort850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "vort200", "vort200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "us", "us", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u1000", "u1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u850", "u850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u700", "u700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u500", "u500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u200", "u200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u100", "u100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u50", "u50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "u10", "u10", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "vs", "vs", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v1000", "v1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v850", "v850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v700", "v700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v500", "v500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v200", "v200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v100", "v100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v50", "v50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "v10", "v10", "atmos_4xdaily", "all", .false., "none", 2 +#### + "dynamics", "tm", "tm", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t1000", "t1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t850", "t850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t700", "t700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t500", "t500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t200", "t200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t100", "t100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t50", "t50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "t10", "t10", "atmos_4xdaily", "all", .false., "none", 2 +#### + "dynamics", "h1000", "h1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h850", "h850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h700", "h700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h500", "h500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h200", "h200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h100", "h100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h50", "h50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "h10", "h10", "atmos_4xdaily", "all", .false., "none", 2 +#### +#"dynamics", "w1000", "w1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "w850", "w850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "w700", "w700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "w500", "w500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "w200", "w200", "atmos_4xdaily", "all", .false., "none", 2 +#### + "dynamics", "q1000", "q1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q850", "q850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q700", "q700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q500", "q500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q200", "q200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q100", "q100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q50", "q50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "q10", "q10", "atmos_4xdaily", "all", .false., "none", 2 +#### + "dynamics", "rh1000", "rh1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "rh850", "rh850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "rh700", "rh700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "rh500", "rh500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "rh200", "rh200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg1000", "omg1000", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg850", "omg850", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg700", "omg700", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg500", "omg500", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg200", "omg200", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg100", "omg100", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg50", "omg50", "atmos_4xdaily", "all", .false., "none", 2 + "dynamics", "omg10", "omg10", "atmos_4xdaily", "all", .false., "none", 2 +### +# gfs static data +### + "dynamics", "pk", "pk", "atmos_static", "all", .false., "none", 2 + "dynamics", "bk", "bk", "atmos_static", "all", .false., "none", 2 + "dynamics", "hyam", "hyam", "atmos_static", "all", .false., "none", 2 + "dynamics", "hybm", "hybm", "atmos_static", "all", .false., "none", 2 + "dynamics", "zsurf", "zsurf", "atmos_static", "all", .false., "none", 2 +### +# FV3 variabls needed for NGGPS evaluation +### +"gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "ice_nc", "nicp", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "rain_nc", "ntrnc", "fv3_history", "all", .false., "none", 2 +### +# chemical tracers advected by FV3 +### +"gfs_dyn", "so2", "so2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "so4", "so4", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dms", "dms", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "msa", "msa", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "bc1", "bc1", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "bc2", "bc2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "oc1", "oc1", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "oc2", "oc2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dust1", "dust1", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dust2", "dust2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dust3", "dust3", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dust4", "dust4", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "dust5", "dust5", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "seas1", "seas1", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "seas2", "seas2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "seas3", "seas3", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "seas4", "seas4", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "seas5", "seas5", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "nh3", "nh3", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "nh4a", "nh4a", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "no3an1", "no3an1", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "no3an2", "no3an2", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "no3an3", "no3an3", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "pm25", "pm25", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "pm10", "pm10", "fv3_history", "all", .false., "none", 2 + +"gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRFtoa", "dswrf_avetoa","fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRFtoa", "uswrf_avetoa","fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRFtoa", "ulwrf_avetoa","fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2 +#"gfs_phys", "cnvw", "cnvcldwat", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "crain", "crain", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2 +# +# GOCART diagnostics +# +"gfs_phys", "ssem001", "ssem001", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssem002", "ssem002", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssem003", "ssem003", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssem004", "ssem004", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssem005", "ssem005", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "seas1sd", "seas1sd", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas2sd", "seas2sd", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas3sd", "seas3sd", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas4sd", "seas4sd", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas5sd", "seas5sd", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "seas1dp", "seas1dp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas2dp", "seas2dp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas3dp", "seas3dp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas4dp", "seas4dp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas5dp", "seas5dp", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "seas1wtl", "seas1wtl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas2wtl", "seas2wtl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas3wtl", "seas3wtl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas4wtl", "seas4wtl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas5wtl", "seas5wtl", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "seas1wtc", "seas1wtc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas2wtc", "seas2wtc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas3wtc", "seas3wtc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas4wtc", "seas4wtc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "seas5wtc", "seas5wtc", "fv3_history2d", "all", .false., "none", 2 + +"gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2 + +#============================================================================================= +# +#====> This file can be used with diag_manager/v2.0a (or higher) <==== +# +# +# FORMATS FOR FILE ENTRIES (not all input values are used) +# ------------------------ +# +#"file_name", output_freq, "output_units", format, "time_units", "long_name", +# +# +#output_freq: > 0 output frequency in "output_units" +# = 0 output frequency every time step +# =-1 output frequency at end of run +# +#output_units = units used for output frequency +# (years, months, days, minutes, hours, seconds) +# +#time_units = units used to label the time axis +# (days, minutes, hours, seconds) +# +# +# FORMAT FOR FIELD ENTRIES (not all input values are used) +# ------------------------ +# +#"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing +# +#time_avg = .true. or .false. +# +#packing = 1 double precision +# = 2 float +# = 4 packed 16-bit integers +# = 8 packed 1-byte (not tested?) diff --git a/parm/parm_fv3diag/diag_table_aod b/parm/parm_fv3diag/diag_table_aod index f8d8aef46b5..0de51b66d85 100644 --- a/parm/parm_fv3diag/diag_table_aod +++ b/parm/parm_fv3diag/diag_table_aod @@ -1,213 +1,6 @@ -"fv3_history", 0, "hours", 1, "hours", "time" -"fv3_history2d", 0, "hours", 1, "hours", "time" - -"gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2 -#"gfs_dyn", "ice_nc", "nccice", "fv3_history", "all", .false., "none", 2 -#"gfs_dyn", "rain_nc", "nconrd", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "cld_amt", "cld_amt", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2 -#"gfs_dyn", "pfhy", "preshy", "fv3_history", "all", .false., "none", 2 -#"gfs_dyn", "pfnh", "presnh", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2 -"gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2 - -"gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "DSWRFtoa", "dswrf_avetoa", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "USWRFtoa", "uswrf_avetoa", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "ULWRFtoa", "ulwrf_avetoa", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2 "gfs_phys", "AOD_550", "aod550", "fv3_history2d", "all", .false., "none", 2 "gfs_phys", "DU_AOD_550", "du_aod550", "fv3_history2d", "all", .false., "none", 2 "gfs_phys", "SU_AOD_550", "su_aod550", "fv3_history2d", "all", .false., "none", 2 "gfs_phys", "BC_AOD_550", "bc_aod550", "fv3_history2d", "all", .false., "none", 2 "gfs_phys", "OC_AOD_550", "oc_aod550", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "SS_AOD_550", "ss_aod550", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "crain", "crain", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2 -"gfs_phys", "rainc", "cnvprcp", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2 -"gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2 - - -#============================================================================================= -# -#====> This file can be used with diag_manager/v2.0a (or higher) <==== -# -# -# FORMATS FOR FILE ENTRIES (not all input values are used) -# ------------------------ -# -#"file_name", output_freq, "output_units", format, "time_units", "long_name", -# -# -#output_freq: > 0 output frequency in "output_units" -# = 0 output frequency every time step -# =-1 output frequency at end of run -# -#output_units = units used for output frequency -# (years, months, days, minutes, hours, seconds) -# -#time_units = units used to label the time axis -# (days, minutes, hours, seconds) -# -# -# FORMAT FOR FIELD ENTRIES (not all input values are used) -# ------------------------ -# -#"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing -# -#time_avg = .true. or .false. -# -#packing = 1 double precision -# = 2 float -# = 4 packed 16-bit integers -# = 8 packed 1-byte (not tested?) +"gfs_phys", "SS_AOD_550", "ss_aod550", "fv3_history2d", "all", .false., "none", 2 \ No newline at end of file diff --git a/parm/parm_fv3diag/field_table_aer b/parm/parm_fv3diag/field_table_aer new file mode 100644 index 00000000000..c31d4b157ad --- /dev/null +++ b/parm/parm_fv3diag/field_table_aer @@ -0,0 +1,169 @@ +# added by FRE: sphum must be present in atmos +# specific humidity for moist runs + "TRACER", "atmos_mod", "sphum" + "longname", "specific humidity" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic cloud water mixing ratio + "TRACER", "atmos_mod", "liq_wat" + "longname", "cloud water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / + "TRACER", "atmos_mod", "rainwat" + "longname", "rain mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / + "TRACER", "atmos_mod", "ice_wat" + "longname", "cloud ice mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / + "TRACER", "atmos_mod", "snowwat" + "longname", "snow mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / + "TRACER", "atmos_mod", "graupel" + "longname", "graupel mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic ozone mixing ratio tracer + "TRACER", "atmos_mod", "o3mr" + "longname", "ozone mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic subgrid scale turbulent kinetic energy + "TRACER", "atmos_mod", "sgs_tke" + "longname", "subgrid scale turbulent kinetic energy" + "units", "m2/s2" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic chemistry tracers + "TRACER", "atmos_mod", "so2" + "longname", "so2 mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=5.e-6" / + "TRACER", "atmos_mod", "so4" + "longname", "sulfate mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=3.e-6" / + "TRACER", "atmos_mod", "dms" + "longname", "DMS mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "msa" + "longname", "msa mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "bc1" + "longname", "hydrophobic black carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "bc2" + "longname", "hydrophillic black carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "oc1" + "longname", "hydrophobic organic carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "oc2" + "longname", "hydrophillic organic carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "dust1" + "longname", "fine dust1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "dust2" + "longname", "fine dust2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "dust3" + "longname", "coarse dust3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "dust4" + "longname", "coarse dust4 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "dust5" + "longname", "coarse dust5 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "seas1" + "longname", "seasalt1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "seas2" + "longname", "seasalt2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "seas3" + "longname", "seasalt3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "seas4" + "longname", "seasalt4 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "seas5" + "longname", "seasalt5 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e-7" / + "TRACER", "atmos_mod", "nh3" + "longname", "primary NH3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e+0" / + "TRACER", "atmos_mod", "nh4a" + "longname", "primary NH4a mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e+0" / + "TRACER", "atmos_mod", "no3an1" + "longname", "primary NO3an1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e+0" / + "TRACER", "atmos_mod", "no3an2" + "longname", "primary NO3an2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e+0" / + "TRACER", "atmos_mod", "no3an3" + "longname", "primary NO3an3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=1.e+0" / +# diagnostic chemistry tracers + "TRACER", "atmos_mod", "pm25" + "longname", "primary PM25 mixing ratio" + "units", "ug/m3" + "tracer_usage", "chemistry", "type=diagnostic" + "profile_type", "fixed", "surface_value=1.e+0" / + "TRACER", "atmos_mod", "pm10" + "longname", "primary PM10 mixing ratio" + "units", "ug/m3" + "tracer_usage", "chemistry", "type=diagnostic" + "profile_type", "fixed", "surface_value=1.e+0" / +# non-prognostic cloud amount + "TRACER", "atmos_mod", "cld_amt" + "longname", "cloud amount" + "units", "1" + "profile_type", "fixed", "surface_value=1.e30" / diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index c9abee57b48..f0533b5f8a3 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -224,16 +224,16 @@ ;; esac - if [ -f $FIXwave/ww3_prnc.${type}.$grdID.inp.tmpl ] + if [ -f $PARMwave/ww3_prnc.${type}.$grdID.inp.tmpl ] then - cp $FIXwave/ww3_prnc.${type}.$grdID.inp.tmpl . + cp $PARMwave/ww3_prnc.${type}.$grdID.inp.tmpl . fi if [ -f ww3_prnc.${type}.$grdID.inp.tmpl ] then set +x echo ' ' - echo " ww3_prnc.${type}.$grdID.inp.tmpl copied ($FIXwave)." + echo " ww3_prnc.${type}.$grdID.inp.tmpl copied ($PARMwave)." echo ' ' [[ "$LOUD" = YES ]] && set -x else @@ -820,9 +820,9 @@ # 5.a ww3_multi template - if [ -f $FIXwave/ww3_multi.${NET}.inp.tmpl ] + if [ -f $PARMwave/ww3_multi.${NET}.inp.tmpl ] then - cp $FIXwave/ww3_multi.${NET}.inp.tmpl ww3_multi.inp.tmpl + cp $PARMwave/ww3_multi.${NET}.inp.tmpl ww3_multi.inp.tmpl fi if [ ! -f ww3_multi.inp.tmpl ] @@ -842,21 +842,21 @@ # 5.b Buoy location file - if [ -f $FIXwave/wave_${NET}.buoys ] + if [ -f $PARMwave/wave_${NET}.buoys ] then - cp $FIXwave/wave_${NET}.buoys buoy.loc + cp $PARMwave/wave_${NET}.buoys buoy.loc fi if [ -f buoy.loc ] then set +x - echo " buoy.loc copied ($FIXwave/wave_${NET}.buoys)." + echo " buoy.loc copied ($PARMwave/wave_${NET}.buoys)." [[ "$LOUD" = YES ]] && set -x else set +x echo " buoy.loc not found. **** WARNING **** " [[ "$LOUD" = YES ]] && set -x - postmsg "$jlogfile" " FATAL ERROR : buoy.loc ($FIXwave/wave_${NET}.buoys) NOT FOUND" + postmsg "$jlogfile" " FATAL ERROR : buoy.loc ($PARMwave/wave_${NET}.buoys) NOT FOUND" touch buoy.loc err=13;export err;${errchk} fi @@ -888,13 +888,18 @@ case ${WW3ATMINP} in 'YES' ) NFGRIDS=`expr $NFGRIDS + 1` - WINDLINE=" '$WAVEWND_FID' F F T F F F F" + WINDLINE=" '$WAVEWND_FID' F F T F F F F F F" WINDFLAG="$WAVEWND_FID" ;; 'CPL' ) - WINDFLAG="CPL:${waveesmfGRD}" WNDIFLAG='T' - CPLILINE=" '${waveesmfGRD}' F F T F F F F" + if [ ${waveesmfGRD} ] + then + WINDFLAG="CPL:${waveesmfGRD}" + CPLILINE=" '${waveesmfGRD}' F F T F F F F F F" + else + WINDFLAG="CPL:native" + fi ;; esac @@ -902,13 +907,18 @@ 'YES' ) NFGRIDS=`expr $NFGRIDS + 1` ICEIFLAG='T' - ICELINE=" '$WAVEICE_FID' F F F T F F F" + ICELINE=" '$WAVEICE_FID' F F F T F F F F F" ICEFLAG="$WAVEICE_FID" ;; 'CPL' ) - ICEFLAG="CPL:${waveesmfGRD}" ICEIFLAG='T' - CPLILINE=" '${waveesmfGRD}' F F ${WNDIFLAG} T F F F" + if [ ${waveesmfGRD} ] + then + ICEFLAG="CPL:${waveesmfGRD}" + CPLILINE=" '${waveesmfGRD}' F F ${WNDIFLAG} T F F F F F" + else + ICEFLAG="CPL:native" + fi ;; esac @@ -916,17 +926,22 @@ 'YES' ) if [ "$WAVECUR_FID" != "$WAVEICE_FID" ]; then NFGRIDS=`expr $NFGRIDS + 1` - CURRLINE=" '$WAVECUR_FID' F T F F F F F" + CURRLINE=" '$WAVECUR_FID' F T F F F F F F F" CURRFLAG="$WAVECUR_FID" else # cur fields share the same grid as ice grid - ICELINE=" '$WAVEICE_FID' F T F ${ICEIFLAG} F F F" + ICELINE=" '$WAVEICE_FID' F T F ${ICEIFLAG} F F F F F" CURRFLAG="$WAVEICE_FID" fi ;; 'CPL' ) - CURRFLAG="CPL:${waveesmfGRD}" CURIFLAG='T' - CPLILINE=" '${waveesmfGRD}' F T ${WNDIFLAG} ${ICEFLAG} F F F" + if [ ${waveesmfGRD} ] + then + CURRFLAG="CPL:${waveesmfGRD}" + CPLILINE=" '${waveesmfGRD}' F T ${WNDIFLAG} ${ICEFLAG} F F F F F" + else + CURRFLAG="CPL:native" + fi ;; esac @@ -942,7 +957,7 @@ NMGRIDS=`expr $NMGRIDS + 1` gridN=`echo $waveGRDN | awk -v i=$GRDN '{print $i}'` gridG=`echo $waveGRDG | awk -v i=$GRDN '{print $i}'` - gline="${gline}'${grid}' 'no' 'CURRFLAG' 'WINDFLAG' 'ICEFLAG' 'no' 'no' 'no' ${gridN} ${gridG} 0.00 1.00 F\n" + gline="${gline}'${grid}' 'no' 'CURRFLAG' 'WINDFLAG' 'ICEFLAG' 'no' 'no' 'no' 'no' 'no' ${gridN} ${gridG} 0.00 1.00 F\n" done gline="${gline}\$" echo $gline @@ -968,6 +983,8 @@ -e "s/OUT_BEG/$time_beg_out/g" \ -e "s/OUT_END/$time_end/g" \ -e "s/DTFLD/ $DTFLD_WAV/g" \ + -e "s/FLAGMASKCOMP/ $FLAGMASKCOMP/g" \ + -e "s/FLAGMASKOUT/ $FLAGMASKOUT/g" \ -e "s/GOFILETYPE/ $GOFILETYPE/g" \ -e "s/POFILETYPE/ $POFILETYPE/g" \ -e "s/FIELDS/$FIELDS/g" \ @@ -989,9 +1006,9 @@ if [ -f ww3_multi.inp ] then echo " Copying file ww3_multi.${WAV_MOD_TAG}.inp to $COMOUT " - cp ww3_multi.inp ${COMOUT}/rundata/ww3_multi.${WAV_MOD_TAG}.$cycle.inp + cp ww3_multi.inp ${COMOUT}/rundata/ww3_multi.${WAV_MOD_TAG}.${cycle}.inp else - echo "FATAL ERROR: file ww3_multi.${WAV_MOD_TAG}.$cycle.inp NOT CREATED, ABORTING" + echo "FATAL ERROR: file ww3_multi.${WAV_MOD_TAG}.${cycle}.inp NOT CREATED, ABORTING" err=13;export err;${errchk} fi diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 7290c1d7e0b..83017a29099 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -102,7 +102,6 @@ cpl=${cpl:-.false.} cplflx=${cplflx:-.false.} # default off,import from outside source cplwav=${cplwav:-.false.} # ? how to control 1-way/2-way? cplchem=${cplchem:-.false.} # Chemistry model -cplgocart=${cplgocart:-.false.} # Chemistry model cplice=${cplice:-.false.} # ICE model OCNTIM=${OCNTIM:-3600} @@ -134,7 +133,6 @@ esac [[ $cplflx = .true. ]] && MOM6_predet #[[ $cplwav = .true. ]] && WW3_predet #no WW3_predet at this time [[ $cplice = .true. ]] && CICE_predet -[[ $cplchem = .true. ]] && GSD_predet case $RUN in 'gfs') FV3_GFS_det;; @@ -144,7 +142,6 @@ esac #no run type determination for data atmosphere [[ $cplflx = .true. ]] && MOM6_det [[ $cplwav = .true. ]] && WW3_det [[ $cplice = .true. ]] && CICE_det -[[ $cplchem = .true. ]] && GSD_det echo "MAIN: RUN Type Determined" @@ -159,7 +156,6 @@ esac #no post determination set up for data atmosphere [[ $cplflx = .true. ]] && MOM6_postdet [[ $cplwav = .true. ]] && WW3_postdet [[ $cplice = .true. ]] && CICE_postdet -[[ $cplchem = .true. ]] && GSD_postdet echo "MAIN: Post-determination set up of run type finished" echo "MAIN: Writing name lists and model configuration" @@ -172,8 +168,7 @@ esac #no namelist for data atmosphere [[ $cplflx = .true. ]] && MOM6_nml [[ $cplwav = .true. ]] && WW3_nml [[ $cplice = .true. ]] && CICE_nml -[[ $cplchem = .true. ]] && GSD_nml -[[ $cplgocart = .true. ]] && GOCART_rc +[[ $cplchem = .true. ]] && GOCART_rc case $RUN in 'data') DATM_model_configure;; @@ -216,7 +211,6 @@ if [ $machine != 'sandbox' ]; then [[ $cplflx = .true. ]] && MOM6_out [[ $cplwav = .true. ]] && WW3_out [[ $cplice = .true. ]] && CICE_out - [[ $cplchem = .true. ]] && GSD_out [[ $esmf_profile = .true. ]] && CPL_out else echo "MAIN: Running on sandbox mode, no output linking" diff --git a/sorc/build_ufs_coupled.sh b/sorc/build_ufs_coupled.sh new file mode 100755 index 00000000000..1b4d11c6eee --- /dev/null +++ b/sorc/build_ufs_coupled.sh @@ -0,0 +1,44 @@ +#! /usr/bin/env bash +set -eux + +# Build S2S by default +APP="S2SW" +CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_coupled,FV3_GFS_v16_couplednsst,FV3_GFS_v16_coupled_nsstNoahmpUGWPv1" + +while getopts "a" option; do + case $option in + a) + APP="ATMAERO" + CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_ugwpv1" + shift + ;; + *) + echo "Unrecognized option: ${1}" + exit 1 + ;; + esac +done + +source ./machine-setup.sh > /dev/null 2>&1 +cwd=`pwd` + +# Set target platform +case "${target}" in + hera|orion|stampede) + target=${target}.intel + ;; +esac + +MOD_PATH=$cwd/ufs_coupled.fd/modulefiles + +module purge + +cd ufs_coupled.fd/ + +if [ -d build ]; then + rm -Rf build +fi + +module use ${MOD_PATH} +module load ufs_${target} +CMAKE_FLAGS="-DAPP=${APP} -DCCPP_SUITES=${CCPP_SUITES}" ./build.sh diff --git a/sorc/build_ww3prepost.sh b/sorc/build_ww3prepost.sh index d2554d038e7..f17d7bcbeb0 100755 --- a/sorc/build_ww3prepost.sh +++ b/sorc/build_ww3prepost.sh @@ -10,16 +10,18 @@ finalexecdir=$( pwd -P )/../exec set +x source ./machine-setup.sh > /dev/null 2>&1 + source ../modulefiles/modulefile.ww3.$target +#source ../modulefiles/module_base.$target set -x +set -u # Error on undefined variables if [ $target = hera ]; then target=hera.intel ; fi if [ $target = orion ]; then target=orion.intel ; fi if [ $target = stampede ]; then target=stampede.intel ; fi -#cd ufs_coupled.fd/WW3 -cd fv3gfs.fd/WW3 +cd ufs_coupled.fd/WW3 export WW3_DIR=$( pwd -P )/model export WW3_BINDIR="${WW3_DIR}/bin" export WW3_TMPDIR=${WW3_DIR}/tmp @@ -35,6 +37,7 @@ export Z_LIB=${Z_LIB:-$ZLIB_ROOT/lib/libz.a} export JASPER_LIB=${JASPER_LIB:-$JASPER_ROOT/lib64/libjasper.a} export WWATCH3_NETCDF=NC4 export NETCDF_CONFIG=$NETCDF_ROOT/bin/nc-config +export PRINTER=${PRINTER:-""} rm $WWATCH3_ENV echo '#' > $WWATCH3_ENV @@ -47,6 +50,7 @@ echo "WWATCH3_F90 $WW3_F90" >> $WWATCH3_ENV echo "WWATCH3_CC $WW3_CC" >> $WWATCH3_ENV echo "WWATCH3_DIR $WW3_DIR" >> $WWATCH3_ENV echo "WWATCH3_TMP $WW3_TMPDIR" >> $WWATCH3_ENV +echo "WWATCH3_NETCDF $WWATCH3_NETCDF" >> $WWATCH3_ENV echo 'WWATCH3_SOURCE yes' >> $WWATCH3_ENV echo 'WWATCH3_LIST yes' >> $WWATCH3_ENV echo '' >> $WWATCH3_ENV @@ -65,17 +69,20 @@ sed -e "s/DIST/SHRD/g"\ ${WW3_BINDIR}/tempswitch > ${WW3_BINDIR}/switch #Build exes for prep jobs: -${WW3_BINDIR}/w3_make ww3_grid -${WW3_BINDIR}/w3_make ww3_prep -${WW3_BINDIR}/w3_make ww3_prnc +${WW3_BINDIR}/w3_make ww3_grid +rc=$? +if [[ $rc -ne 0 ]] ; then + echo "FATAL: Error building ww3_grid (Error code $rc)" + exit $rc +fi #Build exes for post jobs (except grib)" ${WW3_BINDIR}/w3_make ww3_outp -${WW3_BINDIR}/w3_make ww3_outf -${WW3_BINDIR}/w3_make ww3_outp -${WW3_BINDIR}/w3_make ww3_gint -${WW3_BINDIR}/w3_make ww3_ounf -${WW3_BINDIR}/w3_make ww3_ounp +rc=$? +if [[ $rc -ne 0 ]] ; then + echo "FATAL: Error building ww3_outp (Error code $rc)" + exit $rc +fi #Update switch for grib: echo $(cat ${SWITCHFILE}) > ${WW3_BINDIR}/tempswitch @@ -90,7 +97,22 @@ sed -e "s/DIST/SHRD/g"\ ${WW3_BINDIR}/tempswitch > ${WW3_BINDIR}/switch #Build exe for grib ${WW3_BINDIR}/w3_make ww3_grib +rc=$? +if [[ $rc -ne 0 ]] ; then + echo "FATAL: Error building ww3_grib (Error code $rc)" + exit $rc +fi + +for prog in ww3_grid ww3_outp ww3_grib; do + cp $WW3_EXEDIR/$prog $finalexecdir/ + rc=$? + if [[ $rc -ne 0 ]] ; then + echo "FATAL: Unable to copy $WW3_EXEDIR/$prog to $finalexecdir (Error code $rc)" + exit $rc + fi +done -cp $WW3_EXEDIR/ww3_* $finalexecdir/ ${WW3_BINDIR}/w3_clean -c -rm ${WW3_BINDIR}/tempswitch +rm ${WW3_BINDIR}/tempswitch + +exit 0 diff --git a/ush/cplvalidate.sh b/ush/cplvalidate.sh new file mode 100755 index 00000000000..46f861dbe12 --- /dev/null +++ b/ush/cplvalidate.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +##### +## This script validates $confignamevarfornems +## against cpl** switches to check consistency +## +## This is a child script of modular +## forecast script. This script is a direct execution +##### + +cplvalidate(){ +echo "SUB cplvalidate: validating cpl** switches for $confignamevarfornems" +return +case $confignamevarfornems in + 'atm') combination=.false..false..false..false..false.;; + 'datm') combination=.true..true..false..false..false.;; + 'atm_aer') combination=.true..false..false..false..true.;; + 'med_atm_ocn_ice') combination=.true..true..true..false..false.;; + 'cpld') combination=.true..true..true..false..false.;; + 'blocked_atm_wav') combination=.true..false..false..true..false.;; + 'leapfrog_atm_wav')combination=.true..false..false..true..false.;; + 'med_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'cpld_wave') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'med_atm_ocn_ice_wav1way') combination=.true..true..true..true..false.;; + 'med_atm_ocn_ice_wav1waywcurr') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice') combination=.true..true..true..false..false.;; + *) echo "SUB cplvalidate: Combination not supported" + exit 1 ;; +esac +control=$cpl$cplflx$cplice$cplwav$cplchem +#echo $control +if [ $control != $combination ]; then + echo "SUB cplvalidate: inconsistent cpl setting!" + exit 2 +else + echo "SUB cplvalidate: cpl settings validated!" +fi +} diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index a33927e3eb0..e75000ca470 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -176,13 +176,59 @@ EOF else $NLN $FIXfv3/${CASE}_mosaic.nc $DATA/INPUT/${CASE}_mosaic.nc fi + + # Fractional grid related + if [ $FRAC_GRID = ".true." ]; then + OROFIX=${OROFIX:-"${FIX_DIR}/fix_fv3_fracoro/${CASE}.mx${OCNRES}_frac"} + FIX_SFC=${FIX_SFC:-"${OROFIX}/fix_sfc"} + for n in $(seq 1 $ntiles); do + $NLN ${OROFIX}/oro_${CASE}.mx${OCNRES}.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc + done + else + OROFIX=${OROFIX:-"${FIXfv3}/${CASE}"} + FIX_SFC=${FIX_SFC:-"${FIXgrd}/fix_sfc"} + for n in $(seq 1 $ntiles); do + $NLN ${OROFIX}/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc + done + fi + + export CCPP_SUITE=${CCPP_SUITE:-"FV3_GFS_v16"} + _suite_file=$HOMEgfs/sorc/ufs_coupled.fd/FV3/ccpp/suites/suite_${CCPP_SUITE}.xml + + if [ ! -f ${_suite_file} ]; then + echo "FATAL: CCPP Suite file ${_suite_file} does not exist!" + exit 2 + fi + + # Scan suite file to determine whether it uses Noah-MP + if [ $(grep noahmpdrv ${_suite_file} | wc -l ) -gt 0 ]; then + lsm="2" + else + lsm="1" + fi + # Scan suite file to determine whether it uses UGWP v1 + if [ $(grep -i ugwpv1_gsldrag ${_suite_file} | wc -l ) -gt 0 ]; then + gwd_opt="2" + knob_ugwp_version="1" + OROFIX_ugwd=${OROFIX_ugwd:-"${FIX_DIR}/fix_ugwd"} + $NLN ${OROFIX_ugwd}/ugwp_limb_tau.nc $DATA/ugwp_limb_tau.nc + for n in $(seq 1 $ntiles); do + $NLN ${OROFIX_ugwd}/$CASE/${CASE}_oro_data_ls.tile${n}.nc $DATA/INPUT/oro_data_ls.tile${n}.nc + $NLN ${OROFIX_ugwd}/$CASE/${CASE}_oro_data_ss.tile${n}.nc $DATA/INPUT/oro_data_ss.tile${n}.nc + done + else + gwd_opt="1" + knob_ugwp_version="0" + launch_level=${launch_level:-$(echo "$LEVS/2.35" |bc)} + fi + # GFS standard input data IALB=${IALB:-1} IEMS=${IEMS:-1} ISOL=${ISOL:-2} - IAER=${IAER:-111} + IAER=${IAER:-1011} ICO2=${ICO2:-2} if [ ${new_o3forc:-YES} = YES ]; then @@ -207,14 +253,19 @@ EOF $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt ## merra2 aerosol climo - for n in 01 02 03 04 05 06 07 08 09 10 11 12; do - $NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc - done - $NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat - $NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat - $NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat - $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat - $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat + if [ $IAER -eq "1011" ]; then + FIX_AER="${FIX_DIR}/fix_aer" + for month in $(seq 1 12); do + MM=$(printf %02d $month) + $NLN "${FIX_AER}/merra2.aerclim.2003-2014.m${MM}.nc" "aeroclim.m${MM}.nc" + done + FIX_LUT="${FIX_DIR}/fix_lut" + $NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat + $NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat + $NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat + $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat + $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat + fi $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt @@ -268,18 +319,32 @@ EOF FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} FNZORC=${FNZORC:-"igbp"} - FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} - FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} - FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} - FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} - FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} - FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} - FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} - FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} - FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} + if [ $cplflx = ".false." ] ; then + FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} + FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} + FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} + FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} + FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} + FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} + FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} + FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} + FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} + else + FNALBC2=${FNALBC2:-"${FIX_SFC}/${CASE}.facsf.tileX.nc"} + FNTG3C=${FNTG3C:-"${FIX_SFC}/${CASE}.substrate_temperature.tileX.nc"} + FNVEGC=${FNVEGC:-"${FIX_SFC}/${CASE}.vegetation_greenness.tileX.nc"} + FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} + FNVMNC=${FNVMNC:-"${FIX_SFC}/${CASE}.vegetation_greenness.tileX.nc"} + FNVMXC=${FNVMXC:-"${FIX_SFC}/${CASE}.vegetation_greenness.tileX.nc"} + FNSLPC=${FNSLPC:-"${FIX_SFC}/${CASE}.slope_type.tileX.nc"} + FNALBC=${FNALBC:-"${FIX_SFC}/${CASE}.snowfree_albedo.tileX.nc"} + FNVETC=${FNVETC:-"${FIX_SFC}/${CASE}.vegetation_type.tileX.nc"} + FNSOTC=${FNSOTC:-"${FIX_SFC}/${CASE}.soil_type.tileX.nc"} + FNABSC=${FNABSC:-"${FIX_SFC}/${CASE}.maximum_snow_albedo.tileX.nc"} + fi FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} # If the appropriate resolution fix file is not present, use the highest resolution available (T1534) @@ -480,11 +545,7 @@ FV3_GFS_nml(){ echo "MAIN: !!!Sandbox mode, writing to current directory!!!" fi # Call child scripts in current script directory - if [ $cplgocart = .true. ]; then - source $SCRIPTDIR/parsing_namelists_FV3_GOCART.sh - else - source $SCRIPTDIR/parsing_namelists_FV3.sh - fi + source $SCRIPTDIR/parsing_namelists_FV3.sh FV3_namelists echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created } @@ -746,6 +807,8 @@ CICE_postdet() { echo "SUB ${FUNCNAME[0]}: CICE after run type determination" year=$(echo $CDATE|cut -c 1-4) + month=$(echo $CDATE|cut -c 5-6) + day=$(echo $CDATE|cut -c 7-8) stepsperhr=$((3600/$ICETIM)) nhours=$($NHOUR $CDATE ${year}010100) istep0=$((nhours*stepsperhr)) @@ -763,6 +826,8 @@ CICE_postdet() { cice_hist_avg=${cice_hist_avg:-".true."} FRAZIL_FWSALT=${FRAZIL_FWSALT:-".true."} + ktherm=${ktherm:-1} + tfrz_option=${tfrz_option:-"linear_salt"} tr_pond_lvl=${tr_pond_lvl:-".true."} # Use level melt ponds tr_pond_lvl=true # restart_pond_lvl (if tr_pond_lvl=true): @@ -802,7 +867,7 @@ CICE_postdet() { echo "Link CICE fixed files" $NLN -sf $FIXcice/$ICERES/${ice_grid_file} $DATA/ $NLN -sf $FIXcice/$ICERES/${ice_kmt_file} $DATA/ - $NLN -sf $FIXcice/$ICERES/$MESHICE $DATA/ + $NLN -sf $FIXcice/$ICERES/$MESH_OCN_ICE $DATA/ } CICE_nml() { diff --git a/ush/get_platform.sh b/ush/get_platform.sh new file mode 100644 index 00000000000..417f6ce920f --- /dev/null +++ b/ush/get_platform.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +############################################################### +# Auto-detect platform and return string identifier +############################################################### + +get_platform() { + + local hname=`hostname -d` + local pname="unknown" + + if [[ $hname = 'stampede2.tacc.utexas.edu' ]] ; then + # We are on Xsede stampede2 + pname="stampede" + elif [[ $hname = 'hpc.msstate.edu' ]] ; then + # We are on MSU Orion + pname="orion" + elif [[ -d /lfs3 ]] ; then + # We are on NOAA Jet + pname="jet" + elif [[ -d /scratch1 ]] ; then + # We are on NOAA Hera + pname="hera" + elif [[ -d /gpfs/hps && -e /etc/SuSE-release ]] ; then + # We are on NOAA Luna or Surge + pname="wcoss_c" + elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then + # We are on NOAA Mars or Venus + pname="wcoss_dell_p3" + elif [[ -d /dcom && -d /hwrf ]] ; then + # We are on NOAA Tide or Gyre + pname="wcoss" + elif [[ -d /glade ]] ; then + # We are on NCAR Cheyenne + pname="cheyenne" + elif [[ -d /lustre && -d /ncrc ]] ; then + # We are on GAEA. + pname="gaea" + else + echo WARNING: UNKNOWN PLATFORM + fi + + echo "${pname}" +} diff --git a/ush/nems.configure.cpld.IN b/ush/nems.configure.cpld.IN index 08d40044c09..8a070787f51 100644 --- a/ush/nems.configure.cpld.IN +++ b/ush/nems.configure.cpld.IN @@ -31,6 +31,7 @@ OCN_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true + mesh_ocn = @[MESH_OCN_ICE] :: # ICE # @@ -41,7 +42,7 @@ ICE_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true - mesh_ice = @[MESHICE] + mesh_ice = @[MESH_OCN_ICE] stop_n = @[RESTART_N] stop_option = nhours stop_ymd = -999 @@ -99,4 +100,6 @@ ALLCOMP_attributes:: restart_ymd = -999 dbug_flag = @[cap_dbug_flag] use_coldstart = @[use_coldstart] + use_mommesh = @[use_mommesh] + eps_imesh = @[eps_imesh] :: diff --git a/ush/nems.configure.cpld_wave.IN b/ush/nems.configure.cpld_wave.IN index ee4443f2d90..2b8a49e56b6 100644 --- a/ush/nems.configure.cpld_wave.IN +++ b/ush/nems.configure.cpld_wave.IN @@ -31,6 +31,7 @@ OCN_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true + mesh_ocn = @[MESH_OCN_ICE] :: # ICE # @@ -41,7 +42,7 @@ ICE_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true - mesh_ice = @[MESHICE] + mesh_ice = @[MESH_OCN_ICE] stop_n = @[RESTART_N] stop_option = nhours stop_ymd = -999 @@ -113,4 +114,6 @@ ALLCOMP_attributes:: restart_ymd = -999 dbug_flag = @[cap_dbug_flag] use_coldstart = @[use_coldstart] + use_mommesh = @[use_mommesh] + eps_imesh = @[eps_imesh] :: diff --git a/ush/nems.configure.medcold_atm_ocn_ice.IN b/ush/nems.configure.medcold_atm_ocn_ice.IN index d54f6596a6f..80a1527b9aa 100644 --- a/ush/nems.configure.medcold_atm_ocn_ice.IN +++ b/ush/nems.configure.medcold_atm_ocn_ice.IN @@ -32,6 +32,7 @@ OCN_attributes:: ProfileMemory = false OverwriteSlice = true dbug_flag = 0 + mesh_ocn = @[MESH_OCN_ICE] :: # ICE # @@ -42,7 +43,7 @@ ICE_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true - mesh_ice = @[MESHICE] + mesh_ice = @[MESH_OCN_ICE] stop_n = @[FHMAX] stop_option = nhours stop_ymd = -999 @@ -99,4 +100,5 @@ ALLCOMP_attributes:: restart_option = nhours restart_ymd = -999 dbug_flag = 0 + eps_imesh = @[eps_imesh] :: diff --git a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN index 53cfc8c09d4..2ef5f706bf3 100644 --- a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN +++ b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN @@ -31,6 +31,7 @@ OCN_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true + mesh_ocn = @[MESH_OCN_ICE] :: # ICE # @@ -41,7 +42,7 @@ ICE_attributes:: DumpFields = @[DumpFields] ProfileMemory = false OverwriteSlice = true - mesh_ice = @[MESHICE] + mesh_ice = @[MESH_OCN_ICE] stop_n = @[FHMAX] stop_option = nhours stop_ymd = -999 @@ -112,4 +113,5 @@ ALLCOMP_attributes:: restart_option = nhours restart_ymd = -999 dbug_flag = 0 + eps_imesh = @[eps_imesh] :: diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh index 8e446271458..9d65adc2b06 100755 --- a/ush/nems_configure.sh +++ b/ush/nems_configure.sh @@ -36,7 +36,7 @@ ATM_model=${ATM_model:-'fv3'} OCN_model=${OCN_model:-'mom6'} ICE_model=${ICE_model:-'cice'} WAV_model=${WAV_model:-'ww3'} -CHM_model=${CHM_model:-'gsdchem'} +CHM_model=${CHM_model:-'gocart'} ATMPETS=${ATMPETS:-8} MEDPETS=${MEDPETS:-8} @@ -45,6 +45,9 @@ ICEPETS=${ICEPETS:-8} WAVPETS=${WAVPETS:-8} CHMPETS=${CHMPETS:-${ATMPETS}} +USE_MOMMESH=${USE_MOMMESH:-"true"} + + rm -f $DATA/nems.configure med_petlist_bounds=${med_petlist_bounds:-"0 $(( $MEDPETS-1 ))"} @@ -56,7 +59,7 @@ chm_petlist_bounds=${chm_petlist_bounds:-"0 $(( $CHMPETS-1 ))"} # Copy the selected template into run directory cp $SCRIPTDIR/nems.configure.$confignamevarfornems.IN tmp1 -sed -i -e "s;@\[med_model\];nems;g" tmp1 +sed -i -e "s;@\[med_model\];cmeps;g" tmp1 sed -i -e "s;@\[atm_model\];$ATM_model;g" tmp1 sed -i -e "s;@\[med_petlist_bounds\];$med_petlist_bounds;g" tmp1 sed -i -e "s;@\[atm_petlist_bounds\];$atm_petlist_bounds;g" tmp1 @@ -79,6 +82,8 @@ if [ $cplflx = .true. ]; then sed -i -e "s;@\[coupling_interval_slow_sec\];$CPL_SLOW;g" tmp1 sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 sed -i -e "s;@\[RESTART_N\];$restart_interval_nems;g" tmp1 + sed -i -e "s;@\[use_mommesh\];$USE_MOMMESH;g" tmp1 + sed -i -e "s;@\[eps_imesh\];$ICERESdec;g" tmp1 fi if [ $cplwav = .true. ]; then sed -i -e "s;@\[wav_model\];ww3;g" tmp1 @@ -87,10 +92,10 @@ fi if [ $cplice = .true. ]; then sed -i -e "s;@\[ice_model\];$ICE_model;g" tmp1 sed -i -e "s;@\[ice_petlist_bounds\];$ice_petlist_bounds;g" tmp1 - sed -i -e "s;@\[MESHICE\];$MESHICE;g" tmp1 + sed -i -e "s;@\[MESH_OCN_ICE\];$MESH_OCN_ICE;g" tmp1 sed -i -e "s;@\[FHMAX\];$FHMAX_GFS;g" tmp1 fi -if [ $cplchem = .true. -o $cplgocart = .true. ]; then +if [ $cplchem = .true. ]; then sed -i -e "s;@\[chm_model\];$CHM_model;g" tmp1 sed -i -e "s;@\[chm_petlist_bounds\];$chm_petlist_bounds;g" tmp1 sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 @@ -155,9 +160,9 @@ EOF echo "$(cat med_modelio.nml)" -cp $HOMEgfs/sorc/ufs_coupled.fd/CMEPS-interface/CMEPS/mediator/fd_nems.yaml fd_nems.yaml +fi -fi +cp $HOMEgfs/sorc/ufs_coupled.fd/tests/parm/fd_nems.yaml fd_nems.yaml echo "SUB ${FUNCNAME[0]}: Nems configured for $confignamevarfornems" diff --git a/ush/parsing_namelists_CICE.sh b/ush/parsing_namelists_CICE.sh index 60baa023e39..5dd2b15a45c 100644 --- a/ush/parsing_namelists_CICE.sh +++ b/ush/parsing_namelists_CICE.sh @@ -5,7 +5,7 @@ CICE_namelists(){ if [ $warm_start = ".true." ]; then cmeps_run_type='continue' else - cmeps_run_type='startup' + cmeps_run_type='initial' fi @@ -14,12 +14,13 @@ cat > ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in <> diag_table fi +# Append AOD diag table for MERRA2 +if [ $IAER = "1011" ]; then + cat $DIAG_TABLE_AOD >> diag_table +fi + $NCP $DATA_TABLE data_table $NCP $FIELD_TABLE field_table @@ -48,7 +54,7 @@ cat > input.nml <> input.nml << EOF imp_physics = ${imp_physics:-"99"} ! CROW configured EOF - -if [ $CCPP_SUITE = "FV3_GFS_v15p2_coupled" ]; then +case "${CCPP_SUITE:-}" in + "FV3_GFS_v15p2_coupled") cat >> input.nml << EOF oz_phys = .false. oz_phys_2015 = .true. EOF -elif [ $CCPP_SUITE = "FV3_GSD_v0" ]; then + ;; + "FV3_GSD_v0") cat >> input.nml << EOF iovr = ${iovr:-"3"} - ltaerosol = ${ltaerosol:-".F."} ! In config.fcst - lradar = ${lradar:-".F."} ! In config.fcst - ttendlim = ${ttendlim:-0.005} ! In config.fcst + ltaerosol = ${ltaerosol:-".F."} + lradar = ${lradar:-".F."} + ttendlim = ${ttendlim:-0.005} oz_phys = ${oz_phys:-".false."} oz_phys_2015 = ${oz_phys_2015:-".true."} lsoil_lsm = ${lsoil_lsm:-"4"} @@ -223,7 +230,26 @@ elif [ $CCPP_SUITE = "FV3_GSD_v0" ]; then min_lakeice = ${min_lakeice:-"0.15"} min_seaice = ${min_seaice:-"0.15"} EOF -elif [ $CCPP_SUITE = "FV3_GFS_v16_coupled" ]; then + ;; + FV3_GFS_v16_coupled*) + cat >> input.nml << EOF + iovr = ${iovr:-"3"} + ltaerosol = ${ltaerosol:-".false."} + lradar = ${lradar:-".false."} + ttendlim = ${ttendlim:-"0.005"} + oz_phys = ${oz_phys:-".false."} + oz_phys_2015 = ${oz_phys_2015:-".true."} + do_mynnedmf = ${do_mynnedmf:-".false."} + do_mynnsfclay = ${do_mynnsfclay:-".false."} + icloud_bl = ${icloud_bl:-"1"} + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} + bl_mynn_tkeadvect = ${bl_mynn_tkeadvect:-".true."} + bl_mynn_edmf_mom = ${bl_mynn_edmf_mom:-"1"} + min_lakeice = ${min_lakeice:-"0.15"} + min_seaice = ${min_seaice:-"0.15"} +EOF + ;; + FV3_GFS_v16*) cat >> input.nml << EOF iovr = ${iovr:-"3"} ltaerosol = ${ltaerosol:-".false."} @@ -241,11 +267,13 @@ elif [ $CCPP_SUITE = "FV3_GFS_v16_coupled" ]; then min_lakeice = ${min_lakeice:-"0.15"} min_seaice = ${min_seaice:-"0.15"} EOF -else + ;; + *) cat >> input.nml << EOF iovr = ${iovr:-"3"} EOF -fi + ;; +esac cat >> input.nml <> input.nml <> input.nml <> input.nml << EOF + do_tofd = ${do_tofd:-".false."} + fscav_aero = ${fscav_aero:-'*:0.0'} +EOF +else +cat >> input.nml <> input.nml <> input.nml << EOF + cplchm = ${cplchem:-".false."} cplflx = $cplflx - cplwav2atm = ${cplwav2atm} ! CROW configured + cplwav2atm = ${cplwav2atm} EOF fi @@ -327,10 +369,77 @@ if [ $DOIAU = "YES" ]; then EOF fi -cat >> input.nml <> input.nml <> input.nml << EOF + gwd_opt = 2 + do_ugwp = .true. + do_ugwp_v0 = .false. + do_ugwp_v1 = .true. + do_tofd = .false. + do_ugwp_v1_orog_only = .false. + do_gsl_drag_ls_bl = ${do_gsl_drag_ls_bl:-".true."} + do_gsl_drag_ss = ${do_gsl_drag_ss:-".true."} + do_gsl_drag_tofd = ${do_gsl_drag_tofd:-".true."} $gfs_physics_nml / +&cires_ugwp_nml + knob_ugwp_version = ${knob_ugwp_version:-1} + knob_ugwp_solver = ${knob_ugwp_solver:-2} + knob_ugwp_source = ${knob_ugwp_source:-1,1,0,0} + knob_ugwp_wvspec = ${knob_ugwp_wvspec:-1,25,25,25} + knob_ugwp_azdir = ${knob_ugwp_azdir:-2,4,4,4} + knob_ugwp_stoch = ${knob_ugwp_stoch:-0,0,0,0} + knob_ugwp_effac = ${knob_ugwp_effac:-1,1,1,1} + knob_ugwp_doaxyz = ${knob_ugwp_doaxyz:-1} + knob_ugwp_doheat = ${knob_ugwp_doheat:-1} + knob_ugwp_dokdis = ${knob_ugwp_dokdis:-2} + knob_ugwp_ndx4lh = ${knob_ugwp_ndx4lh:-4} + knob_ugwp_palaunch = ${knob_ugwp_palaunch:-275.0e2} + knob_ugwp_nslope = ${knob_ugwp_nslope:-1} + knob_ugwp_lzmax = ${knob_ugwp_lzmax:-15.750e3} + knob_ugwp_lzmin = ${knob_ugwp_lzmin:-0.75e3} + knob_ugwp_lzstar = ${knob_ugwp_lzstar:-2.0e3} + knob_ugwp_taumin = ${knob_ugwp_taumin:-0.25e-3} + knob_ugwp_tauamp = ${knob_ugwp_tauamp:-3.0e-3} + knob_ugwp_lhmet = ${knob_ugwp_lhmet:-200.0e3} + knob_ugwp_orosolv = ${knob_ugwp_orosolv:-'pss-1986'} + $cires_ugwp_nml +/ EOF + ;; + *) + echo "FATAL: Invalid gwd_opt specified: $gwd_opt" + exit 1 + ;; +esac echo "" >> input.nml diff --git a/ush/parsing_namelists_FV3_GOCART.sh b/ush/parsing_namelists_FV3_GOCART.sh deleted file mode 100755 index 0d2390515c3..00000000000 --- a/ush/parsing_namelists_FV3_GOCART.sh +++ /dev/null @@ -1,364 +0,0 @@ -#! /bin/sh -##### -## "parsing_namelist_FV3.sh" -## This script writes namelist for FV3 model -## -## This is the child script of ex-global forecast, -## writing namelist for FV3 -## This script is a direct execution. -##### - -FV3_namelists(){ - -# copy over the tables -DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table_aer} -DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} -FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table_aer} - -# build the diag_table with the experiment name and date stamp -if [ $DOIAU = "YES" ]; then -cat > diag_table << EOF -FV3 Forecast -${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table -else -cat > diag_table << EOF -FV3 Forecast -${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table -fi - -$NCP $DATA_TABLE data_table -$NCP $FIELD_TABLE field_table - -cat > input.nml <> input.nml <> input.nml - -cat >> input.nml <> input.nml << EOF -&nam_stochy -/ -&nam_sfcperts -/ -EOF - -echo "$(cat input.nml)" -} diff --git a/ush/parsing_namelists_MOM6.sh b/ush/parsing_namelists_MOM6.sh index 2af5e1d457d..e7ab58a0ae0 100644 --- a/ush/parsing_namelists_MOM6.sh +++ b/ush/parsing_namelists_MOM6.sh @@ -9,8 +9,9 @@ MOM_INPUT=MOM_input_template_$OCNRES #TODO: Make these variables configurable #Set to False for restart reproducibility -MOM6_REPRO_LA='True' -MOM6_THERMO_SPAN='False' +MOM6_REPRO_LA=${MOM6_REPRO_LA:-'True'} +MOM6_THERMO_SPAN=${MOM6_THERMO_SPAN:-'False'} +MOM6_ALLOW_LANDMASK_CHANGES=${MOM6_ALLOW_LANDMASK_CHANGES:-'False'} if [ $cplwav = ".true." ] ; then MOM6_USE_WAVES='True' @@ -74,6 +75,7 @@ sed -e "s/DT_THERM_MOM6/$DT_THERM_MOM6/g" \ -e "s/MOM6_THERMO_SPAN/$MOM6_THERMO_SPAN/g" \ -e "s/MOM6_REPRO_LA/$MOM6_REPRO_LA/g" \ -e "s/MOM6_USE_WAVES/$MOM6_USE_WAVES/g" \ + -e "s/MOM6_ALLOW_LANDMASK_CHANGES/$MOM6_ALLOW_LANDMASK_CHANGES/g" \ -e "s/NX_GLB/$NX_GLB/g" \ -e "s/NY_GLB/$NY_GLB/g" \ -e "s/CHLCLIM/$CHLCLIM/g" $DATA/INPUT/MOM_input_template_$OCNRES > $DATA/INPUT/MOM_input From 32f2ae44528e6bc28e343c6f4d3df26d5f201d5f Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 10:42:29 -0500 Subject: [PATCH 10/33] delete _bk file --- scripts/exglobal_forecast.sh_bk | 1422 ------------------------------- 1 file changed, 1422 deletions(-) delete mode 100755 scripts/exglobal_forecast.sh_bk diff --git a/scripts/exglobal_forecast.sh_bk b/scripts/exglobal_forecast.sh_bk deleted file mode 100755 index 564c0c798a3..00000000000 --- a/scripts/exglobal_forecast.sh_bk +++ /dev/null @@ -1,1422 +0,0 @@ -#!/bin/ksh -################################################################################ -# UNIX Script Documentation Block -# Script name: exglobal_forecast.sh -# Script description: Runs a global FV3GFS model forecast -# -# Author: Fanglin Yang Org: NCEP/EMC Date: 2016-11-15 -# Abstract: This script runs a single GFS forecast with FV3 dynamical core. -# This script is created based on a C-shell script that GFDL wrote -# for the NGGPS Phase-II Dycore Comparison Project. -# -# Script history log: -# 2016-11-15 Fanglin Yang First Version. -# 2017-02-09 Rahul Mahajan Added warm start and restructured the code. -# 2017-03-10 Fanglin Yang Updated for running forecast on Cray. -# 2017-03-24 Fanglin Yang Updated to use NEMS FV3GFS with IPD4 -# 2017-05-24 Rahul Mahajan Updated for cycling with NEMS FV3GFS -# 2017-09-13 Fanglin Yang Updated for using GFDL MP and Write Component -# 2019-03-05 Rahul Mahajan Implemented IAU -# 2019-03-21 Fanglin Yang Add restart capability for running gfs fcst from a break point. -# 2019-12-12 Henrique Alves Added wave model blocks for coupled run -# 2020-01-31 Henrique Alves Added IAU capability for wave component -# 2020-06-02 Fanglin Yang restore restart capability when IAU is turned on. -# -# $Id$ -# -# Attributes: -# Language: Portable Operating System Interface (POSIX) Shell -# Machine: WCOSS-CRAY, Theia -################################################################################ - -# Set environment. -VERBOSE=${VERBOSE:-"YES"} -if [ $VERBOSE = "YES" ] ; then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi - -machine=${machine:-"WCOSS_C"} -machine=$(echo $machine | tr '[a-z]' '[A-Z]') - -# Cycling and forecast hour specific parameters -CDUMPwave="${CDUMP}wave" -CASE=${CASE:-C768} -CDATE=${CDATE:-2017032500} -CDUMP=${CDUMP:-gdas} -FHMIN=${FHMIN:-0} -FHMAX=${FHMAX:-9} -FHOUT=${FHOUT:-3} -FHZER=${FHZER:-6} -FHCYC=${FHCYC:-24} -FHMAX_HF=${FHMAX_HF:-0} -FHOUT_HF=${FHOUT_HF:-1} -NSOUT=${NSOUT:-"-1"} -FDIAG=$FHOUT -if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi -WRITE_DOPOST=${WRITE_DOPOST:-".false."} -restart_interval=${restart_interval:-0} -rst_invt1=`echo $restart_interval |cut -d " " -f 1` - -PDY=$(echo $CDATE | cut -c1-8) -cyc=$(echo $CDATE | cut -c9-10) - -# Directories. -pwd=$(pwd) -NWPROD=${NWPROD:-${NWROOT:-$pwd}} -HOMEgfs=${HOMEgfs:-$NWPROD} -FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} -FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} -export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} -export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} -FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} -DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory -ROTDIR=${ROTDIR:-$pwd} # rotating archive directory -ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions -DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis - -# Model resolution specific parameters -DELTIM=${DELTIM:-225} -layout_x=${layout_x:-8} -layout_y=${layout_y:-16} -LEVS=${LEVS:-65} - -# Utilities -NCP=${NCP:-"/bin/cp -p"} -NLN=${NLN:-"/bin/ln -sf"} -NMV=${NMV:-"/bin/mv"} -SEND=${SEND:-"YES"} #move final result to rotating directory -ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -KEEPDATA=${KEEPDATA:-"NO"} - -# Other options -MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER -ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) -PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment - -# IAU options -DOIAU=${DOIAU:-"NO"} -IAUFHRS=${IAUFHRS:-0} -IAU_DELTHRS=${IAU_DELTHRS:-0} -IAU_OFFSET=${IAU_OFFSET:-0} - -# Model specific stuff -FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} -FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} -PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} -PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} - -# Wave coupling parameter defaults to false -cplwav=${cplwav:-.false.} - -# Model config options -APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} -NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} -cores_per_node=${cores_per_node:-${npe_node_max:-24}} -ntiles=${ntiles:-6} -NTASKS_FV3=${NTASKS_FV3:-$npe_fv3} - -TYPE=${TYPE:-"nh"} # choices: nh, hydro -MONO=${MONO:-"non-mono"} # choices: mono, non-mono -RUN_CCPP=${RUN_CCPP:-"NO"} - -QUILTING=${QUILTING:-".true."} -OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} -OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} -WRITE_NEMSIOFLIP=${WRITE_NEMSIOFLIP:-".true."} -WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} -affix="nemsio" -[[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" - -rCDUMP=${rCDUMP:-$CDUMP} - -#------------------------------------------------------------------ -# setup the runtime environment -if [ $machine = "WCOSS_C" ] ; then - HUGEPAGES=${HUGEPAGES:-hugepages4M} - . $MODULESHOME/init/sh 2>/dev/null - module load iobuf craype-$HUGEPAGES 2>/dev/null - export MPICH_GNI_COLL_OPT_OFF=${MPICH_GNI_COLL_OPT_OFF:-MPI_Alltoallv} - export MKL_CBWR=AVX2 - export WRTIOBUF=${WRTIOBUF:-"4M"} - export NC_BLKSZ=${NC_BLKSZ:-"4M"} - export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" -fi - -#------------------------------------------------------- -if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi -mkdata=NO -if [ ! -d $DATA ]; then - mkdata=YES - mkdir -p $DATA -fi -cd $DATA || exit 8 -mkdir -p $DATA/INPUT - -if [ $cplwav = ".true." ]; then - if [ $CDUMP = "gdas" ]; then - RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart - else - RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart} - fi - if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi - $NLN $RSTDIR_WAVE restart_wave -fi - -if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then - RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART - if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi - $NLN $RSTDIR_ATM RESTART -else - mkdir -p $DATA/RESTART -fi - -#------------------------------------------------------- -# determine if restart IC exists to continue from a previous forecast -RERUN="NO" -filecount=$(find $RSTDIR_ATM -type f | wc -l) -if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then - reverse=$(echo "${restart_interval[@]} " | tac -s ' ') - for xfh in $reverse ; do - yfh=$((xfh-(IAU_OFFSET/2))) - SDATE=$($NDATE +$yfh $CDATE) - PDYS=$(echo $SDATE | cut -c1-8) - cycs=$(echo $SDATE | cut -c9-10) - flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res - flag2=$RSTDIR_ATM/coupler.res - if [ -s $flag1 ]; then - CDATE_RST=$SDATE - [[ $RERUN = "YES" ]] && break - mv $flag1 ${flag1}.old - if [ -s $flag2 ]; then mv $flag2 ${flag2}.old ;fi - RERUN="YES" - [[ $xfh = $rst_invt1 ]] && RERUN="NO" - fi - done -fi - -#------------------------------------------------------- -# member directory -if [ $MEMBER -lt 0 ]; then - prefix=$CDUMP - rprefix=$rCDUMP - memchar="" -else - prefix=enkf$CDUMP - rprefix=enkf$rCDUMP - memchar=mem$(printf %03i $MEMBER) -fi -memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar -if [ ! -d $memdir ]; then mkdir -p $memdir; fi - -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) -gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar -sCDATE=$($NDATE -3 $CDATE) - -if [[ "$DOIAU" = "YES" ]]; then - sCDATE=$($NDATE -3 $CDATE) - sPDY=$(echo $sCDATE | cut -c1-8) - scyc=$(echo $sCDATE | cut -c9-10) - tPDY=$gPDY - tcyc=$gcyc -else - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc -fi - -#------------------------------------------------------- -# initial conditions -warm_start=${warm_start:-".false."} -read_increment=${read_increment:-".false."} -res_latlon_dynamics="''" - -# Determine if this is a warm start or cold start -if [ -f $gmemdir/RESTART/${sPDY}.${scyc}0000.coupler.res ]; then - export warm_start=".true." -fi - -# turn IAU off for cold start -DOIAU_coldstart=${DOIAU_coldstart:-"NO"} -if [ $DOIAU = "YES" -a $warm_start = ".false." ] || [ $DOIAU_coldstart = "YES" -a $warm_start = ".true." ]; then - export DOIAU="NO" - echo "turning off IAU" - DOIAU_coldstart="YES" - IAU_OFFSET=0 - sCDATE=$CDATE - sPDY=$PDY - scyc=$cyc - tPDY=$sPDY - tcyc=$cyc -fi - -#------------------------------------------------------- -if [ $warm_start = ".true." -o $RERUN = "YES" ]; then -#------------------------------------------------------- -#............................. - if [ $RERUN = "NO" ]; then -#............................. - - # Link all (except sfc_data) restart files from $gmemdir - for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsuf=$(echo $file2 | cut -d. -f1) - if [ $fsuf != "sfc_data" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Link sfcanl_data restart files from $memdir - for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) # remove the date from file - fsufanl=$(echo $file2 | cut -d. -f1) - if [ $fsufanl = "sfcanl_data" ]; then - file2=$(echo $file2 | sed -e "s/sfcanl_data/sfc_data/g") - $NLN $file $DATA/INPUT/$file2 - fi - done - - # Need a coupler.res when doing IAU - if [ $DOIAU = "YES" ]; then - rm -f $DATA/INPUT/coupler.res - cat >> $DATA/INPUT/coupler.res << EOF - 2 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) - ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 Model start time: year, month, day, hour, minute, second - ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 Current model time: year, month, day, hour, minute, second -EOF - fi - - # Link increments - if [ $DOIAU = "YES" ]; then - for i in $(echo $IAUFHRS | sed "s/,/ /g" | rev); do - incfhr=$(printf %03i $i) - if [ $incfhr = "006" ]; then - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atminc.nc - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_ATMINC}atmi${incfhr}.nc - fi - if [ ! -f $increment_file ]; then - echo "ERROR: DOIAU = $DOIAU, but missing increment file for fhr $incfhr at $increment_file" - echo "Abort!" - exit 1 - fi - $NLN $increment_file $DATA/INPUT/fv_increment$i.nc - IAU_INC_FILES="'fv_increment$i.nc',$IAU_INC_FILES" - done - read_increment=".false." - res_latlon_dynamics="" - else - increment_file=$memdir/${CDUMP}.t${cyc}z.${PREFIX_INC}atminc.nc - if [ -f $increment_file ]; then - $NLN $increment_file $DATA/INPUT/fv_increment.nc - read_increment=".true." - res_latlon_dynamics="fv_increment.nc" - fi - fi - -#............................. - else ##RERUN - - export warm_start=".true." - PDYT=$(echo $CDATE_RST | cut -c1-8) - cyct=$(echo $CDATE_RST | cut -c9-10) - for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do - file2=$(echo $(basename $file)) - file2=$(echo $file2 | cut -d. -f3-) - $NLN $file $DATA/INPUT/$file2 - done - - hour_rst=`$NHOUR $CDATE_RST $CDATE` - IAU_FHROT=$((IAU_OFFSET+hour_rst)) - if [ $DOIAU = "YES" ]; then - IAUFHRS=-1 - IAU_DELTHRS=0 - IAU_INC_FILES="''" - fi - - rst_list_rerun="" - xfh=$restart_interval_gfs - while [ $xfh -le $FHMAX_GFS ]; do - rst_list_rerun="$rst_list_rerun $xfh" - xfh=$((xfh+restart_interval_gfs)) - done - restart_interval="$rst_list_rerun" - - fi -#............................. - -else ## cold start - - for file in $(ls $memdir/INPUT/*.nc); do - file2=$(echo $(basename $file)) - fsuf=$(echo $file2 | cut -c1-3) - if [ $fsuf = "gfs" -o $fsuf = "sfc" ]; then - $NLN $file $DATA/INPUT/$file2 - fi - done - -#------------------------------------------------------- -fi -#------------------------------------------------------- - -nfiles=$(ls -1 $DATA/INPUT/* | wc -l) -if [ $nfiles -le 0 ]; then - echo "Initial conditions must exist in $DATA/INPUT, ABORT!" - msg="Initial conditions must exist in $DATA/INPUT, ABORT!" - postmsg "$jlogfile" "$msg" - exit 1 -fi - -# If doing IAU, change forecast hours -if [[ "$DOIAU" = "YES" ]]; then - FHMAX=$((FHMAX+6)) - if [ $FHMAX_HF -gt 0 ]; then - FHMAX_HF=$((FHMAX_HF+6)) - fi -fi - -#-------------------------------------------------------------------------- -# Grid and orography data -for n in $(seq 1 $ntiles); do - $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc - $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc -done -$NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc - -# GFS standard input data -IAER=${IAER:-111} -ICO2=${ICO2:-2} - -if [ ${new_o3forc:-YES} = YES ]; then - O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 -else - O3FORC=global_o3prdlos.f77 -fi -H2OFORC=${H2OFORC:-"global_h2o_pltc.f77"} -$NLN $FIX_AM/${O3FORC} $DATA/global_o3prdlos.f77 -$NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 -$NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt -$NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt - -## merra2 aerosol climo -for n in 01 02 03 04 05 06 07 08 09 10 11 12; do -$NLN $FIX_AER/merra2.aerclim.2003-2014.m${n}.nc $DATA/aeroclim.m${n}.nc -done -$NLN $FIX_LUT/optics_BC.v1_3.dat $DATA/optics_BC.dat -$NLN $FIX_LUT/optics_OC.v1_3.dat $DATA/optics_OC.dat -$NLN $FIX_LUT/optics_DU.v15_3.dat $DATA/optics_DU.dat -$NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat -$NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat - -$NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt -$NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt -if [ $ICO2 -gt 0 ]; then - for file in $(ls $FIX_AM/fix_co2_proj/global_co2historicaldata*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done -fi - -$NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat -if [ $IAER -gt 0 ] ; then - for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do - $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") - done -fi - -#-------------wavewave---------------------- -if [ $cplwav = ".true." ]; then - - for file in $(ls $COMINwave/rundata/rmp_src_to_dst_conserv_*) ; do - $NLN $file $DATA/ - done - $NLN $COMINwave/rundata/ww3_multi.${CDUMPwave}${WAV_MEMBER}.${cycle}.inp $DATA/ww3_multi.inp - - array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) - grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` - - for wavGRD in ${grdALL}; do - $NLN $COMINwave/rundata/${CDUMPwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD - done - - export WAVHCYC=${WAVHCYC:-6} - export WRDATE=`$NDATE -${WAVHCYC} $CDATE` - export WRPDY=`echo $WRDATE | cut -c1-8` - export WRcyc=`echo $WRDATE | cut -c9-10` - export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart - export datwave=$COMOUTwave/rundata - export wavprfx=${CDUMPwave}${WAV_MEMBER} - - for wavGRD in $waveGRD ; do - if [ $RERUN = "NO" ]; then - if [ ! -f ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - else - if [ ! -f ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} ]; then - echo "WARNING: NON-FATAL ERROR wave IC is missing, will start from rest" - fi - $NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD} - fi - eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} - done - - if [ "$WW3ICEINP" = "YES" ]; then - wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice - if [ ! -f $wavicefile ]; then - echo "ERROR: WW3ICEINP = ${WW3ICEINP}, but missing ice file" - echo "Abort!" - exit 1 - fi - $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} - fi - - if [ "$WW3CURINP" = "YES" ]; then - wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur - if [ ! -f $wavcurfile ]; then - echo "ERROR: WW3CURINP = ${WW3CURINP}, but missing current file" - echo "Abort!" - exit 1 - fi - $NLN $wavcurfile $DATA/current.${WAVECUR_FID} - fi - - # Link output files - cd $DATA - eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 - - # Loop for gridded output (uses FHINC) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - for wavGRD in ${waveGRD} ; do - eval $NLN $datwave/${wavprfx}.out_grd.${wavGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_grd.${wavGRD} - done - FHINC=$FHOUT_WAV - if [ $FHMAX_HF_WAV -gt 0 -a $FHOUT_HF_WAV -gt 0 -a $fhr -lt $FHMAX_HF_WAV ]; then - FHINC=$FHOUT_HF_WAV - fi - fhr=$((fhr+FHINC)) - done - - # Loop for point output (uses DTPNT) - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` - YMD=$(echo $YMDH | cut -c1-8) - HMS="$(echo $YMDH | cut -c9-10)0000" - eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} ${YMD}.${HMS}.out_pnt.${waveuoutpGRD} - FHINC=$FHINCP_WAV - fhr=$((fhr+FHINC)) - done - -fi #cplwav=true -#-------------wavewave---------------------- - -# inline post fix files -if [ $WRITE_DOPOST = ".true." ]; then - $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag - $NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt - $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt - $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new -fi -#------------------------------------------------------------------ - -# changeable parameters -# dycore definitions -res=$(echo $CASE |cut -c2-5) -resp=$((res+1)) -npx=$resp -npy=$resp -npz=$((LEVS-1)) -io_layout=${io_layout:-"1,1"} -#ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - -# spectral truncation and regular grid resolution based on FV3 resolution -JCAP_CASE=$((2*res-2)) -LONB_CASE=$((4*res)) -LATB_CASE=$((2*res)) - -JCAP=${JCAP:-$JCAP_CASE} -LONB=${LONB:-$LONB_CASE} -LATB=${LATB:-$LATB_CASE} - -LONB_IMO=${LONB_IMO:-$LONB_CASE} -LATB_JMO=${LATB_JMO:-$LATB_CASE} - -# Fix files -FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} -FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} -FNTSFC=${FNTSFC:-"$FIX_AM/RTGSST.1982.2012.monthly.clim.grb"} -FNSNOC=${FNSNOC:-"$FIX_AM/global_snoclim.1.875.grb"} -FNZORC=${FNZORC:-"igbp"} -FNALBC2=${FNALBC2:-"$FIX_AM/global_albedo4.1x1.grb"} -FNAISC=${FNAISC:-"$FIX_AM/CFSR.SEAICE.1982.2012.monthly.clim.grb"} -FNTG3C=${FNTG3C:-"$FIX_AM/global_tg3clim.2.6x1.5.grb"} -FNVEGC=${FNVEGC:-"$FIX_AM/global_vegfrac.0.144.decpercent.grb"} -FNMSKH=${FNMSKH:-"$FIX_AM/global_slmask.t1534.3072.1536.grb"} -FNVMNC=${FNVMNC:-"$FIX_AM/global_shdmin.0.144x0.144.grb"} -FNVMXC=${FNVMXC:-"$FIX_AM/global_shdmax.0.144x0.144.grb"} -FNSLPC=${FNSLPC:-"$FIX_AM/global_slope.1x1.grb"} -FNALBC=${FNALBC:-"$FIX_AM/global_snowfree_albedo.bosu.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNVETC=${FNVETC:-"$FIX_AM/global_vegtype.igbp.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNSOTC=${FNSOTC:-"$FIX_AM/global_soiltype.statsgo.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNABSC=${FNABSC:-"$FIX_AM/global_mxsnoalb.uariz.t${JCAP}.${LONB}.${LATB}.rg.grb"} -FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} - -# If the appropriate resolution fix file is not present, use the highest resolution available (T1534) -[[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" -[[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" -[[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" -[[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" -[[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" - -# NSST Options -# nstf_name contains the NSST related parameters -# nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled -# nstf_name(2) : NST_SPINUP : 0 = OFF, 1 = ON, -# nstf_name(3) : NST_RESV (Reserved, NSST Analysis) : 0 = OFF, 1 = ON -# nstf_name(4) : ZSEA1 (in mm) : 0 -# nstf_name(5) : ZSEA2 (in mm) : 0 -# nst_anl : .true. or .false., NSST analysis over lake -NST_MODEL=${NST_MODEL:-0} -NST_SPINUP=${NST_SPINUP:-0} -NST_RESV=${NST_RESV-0} -ZSEA1=${ZSEA1:-0} -ZSEA2=${ZSEA2:-0} -nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} -nst_anl=${nst_anl:-".false."} - - -# blocking factor used for threading and general physics performance -#nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` -#nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` -#if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi -blocksize=${blocksize:-32} - -# the pre-conditioning of the solution -# =0 implies no pre-conditioning -# >0 means new adiabatic pre-conditioning -# <0 means older adiabatic pre-conditioning -na_init=${na_init:-1} -[[ $warm_start = ".true." ]] && na_init=0 - -# variables for controlling initialization of NCEP/NGGPS ICs -filtered_terrain=${filtered_terrain:-".true."} -gfs_dwinds=${gfs_dwinds:-".true."} - -# various debug options -no_dycore=${no_dycore:-".false."} -dycore_only=${adiabatic:-".false."} -chksum_debug=${chksum_debug:-".false."} -print_freq=${print_freq:-6} - -if [ ${TYPE} = "nh" ]; then # non-hydrostatic options - - hydrostatic=".false." - phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation - use_hydro_pressure=".false." # use hydrostatic pressure for physics - if [ $warm_start = ".true." ]; then - make_nh=".false." # restarts contain non-hydrostatic state - else - make_nh=".true." # re-initialize non-hydrostatic state - fi - -else # hydrostatic options - - hydrostatic=".true." - phys_hydrostatic=".false." # ignored when hydrostatic = T - use_hydro_pressure=".false." # ignored when hydrostatic = T - make_nh=".false." # running in hydrostatic mode - -fi - -# Conserve total energy as heat globally -consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics - -# time step parameters in FV3 -k_split=${k_split:-2} -n_split=${n_split:-6} - -if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options - - d_con=${d_con_mono:-"0."} - do_vort_damp=".false." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_mono:-"10"} - hord_xx=${hord_xx_nh_mono:-"10"} - else # hydrostatic - hord_mt=${hord_mt_hydro_mono:-"10"} - hord_xx=${hord_xx_hydro_mono:-"10"} - fi - -else # non-monotonic options - - d_con=${d_con_nonmono:-"1."} - do_vort_damp=".true." - if [ ${TYPE} = "nh" ]; then # non-hydrostatic - hord_mt=${hord_mt_nh_nonmono:-"5"} - hord_xx=${hord_xx_nh_nonmono:-"5"} - else # hydrostatic - hord_mt=${hord_mt_hydro_nonmono:-"10"} - hord_xx=${hord_xx_hydro_nonmono:-"10"} - fi - -fi - -if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then - vtdm4=${vtdm4_nh_nonmono:-"0.06"} -else - vtdm4=${vtdm4:-"0.05"} -fi - -if [ $warm_start = ".true." ]; then # warm start from restart file - - nggps_ic=".false." - ncep_ic=".false." - external_ic=".false." - mountain=".true." - if [ $read_increment = ".true." ]; then # add increment on the fly to the restarts - res_latlon_dynamics="fv_increment.nc" - else - res_latlon_dynamics='""' - fi - -else # CHGRES'd GFS analyses - - nggps_ic=${nggps_ic:-".true."} - ncep_ic=${ncep_ic:-".false."} - external_ic=".true." - mountain=".false." - read_increment=".false." - res_latlon_dynamics='""' - -fi - -# Stochastic Physics Options -if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then - ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) - ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) - ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) -else - ISEED=${ISEED:-0} -fi -DO_SKEB=${DO_SKEB:-"NO"} -DO_SPPT=${DO_SPPT:-"NO"} -DO_SHUM=${DO_SHUM:-"NO"} - -if [ $DO_SKEB = "YES" ]; then - do_skeb=".true." -fi -if [ $DO_SHUM = "YES" ]; then - do_shum=".true." -fi -if [ $DO_SPPT = "YES" ]; then - do_sppt=".true." -fi - -# copy over the tables -DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table} -DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} -FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table} - -# build the diag_table with the experiment name and date stamp -if [ $DOIAU = "YES" ]; then -cat > diag_table << EOF -FV3 Forecast -${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table -else -cat > diag_table << EOF -FV3 Forecast -${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 -EOF -cat $DIAG_TABLE >> diag_table -fi - -$NCP $DATA_TABLE data_table -$NCP $FIELD_TABLE field_table - -# copy CCN_ACTIVATE.BIN for Thompson microphysics -if [ $RUN_CCPP = "YES" ]; then -if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then - $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN - $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat - $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat - $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat -fi -fi - -#------------------------------------------------------------------ -rm -f nems.configure - -if [ $cplwav = ".true." ]; then -#### ww3 version of nems.configure - -# Switch on cpl flag - cpl=.true. - -NTASKS_FV3m1=$((NTASKS_FV3-1)) -atm_petlist_bounds=" 0 $((NTASKS_FV3-1))" -wav_petlist_bounds=" $((NTASKS_FV3)) $((NTASKS_FV3m1+npe_wav))" -### atm_petlist_bounds=" 0 1511" -### atm_petlist_bounds=$atm_petlist_bounds -### wav_petlist_bounds="1512 1691" -### wav_petlist_bounds=$wav_petlist_bounds - coupling_interval_sec=${coupling_interval_sec:-1800} - rm -f nems.configure -cat > nems.configure < WAV :SrcTermProcessing=0:TermOrder=SrcSeq - WAV - @ -:: -EOF -else -#### fv3 standalone version of nems.configure -cat > nems.configure < model_configure < input.nml <> input.nml << EOF - iovr = ${iovr:-"3"} - ltaerosol = ${ltaerosol:-".false."} - lradar = ${lradar:-".false."} - ttendlim = ${ttendlim:-"0.005"} - oz_phys = ${oz_phys:-".false."} - oz_phys_2015 = ${oz_phys_2015:-".true."} - lsoil_lsm = ${lsoil_lsm:-"4"} - do_mynnedmf = ${do_mynnedmf:-".false."} - do_mynnsfclay = ${do_mynnsfclay:-".false."} - icloud_bl = ${icloud_bl:-"1"} - bl_mynn_edmf = ${bl_mynn_edmf:-"1"} - bl_mynn_tkeadvect = ${bl_mynn_tkeadvect:-".true."} - bl_mynn_edmf_mom = ${bl_mynn_edmf_mom:-"1"} - min_lakeice = ${min_lakeice:-"0.15"} - min_seaice = ${min_seaice:-"0.15"} -EOF -else - cat >> input.nml << EOF - iovr_lw = ${iovr_lw:-"3"} - iovr_sw = ${iovr_sw:-"3"} -EOF -fi - -# Add namelist for IAU -if [ $DOIAU = "YES" ]; then - cat >> input.nml << EOF - iaufhrs = ${IAUFHRS} - iau_delthrs = ${IAU_DELTHRS} - iau_inc_files= ${IAU_INC_FILES} - iau_drymassfixer = .false. -EOF -fi - -cat >> input.nml <> input.nml - -cat >> input.nml <> input.nml -if [ $MEMBER -gt 0 ]; then - - cat >> input.nml << EOF -&nam_stochy -EOF - - if [ $DO_SKEB = "YES" ]; then - cat >> input.nml << EOF - skeb = $SKEB - iseed_skeb = ${ISEED_SKEB:-$ISEED} - skeb_tau = ${SKEB_TAU:-"-999."} - skeb_lscale = ${SKEB_LSCALE:-"-999."} - skebnorm = ${SKEBNORM:-"1"} - skeb_npass = ${SKEB_nPASS:-"30"} - skeb_vdof = ${SKEB_VDOF:-"5"} -EOF - fi - - if [ $DO_SHUM = "YES" ]; then - cat >> input.nml << EOF - shum = $SHUM - iseed_shum = ${ISEED_SHUM:-$ISEED} - shum_tau = ${SHUM_TAU:-"-999."} - shum_lscale = ${SHUM_LSCALE:-"-999."} -EOF - fi - - if [ $DO_SPPT = "YES" ]; then - cat >> input.nml << EOF - sppt = $SPPT - iseed_sppt = ${ISEED_SPPT:-$ISEED} - sppt_tau = ${SPPT_TAU:-"-999."} - sppt_lscale = ${SPPT_LSCALE:-"-999."} - sppt_logit = ${SPPT_LOGIT:-".true."} - sppt_sfclimit = ${SPPT_SFCLIMIT:-".true."} - use_zmtnblck = ${use_zmtnblck:-".true."} -EOF - fi - - cat >> input.nml << EOF - $nam_stochy_nml -/ -EOF - - - cat >> input.nml << EOF -&nam_sfcperts - $nam_sfcperts_nml -/ -EOF - -else - - cat >> input.nml << EOF -&nam_stochy -/ -&nam_sfcperts -/ -EOF - -fi - - -#------------------------------------------------------------------ -# make symbolic links to write forecast files directly in memdir -cd $DATA -if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then - fhr=$FHMIN - while [ $fhr -le $FHMAX ]; do - FH3=$(printf %03i $fhr) - FH2=$(printf %02i $fhr) - atmi=atmf${FH3}.$affix - sfci=sfcf${FH3}.$affix - logi=logf${FH3} - pgbi=GFSPRS.GrbF${FH2} - flxi=GFSFLX.GrbF${FH2} - atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix - sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix - logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt - pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3} - flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2 - eval $NLN $atmo $atmi - eval $NLN $sfco $sfci - eval $NLN $logo $logi - if [ $WRITE_DOPOST = ".true." ]; then - eval $NLN $pgbo $pgbi - eval $NLN $flxo $flxi - fi - FHINC=$FHOUT - if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 -a $fhr -lt $FHMAX_HF ]; then - FHINC=$FHOUT_HF - fi - fhr=$((fhr+FHINC)) - done -else - for n in $(seq 1 $ntiles); do - eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc - eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc - eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc - eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc - eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc - done -fi - -# Copy namelist file -$NCP input.nml $memdir - -#------------------------------------------------------------------ -# run the executable - -$NCP $FCSTEXECDIR/$FCSTEXEC $DATA/. -export OMP_NUM_THREADS=$NTHREADS_FV3 -$APRUN_FV3 $DATA/$FCSTEXEC 1>&1 2>&2 -export ERR=$? -export err=$ERR -$ERRSCRIPT || exit $err - -#------------------------------------------------------------------ -if [ $SEND = "YES" ]; then - - # Copy gdas and enkf member restart files - if [ $CDUMP = "gdas" -a $rst_invt1 -gt 0 ]; then - cd $DATA/RESTART - mkdir -p $memdir/RESTART - for rst_int in $restart_interval ; do - if [ $rst_int -ge 0 ]; then - RDATE=$($NDATE +$rst_int $CDATE) - rPDY=$(echo $RDATE | cut -c1-8) - rcyc=$(echo $RDATE | cut -c9-10) - for file in $(ls ${rPDY}.${rcyc}0000.*) ; do - $NCP $file $memdir/RESTART/$file - done - fi - done - if [ $DOIAU = "YES" ] || [ $DOIAU_coldstart = "YES" ]; then - # if IAU is on, save restart at start of IAU window - rst_iau=$(( ${IAU_OFFSET} - (${IAU_DELTHRS}/2) )) - if [ $rst_iau -lt 0 ];then - rst_iau=$(( (${IAU_DELTHRS}) - ${IAU_OFFSET} )) - fi - RDATE=$($NDATE +$rst_iau $CDATE) - rPDY=$(echo $RDATE | cut -c1-8) - rcyc=$(echo $RDATE | cut -c9-10) - for file in $(ls ${rPDY}.${rcyc}0000.*) ; do - $NCP $file $memdir/RESTART/$file - done - fi - fi -fi - -#------------------------------------------------------------------ -# Clean up before leaving -if [ $mkdata = "YES" ]; then rm -rf $DATA; fi - -#------------------------------------------------------------------ -set +x -if [ $VERBOSE = "YES" ] ; then - echo $(date) EXITING $0 with return code $err >&2 -fi -exit 0 From 9836bba7ce63a47ee8f054fb98b8560a9e4e0053 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 10:45:38 -0500 Subject: [PATCH 11/33] revert changes for exgfs_wave_prep.sh --- scripts/exgfs_wave_prep.sh | 61 ++++++++++++++------------------------ 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index f0533b5f8a3..c9abee57b48 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -224,16 +224,16 @@ ;; esac - if [ -f $PARMwave/ww3_prnc.${type}.$grdID.inp.tmpl ] + if [ -f $FIXwave/ww3_prnc.${type}.$grdID.inp.tmpl ] then - cp $PARMwave/ww3_prnc.${type}.$grdID.inp.tmpl . + cp $FIXwave/ww3_prnc.${type}.$grdID.inp.tmpl . fi if [ -f ww3_prnc.${type}.$grdID.inp.tmpl ] then set +x echo ' ' - echo " ww3_prnc.${type}.$grdID.inp.tmpl copied ($PARMwave)." + echo " ww3_prnc.${type}.$grdID.inp.tmpl copied ($FIXwave)." echo ' ' [[ "$LOUD" = YES ]] && set -x else @@ -820,9 +820,9 @@ # 5.a ww3_multi template - if [ -f $PARMwave/ww3_multi.${NET}.inp.tmpl ] + if [ -f $FIXwave/ww3_multi.${NET}.inp.tmpl ] then - cp $PARMwave/ww3_multi.${NET}.inp.tmpl ww3_multi.inp.tmpl + cp $FIXwave/ww3_multi.${NET}.inp.tmpl ww3_multi.inp.tmpl fi if [ ! -f ww3_multi.inp.tmpl ] @@ -842,21 +842,21 @@ # 5.b Buoy location file - if [ -f $PARMwave/wave_${NET}.buoys ] + if [ -f $FIXwave/wave_${NET}.buoys ] then - cp $PARMwave/wave_${NET}.buoys buoy.loc + cp $FIXwave/wave_${NET}.buoys buoy.loc fi if [ -f buoy.loc ] then set +x - echo " buoy.loc copied ($PARMwave/wave_${NET}.buoys)." + echo " buoy.loc copied ($FIXwave/wave_${NET}.buoys)." [[ "$LOUD" = YES ]] && set -x else set +x echo " buoy.loc not found. **** WARNING **** " [[ "$LOUD" = YES ]] && set -x - postmsg "$jlogfile" " FATAL ERROR : buoy.loc ($PARMwave/wave_${NET}.buoys) NOT FOUND" + postmsg "$jlogfile" " FATAL ERROR : buoy.loc ($FIXwave/wave_${NET}.buoys) NOT FOUND" touch buoy.loc err=13;export err;${errchk} fi @@ -888,18 +888,13 @@ case ${WW3ATMINP} in 'YES' ) NFGRIDS=`expr $NFGRIDS + 1` - WINDLINE=" '$WAVEWND_FID' F F T F F F F F F" + WINDLINE=" '$WAVEWND_FID' F F T F F F F" WINDFLAG="$WAVEWND_FID" ;; 'CPL' ) + WINDFLAG="CPL:${waveesmfGRD}" WNDIFLAG='T' - if [ ${waveesmfGRD} ] - then - WINDFLAG="CPL:${waveesmfGRD}" - CPLILINE=" '${waveesmfGRD}' F F T F F F F F F" - else - WINDFLAG="CPL:native" - fi + CPLILINE=" '${waveesmfGRD}' F F T F F F F" ;; esac @@ -907,18 +902,13 @@ 'YES' ) NFGRIDS=`expr $NFGRIDS + 1` ICEIFLAG='T' - ICELINE=" '$WAVEICE_FID' F F F T F F F F F" + ICELINE=" '$WAVEICE_FID' F F F T F F F" ICEFLAG="$WAVEICE_FID" ;; 'CPL' ) + ICEFLAG="CPL:${waveesmfGRD}" ICEIFLAG='T' - if [ ${waveesmfGRD} ] - then - ICEFLAG="CPL:${waveesmfGRD}" - CPLILINE=" '${waveesmfGRD}' F F ${WNDIFLAG} T F F F F F" - else - ICEFLAG="CPL:native" - fi + CPLILINE=" '${waveesmfGRD}' F F ${WNDIFLAG} T F F F" ;; esac @@ -926,22 +916,17 @@ 'YES' ) if [ "$WAVECUR_FID" != "$WAVEICE_FID" ]; then NFGRIDS=`expr $NFGRIDS + 1` - CURRLINE=" '$WAVECUR_FID' F T F F F F F F F" + CURRLINE=" '$WAVECUR_FID' F T F F F F F" CURRFLAG="$WAVECUR_FID" else # cur fields share the same grid as ice grid - ICELINE=" '$WAVEICE_FID' F T F ${ICEIFLAG} F F F F F" + ICELINE=" '$WAVEICE_FID' F T F ${ICEIFLAG} F F F" CURRFLAG="$WAVEICE_FID" fi ;; 'CPL' ) + CURRFLAG="CPL:${waveesmfGRD}" CURIFLAG='T' - if [ ${waveesmfGRD} ] - then - CURRFLAG="CPL:${waveesmfGRD}" - CPLILINE=" '${waveesmfGRD}' F T ${WNDIFLAG} ${ICEFLAG} F F F F F" - else - CURRFLAG="CPL:native" - fi + CPLILINE=" '${waveesmfGRD}' F T ${WNDIFLAG} ${ICEFLAG} F F F" ;; esac @@ -957,7 +942,7 @@ NMGRIDS=`expr $NMGRIDS + 1` gridN=`echo $waveGRDN | awk -v i=$GRDN '{print $i}'` gridG=`echo $waveGRDG | awk -v i=$GRDN '{print $i}'` - gline="${gline}'${grid}' 'no' 'CURRFLAG' 'WINDFLAG' 'ICEFLAG' 'no' 'no' 'no' 'no' 'no' ${gridN} ${gridG} 0.00 1.00 F\n" + gline="${gline}'${grid}' 'no' 'CURRFLAG' 'WINDFLAG' 'ICEFLAG' 'no' 'no' 'no' ${gridN} ${gridG} 0.00 1.00 F\n" done gline="${gline}\$" echo $gline @@ -983,8 +968,6 @@ -e "s/OUT_BEG/$time_beg_out/g" \ -e "s/OUT_END/$time_end/g" \ -e "s/DTFLD/ $DTFLD_WAV/g" \ - -e "s/FLAGMASKCOMP/ $FLAGMASKCOMP/g" \ - -e "s/FLAGMASKOUT/ $FLAGMASKOUT/g" \ -e "s/GOFILETYPE/ $GOFILETYPE/g" \ -e "s/POFILETYPE/ $POFILETYPE/g" \ -e "s/FIELDS/$FIELDS/g" \ @@ -1006,9 +989,9 @@ if [ -f ww3_multi.inp ] then echo " Copying file ww3_multi.${WAV_MOD_TAG}.inp to $COMOUT " - cp ww3_multi.inp ${COMOUT}/rundata/ww3_multi.${WAV_MOD_TAG}.${cycle}.inp + cp ww3_multi.inp ${COMOUT}/rundata/ww3_multi.${WAV_MOD_TAG}.$cycle.inp else - echo "FATAL ERROR: file ww3_multi.${WAV_MOD_TAG}.${cycle}.inp NOT CREATED, ABORTING" + echo "FATAL ERROR: file ww3_multi.${WAV_MOD_TAG}.$cycle.inp NOT CREATED, ABORTING" err=13;export err;${errchk} fi From 360529b29143737584134309970ecb12668f3704 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 10:58:27 -0500 Subject: [PATCH 12/33] remove "RUN_CCPP" variable --- ush/forecast_postdet.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index e75000ca470..1de364ded3b 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -484,13 +484,11 @@ EOF #------------------------------------------------------------------ # make symbolic links to write forecast files directly in memdir cd $DATA - if [ $RUN_CCPP = "YES" ]; then - if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then - $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN - $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat - $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat - $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat - fi + if [ "$CCPP_SUITE" = 'FV3_GSD_v0' -o "$CCPP_SUITE" = 'FV3_GSD_noah' ]; then + $NLN $FIX_AM/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN + $NLN $FIX_AM/freezeH2O.dat freezeH2O.dat + $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat + $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat fi affix="nc" From d122fc0ff329c3b5803e30cbff98b766538e10f8 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 15:04:20 -0500 Subject: [PATCH 13/33] added diag_table_cpl indentation fix in various scripts remove build_ufs_coupled.sh --- parm/parm_fv3diag/diag_table_cpl | 306 +++++++++++++++++++++++++++++++ sorc/build_ufs_coupled.sh | 44 ----- ush/cplvalidate.sh | 38 ++-- ush/forecast_postdet.sh | 2 +- ush/nems_configure.sh | 54 +++--- 5 files changed, 353 insertions(+), 91 deletions(-) create mode 100644 parm/parm_fv3diag/diag_table_cpl delete mode 100755 sorc/build_ufs_coupled.sh diff --git a/parm/parm_fv3diag/diag_table_cpl b/parm/parm_fv3diag/diag_table_cpl new file mode 100644 index 00000000000..06ad741978e --- /dev/null +++ b/parm/parm_fv3diag/diag_table_cpl @@ -0,0 +1,306 @@ +#20161003.00Z.C96.64bit.non-mono +#2016 10 03 00 0 0 + +"grid_spec", -1, "months", 1, "days", "time" +"atmos_4xdaily", 6, "hours", 1, "days", "time" +"atmos_static", -1, "hours", 1, "hours", "time" +"fv3_history", 0, "hours", 1, "hours", "time" +"fv3_history2d", 0, "hours", 1, "hours", "time" +###################### +"ocn%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0" +"ocn_daily%4yr%2mo%2dy", 1, "days", 1, "days", "time", 1, "days", "1901 1 1 0 0 0" +"wavocn%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0" +############################################## +# static fields + "ocean_model", "geolon", "geolon", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolat", "geolat", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolon_c", "geolon_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolat_c", "geolat_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolon_u", "geolon_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolat_u", "geolat_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolon_v", "geolon_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "geolat_v", "geolat_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 +# "ocean_model", "depth_ocean", "depth_ocean", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 +# "ocean_model", "wet", "wet", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "wet_c", "wet_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "wet_u", "wet_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "wet_v", "wet_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "sin_rot", "sin_rot", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + "ocean_model", "cos_rot", "cos_rot", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 + +# ocean output TSUV and others + "ocean_model", "SSH", "SSH", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "SST", "SST", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "SSS", "SSS", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "speed", "speed", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "SSU", "SSU", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "SSV", "SSV", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "frazil", "frazil", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "ePBL_h_ML","ePBL", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "MLD_003", "MLD_003", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "MLD_0125", "MLD_0125", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + +# save daily SST + "ocean_model", "geolon", "geolon", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolat", "geolat", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolon_c", "geolon_c", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolat_c", "geolat_c", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolon_u", "geolon_u", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolat_u", "geolat_u", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolon_v", "geolon_v", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "geolat_v", "geolat_v", "ocn_daily%4yr%2mo%2dy", "all", .false., "none", 2 + "ocean_model", "SST", "sst", "ocn_daily%4yr%2mo%2dy", "all", .true., "none", 2 + "ocean_model", "latent", "latent", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "sensible", "sensible", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "SW", "SW", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "LW", "LW", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "evap", "evap", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "lprec", "lprec", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "taux", "taux", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + "ocean_model", "tauy", "tauy", "ocn_daily%4yr%2mo%2dy","all",.true.,"none",2 + +# Z-Space Fields Provided for CMIP6 (CMOR Names): +#=============================================== + "ocean_model_z","uo","uo" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model_z","vo","vo" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model_z","so","so" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model_z","temp","temp" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + +# forcing + "ocean_model", "taux", "taux", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "tauy", "tauy", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "latent", "latent", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "sensible", "sensible", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "SW", "SW", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "LW", "LW", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "evap", "evap", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "lprec", "lprec", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "lrunoff", "lrunoff", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 +# "ocean_model", "frunoff", "frunoff", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "fprec", "fprec", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "LwLatSens", "LwLatSens", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + "ocean_model", "Heat_PmE", "Heat_PmE", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 + +#wave_variables + "ocean_model", "geolon", "geolon", "wavocn%4yr%2mo%2dy%2hr","all", .false., "none", 2 + "ocean_model", "geolat", "geolat", "wavocn%4yr%2mo%2dy%2hr","all", .false., "none", 2 + "ocean_model", "MSTAR", "MSTAR", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "LA", "LA", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "LA_MOD", "LA_MOD", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "MSTAR_LT", "MSTAR_LT", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_h_ML", "ePBL", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ustar", "ustar", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_wind", "ePBL_TKE_wind", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_MKE", "ePBL_TKE_MKE", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_conv", "ePBL_TKE_conv", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_forcing", "ePBL_TKE_forcing", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_mixing", "ePBL_TKE_mixing", "wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_mech_decay","ePBL_TKE_mech_decay","wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + "ocean_model", "ePBL_TKE_conv_decay","ePBL_TKE_conv_decay","wavocn%4yr%2mo%2dy%2hr","all", .true., "none", 2 + +#============================================================================================= +"gfs_dyn", "ucomp", "ugrd", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "vcomp", "vgrd", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "sphum", "spfh", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "temp", "tmp", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "liq_wat", "clwmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "ice_wat", "icmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "snowwat", "snmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "rainwat", "rwmr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "graupel", "grle", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "ice_nc", "nccice", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "rain_nc", "nconrd", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "o3mr", "o3mr", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "cld_amt", "cld_amt", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "delp", "dpres", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "delz", "delz", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "pfhy", "preshy", "fv3_history", "all", .false., "none", 2 +#"gfs_dyn", "pfnh", "presnh", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "w", "dzdt", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "ps", "pressfc", "fv3_history", "all", .false., "none", 2 +"gfs_dyn", "hs", "hgtsfc", "fv3_history", "all", .false., "none", 2 + +"gfs_phys", "ALBDO_ave", "albdo_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cnvprcp_ave", "cprat_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cnvprcpb_ave", "cpratb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "totprcp_ave", "prate_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "totprcpb_ave", "prateb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DLWRF", "dlwrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DLWRFI", "dlwrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRF", "ulwrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRFI", "ulwrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRF", "dswrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRFI", "dswrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRF", "uswrf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRFI", "uswrf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "DSWRFtoa", "dswrf_avetoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "USWRFtoa", "uswrf_avetoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ULWRFtoa", "ulwrf_avetoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "gflux_ave", "gflux_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "hpbl", "hpbl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "lhtfl_ave", "lhtfl_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "shtfl_ave", "shtfl_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pwat", "pwatclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "soilm", "soilm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_aveclm", "tcdc_aveclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avebndcl", "tcdc_avebndcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avelcl", "tcdc_avelcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avemcl", "tcdc_avemcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDC_avehcl", "tcdc_avehcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TCDCcnvcl", "tcdccnvcl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avelct", "pres_avelct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avelcb", "pres_avelcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avemct", "pres_avemct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avemcb", "pres_avemcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avehct", "pres_avehct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PRES_avehcb", "pres_avehcb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PREScnvclt", "prescnvclt", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "PREScnvclb", "prescnvclb", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avehct", "tmp_avehct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avemct", "tmp_avemct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "TEMP_avelct", "tmp_avelct", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "u-gwd_ave", "u-gwd_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "v-gwd_ave", "v-gwd_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "dusfc", "uflx_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "dvsfc", "vflx_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "acond", "acond", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cduvb_ave", "cduvb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cpofp", "cpofp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "duvb_ave", "duvb_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csdlf_ave", "csdlf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csusf_ave", "csusf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csusf_avetoa", "csusftoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csdsf_ave", "csdsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csulf_ave", "csulf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "csulf_avetoa", "csulftoa", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "cwork_ave", "cwork_aveclm", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "evbs_ave", "evbs_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "evcw_ave", "evcw_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "fldcp", "fldcp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "hgt_hyblev1", "hgt_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfh_hyblev1", "spfh_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ugrd_hyblev1", "ugrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vgrd_hyblev1", "vgrd_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmp_hyblev1", "tmp_hyblev1", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "gfluxi", "gflux", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "lhtfl", "lhtfl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "shtfl", "shtfl", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pevpr", "pevpr", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "pevpr_ave", "pevpr_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sbsno_ave", "sbsno_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sfexc", "sfexc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "snohf", "snohf", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "snowc_ave", "snowc_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfhmax2m", "spfhmax_max2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "spfhmin2m", "spfhmin_min2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmpmax2m", "tmax_max2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "tmpmin2m", "tmin_min2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "ssrun_acc", "ssrun_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "sunsd_acc", "sunsd_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "watr_acc", "watr_acc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "wilt", "wilt", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vbdsf_ave", "vbdsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "vddsf_ave", "vddsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "nbdsf_ave", "nbdsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "nddsf_ave", "nddsf_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "trans_ave", "trans_ave", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "psurf", "pressfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "u10m", "ugrd10m", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "v10m", "vgrd10m", "fv3_history2d", "all", .false., "none", 2 + +"gfs_sfc", "crain", "crain", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tprcp", "tprcp", "fv3_history2d", "all", .false., "none", 2 +"gfs_phys", "rainc", "cnvprcp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "hgtsfc", "orog", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "weasd", "weasd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "f10m", "f10m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "q2m", "spfh2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "t2m", "tmp2m", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tsfc", "tmpsfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "vtype", "vtype", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "stype", "sotyp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slmsksfc", "land", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "vfracsfc", "veg", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "zorlsfc", "sfcr", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "uustar", "fricv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt1", "soilt1" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt2", "soilt2" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt3", "soilt3" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilt4", "soilt4" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw1", "soilw1" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw2", "soilw2" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw3", "soilw3" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "soilw4", "soilw4" "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_1", "soill1", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_2", "soill2", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_3", "soill3", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slc_4", "soill4", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "slope", "sltyp", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alnsf", "alnsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alnwf", "alnwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alvsf", "alvsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "alvwf", "alvwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "canopy", "cnwat", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "facsf", "facsf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "facwf", "facwf", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "ffhh", "ffhh", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "ffmm", "ffmm", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "fice", "icec", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "hice", "icetk", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "snoalb", "snoalb", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "shdmax", "shdmax", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "shdmin", "shdmin", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "snowd", "snod", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tg3", "tg3", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tisfc", "tisfc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "tref", "tref", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "z_c", "zc", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "c_0", "c0", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "c_d", "cd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "w_0", "w0", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "w_d", "wd", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xt", "xt", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xz", "xz", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "dt_cool", "dtcool", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xs", "xs", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xu", "xu", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xv", "xv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xtts", "xtts", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "xzts", "xzts", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "d_conv", "dconv", "fv3_history2d", "all", .false., "none", 2 +"gfs_sfc", "qrain", "qrain", "fv3_history2d", "all", .false., "none", 2 + + +#============================================================================================= +# +#====> This file can be used with diag_manager/v2.0a (or higher) <==== +# +# +# FORMATS FOR FILE ENTRIES (not all input values are used) +# ------------------------ +# +#"file_name", output_freq, "output_units", format, "time_units", "long_name", +# +# +#output_freq: > 0 output frequency in "output_units" +# = 0 output frequency every time step +# =-1 output frequency at end of run +# +#output_units = units used for output frequency +# (years, months, days, minutes, hours, seconds) +# +#time_units = units used to label the time axis +# (days, minutes, hours, seconds) +# +# +# FORMAT FOR FIELD ENTRIES (not all input values are used) +# ------------------------ +# +#"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing +# +#time_avg = .true. or .false. +# +#packing = 1 double precision +# = 2 float +# = 4 packed 16-bit integers +# = 8 packed 1-byte (not tested?) diff --git a/sorc/build_ufs_coupled.sh b/sorc/build_ufs_coupled.sh deleted file mode 100755 index 1b4d11c6eee..00000000000 --- a/sorc/build_ufs_coupled.sh +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env bash -set -eux - -# Build S2S by default -APP="S2SW" -CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_coupled,FV3_GFS_v16_couplednsst,FV3_GFS_v16_coupled_nsstNoahmpUGWPv1" - -while getopts "a" option; do - case $option in - a) - APP="ATMAERO" - CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_ugwpv1" - shift - ;; - *) - echo "Unrecognized option: ${1}" - exit 1 - ;; - esac -done - -source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` - -# Set target platform -case "${target}" in - hera|orion|stampede) - target=${target}.intel - ;; -esac - -MOD_PATH=$cwd/ufs_coupled.fd/modulefiles - -module purge - -cd ufs_coupled.fd/ - -if [ -d build ]; then - rm -Rf build -fi - -module use ${MOD_PATH} -module load ufs_${target} -CMAKE_FLAGS="-DAPP=${APP} -DCCPP_SUITES=${CCPP_SUITES}" ./build.sh diff --git a/ush/cplvalidate.sh b/ush/cplvalidate.sh index 46f861dbe12..d9df194f864 100755 --- a/ush/cplvalidate.sh +++ b/ush/cplvalidate.sh @@ -12,29 +12,29 @@ cplvalidate(){ echo "SUB cplvalidate: validating cpl** switches for $confignamevarfornems" return case $confignamevarfornems in - 'atm') combination=.false..false..false..false..false.;; - 'datm') combination=.true..true..false..false..false.;; - 'atm_aer') combination=.true..false..false..false..true.;; - 'med_atm_ocn_ice') combination=.true..true..true..false..false.;; - 'cpld') combination=.true..true..true..false..false.;; - 'blocked_atm_wav') combination=.true..false..false..true..false.;; - 'leapfrog_atm_wav')combination=.true..false..false..true..false.;; - 'med_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; - 'cpld_wave') combination=.true..true..true..true..false.;; - 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; - 'med_atm_ocn_ice_wav1way') combination=.true..true..true..true..false.;; - 'med_atm_ocn_ice_wav1waywcurr') combination=.true..true..true..true..false.;; - 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; - 'medcold_atm_ocn_ice') combination=.true..true..true..false..false.;; - *) echo "SUB cplvalidate: Combination not supported" - exit 1 ;; + 'atm') combination=.false..false..false..false..false.;; + 'datm') combination=.true..true..false..false..false.;; + 'atm_aer') combination=.true..false..false..false..true.;; + 'med_atm_ocn_ice') combination=.true..true..true..false..false.;; + 'cpld') combination=.true..true..true..false..false.;; + 'blocked_atm_wav') combination=.true..false..false..true..false.;; + 'leapfrog_atm_wav')combination=.true..false..false..true..false.;; + 'med_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'cpld_wave') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'med_atm_ocn_ice_wav1way') combination=.true..true..true..true..false.;; + 'med_atm_ocn_ice_wav1waywcurr') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; + 'medcold_atm_ocn_ice') combination=.true..true..true..false..false.;; + *) echo "SUB cplvalidate: Combination not supported" + exit 1 ;; esac control=$cpl$cplflx$cplice$cplwav$cplchem #echo $control if [ $control != $combination ]; then - echo "SUB cplvalidate: inconsistent cpl setting!" - exit 2 + echo "SUB cplvalidate: inconsistent cpl setting!" + exit 2 else - echo "SUB cplvalidate: cpl settings validated!" + echo "SUB cplvalidate: cpl settings validated!" fi } diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 1de364ded3b..f27c341cf30 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -193,7 +193,7 @@ EOF fi export CCPP_SUITE=${CCPP_SUITE:-"FV3_GFS_v16"} - _suite_file=$HOMEgfs/sorc/ufs_coupled.fd/FV3/ccpp/suites/suite_${CCPP_SUITE}.xml + _suite_file=$HOMEgfs/sorc/ufs_model.fd/FV3/ccpp/suites/suite_${CCPP_SUITE}.xml if [ ! -f ${_suite_file} ]; then echo "FATAL: CCPP Suite file ${_suite_file} does not exist!" diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh index 9d65adc2b06..e5c8bc3d634 100755 --- a/ush/nems_configure.sh +++ b/ush/nems_configure.sh @@ -13,7 +13,7 @@ writing_nems_configure() { echo "SUB ${FUNCNAME[0]}: parsing_nems_configure begins" if [ -e $SCRIPTDIR/nems.configure ]; then - rm -f $SCRIPTDIR/nems.configure + rm -f $SCRIPTDIR/nems.configure fi # Setup nems.configure @@ -65,40 +65,40 @@ sed -i -e "s;@\[med_petlist_bounds\];$med_petlist_bounds;g" tmp1 sed -i -e "s;@\[atm_petlist_bounds\];$atm_petlist_bounds;g" tmp1 if [ $cplflx = .true. ]; then - if [ $restart_interval -gt 0 ]; then - restart_interval_nems=$restart_interval - else - restart_interval_nems=$FHMAX - fi - sed -i -e "s;@\[ocn_model\];$OCN_model;g" tmp1 - sed -i -e "s;@\[ocn_petlist_bounds\];$ocn_petlist_bounds;g" tmp1 - sed -i -e "s;@\[DumpFields\];$DumpFields;g" tmp1 - sed -i -e "s;@\[cap_dbug_flag\];$cap_dbug_flag;g" tmp1 - sed -i -e "s;@\[coldstart\];$coldstart;g" tmp1 - sed -i -e "s;@\[use_coldstart\];$use_coldstart;g" tmp1 - sed -i -e "s;@\[RUNTYPE\];$cmeps_run_type;g" tmp1 - sed -i -e "s;@\[CPLMODE\];$cplmode;g" tmp1 - sed -i -e "s;@\[restart_interval\];$restart_interval;g" tmp1 - sed -i -e "s;@\[coupling_interval_slow_sec\];$CPL_SLOW;g" tmp1 - sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 - sed -i -e "s;@\[RESTART_N\];$restart_interval_nems;g" tmp1 + if [ $restart_interval -gt 0 ]; then + restart_interval_nems=$restart_interval + else + restart_interval_nems=$FHMAX + fi + sed -i -e "s;@\[ocn_model\];$OCN_model;g" tmp1 + sed -i -e "s;@\[ocn_petlist_bounds\];$ocn_petlist_bounds;g" tmp1 + sed -i -e "s;@\[DumpFields\];$DumpFields;g" tmp1 + sed -i -e "s;@\[cap_dbug_flag\];$cap_dbug_flag;g" tmp1 + sed -i -e "s;@\[coldstart\];$coldstart;g" tmp1 + sed -i -e "s;@\[use_coldstart\];$use_coldstart;g" tmp1 + sed -i -e "s;@\[RUNTYPE\];$cmeps_run_type;g" tmp1 + sed -i -e "s;@\[CPLMODE\];$cplmode;g" tmp1 + sed -i -e "s;@\[restart_interval\];$restart_interval;g" tmp1 + sed -i -e "s;@\[coupling_interval_slow_sec\];$CPL_SLOW;g" tmp1 + sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 + sed -i -e "s;@\[RESTART_N\];$restart_interval_nems;g" tmp1 sed -i -e "s;@\[use_mommesh\];$USE_MOMMESH;g" tmp1 sed -i -e "s;@\[eps_imesh\];$ICERESdec;g" tmp1 fi if [ $cplwav = .true. ]; then - sed -i -e "s;@\[wav_model\];ww3;g" tmp1 - sed -i -e "s;@\[wav_petlist_bounds\];$wav_petlist_bounds;g" tmp1 + sed -i -e "s;@\[wav_model\];ww3;g" tmp1 + sed -i -e "s;@\[wav_petlist_bounds\];$wav_petlist_bounds;g" tmp1 fi if [ $cplice = .true. ]; then - sed -i -e "s;@\[ice_model\];$ICE_model;g" tmp1 - sed -i -e "s;@\[ice_petlist_bounds\];$ice_petlist_bounds;g" tmp1 - sed -i -e "s;@\[MESH_OCN_ICE\];$MESH_OCN_ICE;g" tmp1 - sed -i -e "s;@\[FHMAX\];$FHMAX_GFS;g" tmp1 + sed -i -e "s;@\[ice_model\];$ICE_model;g" tmp1 + sed -i -e "s;@\[ice_petlist_bounds\];$ice_petlist_bounds;g" tmp1 + sed -i -e "s;@\[MESH_OCN_ICE\];$MESH_OCN_ICE;g" tmp1 + sed -i -e "s;@\[FHMAX\];$FHMAX_GFS;g" tmp1 fi if [ $cplchem = .true. ]; then - sed -i -e "s;@\[chm_model\];$CHM_model;g" tmp1 - sed -i -e "s;@\[chm_petlist_bounds\];$chm_petlist_bounds;g" tmp1 - sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 + sed -i -e "s;@\[chm_model\];$CHM_model;g" tmp1 + sed -i -e "s;@\[chm_petlist_bounds\];$chm_petlist_bounds;g" tmp1 + sed -i -e "s;@\[coupling_interval_fast_sec\];$CPL_FAST;g" tmp1 fi mv tmp1 nems.configure From 6ae9b5ed7b940343a459cdd17b70bd1c306bfb22 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 15:28:40 -0500 Subject: [PATCH 14/33] delete get_platform update forecast_postdet --- ush/forecast_postdet.sh | 18 ----------------- ush/get_platform.sh | 44 ----------------------------------------- 2 files changed, 62 deletions(-) delete mode 100644 ush/get_platform.sh diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index f27c341cf30..f1fe5fa185a 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -809,7 +809,6 @@ CICE_postdet() { day=$(echo $CDATE|cut -c 7-8) stepsperhr=$((3600/$ICETIM)) nhours=$($NHOUR $CDATE ${year}010100) - istep0=$((nhours*stepsperhr)) steps=$((nhours*stepsperhr)) npt=$((FHMAX*$stepsperhr)) # Need this in order for dump_last to work @@ -940,20 +939,3 @@ GOCART_rc() { fi } -GSD_in() { - echo "SUB ${FUNCNAME[0]}: Linking input data for GSD" - # soft link commands insert here -} - -GSD_nml() { - echo "SUB ${FUNCNAME[0]}: Creating name list for GSD" - sh parsing_namelists_GSD.sh -} - -GSD_out() { - echo "SUB ${FUNCNAME[0]}: Copying output data for GSD" - # soft link commands insert here -} - - - diff --git a/ush/get_platform.sh b/ush/get_platform.sh deleted file mode 100644 index 417f6ce920f..00000000000 --- a/ush/get_platform.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -############################################################### -# Auto-detect platform and return string identifier -############################################################### - -get_platform() { - - local hname=`hostname -d` - local pname="unknown" - - if [[ $hname = 'stampede2.tacc.utexas.edu' ]] ; then - # We are on Xsede stampede2 - pname="stampede" - elif [[ $hname = 'hpc.msstate.edu' ]] ; then - # We are on MSU Orion - pname="orion" - elif [[ -d /lfs3 ]] ; then - # We are on NOAA Jet - pname="jet" - elif [[ -d /scratch1 ]] ; then - # We are on NOAA Hera - pname="hera" - elif [[ -d /gpfs/hps && -e /etc/SuSE-release ]] ; then - # We are on NOAA Luna or Surge - pname="wcoss_c" - elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then - # We are on NOAA Mars or Venus - pname="wcoss_dell_p3" - elif [[ -d /dcom && -d /hwrf ]] ; then - # We are on NOAA Tide or Gyre - pname="wcoss" - elif [[ -d /glade ]] ; then - # We are on NCAR Cheyenne - pname="cheyenne" - elif [[ -d /lustre && -d /ncrc ]] ; then - # We are on GAEA. - pname="gaea" - else - echo WARNING: UNKNOWN PLATFORM - fi - - echo "${pname}" -} From b48dc282201fede955eb12a6209dffd071f66cb8 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 30 Jul 2021 15:39:29 -0500 Subject: [PATCH 15/33] remove excessive export statements remove cplwav in the script --- ush/forecast_predet.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 8637091363e..22fee700ce3 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -63,8 +63,8 @@ FV3_GFS_predet(){ HOMEgfs=${HOMEgfs:-$NWPROD} FIX_DIR=${FIX_DIR:-$HOMEgfs/fix} FIX_AM=${FIX_AM:-$FIX_DIR/fix_am} - export FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} - export FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} + FIX_AER=${FIX_AER:-$FIX_DIR/fix_aer} + FIX_LUT=${FIX_LUT:-$FIX_DIR/fix_lut} FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} DATA=${DATA:-$pwd/fv3tmp$$} # temporary running directory ROTDIR=${ROTDIR:-$pwd} # rotating archive directory @@ -102,9 +102,6 @@ FV3_GFS_predet(){ PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} - # Wave coupling parameter defaults to false - cplwav=${cplwav:-.false.} - # Model config options APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined From 12561424b193abe118cb26b2d6dab98301763bf9 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 3 Aug 2021 10:02:02 -0400 Subject: [PATCH 16/33] force to use NTASKS_TOT on Orion for forecast --- .gitignore | 1 - env/ORION.env | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 357b6e824ca..270e17841d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Ignore all compiled files #-------------------------- -sorc/nceplibs-ncio/ __pycache__ *.pyc *.[aox] diff --git a/env/ORION.env b/env/ORION.env index 69721c21edc..f8e33f3e8d7 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -131,7 +131,7 @@ elif [ $step = "fcst" ]; then export NTHREADS_FV3=${nth_fv3:-$nth_max} [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher" + export APRUN_FV3="$launcher -n \$NTASKS_TOT" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max From a4427df5ed39ef75710a622eda3ec6b7ab5770f1 Mon Sep 17 00:00:00 2001 From: jikuang Date: Tue, 3 Aug 2021 12:27:37 -0500 Subject: [PATCH 17/33] Remove CROW-related comments --- ush/parsing_namelists_FV3.sh | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index a570cea546c..28e55699a51 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -11,8 +11,8 @@ FV3_namelists(){ # copy over the tables -DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table} -DIAG_TABLE_AOD=${DIAG_TABLE_AOD:-$PARM_FV3DIAG/diag_table_aod} +DIAG_TABLE_BASE=${DIAG_TABLE_BASE:-$PARM_FV3DIAG/diag_table} +DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table_aod} DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table} @@ -22,18 +22,18 @@ cat > diag_table << EOF FV3 Forecast ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 EOF -cat $DIAG_TABLE >> diag_table +cat $DIAG_TABLE_BASE >> diag_table else cat > diag_table << EOF FV3 Forecast ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 EOF -cat $DIAG_TABLE >> diag_table +cat $DIAG_TABLE_BASE >> diag_table fi # Append AOD diag table for MERRA2 if [ $IAER = "1011" ]; then - cat $DIAG_TABLE_AOD >> diag_table + cat $DIAG_TABLE >> diag_table fi $NCP $DATA_TABLE data_table @@ -58,8 +58,8 @@ cat > input.nml <> input.nml << EOF fv_debug = ${fv_debug:-".false."} range_warn = ${range_warn:-".false."} reset_eta = .false. - n_sponge = ${n_sponge:-"10"} ! CROW configured + n_sponge = ${n_sponge:-"10"} nudge_qv = ${nudge_qv:-".true."} nudge_dz = ${nudge_dz:-".false."} tau = ${tau:-10.} rf_cutoff = ${rf_cutoff:-"7.5e2"} - d2_bg_k1 = ${d2_bg_k1:-"0.15"} ! CROW configured - d2_bg_k2 = ${d2_bg_k2:-"0.02"} ! CROW configured + d2_bg_k1 = ${d2_bg_k1:-"0.15"} + d2_bg_k2 = ${d2_bg_k2:-"0.02"} kord_tm = ${kord_tm:-"-9"} kord_mt = ${kord_mt:-"9"} kord_wz = ${kord_wz:-"9"} @@ -128,15 +128,15 @@ cat >> input.nml << EOF p_fac = 0.1 k_split = $k_split n_split = $n_split - nwat = ${nwat:-2} ! CROW configured + nwat = ${nwat:-2} na_init = $na_init d_ext = 0. - dnats = ${dnats:-0} ! CROW configured + dnats = ${dnats:-0} fv_sg_adj = ${fv_sg_adj:-"450"} d2_bg = 0. - nord = ${nord:-3} ! CROW configured - dddmp = ${dddmp:-0.2} ! CROW configured - d4_bg = ${d4_bg:-0.15} ! CROW configured + nord = ${nord:-3} + dddmp = ${dddmp:-0.2} + d4_bg = ${d4_bg:-0.15} vtdm4 = $vtdm4 delt_max = ${delt_max:-"0.002"} ke_bg = 0. @@ -148,15 +148,15 @@ cat >> input.nml << EOF mountain = $mountain ncep_ic = $ncep_ic d_con = $d_con - hord_mt = $hord_mt ! CROW configured - hord_vt = $hord_xx ! CROW configured - hord_tm = $hord_xx ! CROW configured - hord_dp = -$hord_xx ! CROW configured + hord_mt = $hord_mt + hord_vt = $hord_xx + hord_tm = $hord_xx + hord_dp = -$hord_xx hord_tr = ${hord_tr:-"8"} adjust_dry_mass = ${adjust_dry_mass:-".true."} dry_mass=${dry_mass:-98320.0} consv_te = $consv_te - do_sat_adj = ${do_sat_adj:-".false."} ! CROW configured + do_sat_adj = ${do_sat_adj:-".false."} consv_am = .false. fill = .true. dwind_2d = .false. @@ -196,13 +196,13 @@ cat >> input.nml << EOF &gfs_physics_nml fhzero = $FHZER - h2o_phys = ${h2o_phys:-".true."} ! CROW configured + h2o_phys = ${h2o_phys:-".true."} ldiag3d = ${ldiag3d:-".false."} - fhcyc = $FHCYC ! CROW configured + fhcyc = $FHCYC use_ufo = ${use_ufo:-".true."} pre_rad = ${pre_rad:-".false."} - ncld = ${ncld:-1} ! CROW configured - imp_physics = ${imp_physics:-"99"} ! CROW configured + ncld = ${ncld:-1} + imp_physics = ${imp_physics:-"99"} EOF case "${CCPP_SUITE:-}" in @@ -291,19 +291,19 @@ cat >> input.nml < Date: Tue, 3 Aug 2021 12:41:44 -0500 Subject: [PATCH 18/33] further cleanup comments --- ush/parsing_namelists_FV3.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 28e55699a51..9846fe40045 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -223,10 +223,10 @@ EOF lsoil_lsm = ${lsoil_lsm:-"4"} do_mynnedmf = ${do_mynnedmf:-".false."} do_mynnsfclay = ${do_mynnsfclay:-".false."} - icloud_bl = ${icloud_bl:-"1"} ! In config.fcst - bl_mynn_edmf = ${bl_mynn_edmf:-"1"} ! In config.fcst - bl_mynn_tkeadvect=${bl_mynn_tkeadvect:-".true."} ! In config.fcst - bl_mynn_edmf_mom=${bl_mynn_edmf_mom:-"1"} ! In config.fcst + icloud_bl = ${icloud_bl:-"1"} + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} + bl_mynn_tkeadvect=${bl_mynn_tkeadvect:-".true."} + bl_mynn_edmf_mom=${bl_mynn_edmf_mom:-"1"} min_lakeice = ${min_lakeice:-"0.15"} min_seaice = ${min_seaice:-"0.15"} EOF @@ -279,14 +279,14 @@ cat >> input.nml <> input.nml < Date: Tue, 3 Aug 2021 16:15:34 -0500 Subject: [PATCH 19/33] Fix PET issue when not using full node EMSF fails for atm-only if the total number of tasks is not equal to the number of PETs specified in the namelists. Now srun specifies the number of tasks for the forecast job on Orion so the correct number of tasks is used. Refs: #365 --- env/ORION.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/ORION.env b/env/ORION.env index f8e33f3e8d7..5837e9b620d 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -131,7 +131,7 @@ elif [ $step = "fcst" ]; then export NTHREADS_FV3=${nth_fv3:-$nth_max} [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n \$NTASKS_TOT" + export APRUN_FV3="$launcher -n $npe_fcst_gfs" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max From 11dc06392a05f9fbe44cd1d66fee0cc9e17065b1 Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 4 Aug 2021 10:54:50 -0500 Subject: [PATCH 20/33] replace ufs_coupled with ufs_model in nems_configure.sh --- ush/nems_configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh index e5c8bc3d634..ba54a282863 100755 --- a/ush/nems_configure.sh +++ b/ush/nems_configure.sh @@ -162,7 +162,7 @@ echo "$(cat med_modelio.nml)" fi -cp $HOMEgfs/sorc/ufs_coupled.fd/tests/parm/fd_nems.yaml fd_nems.yaml +cp $HOMEgfs/sorc/ufs_model.fd/tests/parm/fd_nems.yaml fd_nems.yaml echo "SUB ${FUNCNAME[0]}: Nems configured for $confignamevarfornems" From bae436dc957a5926c2a6c98966badb2c6e2916e1 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 5 Aug 2021 12:36:10 -0400 Subject: [PATCH 21/33] remove ncld from the namelist. This is a relic from IPD days --- ush/forecast_predet.sh | 4 ++-- ush/nems_configure.sh | 30 +++++++++++++++--------------- ush/parsing_namelists_FV3.sh | 20 ++------------------ 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 22fee700ce3..6d55e898091 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -97,8 +97,8 @@ FV3_GFS_predet(){ IAU_OFFSET=${IAU_OFFSET:-0} # Model specific stuff - FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/fv3gfs.fd/NEMS/exe} - FCSTEXEC=${FCSTEXEC:-fv3_gfs.x} + FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/ufs_model.fd/build} + FCSTEXEC=${FCSTEXEC:-ufs_model} PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh index ba54a282863..c4c178dbb61 100755 --- a/ush/nems_configure.sh +++ b/ush/nems_configure.sh @@ -1,9 +1,9 @@ #!/bin/sh ##### -## This script writes nems.configure file -## first, select a "*.IN" templates based on -## $confignamevarfornems and parse values based on +## This script writes nems.configure file +## first, select a "*.IN" templates based on +## $confignamevarfornems and parse values based on ## $cpl** switches. ## ## This is a child script of modular @@ -18,10 +18,10 @@ fi # Setup nems.configure DumpFields=${NEMSDumpFields:-false} -cap_dbug_flag=${cap_dbug_flag:-0} +cap_dbug_flag=${cap_dbug_flag:-0} if [ $warm_start = ".true." ]; then cmeps_run_type='continue' -else +else cmeps_run_type='startup' fi if [[ $inistep = "cold" ]]; then @@ -39,7 +39,7 @@ WAV_model=${WAV_model:-'ww3'} CHM_model=${CHM_model:-'gocart'} ATMPETS=${ATMPETS:-8} -MEDPETS=${MEDPETS:-8} +MEDPETS=${MEDPETS:-8} OCNPETS=${OCNPETS:-8} ICEPETS=${ICEPETS:-8} WAVPETS=${WAVPETS:-8} @@ -51,10 +51,10 @@ USE_MOMMESH=${USE_MOMMESH:-"true"} rm -f $DATA/nems.configure med_petlist_bounds=${med_petlist_bounds:-"0 $(( $MEDPETS-1 ))"} -atm_petlist_bounds=${atm_petlist_bounds:-"0 $(( $ATMPETS-1 ))"} -ocn_petlist_bounds=${ocn_petlist_bounds:-"$ATMPETS $(( $ATMPETS+$OCNPETS-1 ))"} -ice_petlist_bounds=${ice_petlist_bounds:-"$(( $ATMPETS+$OCNPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS-1 ))"} -wav_petlist_bounds=${wav_petlist_bounds:-"$(( $ATMPETS+$OCNPETS+$ICEPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS+$WAVPETS-1 ))"} +atm_petlist_bounds=${atm_petlist_bounds:-"0 $(( $ATMPETS-1 ))"} +ocn_petlist_bounds=${ocn_petlist_bounds:-"$ATMPETS $(( $ATMPETS+$OCNPETS-1 ))"} +ice_petlist_bounds=${ice_petlist_bounds:-"$(( $ATMPETS+$OCNPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS-1 ))"} +wav_petlist_bounds=${wav_petlist_bounds:-"$(( $ATMPETS+$OCNPETS+$ICEPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS+$WAVPETS-1 ))"} chm_petlist_bounds=${chm_petlist_bounds:-"0 $(( $CHMPETS-1 ))"} # Copy the selected template into run directory @@ -65,10 +65,10 @@ sed -i -e "s;@\[med_petlist_bounds\];$med_petlist_bounds;g" tmp1 sed -i -e "s;@\[atm_petlist_bounds\];$atm_petlist_bounds;g" tmp1 if [ $cplflx = .true. ]; then - if [ $restart_interval -gt 0 ]; then - restart_interval_nems=$restart_interval - else - restart_interval_nems=$FHMAX + if [ $restart_interval -gt 0 ]; then + restart_interval_nems=$restart_interval + else + restart_interval_nems=$FHMAX fi sed -i -e "s;@\[ocn_model\];$OCN_model;g" tmp1 sed -i -e "s;@\[ocn_petlist_bounds\];$ocn_petlist_bounds;g" tmp1 @@ -107,7 +107,7 @@ echo "$(cat nems.configure)" if [ $cplflx = .true. ]; then -#Create other CMEPS mediator related files +#Create other CMEPS mediator related files cat > pio_in << EOF &papi_inparm papi_ctr1_str = "PAPI_FP_OPS" diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 9846fe40045..df3fb5be8a7 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -54,7 +54,7 @@ cat > input.nml <> input.nml << EOF $fv_core_nml / -&cires_ugwp_nml - knob_ugwp_solver = ${knob_ugwp_solver:-2} - knob_ugwp_source = ${knob_ugwp_source:-1,1,0,0} - knob_ugwp_wvspec = ${knob_ugwp_wvspec:-1,25,25,25} - knob_ugwp_azdir = ${knob_ugwp_azdir:-2,4,4,4} - knob_ugwp_stoch = ${knob_ugwp_stoch:-0,0,0,0} - knob_ugwp_effac = ${knob_ugwp_effac:-1,1,1,1} - knob_ugwp_doaxyz = ${knob_ugwp_doaxyz:-1} - knob_ugwp_doheat = ${knob_ugwp_doheat:-1} - knob_ugwp_dokdis = ${knob_ugwp_dokdis:-1} - knob_ugwp_ndx4lh = ${knob_ugwp_ndx4lh:-1} - knob_ugwp_version = ${knob_ugwp_version:-0} - launch_level = ${launch_level:-54} -/ - &external_ic_nml filtered_terrain = $filtered_terrain levp = $LEVS @@ -201,7 +186,6 @@ cat >> input.nml << EOF fhcyc = $FHCYC use_ufo = ${use_ufo:-".true."} pre_rad = ${pre_rad:-".false."} - ncld = ${ncld:-1} imp_physics = ${imp_physics:-"99"} EOF @@ -348,11 +332,11 @@ cat >> input.nml <> input.nml << EOF + frac_grid = ${FRAC_GRID:-".true."} cplchm = ${cplchem:-".false."} cplflx = $cplflx cplwav2atm = ${cplwav2atm} From 814064e09f0959256345151adcb8389d994fa174 Mon Sep 17 00:00:00 2001 From: jikuang Date: Fri, 6 Aug 2021 14:11:13 -0500 Subject: [PATCH 22/33] update scripts to match coupled_sprint_0806 tag, off from feature/coupled-crow. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Need to decide if the following default variable update should go in or not: lheatstrg = ${lheatstrg-“.false.“} lseaspray = ${lseaspray:-“.false.“} --- ush/forecast_postdet.sh | 27 +++++++++++++++++++++++++++ ush/parsing_namelists_FV3.sh | 23 +++++++++++++++++++---- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index f1fe5fa185a..9e257b6614a 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -203,8 +203,34 @@ EOF # Scan suite file to determine whether it uses Noah-MP if [ $(grep noahmpdrv ${_suite_file} | wc -l ) -gt 0 ]; then lsm="2" + landice=".false." + iopt_dveg=${iopt_dveg:-"4"} + iopt_crs=${iopt_crs:-"2"} + iopt_btr=${iopt_btr:-"1"} + iopt_run=${iopt_run:-"1"} + iopt_sfc=${iopt_sfc:-"1"} + iopt_frz=${iopt_frz:-"1"} + iopt_inf=${iopt_inf:-"1"} + iopt_rad=${iopt_rad:-"3"} + iopt_alb=${iopt_alb:-"1"} + iopt_snf=${iopt_snf:-"4"} + iopt_tbot=${iopt_tbot:-"2"} + iopt_stc=${iopt_stc:-"3"} else lsm="1" + landice=".true." + iopt_dveg=${iopt_dveg:-"1"} + iopt_crs=${iopt_crs:-"1"} + iopt_btr=${iopt_btr:-"1"} + iopt_run=${iopt_run:-"1"} + iopt_sfc=${iopt_sfc:-"1"} + iopt_frz=${iopt_frz:-"1"} + iopt_inf=${iopt_inf:-"1"} + iopt_rad=${iopt_rad:-"1"} + iopt_alb=${iopt_alb:-"2"} + iopt_snf=${iopt_snf:-"4"} + iopt_tbot=${iopt_tbot:-"2"} + iopt_stc=${iopt_stc:-"1"} fi # Scan suite file to determine whether it uses UGWP v1 @@ -471,6 +497,7 @@ EOF ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2)) ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3)) + ISEED_CA=$(( (CDATE*1000 + MEMBER*10 + 4) % 2147483647 )) else ISEED=${ISEED:-0} fi diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index df3fb5be8a7..88af0b4dc1e 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -107,7 +107,7 @@ cat >> input.nml << EOF grid_type = -1 make_nh = $make_nh fv_debug = ${fv_debug:-".false."} - range_warn = ${range_warn:-".false."} + range_warn = ${range_warn:-".true."} reset_eta = .false. n_sponge = ${n_sponge:-"10"} nudge_qv = ${nudge_qv:-".true."} @@ -135,7 +135,7 @@ cat >> input.nml << EOF fv_sg_adj = ${fv_sg_adj:-"450"} d2_bg = 0. nord = ${nord:-3} - dddmp = ${dddmp:-0.2} + dddmp = ${dddmp:-0.1} d4_bg = ${d4_bg:-0.15} vtdm4 = $vtdm4 delt_max = ${delt_max:-"0.002"} @@ -282,6 +282,7 @@ cat >> input.nml <> input.nml <> input.nml << EOF - do_tofd = ${do_tofd:-".false."} fscav_aero = ${fscav_aero:-'*:0.0'} EOF else @@ -353,6 +352,22 @@ if [ $DOIAU = "YES" ]; then EOF fi +if [ ${DO_CA:-"NO"} = "YES" ]; then + cat >> input.nml << EOF + do_ca = .True. + ca_sgs = ${ca_sgs:-".True."} + nca = ${nca:-"1"} + scells = ${scells:-"2600"} + tlives = ${tlives:-"1800"} + nseed = ${nseed:-"1"} + nfracseed = ${nfracseed:-"0.5"} + rcell = ${rcell:-"0.72"} + ca_trigger = ${ca_trigger:-".True."} + nspinup = ${nspinup:-"1"} + iseed_ca = ${ISEED_CA:-"12345"} +EOF +fi + case ${gwd_opt:-"2"} in 1) cat >> input.nml < Date: Fri, 6 Aug 2021 15:01:48 -0500 Subject: [PATCH 23/33] permission setting unification --- ush/WAM_XML_to_ASCII.pl | 0 ush/nems.configure.cpld.IN | 0 ush/nems.configure.cpld_wave.IN | 0 ush/nems.configure.medcold_atm_ocn_ice.IN | 0 ush/nems.configure.medcold_atm_ocn_ice_wav.IN | 0 ush/parsing_namelists_CICE.sh | 0 ush/parsing_namelists_MOM6.sh | 0 7 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ush/WAM_XML_to_ASCII.pl mode change 100644 => 100755 ush/nems.configure.cpld.IN mode change 100644 => 100755 ush/nems.configure.cpld_wave.IN mode change 100644 => 100755 ush/nems.configure.medcold_atm_ocn_ice.IN mode change 100644 => 100755 ush/nems.configure.medcold_atm_ocn_ice_wav.IN mode change 100644 => 100755 ush/parsing_namelists_CICE.sh mode change 100644 => 100755 ush/parsing_namelists_MOM6.sh diff --git a/ush/WAM_XML_to_ASCII.pl b/ush/WAM_XML_to_ASCII.pl old mode 100644 new mode 100755 diff --git a/ush/nems.configure.cpld.IN b/ush/nems.configure.cpld.IN old mode 100644 new mode 100755 diff --git a/ush/nems.configure.cpld_wave.IN b/ush/nems.configure.cpld_wave.IN old mode 100644 new mode 100755 diff --git a/ush/nems.configure.medcold_atm_ocn_ice.IN b/ush/nems.configure.medcold_atm_ocn_ice.IN old mode 100644 new mode 100755 diff --git a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN old mode 100644 new mode 100755 diff --git a/ush/parsing_namelists_CICE.sh b/ush/parsing_namelists_CICE.sh old mode 100644 new mode 100755 diff --git a/ush/parsing_namelists_MOM6.sh b/ush/parsing_namelists_MOM6.sh old mode 100644 new mode 100755 From 4afacc457c307af620f1e209d4059b68fdebe4b8 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 6 Aug 2021 23:30:57 -0400 Subject: [PATCH 24/33] templates .IN are not executables. Strip trailing whitespaces and expand tabs for mixed indents --- scripts/exglobal_forecast.sh | 12 +- ush/cplvalidate.sh | 5 +- ush/forecast_det.sh | 4 +- ush/forecast_postdet.sh | 234 +++++++++--------- ush/forecast_predet.sh | 64 ++--- ush/nems.configure.atm.IN | 0 ush/nems.configure.atm_aer.IN | 0 ush/nems.configure.blocked_atm_wav.IN | 0 ush/nems.configure.cpld.IN | 0 ush/nems.configure.cpld_wave.IN | 0 ush/nems.configure.leapfrog_atm_wav.IN | 0 ush/nems.configure.medcold_atm_ocn_ice.IN | 0 ush/nems.configure.medcold_atm_ocn_ice_wav.IN | 0 ush/parsing_model_configure_DATM.sh | 4 +- ush/parsing_model_configure_FV3.sh | 2 +- ush/parsing_namelists_CICE.sh | 102 ++++---- ush/parsing_namelists_FV3.sh | 74 +++--- ush/parsing_namelists_MOM6.sh | 18 +- 18 files changed, 259 insertions(+), 260 deletions(-) mode change 100755 => 100644 ush/nems.configure.atm.IN mode change 100755 => 100644 ush/nems.configure.atm_aer.IN mode change 100755 => 100644 ush/nems.configure.blocked_atm_wav.IN mode change 100755 => 100644 ush/nems.configure.cpld.IN mode change 100755 => 100644 ush/nems.configure.cpld_wave.IN mode change 100755 => 100644 ush/nems.configure.leapfrog_atm_wav.IN mode change 100755 => 100644 ush/nems.configure.medcold_atm_ocn_ice.IN mode change 100755 => 100644 ush/nems.configure.medcold_atm_ocn_ice_wav.IN diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 83017a29099..772d00b9f84 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -16,7 +16,7 @@ ## 2017-03-24 Fanglin Yang Updated to use NEMS FV3GFS with IPD4 ## 2017-05-24 Rahul Mahajan Updated for cycling with NEMS FV3GFS ## 2017-09-13 Fanglin Yang Updated for using GFDL MP and Write Component -## 2019-04-02 +## 2019-04-02 ## ## Attributes: ## Language: Portable Operating System Interface (POSIX) Shell @@ -36,7 +36,7 @@ ## 1. initial condition, $memdir/INPUT/*.nc ## Restart files: ## -## Fix files: +## Fix files: ## 1. computing grid, $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc ## 2. orography data, $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc ## 3. mosaic data, $FIXfv3/$CASE/${CASE}_mosaic.nc @@ -47,7 +47,7 @@ ## 8. Global CO2 historical data, $FIX_AM/global_co2historicaldata_glob.txt ## 8. Global CO2 monthly data, $FIX_AM/co2monthlycyc.txt ## 10. Additional global CO2 data, $FIX_AM/fix_co2_proj/global_co2historicaldata -## 11. Climatological aerosol global distribution +## 11. Climatological aerosol global distribution ## $FIX_AM/global_climaeropac_global.txt ## 12. Monthly volcanic forcing $FIX_AM/global_volcanic_aerosols_YYYY-YYYY.txt ## @@ -63,8 +63,8 @@ ## 4. atmospheric static tiles, $memdir/atmos_static.tile${n}.nc ## 5. atmospheric 4x daily tiles, $memdir/atmos_4xdaily.tile${n}.nc ## -## Status output -## 0: Normal +## Status output +## 0: Normal ## others: Error ## ## Namelist input, in RUNDIR, @@ -185,7 +185,7 @@ echo "MAIN: NEMS configured" #------------------------------------------------------------------ # run the executable -if [ $esmf_profile ]; then +if [ $esmf_profile ]; then export ESMF_RUNTIME_PROFILE=ON export ESMF_RUNTIME_PROFILE_OUTPUT=SUMMARY fi diff --git a/ush/cplvalidate.sh b/ush/cplvalidate.sh index d9df194f864..a9d124aad11 100755 --- a/ush/cplvalidate.sh +++ b/ush/cplvalidate.sh @@ -26,11 +26,10 @@ case $confignamevarfornems in 'med_atm_ocn_ice_wav1waywcurr') combination=.true..true..true..true..false.;; 'medcold_atm_ocn_ice_wav') combination=.true..true..true..true..false.;; 'medcold_atm_ocn_ice') combination=.true..true..true..false..false.;; - *) echo "SUB cplvalidate: Combination not supported" - exit 1 ;; + *) echo "SUB cplvalidate: Combination not supported" + exit 1 ;; esac control=$cpl$cplflx$cplice$cplwav$cplchem -#echo $control if [ $control != $combination ]; then echo "SUB cplvalidate: inconsistent cpl setting!" exit 2 diff --git a/ush/forecast_det.sh b/ush/forecast_det.sh index 2dac45f527e..5d6491e7340 100755 --- a/ush/forecast_det.sh +++ b/ush/forecast_det.sh @@ -1,6 +1,6 @@ -#! /bin/sh +#!/bin/sh -##### +##### ## "forecast_det.sh" ## This script sets value of all variables ## diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 9e257b6614a..d3df34a16c8 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -7,7 +7,7 @@ ## ## This is a child script of modular ## forecast script. This script is function definition. -## need to call these functions in the parent script +## need to call these functions in the parent script ## for execution. ##### @@ -20,13 +20,13 @@ DATM_postdet(){ ###################################################################### # Link DATM inputs (ie forcing files) # ###################################################################### - - #TODO: This should be some loop through CDATE-> CDATE+ FORECAST length - #and get input from either CFSR or GEFS or Whatever... + + #TODO: This should be some loop through CDATE-> CDATE+ FORECAST length + #and get input from either CFSR or GEFS or Whatever... #Currently assumes you only need the month of DATM input for IC date - #DATMINPUTDIR should be machine specific - - # DATM forcing file name convention is ${DATM_FILENAME_BASE}.$YYYYMMDDHH.nc + #DATMINPUTDIR should be machine specific + + # DATM forcing file name convention is ${DATM_FILENAME_BASE}.$YYYYMMDDHH.nc echo "Link DATM forcing files" DATMINPUTDIR="/scratch2/NCEPDEV/marineda/DATM_INPUT/CFSR/${SYEAR}${SMONTH}" $NLN -sf ${DATMINPUTDIR}/${DATM_FILENAME_BASE}*.nc $DATA/DATM_INPUT/ @@ -34,17 +34,17 @@ DATM_postdet(){ FV3_GFS_postdet(){ echo "SUB ${FUNCNAME[0]}: $RERUN and $warm_start determined for $RUN" - + echo $warm_start echo $RERUN - + #------------------------------------------------------- if [ $warm_start = ".true." -o $RERUN = "YES" ]; then #------------------------------------------------------- #............................. if [ $RERUN = "NO" ]; then #............................. - + # Link all (except sfc_data) restart files from $gmemdir for file in $(ls $gmemdir/RESTART/${sPDY}.${scyc}0000.*.nc); do file2=$(echo $(basename $file)) @@ -54,7 +54,7 @@ FV3_GFS_postdet(){ $NLN $file $DATA/INPUT/$file2 fi done - + # Link sfcanl_data restart files from $memdir for file in $(ls $memdir/RESTART/${sPDY}.${scyc}0000.*.nc); do file2=$(echo $(basename $file)) @@ -114,7 +114,7 @@ EOF file2=$(echo $file2 | cut -d. -f3-) $NLN $file $DATA/INPUT/$file2 done - + hour_rst=`$NHOUR $CDATE_RST $CDATE` IAU_FHROT=$((IAU_OFFSET+hour_rst)) if [ $DOIAU = "YES" ]; then @@ -122,7 +122,7 @@ EOF IAU_DELTHRS=0 IAU_INC_FILES="''" fi - + rst_list_rerun="" xfh=$restart_interval_gfs while [ $xfh -le $FHMAX_GFS ]; do @@ -133,7 +133,7 @@ EOF fi #............................. - else ## cold start + else ## cold start for file in $(ls $memdir/INPUT/*.nc); do file2=$(echo $(basename $file)) fsuf=$(echo $file2 | cut -c1-3) @@ -141,9 +141,9 @@ EOF $NLN $file $DATA/INPUT/$file2 fi done - - fi - + + fi + if [ $machine = 'sandbox' ]; then echo SUB ${FUNCNAME[0]}: Checking initial condition, overriden in sandbox mode! else @@ -163,17 +163,17 @@ EOF FHMAX_HF=$((FHMAX_HF+6)) fi fi - + #-------------------------------------------------------------------------- # Grid and orography data for n in $(seq 1 $ntiles); do $NLN $FIXfv3/$CASE/${CASE}_grid.tile${n}.nc $DATA/INPUT/${CASE}_grid.tile${n}.nc $NLN $FIXfv3/$CASE/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc done - + if [ $cplflx = ".false." ] ; then $NLN $FIXfv3/$CASE/${CASE}_mosaic.nc $DATA/INPUT/grid_spec.nc - else + else $NLN $FIXfv3/${CASE}_mosaic.nc $DATA/INPUT/${CASE}_mosaic.nc fi @@ -190,16 +190,16 @@ EOF for n in $(seq 1 $ntiles); do $NLN ${OROFIX}/${CASE}_oro_data.tile${n}.nc $DATA/INPUT/oro_data.tile${n}.nc done - fi + fi export CCPP_SUITE=${CCPP_SUITE:-"FV3_GFS_v16"} _suite_file=$HOMEgfs/sorc/ufs_model.fd/FV3/ccpp/suites/suite_${CCPP_SUITE}.xml - + if [ ! -f ${_suite_file} ]; then echo "FATAL: CCPP Suite file ${_suite_file} does not exist!" exit 2 fi - + # Scan suite file to determine whether it uses Noah-MP if [ $(grep noahmpdrv ${_suite_file} | wc -l ) -gt 0 ]; then lsm="2" @@ -232,7 +232,7 @@ EOF iopt_tbot=${iopt_tbot:-"2"} iopt_stc=${iopt_stc:-"1"} fi - + # Scan suite file to determine whether it uses UGWP v1 if [ $(grep -i ugwpv1_gsldrag ${_suite_file} | wc -l ) -gt 0 ]; then gwd_opt="2" @@ -248,15 +248,15 @@ EOF knob_ugwp_version="0" launch_level=${launch_level:-$(echo "$LEVS/2.35" |bc)} fi - + # GFS standard input data - + IALB=${IALB:-1} IEMS=${IEMS:-1} ISOL=${ISOL:-2} IAER=${IAER:-1011} ICO2=${ICO2:-2} - + if [ ${new_o3forc:-YES} = YES ]; then O3FORC=ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 else @@ -277,7 +277,7 @@ EOF $NLN $FIX_AM/${H2OFORC} $DATA/global_h2oprdlos.f77 $NLN $FIX_AM/global_solarconstant_noaa_an.txt $DATA/solarconstant_noaa_an.txt $NLN $FIX_AM/global_sfc_emissivity_idx.txt $DATA/sfc_emissivity_idx.txt - + ## merra2 aerosol climo if [ $IAER -eq "1011" ]; then FIX_AER="${FIX_DIR}/fix_aer" @@ -292,7 +292,7 @@ EOF $NLN $FIX_LUT/optics_SS.v3_3.dat $DATA/optics_SS.dat $NLN $FIX_LUT/optics_SU.v1_3.dat $DATA/optics_SU.dat fi - + $NLN $FIX_AM/global_co2historicaldata_glob.txt $DATA/co2historicaldata_glob.txt $NLN $FIX_AM/co2monthlycyc.txt $DATA/co2monthlycyc.txt if [ $ICO2 -gt 0 ]; then @@ -300,14 +300,14 @@ EOF $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") done fi - + $NLN $FIX_AM/global_climaeropac_global.txt $DATA/aerosol.dat if [ $IAER -gt 0 ] ; then for file in $(ls $FIX_AM/global_volcanic_aerosols*) ; do $NLN $file $DATA/$(echo $(basename $file) | sed -e "s/global_//g") done fi - + # inline post fix files if [ $WRITE_DOPOST = ".true." ]; then $NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag @@ -315,7 +315,7 @@ EOF $NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt $NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new fi - + #------------------------------------------------------------------ # changeable parameters # dycore definitions @@ -326,19 +326,19 @@ EOF npz=$((LEVS-1)) io_layout="1,1" #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - + # spectral truncation and regular grid resolution based on FV3 resolution JCAP_CASE=$((2*res-2)) LONB_CASE=$((4*res)) LATB_CASE=$((2*res)) - + JCAP=${JCAP:-$JCAP_CASE} LONB=${LONB:-$LONB_CASE} LATB=${LATB:-$LATB_CASE} - + LONB_IMO=${LONB_IMO:-$LONB_CASE} LATB_JMO=${LATB_JMO:-$LATB_CASE} - + # Fix files FNGLAC=${FNGLAC:-"$FIX_AM/global_glacier.2x2.grb"} FNMXIC=${FNMXIC:-"$FIX_AM/global_maxice.2x2.grb"} @@ -372,14 +372,14 @@ EOF FNABSC=${FNABSC:-"${FIX_SFC}/${CASE}.maximum_snow_albedo.tileX.nc"} fi FNSMCC=${FNSMCC:-"$FIX_AM/global_soilmgldas.statsgo.t${JCAP}.${LONB}.${LATB}.grb"} - + # If the appropriate resolution fix file is not present, use the highest resolution available (T1534) [[ ! -f $FNALBC ]] && FNALBC="$FIX_AM/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb" [[ ! -f $FNVETC ]] && FNVETC="$FIX_AM/global_vegtype.igbp.t1534.3072.1536.rg.grb" [[ ! -f $FNSOTC ]] && FNSOTC="$FIX_AM/global_soiltype.statsgo.t1534.3072.1536.rg.grb" [[ ! -f $FNABSC ]] && FNABSC="$FIX_AM/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb" [[ ! -f $FNSMCC ]] && FNSMCC="$FIX_AM/global_soilmgldas.statsgo.t1534.3072.1536.grb" - + # NSST Options # nstf_name contains the NSST related parameters # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled @@ -395,30 +395,30 @@ EOF ZSEA2=${ZSEA2:-0} nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} nst_anl=${nst_anl:-".false."} - + # blocking factor used for threading and general physics performance #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi blocksize=${blocksize:-32} - + # the pre-conditioning of the solution # =0 implies no pre-conditioning # >0 means new adiabatic pre-conditioning # <0 means older adiabatic pre-conditioning na_init=${na_init:-1} [[ $warm_start = ".true." ]] && na_init=0 - + # variables for controlling initialization of NCEP/NGGPS ICs filtered_terrain=${filtered_terrain:-".true."} gfs_dwinds=${gfs_dwinds:-".true."} - + # various debug options no_dycore=${no_dycore:-".false."} dycore_only=${adiabatic:-".false."} chksum_debug=${chksum_debug:-".false."} print_freq=${print_freq:-6} - + if [ ${TYPE} = "nh" ]; then # non-hydrostatic options hydrostatic=".false." phys_hydrostatic=".false." # enable heating in hydrostatic balance in non-hydrostatic simulation @@ -428,21 +428,21 @@ EOF else make_nh=".true." # re-initialize non-hydrostatic state fi - + else # hydrostatic options hydrostatic=".true." phys_hydrostatic=".false." # ignored when hydrostatic = T use_hydro_pressure=".false." # ignored when hydrostatic = T make_nh=".false." # running in hydrostatic mode fi - + # Conserve total energy as heat globally consv_te=${consv_te:-1.} # range 0.-1., 1. will restore energy to orig. val. before physics - + # time step parameters in FV3 k_split=${k_split:-2} n_split=${n_split:-6} - + if [ $(echo $MONO | cut -c-4) = "mono" ]; then # monotonic options d_con=${d_con_mono:-"0."} do_vort_damp=".false." @@ -453,7 +453,7 @@ EOF hord_mt=${hord_mt_hydro_mono:-"10"} hord_xx=${hord_xx_hydro_mono:-"10"} fi - + else # non-monotonic options d_con=${d_con_nonmono:-"1."} do_vort_damp=".true." @@ -465,13 +465,13 @@ EOF hord_xx=${hord_xx_hydro_nonmono:-"10"} fi fi - + if [ $(echo $MONO | cut -c-4) != "mono" -a $TYPE = "nh" ]; then vtdm4=${vtdm4_nh_nonmono:-"0.06"} else vtdm4=${vtdm4:-"0.05"} fi - + if [ $warm_start = ".true." ]; then # warm start from restart file nggps_ic=".false." ncep_ic=".false." @@ -482,16 +482,16 @@ EOF else res_latlon_dynamics='""' fi - + else # CHGRES'd GFS analyses nggps_ic=${nggps_ic:-".true."} ncep_ic=${ncep_ic:-".false."} external_ic=".true." mountain=".false." read_increment=".false." - res_latlon_dynamics='""' + res_latlon_dynamics='""' fi - + # Stochastic Physics Options if [ ${SET_STP_SEED:-"YES"} = "YES" ]; then ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1)) @@ -507,7 +507,7 @@ EOF JCAP_STP=${JCAP_STP:-$JCAP_CASE} LONB_STP=${LONB_STP:-$LONB_CASE} LATB_STP=${LATB_STP:-$LATB_CASE} - + #------------------------------------------------------------------ # make symbolic links to write forecast files directly in memdir cd $DATA @@ -517,12 +517,12 @@ EOF $NLN $FIX_AM/qr_acr_qg.dat qr_acr_qg.dat $NLN $FIX_AM/qr_acr_qs.dat qr_acr_qs.dat fi - + affix="nc" if [ "$OUTPUT_FILE" = "nemsio" ]; then affix="nemsio" - fi - + fi + if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then fhr=$FHMIN while [ $fhr -le $FHMAX ]; do @@ -555,7 +555,7 @@ EOF for n in $(seq 1 $ntiles); do eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc - eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc + eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc done @@ -583,13 +583,13 @@ DATM_nml(){ data_out_GFS() { # data in take for FV3GFS - # Arguments: None - # + # Arguments: None + # #------------------------------------------------------------------ # make symbolic links to write forecast files directly in memdir echo "SUB ${FUNCNAME[0]}: copying output data for FV3" #------------------------------------------------------------------ - + if [ $SEND = "YES" ]; then # Copy model restart files if [ $CDUMP = "gdas" -a $restart_interval -gt 0 ]; then @@ -598,7 +598,7 @@ data_out_GFS() { # Only save restarts at single time in RESTART directory # Either at restart_interval or at end of the forecast # if [ $restart_interval -eq 0 -o $restart_interval -eq $FHMAX ]; then - + # Add time-stamp to restart files at FHMAX # RDATE=$($NDATE +$FHMAX $CDATE) # rPDY=$(echo $RDATE | cut -c1-8) @@ -612,29 +612,29 @@ data_out_GFS() { rPDY=$(echo $RDATE | cut -c1-8) rcyc=$(echo $RDATE | cut -c9-10) for file in ${rPDY}.${rcyc}0000.* ; do - $NCP $file $memdir/RESTART/$file + $NCP $file $memdir/RESTART/$file done fi fi - + $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/ - + echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied" } WW3_postdet() { echo "SUB ${FUNCNAME[0]}: Linking input data for WW3" COMPONENTwave=${COMPONENTwave:-${RUN}wave} - + #Link mod_def files for wave grids array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` - + for wavGRD in ${grdALL}; do - $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD + $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD done - + export WAVHCYC=${WAVHCYC:-6} export WRDATE=`$NDATE -${WAVHCYC} $CDATE` export WRPDY=`echo $WRDATE | cut -c1-8` @@ -642,7 +642,7 @@ WW3_postdet() { export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart export datwave=$COMOUTwave/rundata export wavprfx=${CDUMPwave}${WAV_MEMBER} - + #Copy initial condition files: for wavGRD in $waveGRD ; do if [ $RERUN = "NO" ]; then @@ -658,7 +658,7 @@ WW3_postdet() { fi eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD} done - + if [ "$WW3ICEINP" = "YES" ]; then wavicefile=$COMINwave/rundata/${CDUMPwave}.${WAVEICE_FID}.${cycle}.ice if [ ! -f $wavicefile ]; then @@ -668,7 +668,7 @@ WW3_postdet() { fi $NLN ${wavicefile} $DATA/ice.${WAVEICE_FID} fi - + if [ "$WW3CURINP" = "YES" ]; then wavcurfile=$COMINwave/rundata/${CDUMPwave}.${WAVECUR_FID}.${cycle}.cur if [ ! -f $wavcurfile ]; then @@ -678,11 +678,11 @@ WW3_postdet() { fi $NLN $wavcurfile $DATA/current.${WAVECUR_FID} fi - + # Link output files cd $DATA eval $NLN $datwave/${wavprfx}.log.mww3.${PDY}${cyc} log.mww3 - + # Loop for gridded output (uses FHINC) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do @@ -698,7 +698,7 @@ WW3_postdet() { fi fhr=$((fhr+FHINC)) done - + # Loop for point output (uses DTPNT) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do @@ -727,31 +727,31 @@ WW3_out() { CPL_out() { echo "SUB ${FUNCNAME[0]}: Copying output data for general cpl fields" - if [ $esmf_profile = ".true." ]; then - $NCP $DATA/ESMF_Profile.summary $ROTDIR/$CDUMP.$PDY/$cyc/ - fi + if [ $esmf_profile = ".true." ]; then + $NCP $DATA/ESMF_Profile.summary $ROTDIR/$CDUMP.$PDY/$cyc/ + fi } MOM6_postdet() { echo "SUB ${FUNCNAME[0]}: MOM6 after run type determination" - + OCNRES=${OCNRES:-"025"} - + # Copy MOM6 ICs $NCP -pf $ICSDIR/$CDATE/ocn/MOM*nc $DATA/INPUT/ - + # Copy MOM6 fixed files $NCP -pf $FIXmom/$OCNRES/* $DATA/INPUT/ - + # Copy coupled grid_spec $NCP -pf $FIX_DIR/fix_cpl/a${CASE}o${OCNRES}/grid_spec.nc $DATA/INPUT/ - + # Copy mediator restart files to RUNDIR if [ $inistep = 'restart' ]; then $NCP $ROTDIR/$CDUMP.$PDY/$cyc/ufs.cpld*.nc $DATA/ $NCP $ROTDIR/$CDUMP.$PDY/$cyc/rpointer.cpl $DATA/ fi - + echo "SUB ${FUNCNAME[0]}: MOM6 input data linked/copied" } @@ -763,11 +763,11 @@ MOM6_nml() { MOM6_out() { echo "SUB ${FUNCNAME[0]}: Copying output data for MOM6" - + export ENSMEM=${ENSMEM:-01} - + export IDATE=$CDATE - + if [ $RUN_ENVIR = "nco" ]; then export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc} export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc} @@ -776,7 +776,7 @@ MOM6_out() { export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc" fi [[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT - + if [ $inistep = 'cold' ]; then cp $DATA/ufs.cpld.cold.cpl.r.*.nc $COMOUT/ cp $DATA/rpointer.cpl $COMOUT/ @@ -788,14 +788,14 @@ MOM6_out() { else fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') fi - + # copy ocn files for fhr in $fhrlst; do export fhr=$fhr if [[ 10#$fhr -ge 6 ]]; then hh_inc_m=$((10#$FHOUT/2)) hh_inc_o=$((10#$FHOUT )) - + # ------------------------------------------------------ # adjust the dates on the mom filenames and save # ------------------------------------------------------ @@ -805,17 +805,17 @@ MOM6_out() { DD=`echo $VDATE | cut -c7-8` HH=`echo $VDATE | cut -c9-10` SS=$((10#$HH*3600)) - + m_date=$($NDATE -$hh_inc_m $VDATE) p_date=$VDATE - + year=`echo $m_date | cut -c1-4` month=`echo $m_date | cut -c5-6` day=`echo $m_date | cut -c7-8` hh=`echo $m_date | cut -c9-10` - + export ocnfile=ocn_${year}_${month}_${day}_${hh}.nc - + echo "$NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc" $NCP -p $ocnfile $COMOUT/ocn$p_date.$ENSMEM.$IDATE.nc status=$? @@ -830,7 +830,7 @@ MOM6_out() { CICE_postdet() { echo "SUB ${FUNCNAME[0]}: CICE after run type determination" - + year=$(echo $CDATE|cut -c 1-4) month=$(echo $CDATE|cut -c 5-6) day=$(echo $CDATE|cut -c 7-8) @@ -838,56 +838,56 @@ CICE_postdet() { nhours=$($NHOUR $CDATE ${year}010100) steps=$((nhours*stepsperhr)) npt=$((FHMAX*$stepsperhr)) # Need this in order for dump_last to work - + histfreq_n=${histfreq_n:-6} if [ $inistep = 'cold' ]; then dumpfreq_n=${dumpfreq_n:-3600} # restart write interval in seconds, default 1 hour dumpfreq="s" - else + else dumpfreq_n=${dumpfreq_n:-3024000} # restart write interval in seconds, default 35 days dumpfreq=${dumpfreq:-"s"} # "s" or "d" or "m" for restarts at intervals of "seconds", "days" or "months" - fi + fi cice_hist_avg=${cice_hist_avg:-".true."} - + FRAZIL_FWSALT=${FRAZIL_FWSALT:-".true."} ktherm=${ktherm:-1} tfrz_option=${tfrz_option:-"linear_salt"} tr_pond_lvl=${tr_pond_lvl:-".true."} # Use level melt ponds tr_pond_lvl=true - + # restart_pond_lvl (if tr_pond_lvl=true): - # -- if true, initialize the level ponds from restart (if runtype=continue) - # -- if false, re-initialize level ponds to zero (if runtype=initial or continue) - + # -- if true, initialize the level ponds from restart (if runtype=continue) + # -- if false, re-initialize level ponds to zero (if runtype=initial or continue) + #TODO: Determine the proper way to determine if it's a 'hot start' or not - #note this is not mediator cold start or not + #note this is not mediator cold start or not #if [ hotstart ]; then - # #continuing run "hot start" + # #continuing run "hot start" # RUNTYPE='continue' # USE_RESTART_TIME='.true.' - #fi + #fi RUNTYPE='initial' USE_RESTART_TIME='.false.' restart_pond_lvl=${restart_pond_lvl:-".false."} - + ICERES=${ICERES:-"025"} if [ $ICERES = '025' ]; then ICERESdec="0.25" fi if [ $ICERES = '050' ]; then ICERESdec="0.50" - fi + fi if [ $ICERES = '100' ]; then ICERESdec="1.00" fi - + ice_grid_file=${ice_grid_file:-"grid_cice_NEMS_mx${ICERES}.nc"} ice_kmt_file=${ice_kmt_file:-"kmtu_cice_NEMS_mx${ICERES}.nc"} - + iceic="cice_model.res_$CDATE.nc" - - # Copy CICE IC + + # Copy CICE IC $NCP -p $ICSDIR/$CDATE/ice/cice_model_${ICERESdec}.res_$CDATE.nc $DATA/$iceic - + echo "Link CICE fixed files" $NLN -sf $FIXcice/$ICERES/${ice_grid_file} $DATA/ $NLN -sf $FIXcice/$ICERES/${ice_kmt_file} $DATA/ @@ -913,7 +913,7 @@ CICE_out() { else fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/\[/ /g; s/\]/ /g; s/f/ /g; s/,/ /g') fi - + for fhr in $fhrlst; do export fhr=$fhr # -------------------------------------- @@ -942,7 +942,7 @@ CICE_out() { status=$? [[ $status -ne 0 ]] && exit $status fi - done + done fi } @@ -950,14 +950,14 @@ GOCART_rc() { echo "SUB ${FUNCNAME[0]}: Linking input data and copying config files for GOCART" # set input directory containing GOCART input data and configuration files # this variable is platform-dependent and should be set via a YAML file - + # link directory containing GOCART input dataset, if provided if [ ! -z "${CHM_INPDIR}" ]; then $NLN -sf ${CHM_INPDIR} $DATA status=$? [[ $status -ne 0 ]] && exit $status fi - + # copying GOCART configuration files if [ ! -z "${CHM_CFGDIR}" ]; then $NCP ${CHM_CFGDIR}/*.rc $DATA diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 6d55e898091..c37c13f803d 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -1,6 +1,6 @@ -#! /bin/sh +#!/bin/sh -##### +##### ## "forecast_def.sh" ## This script sets value of all variables ## @@ -32,7 +32,7 @@ DATM_predet(){ if [ ! -d $DATA ]; then mkdir -p $DATA; fi if [ ! -d $DATA/DATM_INPUT ]; then mkdir -p $DATA/DATM_INPUT; fi FHMAX=${FHMAX:-9} - # Go to Run Directory (DATA) + # Go to Run Directory (DATA) cd $DATA } @@ -53,10 +53,10 @@ FV3_GFS_predet(){ WRITE_DOPOST=${WRITE_DOPOST:-".false."} restart_interval=${restart_interval:-0} rst_invt1=`echo $restart_interval |cut -d " " -f 1` - + PDY=$(echo $CDATE | cut -c1-8) cyc=$(echo $CDATE | cut -c9-10) - + # Directories. pwd=$(pwd) NWPROD=${NWPROD:-${NWROOT:-$pwd}} @@ -70,13 +70,13 @@ FV3_GFS_predet(){ ROTDIR=${ROTDIR:-$pwd} # rotating archive directory ICSDIR=${ICSDIR:-$pwd} # cold start initial conditions DMPDIR=${DMPDIR:-$pwd} # global dumps for seaice, snow and sst analysis - + # Model resolution specific parameters DELTIM=${DELTIM:-225} layout_x=${layout_x:-8} layout_y=${layout_y:-16} LEVS=${LEVS:-65} - + # Utilities NCP=${NCP:-"/bin/cp -p"} NLN=${NLN:-"/bin/ln -sf"} @@ -84,32 +84,32 @@ FV3_GFS_predet(){ SEND=${SEND:-"YES"} #move final result to rotating directory ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} KEEPDATA=${KEEPDATA:-"NO"} - + # Other options MEMBER=${MEMBER:-"-1"} # -1: control, 0: ensemble mean, >0: ensemble member $MEMBER ENS_NUM=${ENS_NUM:-1} # Single executable runs multiple members (e.g. GEFS) PREFIX_ATMINC=${PREFIX_ATMINC:-""} # allow ensemble to use recentered increment - + # IAU options DOIAU=${DOIAU:-"NO"} IAUFHRS=${IAUFHRS:-0} IAU_DELTHRS=${IAU_DELTHRS:-0} IAU_OFFSET=${IAU_OFFSET:-0} - + # Model specific stuff FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/ufs_model.fd/build} FCSTEXEC=${FCSTEXEC:-ufs_model} PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag} PARM_POST=${PARM_POST:-$HOMEgfs/parm/post} - + # Model config options APRUN_FV3=${APRUN_FV3:-${APRUN_FCST:-${APRUN:-""}}} - #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined + #the following NTHREAD_FV3 line is commented out because NTHREAD_FCST is not defined #and because NTHREADS_FV3 gets overwritten by what is in the env/${macine}.env #file and the value of npe_node_fcst is not correctly defined when using more than #one thread and sets NTHREADS_FV3=1 even when the number of threads is appropraitely >1 #NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}} - NTHREADS_FV3=${nth_fv3:-1} + NTHREADS_FV3=${nth_fv3:-1} cores_per_node=${cores_per_node:-${npe_node_fcst:-24}} ntiles=${ntiles:-6} if [ $MEMBER -lt 0 ]; then @@ -117,10 +117,10 @@ FV3_GFS_predet(){ else NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} fi - + TYPE=${TYPE:-"nh"} # choices: nh, hydro MONO=${MONO:-"non-mono"} # choices: mono, non-mono - + QUILTING=${QUILTING:-".true."} OUTPUT_GRID=${OUTPUT_GRID:-"gaussian_grid"} OUTPUT_FILE=${OUTPUT_FILE:-"nemsio"} @@ -128,9 +128,9 @@ FV3_GFS_predet(){ WRITE_FSYNCFLAG=${WRITE_FSYNCFLAG:-".true."} affix="nemsio" [[ "$OUTPUT_FILE" = "netcdf" ]] && affix="nc" - + rCDUMP=${rCDUMP:-$CDUMP} - + #------------------------------------------------------------------ # setup the runtime environment if [ $machine = "WCOSS_C" ] ; then @@ -143,7 +143,7 @@ FV3_GFS_predet(){ export NC_BLKSZ=${NC_BLKSZ:-"4M"} export IOBUF_PARAMS="*nemsio:verbose:size=${WRTIOBUF},*:verbose:size=${NC_BLKSZ}" fi - + #------------------------------------------------------- if [ ! -d $ROTDIR ]; then mkdir -p $ROTDIR; fi mkdata=NO @@ -153,7 +153,7 @@ FV3_GFS_predet(){ fi cd $DATA || exit 8 mkdir -p $DATA/INPUT - + #------------------------------------------------------------------ # changeable parameters # dycore definitions @@ -164,7 +164,7 @@ FV3_GFS_predet(){ npz=$((LEVS-1)) io_layout="1,1" #ncols=$(( (${npx}-1)*(${npy}-1)*3/2 )) - + # spectral truncation and regular grid resolution based on FV3 resolution JCAP_CASE=$((2*res-2)) LONB_CASE=$((4*res)) @@ -172,14 +172,14 @@ FV3_GFS_predet(){ if [ $LATB_CASE -eq 192 ]; then LATB_CASE=190 # berror file is at this resolution fi - + JCAP=${JCAP:-$JCAP_CASE} LONB=${LONB:-$LONB_CASE} LATB=${LATB:-$LATB_CASE} - + LONB_IMO=${LONB_IMO:-$LONB_CASE} LATB_JMO=${LATB_JMO:-$LATB_CASE} - + # NSST Options # nstf_name contains the NSST related parameters # nstf_name(1) : NST_MODEL (NSST Model) : 0 = OFF, 1 = ON but uncoupled, 2 = ON and coupled @@ -195,24 +195,24 @@ FV3_GFS_predet(){ ZSEA2=${ZSEA2:-0} nstf_name=${nstf_name:-"$NST_MODEL,$NST_SPINUP,$NST_RESV,$ZSEA1,$ZSEA2"} nst_anl=${nst_anl:-".false."} - - + + # blocking factor used for threading and general physics performance #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi blocksize=${blocksize:-32} - + # variables for controlling initialization of NCEP/NGGPS ICs filtered_terrain=${filtered_terrain:-".true."} gfs_dwinds=${gfs_dwinds:-".true."} - + # various debug options no_dycore=${no_dycore:-".false."} dycore_only=${adiabatic:-".false."} chksum_debug=${chksum_debug:-".false."} print_freq=${print_freq:-6} - + #------------------------------------------------------- if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART @@ -221,7 +221,7 @@ FV3_GFS_predet(){ else mkdir -p $DATA/RESTART fi - + #------------------------------------------------------- # member directory if [ $MEMBER -lt 0 ]; then @@ -235,13 +235,13 @@ FV3_GFS_predet(){ fi memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar if [ ! -d $memdir ]; then mkdir -p $memdir; fi - + GDATE=$($NDATE -$assim_freq $CDATE) gPDY=$(echo $GDATE | cut -c1-8) gcyc=$(echo $GDATE | cut -c9-10) gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar sCDATE=$($NDATE -3 $CDATE) - + if [[ "$DOIAU" = "YES" ]]; then sCDATE=$($NDATE -3 $CDATE) sPDY=$(echo $sCDATE | cut -c1-8) @@ -255,7 +255,7 @@ FV3_GFS_predet(){ tPDY=$sPDY tcyc=$cyc fi - + echo "SUB ${FUNCNAME[0]}: pre-determination variables set" } diff --git a/ush/nems.configure.atm.IN b/ush/nems.configure.atm.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.atm_aer.IN b/ush/nems.configure.atm_aer.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.blocked_atm_wav.IN b/ush/nems.configure.blocked_atm_wav.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.cpld.IN b/ush/nems.configure.cpld.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.cpld_wave.IN b/ush/nems.configure.cpld_wave.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.leapfrog_atm_wav.IN b/ush/nems.configure.leapfrog_atm_wav.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.medcold_atm_ocn_ice.IN b/ush/nems.configure.medcold_atm_ocn_ice.IN old mode 100755 new mode 100644 diff --git a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN old mode 100755 new mode 100644 diff --git a/ush/parsing_model_configure_DATM.sh b/ush/parsing_model_configure_DATM.sh index c3fb5d1ac52..92716c564e6 100755 --- a/ush/parsing_model_configure_DATM.sh +++ b/ush/parsing_model_configure_DATM.sh @@ -1,6 +1,6 @@ #! /bin/sh -##### +##### ## "parsing_model_configure_DATM.sh" ## This script writes model configure file ## for DATM model @@ -33,7 +33,7 @@ atm_coupling_interval_sec: ${coupling_interval_fast_sec} iatm: ${IATM} jatm: ${JATM} cdate0: ${CDATE} -nfhout: ${NFHOUT} +nfhout: ${NFHOUT} filename_base: ${DATM_FILENAME_BASE} EOF echo "$(cat model_configure)" diff --git a/ush/parsing_model_configure_FV3.sh b/ush/parsing_model_configure_FV3.sh index f58594fe0a4..e7594da5c78 100755 --- a/ush/parsing_model_configure_FV3.sh +++ b/ush/parsing_model_configure_FV3.sh @@ -1,6 +1,6 @@ #! /bin/sh -##### +##### ## "parsing_model_configure_FV3.sh" ## This script writes model configure file ## for FV3 model diff --git a/ush/parsing_namelists_CICE.sh b/ush/parsing_namelists_CICE.sh index 5dd2b15a45c..0f5eb438fc6 100755 --- a/ush/parsing_namelists_CICE.sh +++ b/ush/parsing_namelists_CICE.sh @@ -4,12 +4,12 @@ CICE_namelists(){ if [ $warm_start = ".true." ]; then cmeps_run_type='continue' -else +else cmeps_run_type='initial' fi -cat > ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < ice_in < input.nml <> input.nml << EOF grid_type = -1 - make_nh = $make_nh + make_nh = $make_nh fv_debug = ${fv_debug:-".false."} range_warn = ${range_warn:-".true."} reset_eta = .false. - n_sponge = ${n_sponge:-"10"} + n_sponge = ${n_sponge:-"10"} nudge_qv = ${nudge_qv:-".true."} nudge_dz = ${nudge_dz:-".false."} tau = ${tau:-10.} rf_cutoff = ${rf_cutoff:-"7.5e2"} - d2_bg_k1 = ${d2_bg_k1:-"0.15"} - d2_bg_k2 = ${d2_bg_k2:-"0.02"} + d2_bg_k1 = ${d2_bg_k1:-"0.15"} + d2_bg_k2 = ${d2_bg_k2:-"0.02"} kord_tm = ${kord_tm:-"-9"} kord_mt = ${kord_mt:-"9"} kord_wz = ${kord_wz:-"9"} @@ -128,14 +128,14 @@ cat >> input.nml << EOF p_fac = 0.1 k_split = $k_split n_split = $n_split - nwat = ${nwat:-2} + nwat = ${nwat:-2} na_init = $na_init d_ext = 0. - dnats = ${dnats:-0} + dnats = ${dnats:-0} fv_sg_adj = ${fv_sg_adj:-"450"} d2_bg = 0. - nord = ${nord:-3} - dddmp = ${dddmp:-0.1} + nord = ${nord:-3} + dddmp = ${dddmp:-0.1} d4_bg = ${d4_bg:-0.15} vtdm4 = $vtdm4 delt_max = ${delt_max:-"0.002"} @@ -148,15 +148,15 @@ cat >> input.nml << EOF mountain = $mountain ncep_ic = $ncep_ic d_con = $d_con - hord_mt = $hord_mt + hord_mt = $hord_mt hord_vt = $hord_xx hord_tm = $hord_xx - hord_dp = -$hord_xx - hord_tr = ${hord_tr:-"8"} + hord_dp = -$hord_xx + hord_tr = ${hord_tr:-"8"} adjust_dry_mass = ${adjust_dry_mass:-".true."} dry_mass=${dry_mass:-98320.0} consv_te = $consv_te - do_sat_adj = ${do_sat_adj:-".false."} + do_sat_adj = ${do_sat_adj:-".false."} consv_am = .false. fill = .true. dwind_2d = .false. @@ -181,12 +181,12 @@ cat >> input.nml << EOF &gfs_physics_nml fhzero = $FHZER - h2o_phys = ${h2o_phys:-".true."} + h2o_phys = ${h2o_phys:-".true."} ldiag3d = ${ldiag3d:-".false."} - fhcyc = $FHCYC + fhcyc = $FHCYC use_ufo = ${use_ufo:-".true."} pre_rad = ${pre_rad:-".false."} - imp_physics = ${imp_physics:-"99"} + imp_physics = ${imp_physics:-"99"} EOF case "${CCPP_SUITE:-}" in @@ -199,8 +199,8 @@ EOF "FV3_GSD_v0") cat >> input.nml << EOF iovr = ${iovr:-"3"} - ltaerosol = ${ltaerosol:-".F."} - lradar = ${lradar:-".F."} + ltaerosol = ${ltaerosol:-".F."} + lradar = ${lradar:-".F."} ttendlim = ${ttendlim:-0.005} oz_phys = ${oz_phys:-".false."} oz_phys_2015 = ${oz_phys_2015:-".true."} @@ -208,9 +208,9 @@ EOF do_mynnedmf = ${do_mynnedmf:-".false."} do_mynnsfclay = ${do_mynnsfclay:-".false."} icloud_bl = ${icloud_bl:-"1"} - bl_mynn_edmf = ${bl_mynn_edmf:-"1"} + bl_mynn_edmf = ${bl_mynn_edmf:-"1"} bl_mynn_tkeadvect=${bl_mynn_tkeadvect:-".true."} - bl_mynn_edmf_mom=${bl_mynn_edmf_mom:-"1"} + bl_mynn_edmf_mom=${bl_mynn_edmf_mom:-"1"} min_lakeice = ${min_lakeice:-"0.15"} min_seaice = ${min_seaice:-"0.15"} EOF @@ -263,19 +263,19 @@ cat >> input.nml <> input.nml <> input.nml <> input.nml < $DATA/INPUT/MOM_input rm $DATA/INPUT/MOM_input_template_$OCNRES -#data table for runoff: +#data table for runoff: DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} $NCP $DATA_TABLE $DATA/data_table_template sed -e "s/FRUNOFF/$FRUNOFF/g" $DATA/data_table_template > $DATA/data_table From 0ef2da8bed14e5c2fff9a064b3301b1b68a8edea Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 6 Aug 2021 23:35:02 -0400 Subject: [PATCH 25/33] fix more trailing spaces in the scripts added --- ush/WAM_XML_to_ASCII.pl | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ush/WAM_XML_to_ASCII.pl b/ush/WAM_XML_to_ASCII.pl index 3c7a9ff6316..8eb5dedfe87 100755 --- a/ush/WAM_XML_to_ASCII.pl +++ b/ush/WAM_XML_to_ASCII.pl @@ -1,4 +1,4 @@ -#! /usr/bin/env perl +#!/usr/bin/env perl use strict; use warnings; @@ -14,20 +14,20 @@ # write XML Data to file -open (MYFILE, ">", "wam_input.asc") +open (MYFILE, ">", "wam_input.asc") or die "Can't Open MYFILE: $!"; - + print MYFILE "Issue Date ", $data->{'issue-date'}, "\n"; print MYFILE "F10 81 Day Avg ", $data->{'f10-81-avg-currentday'}, " \n"; print MYFILE "Flags: 0=Forecast, 1=Estimated, 2=Observed \n\n"; - + printf MYFILE " Date_Time F10 Kp F10Flag KpFlag \n"; printf MYFILE "----------------------------------------------------------------------- \n"; - + my $counter = 0; while ($counter < 56) { - printf MYFILE "%s%12g%12g%12g%12g \n", + printf MYFILE "%s%12g%12g%12g%12g \n", $data->{'data-item'}->[$counter]->{'time-tag'}, $data->{'data-item'}->[$counter]->{'f10'}, $data->{'data-item'}->[$counter]->{'kp'}, @@ -36,6 +36,5 @@ $counter +=1; } -close (MYFILE); - +close (MYFILE); From 9275915d56bd20b912b501d24633a194f2f166a6 Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 9 Aug 2021 15:44:52 -0500 Subject: [PATCH 26/33] fix typo update do_ugwp --- ush/forecast_postdet.sh | 2 +- ush/parsing_namelists_FV3.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index d3df34a16c8..e1a671cd07e 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -150,7 +150,7 @@ EOF nfiles=$(ls -1 $DATA/INPUT/* | wc -l) if [ $nfiles -le 0 ]; then echo SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT! - msg=”"SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT!" + msg="SUB ${FUNCNAME[0]}: Initial conditions must exist in $DATA/INPUT, ABORT!" postmsg "$jlogfile" "$msg" exit 1 fi diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index e67ad40aaae..2495bbdea5e 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -399,7 +399,7 @@ EOF 2) cat >> input.nml << EOF gwd_opt = 2 - do_ugwp = .true. + do_ugwp = .false. do_ugwp_v0 = .false. do_ugwp_v1 = .true. do_tofd = .false. From 093509813b8454ab68d3e2317e4fcabe2fd88860 Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 9 Aug 2021 15:48:46 -0500 Subject: [PATCH 27/33] update if logic of MEMBER to DO_SPPT; DO_SHUM, DO_SKEB --- ush/parsing_namelists_FV3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 2495bbdea5e..b5a707a0764 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -552,7 +552,8 @@ EOF # Add namelist for stochastic physics options echo "" >> input.nml -if [ $MEMBER -gt 0 ]; then +#if [ $MEMBER -gt 0 ]; then +if [ $DO_SPPT = .true. -o $DO_SHUM = .true. -o $DO_SKEB = .true. ]; then cat >> input.nml << EOF &nam_stochy From b39280f694ec6b90ff907e09a91ba56b38cdda47 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Mon, 9 Aug 2021 18:24:29 -0400 Subject: [PATCH 28/33] fix fcst tasks issue for gdas and gfs. fix ocnres to 050 --- env/ORION.env | 2 +- parm/config/config.base.emc.dyn | 2 +- parm/config/config.fcst | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/env/ORION.env b/env/ORION.env index 5837e9b620d..19a4a8e0304 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -131,7 +131,7 @@ elif [ $step = "fcst" ]; then export NTHREADS_FV3=${nth_fv3:-$nth_max} [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_fcst_gfs" + export APRUN_FV3="$launcher -n $ntasks_fcst" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index fdcfeaddfa3..b59485adc6e 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -148,7 +148,7 @@ export LEVS=128 export CASE="@CASECTL@" export CASE_ENKF="@CASEENS@" export ICERES=025 -export OCNRES=025 +export OCNRES=050 # Surface cycle update frequency if [[ "$CDUMP" == "gdas" ]] ; then diff --git a/parm/config/config.fcst b/parm/config/config.fcst index 1dfb569ad2c..acdbd42636d 100755 --- a/parm/config/config.fcst +++ b/parm/config/config.fcst @@ -103,6 +103,9 @@ export ICEPETS="80" export WAVPETS="160" export CHMPETS="1700" +[[ "$CDUMP" = "gfs" ]] && ntasks_fcst=$npe_fcst_gfs || ntasks_fcst=$npe_fcst +export ntasks_fcst + ####################################################################### # Model configuration export TYPE="nh" From b3119f34188e82f7b965f474fec58a28149ba5e5 Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 9 Aug 2021 23:13:25 -0500 Subject: [PATCH 29/33] update ENV file for efcs job --- env/ORION.env | 2 +- parm/config/config.efcs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/env/ORION.env b/env/ORION.env index 19a4a8e0304..029753a2a14 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -148,7 +148,7 @@ elif [ $step = "efcs" ]; then export NTHREADS_FV3=${nth_efcs:-$nth_max} [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher" + export APRUN_FV3="$launcher -n $ntasks_efcs" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max diff --git a/parm/config/config.efcs b/parm/config/config.efcs index 94b9df1840b..03075126dbe 100755 --- a/parm/config/config.efcs +++ b/parm/config/config.efcs @@ -18,6 +18,7 @@ if [ $QUILTING = ".true." ]; then export npe_efcs=$npe_fv3 fi +export ntasks_efcs=$npe_efcs # Number of enkf members per fcst job export NMEM_EFCSGRP=2 export RERUN_EFCSGRP="NO" From 06b411cf37059fa55692df26f61fc6ffa3b729be Mon Sep 17 00:00:00 2001 From: jikuang Date: Mon, 9 Aug 2021 23:20:39 -0500 Subject: [PATCH 30/33] properly design DIAG_TABLE and DIAG_TABLE_APPEND --- parm/config/config.fcst | 8 ++++---- ush/parsing_namelists_FV3.sh | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parm/config/config.fcst b/parm/config/config.fcst index acdbd42636d..aec1d510539 100755 --- a/parm/config/config.fcst +++ b/parm/config/config.fcst @@ -269,7 +269,7 @@ if [[ "$CDUMP" == "gdas" ]] ; then # GDAS cycle specific parameters # Variables used in DA cycling if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then - export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_aod" + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_da" else export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_da_orig" fi @@ -300,7 +300,7 @@ elif [[ "$CDUMP" == "gfs" ]] ; then # GFS cycle specific parameters # Write more variables to output if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then - export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_aod" + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table" else export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_orig" fi @@ -340,13 +340,13 @@ elif [[ "$CDUMP" == "gfs" ]] ; then # GFS cycle specific parameters fi if [ $DO_AERO = "YES" ]; then # temporary settings for aerosol coupling - export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_aer" + export DIAG_TABLE_APPEND="$HOMEgfs/parm/parm_fv3diag/diag_table_aer" export FIELD_TABLE="$HOMEgfs/parm/parm_fv3diag/field_table_aer" export CHM_CFGDIR="not_set" export CHM_INPDIR="not_set" export dnats="$(( $dnats + 0 ))" elif [[ $DO_COUPLED = "YES" ]] ; then # coupled model - export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_cpl" + export DIAG_TABLE_APPEND="$HOMEgfs/parm/parm_fv3diag/diag_table_cpl" fi # Remember config.efcs will over-ride these values for ensemble forecasts diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index b5a707a0764..59f3e8afa8f 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -11,8 +11,8 @@ FV3_namelists(){ # copy over the tables -DIAG_TABLE_BASE=${DIAG_TABLE_BASE:-$PARM_FV3DIAG/diag_table} -DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table_aod} +DIAG_TABLE=${DIAG_TABLE:-$PARM_FV3DIAG/diag_table} +DIAG_TABLE_APPEND=${DIAG_TABLE_APPEND:-$PARM_FV3DIAG/diag_table_aod} DATA_TABLE=${DATA_TABLE:-$PARM_FV3DIAG/data_table} FIELD_TABLE=${FIELD_TABLE:-$PARM_FV3DIAG/field_table} @@ -22,18 +22,18 @@ cat > diag_table << EOF FV3 Forecast ${gPDY:0:4} ${gPDY:4:2} ${gPDY:6:2} ${gcyc} 0 0 EOF -cat $DIAG_TABLE_BASE >> diag_table +cat $DIAG_TABLE >> diag_table else cat > diag_table << EOF FV3 Forecast ${sPDY:0:4} ${sPDY:4:2} ${sPDY:6:2} ${scyc} 0 0 EOF -cat $DIAG_TABLE_BASE >> diag_table +cat $DIAG_TABLE >> diag_table fi # Append AOD diag table for MERRA2 if [ $IAER = "1011" ]; then - cat $DIAG_TABLE >> diag_table + cat $DIAG_TABLE_APPEND >> diag_table fi $NCP $DATA_TABLE data_table From ef9cf2c122c03816ae487201d798ec25f23a3319 Mon Sep 17 00:00:00 2001 From: jikuang Date: Tue, 10 Aug 2021 18:43:26 -0500 Subject: [PATCH 31/33] update stochastic parameters move OCNRES to config.fv3 --- parm/config/config.base.emc.dyn | 1 - parm/config/config.fv3 | 7 +++++++ ush/forecast_postdet.sh | 12 +++++++++--- ush/parsing_namelists_FV3.sh | 14 +++++++------- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index b59485adc6e..663a3815e2e 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -148,7 +148,6 @@ export LEVS=128 export CASE="@CASECTL@" export CASE_ENKF="@CASEENS@" export ICERES=025 -export OCNRES=050 # Surface cycle update frequency if [[ "$CDUMP" == "gdas" ]] ; then diff --git a/parm/config/config.fv3 b/parm/config/config.fv3 index 13362980885..15928424939 100755 --- a/parm/config/config.fv3 +++ b/parm/config/config.fv3 @@ -51,6 +51,7 @@ case $case_in in export WRITE_GROUP_GFS=1 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="1M" + export OCNRES=100 ;; "C96") export DELTIM=720 @@ -69,6 +70,7 @@ case $case_in in export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="4M" export n_split=6 + export OCNRES=100 ;; "C192") export DELTIM=450 @@ -86,6 +88,7 @@ case $case_in in export WRITE_GROUP_GFS=2 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="8M" + export OCNRES=050 ;; "C384") export DELTIM=240 @@ -103,6 +106,7 @@ case $case_in in export WRITE_GROUP_GFS=2 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="16M" + export OCNRES=025 ;; "C768") export DELTIM=150 @@ -120,6 +124,7 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "2*$npe_node_max" |bc) export WRTIOBUF="32M" + export OCNRES=025 ;; "C1152") export DELTIM=120 @@ -137,6 +142,7 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "2*$npe_node_max" |bc) export WRTIOBUF="48M" + export OCNRES=025 ;; "C3072") export DELTIM=90 @@ -154,6 +160,7 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "3*$npe_node_max" |bc) export WRTIOBUF="64M" + export OCNRES=050 ;; *) echo "grid $case_in not supported, ABORT!" diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index e1a671cd07e..46e62d72d54 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -501,9 +501,15 @@ EOF else ISEED=${ISEED:-0} fi - DO_SKEB=${DO_SKEB:-".false."} - DO_SPPT=${DO_SPPT:-".false."} - DO_SHUM=${DO_SHUM:-".false."} + if [ $DO_SKEB = "YES" ]; then + do_skeb=".true." + fi + if [ $DO_SPPT = "YES" ]; then + do_sppt=".true." + fi + if [ $DO_SHUM = "YES" ]; then + do_shum=".true." + fi JCAP_STP=${JCAP_STP:-$JCAP_CASE} LONB_STP=${LONB_STP:-$LONB_CASE} LATB_STP=${LATB_STP:-$LATB_CASE} diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 59f3e8afa8f..46bb76cb273 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -328,9 +328,9 @@ EOF fi cat >> input.nml <> input.nml #if [ $MEMBER -gt 0 ]; then -if [ $DO_SPPT = .true. -o $DO_SHUM = .true. -o $DO_SKEB = .true. ]; then +if [ $do_sppt = .true. -o $do_shum = .true. -o $do_skeb = .true. ]; then cat >> input.nml << EOF &nam_stochy EOF - if [ $DO_SKEB = ".true." ]; then + if [ $do_skeb = ".true." ]; then cat >> input.nml << EOF skeb = $SKEB iseed_skeb = ${ISEED_SKEB:-$ISEED} @@ -571,7 +571,7 @@ EOF EOF fi - if [ $DO_SHUM = ".true." ]; then + if [ $do_shum = ".true." ]; then cat >> input.nml << EOF shum = $SHUM iseed_shum = ${ISEED_SHUM:-$ISEED} @@ -580,7 +580,7 @@ EOF EOF fi - if [ $DO_SPPT = ".true." ]; then + if [ $do_sppt = ".true." ]; then cat >> input.nml << EOF sppt = $SPPT iseed_sppt = ${ISEED_SPPT:-$ISEED} From 2eae221c1bc23543635651fe33f258b524df0af5 Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 11 Aug 2021 10:09:12 -0500 Subject: [PATCH 32/33] address changes requested by group members move OCNRES to config.fcst use DO_* switches to control parsing_namelists_FV3.sh eliminate duplicated variable ntasks_efcs --- env/ORION.env | 2 +- parm/config/config.efcs | 1 - parm/config/config.fcst | 20 ++++++++++++++++---- parm/config/config.fv3 | 7 ------- ush/parsing_namelists_FV3.sh | 8 ++++---- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/env/ORION.env b/env/ORION.env index 029753a2a14..5909f3a1148 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -148,7 +148,7 @@ elif [ $step = "efcs" ]; then export NTHREADS_FV3=${nth_efcs:-$nth_max} [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $ntasks_efcs" + export APRUN_FV3="$launcher -n $npe_efcs" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max diff --git a/parm/config/config.efcs b/parm/config/config.efcs index 03075126dbe..94b9df1840b 100755 --- a/parm/config/config.efcs +++ b/parm/config/config.efcs @@ -18,7 +18,6 @@ if [ $QUILTING = ".true." ]; then export npe_efcs=$npe_fv3 fi -export ntasks_efcs=$npe_efcs # Number of enkf members per fcst job export NMEM_EFCSGRP=2 export RERUN_EFCSGRP="NO" diff --git a/parm/config/config.fcst b/parm/config/config.fcst index aec1d510539..632d3466900 100755 --- a/parm/config/config.fcst +++ b/parm/config/config.fcst @@ -103,8 +103,11 @@ export ICEPETS="80" export WAVPETS="160" export CHMPETS="1700" -[[ "$CDUMP" = "gfs" ]] && ntasks_fcst=$npe_fcst_gfs || ntasks_fcst=$npe_fcst -export ntasks_fcst +if [ "$CDUMP" = "gfs" ]; then + export ntasks_fcst=$npe_fcst_gfs +else + export ntasks_fcst=$npe_fcst +fi ####################################################################### # Model configuration @@ -340,15 +343,24 @@ elif [[ "$CDUMP" == "gfs" ]] ; then # GFS cycle specific parameters fi if [ $DO_AERO = "YES" ]; then # temporary settings for aerosol coupling - export DIAG_TABLE_APPEND="$HOMEgfs/parm/parm_fv3diag/diag_table_aer" + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_aer" export FIELD_TABLE="$HOMEgfs/parm/parm_fv3diag/field_table_aer" export CHM_CFGDIR="not_set" export CHM_INPDIR="not_set" export dnats="$(( $dnats + 0 ))" elif [[ $DO_COUPLED = "YES" ]] ; then # coupled model - export DIAG_TABLE_APPEND="$HOMEgfs/parm/parm_fv3diag/diag_table_cpl" + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_cpl" fi +case "$CASE" in + "C48") export OCNRES=100;; + "C96") export OCNRES=100;; + "C192") export OCNRES=050;; + "C384") export OCNRES=025;; + "C768") export OCNRES=025;; + *) export OCNRES=025;; +esac + # Remember config.efcs will over-ride these values for ensemble forecasts # if these variables are re-defined there. # Otherwise, the ensemble forecast will inherit from config.fcst diff --git a/parm/config/config.fv3 b/parm/config/config.fv3 index 15928424939..13362980885 100755 --- a/parm/config/config.fv3 +++ b/parm/config/config.fv3 @@ -51,7 +51,6 @@ case $case_in in export WRITE_GROUP_GFS=1 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="1M" - export OCNRES=100 ;; "C96") export DELTIM=720 @@ -70,7 +69,6 @@ case $case_in in export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="4M" export n_split=6 - export OCNRES=100 ;; "C192") export DELTIM=450 @@ -88,7 +86,6 @@ case $case_in in export WRITE_GROUP_GFS=2 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="8M" - export OCNRES=050 ;; "C384") export DELTIM=240 @@ -106,7 +103,6 @@ case $case_in in export WRITE_GROUP_GFS=2 export WRTTASK_PER_GROUP_GFS=$npe_node_max export WRTIOBUF="16M" - export OCNRES=025 ;; "C768") export DELTIM=150 @@ -124,7 +120,6 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "2*$npe_node_max" |bc) export WRTIOBUF="32M" - export OCNRES=025 ;; "C1152") export DELTIM=120 @@ -142,7 +137,6 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "2*$npe_node_max" |bc) export WRTIOBUF="48M" - export OCNRES=025 ;; "C3072") export DELTIM=90 @@ -160,7 +154,6 @@ case $case_in in export WRITE_GROUP_GFS=4 export WRTTASK_PER_GROUP_GFS=$(echo "3*$npe_node_max" |bc) export WRTIOBUF="64M" - export OCNRES=050 ;; *) echo "grid $case_in not supported, ABORT!" diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 46bb76cb273..dd08d30a01f 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -553,13 +553,13 @@ EOF # Add namelist for stochastic physics options echo "" >> input.nml #if [ $MEMBER -gt 0 ]; then -if [ $do_sppt = .true. -o $do_shum = .true. -o $do_skeb = .true. ]; then +if [ $DO_SPPT = "YES" -o $DO_SHUM = "YES" -o $DO_SKEB = "YES" ]; then cat >> input.nml << EOF &nam_stochy EOF - if [ $do_skeb = ".true." ]; then + if [ $DO_SKEB = "YES" ]; then cat >> input.nml << EOF skeb = $SKEB iseed_skeb = ${ISEED_SKEB:-$ISEED} @@ -571,7 +571,7 @@ EOF EOF fi - if [ $do_shum = ".true." ]; then + if [ $DO_SHUM = "YES" ]; then cat >> input.nml << EOF shum = $SHUM iseed_shum = ${ISEED_SHUM:-$ISEED} @@ -580,7 +580,7 @@ EOF EOF fi - if [ $do_sppt = ".true." ]; then + if [ $DO_SPPT = "YES" ]; then cat >> input.nml << EOF sppt = $SPPT iseed_sppt = ${ISEED_SPPT:-$ISEED} From d7d3f90290931685f6060396602ad9fc7a63578e Mon Sep 17 00:00:00 2001 From: jikuang Date: Wed, 11 Aug 2021 11:55:41 -0500 Subject: [PATCH 33/33] remove obsolete parameters PE_MEMBER1 and total_member --- ush/parsing_model_configure_DATM.sh | 2 -- ush/parsing_model_configure_FV3.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/ush/parsing_model_configure_DATM.sh b/ush/parsing_model_configure_DATM.sh index 92716c564e6..a2e7c8c9185 100755 --- a/ush/parsing_model_configure_DATM.sh +++ b/ush/parsing_model_configure_DATM.sh @@ -14,9 +14,7 @@ DATM_model_configure(){ rm -f model_configure cat > model_configure <> model_configure <