Skip to content

Commit

Permalink
Merge branch 'develop' into feature/mathomp4/571-update-regress
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrabenh authored Feb 21, 2024
2 parents 91789ce + 94e3cbf commit db69cd9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 6 additions & 2 deletions AGCM.rc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ CLOSURE_CONGESTUS: 3
@HIST_GOCARTCA.br::CA.brphilic default
@HIST_GOCARTCA.oc::CA.ocphilic default
@HIST_GOCARTNI::NO3an1 "NI::NO3an2,NI::NO3an3"
@HIST_GOCARTPCHEM::OX default
@HIST_GOCARTPCHEM::OX default
@HIST_GOCART::
@HIST_GOCART###########################################################

Expand Down Expand Up @@ -905,6 +905,10 @@ USE_SATSIM_RADAR: @RADAR_SATSIM
USE_SATSIM_LIDAR: @LIDAR_SATSIM
USE_SATSIM_MISR: @MISR_SATSIM

# Flags to enable wave code
# -------------------------
USE_WAVES: 0

@COUPLED INTERPOLATE_ATMLM: 0
@COUPLED INTERPOLATE_ATMTAU: 1
@COUPLED INTERPOLATE_OCEAN_ICE_CURRENTS: 0
Expand All @@ -929,7 +933,7 @@ USE_SATSIM_MISR: @MISR_SATSIM
@MOM5#DATA_SST_FILE: sst.data
@MOM5#DATA_FRT_FILE: fraci.data

@COUPLED
@COUPLED
@COUPLED# Section for CICE
@COUPLED# -----------------
@CICE4USE_CICE_Thermo: 1
Expand Down
13 changes: 7 additions & 6 deletions gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ end
# -----------------------
set USE_WAVES = `grep '^\s*USE_WAVES:' AGCM.rc| cut -d: -f2`
set wavemodel = `cat WGCM.rc | grep "wave_model:" | cut -d "#" -f1 | cut -d ":" -f 2 | sed 's/\s//g'`
set wavewatch = `$USE_WAVES != 0 && $wavemodel == "WW3"`

# Copy Restarts to Scratch Directory
# ----------------------------------
Expand All @@ -644,7 +645,7 @@ else
end

# WW3 restart file
if( $wavemodel == "WW3" ) then
if( $wavewatch ) then
set rst_ww3 = "restart.ww3"
if(-e $EXPDIR/${rst_ww3} ) /bin/cp $EXPDIR/${rst_ww3} . &
endif
Expand Down Expand Up @@ -679,7 +680,7 @@ if($numrs == 0) then
wait
@COUPLED cp -r $EXPDIR/RESTART ${EXPDIR}/restarts/RESTART.${edate}
# WW3 restart file
if( $wavemodel == "WW3" ) then
if( $wavewatch ) then
set rst_ww3 = "restart.ww3"
if( -e ${rst_ww3} ) cp ${rst_ww3} ${EXPDIR}/restarts/$EXPID.${rst_ww3}.${edate}.${GCMVER}.${BCTAG}_${BCRSLV}
endif
Expand Down Expand Up @@ -839,7 +840,7 @@ endif

# Set WW3 start date and time
# ---------------------------
if ( $USE_WAVES != 0 && $wavemodel == "WW3" ) then
if( $wavewatch ) then
cp ww3_multi.nml ww3_multi.nml.orig
awk '{$1=$1};1' < ww3_multi.nml.orig > ww3_multi.nml

Expand Down Expand Up @@ -1318,15 +1319,15 @@ end

# WW3 restarts - assumes that there is at least one NEW restart file
# ------------------------------------------------------------------
if( $wavemodel == "WW3" ) then
if( $wavewatch ) then

set ww3checkpoint = `/bin/ls -1 restart[0-9][0-9][0-9].ww3 | sort -n | tail -n 1`
set rst_ww3 = "restart.ww3"
if ( $#ww3checkpoint != 0 ) /bin/mv -f $ww3checkpoint $rst_ww3
cp $rst_ww3 ${EXPDIR}/restarts/$EXPID.${rst_ww3}.${edate}.${GCMVER}.${BCTAG}_${BCRSLV}.bin

# remove intermediate restarts
set ww3checkpoint = `/bin/ls -1 restart[0-9][0-9][0-9].ww3 | sort -n | tail -n 1`
set ww3checkpoint = `/bin/ls -1 restart[0-9][0-9][0-9].ww3 | sort -n | tail -n 1`
if ( $#ww3checkpoint != 0 ) /bin/rm ./restart[0-9][0-9][0-9].ww3
endif

Expand Down Expand Up @@ -1437,7 +1438,7 @@ else
wait
cp cap_restart $EXPDIR/cap_restart

if( $wavemodel == "WW3" ) then
if( $wavewatch ) then
set rst_ww3 = "restart.ww3"
/bin/rm -f $EXPDIR/$rst_ww3
cp $rst_ww3 $EXPDIR/$rst_ww3 &
Expand Down

0 comments on commit db69cd9

Please sign in to comment.