Skip to content

Commit

Permalink
add function in run_all.sh, fix issue with TAG ...
Browse files Browse the repository at this point in the history
  • Loading branch information
pmathiot committed Mar 30, 2020
1 parent eec9991 commit 20ecca0
Show file tree
Hide file tree
Showing 27 changed files with 213 additions and 267 deletions.
2 changes: 1 addition & 1 deletion FILTERS/filter_grid-T
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--cnk_dmn deptht,1 --cnk_dmn time_counter,1 --cnk_dmn x,200 --cnk_dmn y,200 -v (^thetao$)+,(^votemper$),(^so$)+,(^vosaline$)+,(^zos$)+,(^sossheig$)+,(^somxzint1$)+,(^sokaraml$)+,(^hfds$)+,(^sohefldo$)+,(^soicecov$)+
--cnk_dmn deptht,1 --cnk_dmn time_counter,1 --cnk_dmn x,200 --cnk_dmn y,200 -v (^thetao$)+,(^votemper$)+,(^so$)+,(^vosaline$)+,(^zos$)+,(^sossheig$)+,(^somxzint1$)+,(^sokaraml$)+,(^hfds$)+,(^sohefldo$)+,(^soicecov$)+
3 changes: 3 additions & 0 deletions OBS/AMHT_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = L. Jackson
mean = 1.2
std = 0.2
3 changes: 3 additions & 0 deletions OBS/AMOC_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = L. Jackson
mean = 17.5
std = 2.5
3 changes: 3 additions & 0 deletions OBS/ANT_sie02_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 3
std = 1
3 changes: 3 additions & 0 deletions OBS/ANT_sie09_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 18.5
std = 1.5
3 changes: 3 additions & 0 deletions OBS/ARC_sie03_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 15.3
std = 1.0
3 changes: 3 additions & 0 deletions OBS/ARC_sie09_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 6.3
std = 1
3 changes: 3 additions & 0 deletions OBS/NWC_sst_mean_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 12.1
std = 1.
3 changes: 3 additions & 0 deletions OBS/SO_sst_mean_obs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ref = P. Mathiot
mean = 7.4403515925274846
std = 1.
1 change: 0 additions & 1 deletion SCRIPT/common.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

# create repository
DATPATH=${SCRATCH}/ACC/$CONFIG/$RUNID/
if [ ! -d $DATPATH ]; then mkdir -p $DATPATH ; fi

# check mesh mask
Expand Down
2 changes: 1 addition & 1 deletion SCRIPT/get_data.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

if [ $FREQ == '5d' ]; then FILE_LST=`moo ls moose:/crum/$RUNID/${CRUM_FREQ}.nc.file/*_${FREQ}_${GRID}_${TAG}.nc`
elif [ $FREQ == 'i1m' ]; then FILE_LST=`moo ls moose:/crum/$RUNID/${CRUM_FREQ}.nc.file/*_1m_${TAG}.nc`
else FILE_LST=`moo ls moose:/crum/$RUNID/${CRUM_FREQ}.nc.file/*_${FREQ}_${TAG}_${GRID}.nc`;
else FILE_LST=`moo ls moose:/crum/$RUNID/${CRUM_FREQ}.nc.file/*_${FREQ}_${TAG}*_${GRID}.nc`;
fi

for MFILE in `echo ${FILE_LST}`; do
Expand Down
12 changes: 6 additions & 6 deletions SCRIPT/mk_bot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-${GRID}

