diff --git a/Externals_coupled.cfg b/Externals_coupled.cfg index 00045eb381e..4baa183c230 100644 --- a/Externals_coupled.cfg +++ b/Externals_coupled.cfg @@ -1,5 +1,5 @@ [ufs-s2s-model] -tag = s2s_prototype4.0 +tag = ufss2s_cmeps_v0.7 local_path = sorc/fv3_coupled.fd repo_url = https://github.com/ufs-community/ufs-s2s-model protocol = git diff --git a/README.md b/README.md index e3a33c3086a..acf2a53c5fe 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ or For Orion: First make sure you have python loaded: module load contrib -module load rocoto +module load rocoto #Make sure to use 1.3.2 module load intelpython3 and then replace ORION with HERA in the commands above. diff --git a/jobs/JWAVE_POST_SBS b/jobs/JWAVE_POST_SBS index 66676b0eae8..f1a10366415 100755 --- a/jobs/JWAVE_POST_SBS +++ b/jobs/JWAVE_POST_SBS @@ -56,7 +56,10 @@ export COMOUT=${COMOUT:-${COMOUTwave}/${COMPONENTwave}.${PDY}/${cyc}} mkdir -p $COMOUT/gridded mkdir -p $COMOUT/station -mkdir -p $COMOUT/stats + +# Set mpi serial command +export wavempexec=${launcher:-"mpirun -n"} +export wave_mpmd=${mpmd:-"cfp"} env | sort diff --git a/modulefiles/modulefile.reg2grb2.orion b/modulefiles/modulefile.reg2grb2.orion index 17f16a34488..c5e8ffb9a00 100644 --- a/modulefiles/modulefile.reg2grb2.orion +++ b/modulefiles/modulefile.reg2grb2.orion @@ -2,13 +2,11 @@ # reg2grb2 - orion ############################################################# export FCOMP=ifort -module load intel/2020 +module load intel/2018.4 module load netcdf/4.7.2 module load ip/3.0.2 module load sp/2.0.3 module load w3nco/2.0.7 module load bacio/2.0.3 module load landsfcutil/2.2.0 -module use -a /apps/contrib/NCEPLIBS/orion/modulefiles module load wgrib/2.0.8 -export WGRIB2_ROOT=/apps/contrib/NCEPLIBS/orion/NCEPLIBS/NCEPLIBS-external/build5/wgrib2/grib2 diff --git a/parm/mom6/MOM_input_025 b/parm/mom6/MOM_input_025 index 56ca33fc705..d977f6f298a 100644 --- a/parm/mom6/MOM_input_025 +++ b/parm/mom6/MOM_input_025 @@ -187,6 +187,7 @@ DTFREEZE_DP = -7.75E-08 ! [deg C Pa-1] default = 0.0 ! temperature with pressure. ! === module MOM_restart === +RESTART_CHECKSUMS_REQUIRED = False PARALLEL_RESTARTFILES = True ! [Boolean] default = False ! If true, each processor writes its own restart file, ! otherwise a single restart file is generated diff --git a/parm/mom6/MOM_input_025_wav b/parm/mom6/MOM_input_025_wav index 71e077bfeac..28a40975755 100644 --- a/parm/mom6/MOM_input_025_wav +++ b/parm/mom6/MOM_input_025_wav @@ -187,6 +187,7 @@ DTFREEZE_DP = -7.75E-08 ! [deg C Pa-1] default = 0.0 ! temperature with pressure. ! === module MOM_restart === +RESTART_CHECKSUMS_REQUIRED = False PARALLEL_RESTARTFILES = True ! [Boolean] default = False ! If true, each processor writes its own restart file, ! otherwise a single restart file is generated diff --git a/sorc/build_fv3_coupled.sh b/sorc/build_fv3_coupled.sh index 88cf75fe654..d33992c74cc 100755 --- a/sorc/build_fv3_coupled.sh +++ b/sorc/build_fv3_coupled.sh @@ -16,7 +16,12 @@ if [ ! -d "../exec" ]; then mkdir ../exec fi +if [ $target = hera ]; then target=hera.intel ; fi +if [ $target = orion ]; then target=orion.intel ; fi + +cd fv3_coupled.fd/ +FV3=$( pwd -P )/FV3 +cd tests/ +./compile.sh "$FV3" "$target" "CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y WW3=Y CMEPS=Y" 1 +mv -f fcst_1.exe ../NEMS/exe/nems_fv3_ccpp_mom6_cice5_ww3.x -cd fv3_coupled.fd/NEMS -make -j 8 app=coupledFV3_CCPP_MOM6_CICE_WW3 build -mv ./exe/NEMS.x ./exe/nems_fv3_ccpp_mom6_cice5_ww3.x diff --git a/sorc/machine-setup.sh b/sorc/machine-setup.sh index d0b93b95ee0..e1176242270 100644 --- a/sorc/machine-setup.sh +++ b/sorc/machine-setup.sh @@ -24,14 +24,14 @@ if [[ -d /work ]] ; then # We are on MSU Orion if ( ! eval module help > /dev/null 2>&1 ) ; then echo load the module command 1>&2 - source /apps/lmod/init/$__ms_shell + source /apps/lmod/lmod/init/$__ms_shell fi target=orion module purge module load intel/2018.4 module load impi/2018.4 export NCEPLIBS=/apps/contrib/NCEPLIBS/orion - export WRFPATH=$NCEPLIBS/wrf.shared.new/v1.1.1/src + #export WRFPATH=$NCEPLIBS/wrf.shared.new/v1.1.1/src module use $NCEPLIBS/modulefiles export myFC=mpiifort export FCOMP=mpiifort diff --git a/sorc/reg2grb2.fd/regdiag.f b/sorc/reg2grb2.fd/regdiag.f index 1130ce94768..89c3847b654 100755 --- a/sorc/reg2grb2.fd/regdiag.f +++ b/sorc/reg2grb2.fd/regdiag.f @@ -377,7 +377,7 @@ subroutine diag(im,jm,km,icefile,ocnfile, & ! check why fac=-8.64e6 for evap minus precip !------------------------------------------------------------------- data fac/ 0.0, 0.001,1.0,1.0, 1.0, 1.0, 1.0,1.0,1.0,1.0, & - 1.0,273.15,1.0,1.0,-8.64e6, 1.0, 1.0,1.0,1.0,1.0, & + 1.0,273.15,1.0,1.0,-8.64e3, 1.0, 1.0,1.0,1.0,1.0, & 1.0, 1.0,1.0,1.0, 1.0, 1.0, 1.0,1.0,1.0,1.0, & 1.0, 1.0,1.0,1.0, 1.0, 1.0, 1.0/ @@ -784,10 +784,11 @@ subroutine diag(im,jm,km,icefile,ocnfile, & endif ! pme if (nv.eq.15) then - varsfc=pme + varsfc=lprec-evap !pme do j=1,jm do i=1,im - if (varsfc(i,j) .LE. spv_pme) varsfc(i,j)=undef +! if (varsfc(i,j) .LE. spv_pme) varsfc(i,j)=undef + if (lprec(i,j) .LE. spv_pme) varsfc(i,j)=undef enddo enddo endif diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 48ff14a7f73..a991d285909 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -598,7 +598,8 @@ MOM6_postdet() # Copy mediator restart files to RUNDIR if [ $inistep = 'restart' ]; then - $NCP $ROTDIR/$CDUMP.$PDY/$cyc/mediator_* $DATA/ + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/ufs.s2s*.nc $DATA/ + $NCP $ROTDIR/$CDUMP.$PDY/$cyc/rpointer.cpl $DATA/ fi echo "SUB ${FUNCNAME[0]}: MOM6 input data linked/copied" @@ -629,7 +630,8 @@ MOM6_out() [[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT if [ $inistep = 'cold' ]; then - cp $DATA/mediator_* $COMOUT/ + cp $DATA/ufs.s2s.cold.cpl.r.*.nc $COMOUT/ + cp $DATA/rpointer.cpl $COMOUT/ status=$? exit $status else diff --git a/ush/nems.configure.med_atm_ocn_ice.IN b/ush/nems.configure.med_atm_ocn_ice.IN index 29cfe492d20..973a49cecfd 100755 --- a/ush/nems.configure.med_atm_ocn_ice.IN +++ b/ush/nems.configure.med_atm_ocn_ice.IN @@ -11,12 +11,6 @@ EARTH_attributes:: # MED # MED_model: @[med_model] MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = 0 - DumpFields = @[DumpFields] - DumpRHs = false - coldstart = @[coldstart] - restart_interval = 0 :: # ATM # @@ -25,6 +19,8 @@ ATM_petlist_bounds: @[atm_petlist_bounds] ATM_attributes:: Verbosity = 0 DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true :: # OCN # @@ -33,7 +29,9 @@ OCN_petlist_bounds: @[ocn_petlist_bounds] OCN_attributes:: Verbosity = 0 DumpFields = @[DumpFields] - restart_interval = 0 + ProfileMemory = false + OverwriteSlice = true + dbug_flag = 0 :: # ICE # @@ -42,27 +40,59 @@ ICE_petlist_bounds: @[ice_petlist_bounds] ICE_attributes:: Verbosity = 0 DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + dbug_flag = 0 :: -# Run Sequence # +# CMEPS warm run sequence runSeq:: - @@[CPL_SLOW] - MED MedPhase_prep_ocn - MED -> OCN :remapMethod=redist - OCN - @@[CPL_FAST] - MED MedPhase_prep_ice - MED MedPhase_prep_atm - MED -> ATM :remapMethod=redist - MED -> ICE :remapMethod=redist - ATM - ICE - ATM -> MED :remapMethod=redist - ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast - @ - OCN -> MED :remapMethod=redist - MED MedPhase_write_restart - @ +@@[CPL_SLOW] + MED med_phases_prep_ocn_accum_avg + MED -> OCN :remapMethod=redist + OCN + @@[CPL_FAST] + MED med_phases_prep_atm + MED med_phases_prep_ice + MED -> ATM :remapMethod=redist + MED -> ICE :remapMethod=redist + ATM + ICE + ATM -> MED :remapMethod=redist + 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_profile + @ + OCN -> MED :remapMethod=redist + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = .true. +:: +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 = nems_orig +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = startup + case_name = ufs.s2s + restart_n = @[restart_interval_hours] + restart_option = nhours + restart_ymd = -999 :: diff --git a/ush/nems.configure.med_atm_ocn_ice_wav.IN b/ush/nems.configure.med_atm_ocn_ice_wav.IN old mode 100755 new mode 100644 index 3a4ffe040d0..239ab765fe4 --- a/ush/nems.configure.med_atm_ocn_ice_wav.IN +++ b/ush/nems.configure.med_atm_ocn_ice_wav.IN @@ -11,13 +11,6 @@ EARTH_attributes:: # MED # MED_model: @[med_model] MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = 0 - DumpFields = @[DumpFields] - DumpRHs = false - coldstart = false - restart_interval = 0 - ProfileMemory = false :: # ATM # @@ -27,7 +20,7 @@ ATM_attributes:: Verbosity = 0 DumpFields = @[DumpFields] ProfileMemory = false - OverwriteSlice = false + OverwriteSlice = true :: # OCN # @@ -36,9 +29,9 @@ OCN_petlist_bounds: @[ocn_petlist_bounds] OCN_attributes:: Verbosity = 0 DumpFields = @[DumpFields] - restart_interval = 0 ProfileMemory = false - OverwriteSlice = false + OverwriteSlice = true + dbug_flag = 0 :: # ICE # @@ -48,10 +41,11 @@ ICE_attributes:: Verbosity = 0 DumpFields = @[DumpFields] ProfileMemory = false - OverwriteSlice = false + OverwriteSlice = true + dbug_flag = 0 :: -# WAV # +# WAV # WAV_model: @[wav_model] WAV_petlist_bounds: @[wav_petlist_bounds] WAV_attributes:: @@ -59,31 +53,60 @@ WAV_attributes:: OverwriteSlice = false :: -# Run Sequence # +# CMEPS warm run sequence runSeq:: - @@[CPL_SLOW] - MED MedPhase_prep_ocn - MED -> OCN :remapMethod=redist - OCN -> WAV - WAV -> OCN :srcMaskValues=1 - OCN - @@[CPL_FAST] - MED MedPhase_prep_ice - MED MedPhase_prep_atm - MED -> ATM :remapMethod=redist - MED -> ICE :remapMethod=redist - WAV -> ATM :srcMaskValues=1 - ATM -> WAV - ICE -> WAV - ATM - ICE - WAV - ATM -> MED :remapMethod=redist - ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast - @ - OCN -> MED :remapMethod=redist - MED MedPhase_write_restart - @ +@@[CPL_SLOW] + MED med_phases_prep_ocn_accum_avg + MED -> OCN :remapMethod=redist + OCN -> WAV + WAV -> OCN :srcMaskValues=1 + OCN + @@[CPL_FAST] + 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 + 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_profile + @ + OCN -> MED :remapMethod=redist + MED med_phases_restart_write +@ +:: + +# CMEPS variables + +DRIVER_attributes:: + mediator_read_restart = .true. +:: +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 = nems_orig +:: +ALLCOMP_attributes:: + ScalarFieldCount = 2 + ScalarFieldIdxGridNX = 1 + ScalarFieldIdxGridNY = 2 + ScalarFieldName = cpl_scalars + start_type = startup + case_name = ufs.s2s + restart_n = @[restart_interval_hours] + restart_option = nhours + restart_ymd = -999 :: diff --git a/ush/nems.configure.med_atm_ocn_ice_wav1way.IN b/ush/nems.configure.med_atm_ocn_ice_wav1way.IN deleted file mode 100755 index 3e68f691cf1..00000000000 --- a/ush/nems.configure.med_atm_ocn_ice_wav1way.IN +++ /dev/null @@ -1,78 +0,0 @@ -############################################# -#### NEMS Run-Time Configuration File ##### -############################################# - -# EARTH # -EARTH_component_list: MED ATM OCN ICE WAV -EARTH_attributes:: - Verbosity = max -:: - -# MED # -MED_model: @[med_model] -MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = max - DumpFields = false - DumpRHs = false - coldstart = false - restart_interval = 0 -:: - -# ATM # -ATM_model: @[atm_model] -ATM_petlist_bounds: @[atm_petlist_bounds] -ATM_attributes:: - Verbosity = max - DumpFields = false -:: - -# OCN # -OCN_model: @[ocn_model] -OCN_petlist_bounds: @[ocn_petlist_bounds] -OCN_attributes:: - Verbosity = max - DumpFields = true - restart_interval = 9999999 -:: - -# ICE # -ICE_model: @[ice_model] -ICE_petlist_bounds: @[ice_petlist_bounds] -ICE_attributes:: - Verbosity = max - DumpFields = false -:: - -# WAV # -WAV_model: @[wav_model] -WAV_petlist_bounds: @[wav_petlist_bounds] -WAV_attributes:: - Verbosity = max - DumpFields = false -:: - -# Run Sequence # -runSeq:: - @@[coupling_interval_slow_sec] - MED MedPhase_prep_ocn - MED -> OCN :remapMethod=redist - ATM -> WAV - OCN - WAV - @@[coupling_interval_fast_sec] - MED MedPhase_prep_ice - MED MedPhase_prep_atm - MED -> ATM :remapMethod=redist - MED -> ICE :remapMethod=redist - ATM - ICE - ATM -> MED :remapMethod=redist - ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast - @ - OCN -> MED :remapMethod=redist - MED MedPhase_write_restart - @ -:: diff --git a/ush/nems.configure.med_atm_ocn_ice_wav1waywcurr.IN b/ush/nems.configure.med_atm_ocn_ice_wav1waywcurr.IN deleted file mode 100755 index 84f2ad8878d..00000000000 --- a/ush/nems.configure.med_atm_ocn_ice_wav1waywcurr.IN +++ /dev/null @@ -1,79 +0,0 @@ -############################################# -#### NEMS Run-Time Configuration File ##### -############################################# - -# EARTH # -EARTH_component_list: MED ATM OCN ICE WAV -EARTH_attributes:: - Verbosity = max -:: - -# MED # -MED_model: @[med_model] -MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = max - DumpFields = false - DumpRHs = false - coldstart = false - restart_interval = 0 -:: - -# ATM # -ATM_model: @[atm_model] -ATM_petlist_bounds: @[atm_petlist_bounds] -ATM_attributes:: - Verbosity = max - DumpFields = false -:: - -# OCN # -OCN_model: @[ocn_model] -OCN_petlist_bounds: @[ocn_petlist_bounds] -OCN_attributes:: - Verbosity = max - DumpFields = false - restart_interval = 9999999 -:: - -# ICE # -ICE_model: @[ice_model] -ICE_petlist_bounds: @[ice_petlist_bounds] -ICE_attributes:: - Verbosity = max - DumpFields = false -:: - -# WAV # -WAV_model: @[wav_model] -WAV_petlist_bounds: @[wav_petlist_bounds] -WAV_attributes:: - Verbosity = max - DumpFields = false -:: - -# Run Sequence # -runSeq:: - @@[coupling_interval_slow_sec] - MED MedPhase_prep_ocn - MED -> OCN :remapMethod=redist - ATM -> WAV - OCN -> WAV - OCN - WAV - @@[coupling_interval_fast_sec] - MED MedPhase_prep_ice - MED MedPhase_prep_atm - MED -> ATM :remapMethod=redist - MED -> ICE :remapMethod=redist - ATM - ICE - ATM -> MED :remapMethod=redist - ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast - @ - OCN -> MED :remapMethod=redist - MED MedPhase_write_restart - @ -:: 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 index 72471e2bc5e..e74920d7098 --- a/ush/nems.configure.medcold_atm_ocn_ice.IN +++ b/ush/nems.configure.medcold_atm_ocn_ice.IN @@ -11,12 +11,6 @@ EARTH_attributes:: # MED # MED_model: @[med_model] MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = 0 - DumpFields = false - DumpRHs = false - coldstart = @[coldstart] - restart_interval = 0 :: # ATM # @@ -24,7 +18,9 @@ ATM_model: @[atm_model] ATM_petlist_bounds: @[atm_petlist_bounds] ATM_attributes:: Verbosity = 0 - DumpFields = false + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true :: # OCN # @@ -32,8 +28,10 @@ OCN_model: @[ocn_model] OCN_petlist_bounds: @[ocn_petlist_bounds] OCN_attributes:: Verbosity = 0 - DumpFields = false - restart_interval = 0 + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + dbug_flag = 0 :: # ICE # @@ -41,27 +39,60 @@ ICE_model: @[ice_model] ICE_petlist_bounds: @[ice_petlist_bounds] ICE_attributes:: Verbosity = 0 - DumpFields = false + DumpFields = @[DumpFields] + ProfileMemory = false + OverwriteSlice = true + dbug_flag = 0 :: -# Coldstart Run Sequence # +# CMEPS cold run sequence + runSeq:: @@[CPL_SLOW] @@[CPL_FAST] - MED MedPhase_prep_atm + MED med_phases_prep_atm MED -> ATM :remapMethod=redist ATM ATM -> MED :remapMethod=redist - MED MedPhase_prep_ice + MED med_phases_prep_ice MED -> ICE :remapMethod=redist ICE ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast + MED med_fraction_set + MED med_phases_prep_ocn_map + MED med_phases_prep_ocn_merge + MED med_phases_prep_ocn_accum_fast @ - MED MedPhase_prep_ocn + 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.s2s.cold + restart_n = 1 + restart_option = nhours + restart_ymd = -999 :: diff --git a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN index 12eaa9cc231..7e8629bf3c6 100644 --- a/ush/nems.configure.medcold_atm_ocn_ice_wav.IN +++ b/ush/nems.configure.medcold_atm_ocn_ice_wav.IN @@ -11,12 +11,6 @@ EARTH_attributes:: # MED # MED_model: @[med_model] MED_petlist_bounds: @[med_petlist_bounds] -MED_attributes:: - Verbosity = 0 - DumpFields = false - DumpRHs = false - coldstart = true - ProfileMemory = false :: # ATM # @@ -24,9 +18,9 @@ ATM_model: @[atm_model] ATM_petlist_bounds: @[atm_petlist_bounds] ATM_attributes:: Verbosity = 0 - DumpFields = false + DumpFields = @[DumpFields] ProfileMemory = false - OverwriteSlice = false + OverwriteSlice = true :: # OCN # @@ -34,10 +28,10 @@ OCN_model: @[ocn_model] OCN_petlist_bounds: @[ocn_petlist_bounds] OCN_attributes:: Verbosity = 0 - DumpFields = false + DumpFields = @[DumpFields] ProfileMemory = false - restart_n=0 - OverwriteSlice = false + OverwriteSlice = true + dbug_flag = 0 :: # ICE # @@ -45,9 +39,10 @@ ICE_model: @[ice_model] ICE_petlist_bounds: @[ice_petlist_bounds] ICE_attributes:: Verbosity = 0 - DumpFields = false + DumpFields = @[DumpFields] ProfileMemory = false - OverwriteSlice = false + OverwriteSlice = true + dbug_flag = 0 :: # WAV # @@ -58,31 +53,60 @@ WAV_attributes:: OverwriteSlice = false :: +# CMEPS cold run sequence -# Run Sequence # runSeq:: @@[CPL_SLOW] OCN -> WAV - WAV -> OCN :srcMaskValues=1 + WAV -> OCN ::srcMaskValues=1 @@[CPL_FAST] - MED MedPhase_prep_atm + MED med_phases_prep_atm MED -> ATM :remapMethod=redist WAV -> ATM :srcMaskValues=1 ATM ATM -> WAV ATM -> MED :remapMethod=redist - MED MedPhase_prep_ice + MED med_phases_prep_ice MED -> ICE :remapMethod=redist ICE - ICE -> WAV + ICE -> WAV WAV ICE -> MED :remapMethod=redist - MED MedPhase_atm_ocn_flux - MED MedPhase_accum_fast + MED med_fraction_set + MED med_phases_prep_ocn_map + MED med_phases_prep_ocn_merge + MED med_phases_prep_ocn_accum_fast @ - MED MedPhase_prep_ocn + 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.s2s.cold + restart_n = 1 + restart_option = nhours + restart_ymd = -999 :: diff --git a/ush/nems_configure.sh b/ush/nems_configure.sh index 4573a8fa504..840cb685d7f 100755 --- a/ush/nems_configure.sh +++ b/ush/nems_configure.sh @@ -32,44 +32,18 @@ ICE_model=${ICE_model:-'cice'} WAV_model=${WAV_model:-'ww3'} ATMPETS=${ATMPETS:-8} +MEDPETS=${MEDPETS:-8} OCNPETS=${OCNPETS:-8} ICEPETS=${ICEPETS:-8} WAVPETS=${WAVPETS:-8} rm -f $DATA/nems.configure -med_petlist_bounds=${med_petlist_bounds:-"0 $(( $ATMPETS-1 ))"} -atm_petlist_bounds=${atm_petlist_bounds:-"0 $(( $ATMPETS-1 ))"} #6*8*6+wrtgrps(24) -ocn_petlist_bounds=${ocn_petlist_bounds:-"$ATMPETS $(( $ATMPETS+$OCNPETS-1 ))"} #120 -ice_petlist_bounds=${ice_petlist_bounds:-"$(( $ATMPETS+$OCNPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS-1 ))"} #48 -wav_petlist_bounds=${wav_petlist_bounds:-"$(( $ATMPETS+$OCNPETS+$ICEPETS )) $(( $ATMPETS+$OCNPETS+$ICEPETS+$WAVPETS-1 ))"} #48 - -#if [ $CASE = "C96" ] ; then -# med_petlist_bounds=${med_petlist_bounds:-'0 149'} -# atm_petlist_bounds=${atm_petlist_bounds:-'0 149'} -# ocn_petlist_bounds=${ocn_petlist_bounds:-'150 389'} -# ice_petlist_bounds=${ice_petlist_bounds:-'390 509'} -#elif [ $CASE = "C384" ] ; then - # This is 4x8 layout * 6 - worked - #MED_petlist_bounds=${MED_petlist_bounds:-'0 263'} - #ATM_petlist_bounds=${ATM_petlist_bounds:-'0 263'} #192+wrtgrps(72) - #OCN_petlist_bounds=${OCN_petlist_bounds:-'264 503'} #240 - #ICE_petlist_bounds=${ICE_petlist_bounds:-'504 623'} #120 - -# med_petlist_bounds=${med_petlist_bounds:-'0 311'} -# atm_petlist_bounds=${atm_petlist_bounds:-'0 311'} #6*8*6+wrtgrps(24) -# ocn_petlist_bounds=${ocn_petlist_bounds:-'312 431'} #120 -# ice_petlist_bounds=${ice_petlist_bounds:-'432 479'} #48 - - # This is 6x12 layout * 6 = 432 + 72 # didn't work - #MED_petlist_bounds=${MED_petlist_bounds:-'0 503'} - #ATM_petlist_bounds=${ATM_petlist_bounds:-'0 503'} #432+wrtgrps(72) - #OCN_petlist_bounds=${OCN_petlist_bounds:-'504 743'} #240 - #ICE_petlist_bounds=${ICE_petlist_bounds:-'744 863'} #120 -#else -# echo "$CASE not supported for coupled yet" - # $CASE can only run standalone model -#fi +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 ))"} # Copy the selected template into run directory cp $SCRIPTDIR/nems.configure.$confignamevarfornems.IN tmp1 @@ -79,6 +53,11 @@ 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 @@ -86,6 +65,7 @@ if [ $cplflx = .true. ]; then sed -i -e "s;@\[restart_interval\];$restart_interval;g" tmp1 sed -i -e "s;@\[CPL_SLOW\];$CPL_SLOW;g" tmp1 sed -i -e "s;@\[CPL_FAST\];$CPL_FAST;g" tmp1 + sed -i -e "s;@\[restart_interval_hours\];$restart_interval_nems;g" tmp1 fi if [ $cplwav = .true. ]; then sed -i -e "s;@\[wav_model\];ww3;g" tmp1 @@ -100,5 +80,67 @@ if [ $cplchem = .true. ]; then 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/fv3_coupled.fd/CMEPS/mediator/fd_nems.yaml fd_nems.yaml + +fi + echo "SUB ${FUNCNAME[0]}: Nems configured for $confignamevarfornems" + } diff --git a/ush/parsing_namelists_CICE.sh b/ush/parsing_namelists_CICE.sh index 88de147a850..26e7527cdaa 100644 --- a/ush/parsing_namelists_CICE.sh +++ b/ush/parsing_namelists_CICE.sh @@ -85,7 +85,7 @@ cat > ice_in < ice_in <