Skip to content
Snippets Groups Projects
Commit 8bfda7f0 authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Bugfix in prepare_rundir.sh

parent 73097d12
No related branches found
No related tags found
1 merge request!2Split prepare_rundir.sh into three different stages for the whole experiment,...
......@@ -50,7 +50,7 @@ function download_file() {
MEMBER=%initial_conditions.member%
INITIAL_CONDITIONS_PARENT_FOLDER=%initial_conditions.parent_folder%
INITIAL_CONDITIONS_PATH=${INITIAL_CONDITIONS_PARENT_FOLDER}/${STARTDATE:0:6}/${STARTDATE}T00
INITIAL_CONDITIONS_PATH=${INITIAL_CONDITIONS_PARENT_FOLDER}/${STARTDATE:0:6}/${STARTDATE:0:8}T00
#AN_FILE=igaf$(date -u +"%Y%m%d")00.m${MEMBER}.grb
#FG_FILE=igfff00030000.m${MEMBER}.grb
......@@ -58,6 +58,17 @@ INITIAL_CONDITIONS_PATH=${INITIAL_CONDITIONS_PARENT_FOLDER}/${STARTDATE:0:6}/${S
AN_SOURCE=$(find ${INITIAL_CONDITIONS_PATH} -name igfff00030000.m${MEMBER}.grb | sort | tail -n 1)
FG_SOURCE=$(find ${INITIAL_CONDITIONS_PATH} -name "igaf*00.m${MEMBER}.grb" | sort | tail -n 1)
if [ ! -f "${AN_SOURCE}" ]; then
echo "Analysis file for date ${STARTDATE} not found!"
exit 1
fi
if [ ! -f "${FG_SOURCE}" ]; then
echo "FG file for date ${STARTDATE} not found!"
exit 1
fi
AN_FILE=analysis.nc
FG_FILE=fg.nc
......
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