Skip to content

Commit

Permalink
update interannual scripts to read tidal forcing files
Browse files Browse the repository at this point in the history
  • Loading branch information
GilesFearon committed Oct 17, 2024
1 parent 5efa21b commit 9e17230
Show file tree
Hide file tree
Showing 8 changed files with 2,989 additions and 13 deletions.
21 changes: 16 additions & 5 deletions configs/chpc_tools/myenv_inter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,35 @@
# we can always add more here if we want

# source code
#export SOURCE=/home/gfearon/code/croco-v1.3.1/OCEAN/
export SOURCE=/mnt/lustre/users/sillig/CROCO_TRAINING_Basic/1_CROCO_code/croco-v1.3.1/OCEAN/
export SOURCE=/home/$USER/croco-v1.3.1/OCEAN/

export RUNDIR=/home/gfearon/lustre/somisana-croco/configs/sa_west_02/croco_v1.3.1/
export RUNDIR=/home/$USER/lustre/somisana-croco/configs/sa_west_02/croco_v1.3.1/
#export RUNDIR=/home/$USER/lustre/somisana-croco/configs/sa_southeast_01/croco_v1.3.1/

#
# dir with compile options
export EXENAME=C01
export EXENAME=C05
#
# MPI partitioning
#export MPI_NUM_X=6
#export MPI_NUM_Y=4
export MPI_NUM_X=5
export MPI_NUM_Y=19
export MPI_NUM_PROCS=$(($MPI_NUM_X * $MPI_NUM_Y))
#

# boundary and atmospheric forcing
export BULK_FILES=0
export ATMOS_BULK=ERA5
#
export FORCING_FILES=0
export ATMOS_FRC=NA
#
export CLIMATOLOGY_FILES=0
export BOUNDARY_FILES=1
export OGCM=GLORYS
#
TIDE_FILES=1
export TIDE_FRC=TPXO10

# runtime input
export INNAME=I01
13 changes: 7 additions & 6 deletions configs/chpc_tools/run_croco_inter.pbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#PBS -l select=4:ncpus=24:mpiprocs=24
#PBS -P ERTH1103
#PBS -q normal
#PBS -l walltime=02:00:00
#PBS -l walltime=18:00:00
#PBS -o /home/gfearon/run_croco_inter_lengau/stdout
#PBS -e /home/gfearon/run_croco_inter_lengau/stderr
#
Expand All @@ -29,17 +29,13 @@ source ${INPUTDIR_IN}/myenv_in.sh
INPUTDIR_SRF=$RUNDIR/$ATMOS_BULK
INPUTDIR_BRY=$RUNDIR/$OGCM
INPUTDIR_GRD=$RUNDIR/GRID
INPUTDIR_TID=$RUNDIR/$TIDE_FRC

MODEL=croco
RUNNAME=${EXENAME}_${INNAME}_${OGCM}_${ATMOS_BULK}
SCRATCHDIR=$RUNDIR/$RUNNAME/scratch
OUTPUTDIR=$RUNDIR/$RUNNAME/output

BULK_FILES=1
FORCING_FILES=0
CLIMATOLOGY_FILES=1
BOUNDARY_FILES=0

########################################################
#
if [[ $TIME_SCHED == 0 ]]; then
Expand All @@ -51,6 +47,7 @@ fi
#
GRDFILE=${MODEL}_grd
FRCFILE=${MODEL}_frc
TIDFILE=${MODEL}_frc
BLKFILE=${MODEL}_blk
INIFILE=${MODEL}_ini
CLMFILE=${MODEL}_clm
Expand Down Expand Up @@ -168,6 +165,10 @@ while [ $NY != $NY_END ]; do
echo "Getting ${BLKFILE}_${ATMOS_BULK}_${TIME}.nc${ENDF} from ${INPUTDIR_SRF}${ENDF}"
$LN -sf ${INPUTDIR_SRF}${ENDF}/${BLKFILE}_${ATMOS_BULK}_${TIME}.nc${ENDF} ${BLKFILE}.nc${ENDF}
fi
if [[ ${TIDE_FILES} == 1 ]]; then
echo "Getting ${TIDFILE}_${TIDE_FRC}_${TIME}.nc${ENDF} from ${INPUTDIR_TID}${ENDF}"
$LN -sf ${INPUTDIR_TID}${ENDF}/${TIDFILE}_${TIDE_FRC}_${TIME}.nc${ENDF} ${FRCFILE}.nc${ENDF}
fi
LEVEL=$((LEVEL + 1))
done
#
Expand Down
2 changes: 2 additions & 0 deletions configs/sa_southeast_01/croco_v1.3.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Compile options
03 - as per 01, define ONLINE
04 - as per 03, undef CLIMATOLOGY and define FRC_BRY
05 - as per 04, define ERA_ECMWF (ERA5 blk files are in a different format for ONLINE processing)
06 - as per 04, define TIDES
07 - as per 06, define ERA_ECMWF (ERA5 blk files are in a different format for ONLINE processing)

Runtime input (\*.in files)
---------------------------
Expand Down
7 changes: 6 additions & 1 deletion configs/sa_southeast_01/croco_v1.3.1/run_croco_inter.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ source ${INPUTDIR_IN}/myenv_in.sh
INPUTDIR_SRF=$RUNDIR/$ATMOS_BULK
INPUTDIR_BRY=$RUNDIR/$OGCM
INPUTDIR_GRD=$RUNDIR/GRID
INPUTDIR_TID=$RUNDIR/$TIDE_FRC

MODEL=croco
RUNNAME=${EXENAME}_${INNAME}_${OGCM}_${ATMOS_BULK}
Expand All @@ -39,6 +40,7 @@ fi
#
GRDFILE=${MODEL}_grd
FRCFILE=${MODEL}_frc
TIDFILE=${MODEL}_frc
BLKFILE=${MODEL}_blk
INIFILE=${MODEL}_ini
CLMFILE=${MODEL}_clm
Expand Down Expand Up @@ -80,7 +82,6 @@ chmod u+x $CODFILE
#$CP -f $INPUTDIR_IN/AGRIF_FixedGrids.in $SCRATCHDIR
#echo "Getting stations file from $INPUTDIR_IN"
#$CP -f $INPUTDIR_IN/stations.in $SCRATCHDIR
#$CP -f $TIDEDIR/frc.nc $SCRATCHDIR

#
# Get the netcdf files for run initiation
Expand Down Expand Up @@ -156,6 +157,10 @@ while [ $NY != $NY_END ]; do
echo "Getting ${BLKFILE}_${ATMOS_BULK}_${TIME}.nc${ENDF} from ${INPUTDIR_SRF}${ENDF}"
$LN -sf ${INPUTDIR_SRF}${ENDF}/${BLKFILE}_${ATMOS_BULK}_${TIME}.nc${ENDF} ${BLKFILE}.nc${ENDF}
fi
if [[ ${TIDE_FILES} == 1 ]]; then
echo "Getting ${TIDFILE}_${TIDE_FRC}_${TIME}.nc${ENDF} from ${INPUTDIR_TID}${ENDF}"
$LN -sf ${INPUTDIR_TID}${ENDF}/${TIDFILE}_${TIDE_FRC}_${TIME}.nc${ENDF} ${FRCFILE}.nc${ENDF}
fi
LEVEL=$((LEVEL + 1))
done
#
Expand Down
Loading

0 comments on commit 9e17230

Please sign in to comment.