# check presence of input file
FILE=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
FILE=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-${GRID}.nc`
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make bot
Expand All @@ -36,23 +36,23 @@ $CDFPATH/cdfbottom -f $FILE -nc4 -o tmp_$FILEOUT
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfbottom; exit"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ;
echo "error when running cdfbottom; exit"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ;
exit 1
fi

# Amundsen avg (CDW)
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v '|thetao|votemper|' -p T -var -w 710 741 202 266 0 0 -minmax -o AMU_thetao_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (AMU)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (AMU)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi

# WRoss avg (bottom water)
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v '|so|vosaline|' -p T -var -w 347 404 150 233 0 0 -minmax -o WROSS_so_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WROS)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WROS)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi

# ERoss avg (CDW)
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v '|thetao|votemper|' -p T -var -w 448 519 152 180 0 0 -minmax -o EROSS_thetao_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (EROSS)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (EROSS)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi

# Weddell Avg (bottom water)
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v '|so|vosaline|' -p T -var -w 891 938 204 258 0 0 -minmax -o WED_so_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WWED)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WWED)"; echo "E R R O R in : ./mk_bot.bash $@ (see SLURM/${CONFIG}/${RUNID}/bot_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
#
6 changes: 3 additions & 3 deletions SCRIPT/mk_hfds.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-${GRID}

# check presence of input file
FILE=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_hfds.bash $@ (see SLURM/${CONFIG}/${RUNID}/hfds_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILE=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-${GRID}.nc`
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_hfds.bash $@ (see SLURM/${CONFIG}/${RUNID}/hfds_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make mxl
FILEOUT=GLO_hfds_nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
Expand All @@ -35,6 +35,6 @@ if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILE -v '|sohefldo|hfds
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_hfds.bash $@ (see SLURM/${CONFIG}/${RUNID}/hfds_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_hfds.bash $@ (see SLURM/${CONFIG}/${RUNID}/hfds_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi
#
8 changes: 4 additions & 4 deletions SCRIPT/mk_mht.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-V

# check presence of input file
FILEV=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-V.nc
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_mht.bash $@ (see SLURM/${CONFIG}/${RUNID}/mht_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILEV=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-V.nc`
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_mht.bash $@ (see SLURM/${CONFIG}/${RUNID}/mht_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make mht
set -x
Expand All @@ -35,8 +35,8 @@ $CDFPATH/cdfmhst -vt $FILEV -vvl -o tmp_$FILEOUT
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfmht; exit"; echo "E R R O R in : ./mk_mht.bash $@ (see SLURM/${CONFIG}/${RUNID}/mht_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmht; exit"; echo "E R R O R in : ./mk_mht.bash $@ (see SLURM/${CONFIG}/${RUNID}/mht_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi

# extract only 26.5
ncks -O -d y,793,793 $FILEOUT nemo_${RUN_NAME}o_${FREQ}_${TAG}_mht_265.nc
if [ $CONFIG == 'eORCA025' ]; then ncks -O -d y,793,793 $FILEOUT nemo_${RUN_NAME}o_${FREQ}_${TAG}_mht_265.nc ; fi
19 changes: 9 additions & 10 deletions SCRIPT/mk_moc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,23 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-U

# check presence of input file
FILEV=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-V.nc
FILEU=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-U.nc
FILET=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-T.nc
FILES=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-T.nc
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILET ] ; then echo "$FILET is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILES ] ; then echo "$FILES is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILEV=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-V.nc`
FILEU=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-U.nc`
FILET=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-T.nc`
FILES=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-T.nc`
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILET ] ; then echo "$FILET is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILES ] ; then echo "$FILES is missing; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make moc
set -x
FILEOUT=nemo_${RUN_NAME}o_${FREQ}_${TAG}_moc.nc
$CDFPATH/cdfmoc -v $FILEV -u $FILEU -t $FILET -s $FILES -rapid -vvl -o tmp_$FILEOUT

# mv output file
if [[ $? -eq 0 ]]; then
mv rapid_tmp_$FILEOUT rapid_$FILEOUT
else
echo "error when running cdfmoc; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmoc; exit"; echo "E R R O R in : ./mk_moc.bash $@ (see SLURM/${CONFIG}/${RUNID}/moc_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi

6 changes: 3 additions & 3 deletions SCRIPT/mk_mxl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-${GRID}

# check presence of input file
FILE=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_mxl.bash $@ (see SLURM/${CONFIG}/${RUNID}/mxl_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILE=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-${GRID}.nc`
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_mxl.bash $@ (see SLURM/${CONFIG}/${RUNID}/mxl_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make mxl
FILEOUT=WMXL_nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
Expand All @@ -35,6 +35,6 @@ if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILE -v '|somxzint1|sok
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfmxl; exit"; echo "E R R O R in : ./mk_mxl.bash $@ (see SLURM/${CONFIG}/${RUNID}/mxl_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmxl; exit"; echo "E R R O R in : ./mk_mxl.bash $@ (see SLURM/${CONFIG}/${RUNID}/mxl_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi
#
14 changes: 7 additions & 7 deletions SCRIPT/mk_psi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-U

# check presence of input file
FILEU=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-U.nc
FILEV=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-V.nc
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILEU=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-U.nc`
FILEV=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-V.nc`
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make psi
FILEOUT=nemo_${RUN_NAME}o_${FREQ}_${TAG}_psi.nc
Expand All @@ -37,13 +37,13 @@ $CDFPATH/cdfpsi -u $FILEU -v $FILEV -vvl -nc4 -ref 1 1 -o tmp_$FILEOUT
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfpsi; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfpsi; exit"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi

# WG max
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v sobarstf -p T -w 1025 1300 325 380 0 0 -minmax -o WG_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WG)"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (WG)"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi

# RG max
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILEOUT -v sobarstf -p T -w 476 607 254 370 0 0 -minmax -o RG_$FILEOUT ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (RG)"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
if [ $? -ne 0 ] ; then echo "error when running cdfmean (RG)"; echo "E R R O R in : ./mk_psi.bash $@ (see SLURM/${CONFIG}/${RUNID}/psi_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; fi
8 changes: 4 additions & 4 deletions SCRIPT/mk_sie.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-${GRID}

# check presence of input file
FILE=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-T.nc
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_sie.bash $@ (see SLURM/${CONFIG}/${RUNID}/sie_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILE=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-T.nc`
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_sie.bash $@ (see SLURM/${CONFIG}/${RUNID}/sie_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make sie
FILEOUT=ARC_sie_nemo_${RUN_NAME}o_${FREQ}_${TAG}.nc
if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdficediags -i $FILE -o tmp_$FILEOUT ; fi
$CDFPATH/cdficediags -i $FILE -o tmp_$FILEOUT

# mv output file
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdficediags; exit"; echo "E R R O R in : ./mk_sie.bash $@ (see SLURM/${CONFIG}/${RUNID}/sie_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdficediags; exit"; echo "E R R O R in : ./mk_sie.bash $@ (see SLURM/${CONFIG}/${RUNID}/sie_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi
8 changes: 4 additions & 4 deletions SCRIPT/mk_sst.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-${GRID}

# check presence of input file
FILE=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILE=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-${GRID}.nc`
if [ ! -f $FILE ] ; then echo "$FILE is missing; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make sst
FILEOUT=SO_sst_nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
Expand All @@ -35,7 +35,7 @@ if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILE -v '|thetao|votemp
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi

FILEOUT=NWC_sst_nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-${GRID}.nc
Expand All @@ -45,5 +45,5 @@ if [ $CONFIG == 'eORCA025' ] ; then $CDFPATH/cdfmean -f $FILE -surf -v '|thetao|
if [[ $? -eq 0 ]]; then
mv tmp_$FILEOUT $FILEOUT
else
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdfmean; exit"; echo "E R R O R in : ./mk_sst.bash $@ (see SLURM/${CONFIG}/${RUNID}/sst_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi
10 changes: 5 additions & 5 deletions SCRIPT/mk_trp.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ RUN_NAME=${RUNID#*-}
#${SCRPATH}/get_data.bash $RUNID $FREQ $TAG grid-U

# check presence of input file
FILEV=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-V.nc
FILEU=nemo_${RUN_NAME}o_${FREQ}_${TAG}_grid-U.nc
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
FILEV=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-V.nc`
FILEU=`ls nemo_${RUN_NAME}o_${FREQ}_${TAG}-????????_grid-U.nc`
if [ ! -f $FILEV ] ; then echo "$FILEV is missing; exit"; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi
if [ ! -f $FILEU ] ; then echo "$FILEU is missing; exit"; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1 ; fi

# make trp
$CDFPATH/cdftransport -u $FILEU -v $FILEV -noheat -vvl -pm -sfx nemo_${RUN_NAME}o_${FREQ}_${TAG} < ${EXEPATH}/SECTIONS/section_${CONFIG}.dat

# mv output file
if [[ $? -eq 0 ]]; then
else
echo "error when running cdftransport; exit" ; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
echo "error when running cdftransport; exit" ; echo "E R R O R in : ./mk_trp.bash $@ (see SLURM/${CONFIG}/${RUNID}/trp_${FREQ}_${TAG}.out)" >> ${EXEPATH}/ERROR.txt ; exit 1
fi
9 changes: 4 additions & 5 deletions SCRIPT/plot_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ def main():
nyt=10
else:
nyt=100
nmt=ts_lst[irun].index[-1].to_pydatetime().date().month
ndt=ts_lst[irun].index[-1].to_pydatetime().date().day
nmt=ts_lst[irun].index[0].to_pydatetime().date().month
ndt=ts_lst[irun].index[0].to_pydatetime().date().day

ax[ivar].xaxis.set_major_locator(mdates.YearLocator(nyt,month=nmt,day=1))
ax[ivar].xaxis.set_major_locator(mdates.YearLocator(nyt,month=1,day=1))
ax[ivar].tick_params(axis='both', labelsize=16)
if (ivar != nvar-1):
ax[ivar].set_xticklabels([])
Expand All @@ -312,12 +312,11 @@ def main():
lt.set_ha('center')

rmin[ivar],rmax[ivar]=get_ybnd(run_lst,obs_min[ivar],obs_max[ivar])
print rmin[ivar], rmax[ivar]
ax[ivar].set_ylim([rmin[ivar],rmax[ivar]])
ax[ivar].grid()

# tidy up space
plt.subplots_adjust(left=0.07, right=0.8, bottom=0.2, top=0.92, wspace=0.15, hspace=0.15)
plt.subplots_adjust(left=0.1, right=0.8, bottom=0.2, top=0.92, wspace=0.15, hspace=0.15)

# add legend
add_legend(lg,ax[nvar-1])
Expand Down
Loading

0 comments on commit 20ecca0

Please sign in to comment.