Skip to content

Commit

Permalink
Merge branch 'develop' into feature/jkolassa_disable_cn45
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrabenh authored Feb 21, 2024
2 parents 76707fb + 1db085a commit 4046b15
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 44 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 @@ -904,6 +904,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 @@ -928,7 +932,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
61 changes: 25 additions & 36 deletions gcm_regress.j
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ if( $RUN_STARTSTOP == TRUE ) then

# Some replay runs also have checkpoints like mkiau_checkpoint.20150509_2200z.nc4
# and we need to move those as well if they exist
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
# Need also make another variable storing all the mkiau_checkpoint files
set complete_startstop_replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
foreach chk ( $replay_chk_file_names )
Expand Down Expand Up @@ -533,7 +533,7 @@ end

# Some replay runs also have checkpoints like mkiau_checkpoint.20150509_2200z.nc4
# and we need to move those as well if they exist
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
# Need also make another variable storing all the replay checkpoint files
set complete_layout_replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
foreach chk ( $replay_chk_file_names )
Expand Down Expand Up @@ -631,7 +631,7 @@ if ($RUN_STARTSTOP == TRUE) then

# Some replay runs also have checkpoints like mkiau_checkpoint.20150509_2200z.nc4
# and we need to move those as well if they exist
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
foreach chk ( $replay_chk_file_names )
/bin/mv -v $chk ${chk}.${nymde1}_${nhmse1}.3
end
Expand Down Expand Up @@ -692,6 +692,7 @@ if ( $RUN_LAYOUT == TRUE) then
/bin/mv CAP.rc CAP.tmp
cat CAP.tmp | sed -e "s?$oldstring?$newstring?g" > CAP.rc

# Set the new NX and NY
./strip AGCM.rc
set oldstring = `cat AGCM.rc | grep "^ *NX:"`
set newstring = "NX: ${test_NX}"
Expand All @@ -701,6 +702,17 @@ if ( $RUN_LAYOUT == TRUE) then
set newstring = "NY: ${test_NY}"
/bin/mv AGCM.rc AGCM.tmp
cat AGCM.tmp | sed -e "s?$oldstring?$newstring?g" > AGCM.rc

# Set the new number of writers and readers
set oldstring = `cat AGCM.rc | grep "^ *NUM_WRITERS:"`
set newstring = "NUM_WRITERS: 6"
/bin/mv AGCM.rc AGCM.tmp
cat AGCM.tmp | sed -e "s?$oldstring?$newstring?g" > AGCM.rc
set oldstring = `cat AGCM.rc | grep "^ *NUM_READERS:"`
set newstring = "NUM_READERS: 6"
/bin/mv AGCM.rc AGCM.tmp
cat AGCM.tmp | sed -e "s?$oldstring?$newstring?g" > AGCM.rc

@COUPLED set oldstring = `cat AGCM.rc | grep "^ *OGCM.NX:"`
@COUPLED set newstring = "OGCM.NX: ${test_NY}"
@COUPLED /bin/mv AGCM.rc AGCM.tmp
Expand Down Expand Up @@ -733,7 +745,7 @@ if ( $RUN_LAYOUT == TRUE) then

# Some replay runs also have checkpoints like mkiau_checkpoint.20150509_2200z.nc4
# and we need to move those as well if they exist
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
set replay_chk_file_names = `ls -1 mkiau_checkpoint.*.nc4`
foreach chk ( $replay_chk_file_names )
/bin/mv -v $chk ${chk}.${nymde1}_${nhmse1}.4
end
Expand All @@ -749,6 +761,9 @@ if ( $RUN_LAYOUT == TRUE) then

endif

# Set the comparison command for netCDF-4 files
set NCCMP = `echo ${BASEDIR}/${ARCH}/bin/nccmp -dmfgBq `

#######################################################################
# Compare Restarts
# for start stop regression
Expand All @@ -759,8 +774,6 @@ endif

if ($RUN_STARTSTOP == TRUE) then

set NCCMP = `echo ${BASEDIR}/${ARCH}/bin/nccmp -dmfgBq `

if( -e startstop_regress_test ) /bin/rm startstop_regress_test

echo "=== Comparing restarts from ${NX0}x${NY0} run of duration ${test_duration_step1} with restarts from ${test_duration_step2} + ${test_duration_step3} ${NX0}x${NY0} runs ==="
Expand All @@ -777,8 +790,8 @@ if ($RUN_STARTSTOP == TRUE) then
if( $check == true ) then
echo Comparing ${chk}

# compare binary checkpoint files
cmp $file1 $file2
# compare NetCDF-4 checkpoint files
${NCCMP} $file1 $file2
if( $status == 0 ) then
echo Start-Stop Success!
echo " "
Expand All @@ -788,17 +801,6 @@ if ($RUN_STARTSTOP == TRUE) then
set startstop_pass = false
endif

# compare NetCDF-4 checkpoint files
# ${NCCMP} $file1 $file2
# if( status == 0 ) then
# echo Start-Stop Success!
# echo " "
# else
# echo Start-Stop Failed!
# echo " "
# set startstop_pass = false
# endif

endif
endif
end
Expand Down Expand Up @@ -897,8 +899,6 @@ endif

if ($RUN_LAYOUT == TRUE) then

set NCCMP = `echo ${BASEDIR}/${ARCH}/bin/nccmp -dmfgBq `

if( -e layout_regress_test ) /bin/rm layout_regress_test

echo "=== Comparing restarts from ${NX0}x${NY0} run of duration ${test_duration_step2} with restarts from ${test_NX}x${test_NY} run of duration ${test_duration_step4} ==="
Expand All @@ -915,8 +915,8 @@ if ($RUN_LAYOUT == TRUE) then
if( $check == true ) then
echo Comparing ${chk}

# compare binary checkpoint files
cmp $file1 $file2
# compare NetCDF-4 checkpoint files
${NCCMP} $file1 $file2
if( $status == 0 ) then
echo Layout Success!
echo " "
Expand All @@ -926,17 +926,6 @@ if ($RUN_LAYOUT == TRUE) then
set layout_pass = false
endif

# compare NetCDF-4 checkpoint files
# ${NCCMP} $file1 $file2
# if( status == 0 ) then
# echo Layout Success!
# echo " "
# else
# echo Layout Failed!
# echo " "
# set layout_pass = false
# endif

endif
endif
end
Expand Down Expand Up @@ -971,7 +960,7 @@ if ($RUN_LAYOUT == TRUE) then
if( $check == true ) then
echo Comparing ${chk}

# compare checkpoint files
# compare checkpoint files
${NCCMP} $file1 $file2
if( $status == 0 ) then
echo Layout Success!
Expand All @@ -997,7 +986,7 @@ if ($RUN_LAYOUT == TRUE) then
if( $check == true ) then
echo Comparing ${hist}

# compare history files
# compare history files
${NCCMP} $file1 $file2
if( $status == 0 ) then
echo Layout Success!
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 4046b15

Please sign in to comment.