Skip to content
Snippets Groups Projects
Commit 107b3781 authored by Lukas Kluft's avatar Lukas Kluft
Browse files

Make extraction of SST data more automated

parent 39f0c228
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,6 @@ CMIP_EXP='piControl' # e.g. ssp585, piControl, ...
CMIP_VAR='r1i1p1f1'
INST_ID='MPI-M' # e.g. DKRZ, MPI-M
CMIP_DIR="/pool/data/CMIP6/data/${CMIP_ACT}/${INST_ID}/MPI-ESM1-2-HR/${CMIP_EXP}/${CMIP_VAR}/"
CMIP_SST="3hr/tos/gn/v20190710/tos_3hr_MPI-ESM1-2-HR_${CMIP_EXP}_${CMIP_VAR}_gn_20[123]*.nc"
CMIP_SIC="SIday/siconc/gn/v20190710/siconc_SIday_MPI-ESM1-2-HR_${CMIP_EXP}_${CMIP_VAR}_gn_*"
# ICON target grid
GRID_ID="0015"
......
......@@ -28,6 +28,11 @@ lastyear=$(( $YEAR + 10 ))
mkdir -p "${WORKDIR}" "${SST_SIC_OUTDIR}"
# Sea surface temperature.
# The SST data is quite large so only read the current as well as the adjacent
# decases to speedup the extraction.
decade="${YEAR:2:1}" # 1976 -> 7
adjacent_yy="$(($decade - 1))$decade$(($decade + 1))" # 7 -> 678
CMIP_SST="3hr/tos/gn/v20190710/tos_3hr_MPI-ESM1-2-HR_${CMIP_EXP}_${CMIP_VAR}_gn_20[${adjacent_yy}]*.nc"
cdo \
"${CDO_OPTS[@]}" \
-addc,273.15 \
......@@ -38,6 +43,7 @@ cdo \
# Sea-ice area fraction.
CMIP_SIC="SIday/siconc/gn/v20190710/siconc_SIday_MPI-ESM1-2-HR_${CMIP_EXP}_${CMIP_VAR}_gn_*"
cdo \
"${CDO_OPTS[@]}" \
-inttime,${firstyear}-01-01,12:00:00,3hour \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment