source: NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/tests/STATION_ASF/EXPREF/launch_sasf.sh

Last change on this file was 13197, checked in by gsamson, 3 months ago

merge with trunk@r13136 with a more recent svn version; pass all SETTE tests; results identical to trunk@r13136; ticket #2419

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1#!/bin/bash
2
3# NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup:
4NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"`
5
6echo "Using NEMO_DIR=${NEMO_DIR}"
7
8# what directory inside "tests" actually contains the compiled test-case?
9TC_DIR="STATION_ASF2"
10
11# => so the executable to use is:
12NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe"
13
14# Directory where to run the simulation:
15WORK_DIR="${HOME}/tmp/STATION_ASF"
16
17
18# FORC_DIR => Directory containing sea-surface + atmospheric forcings
19#             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/):
20if [ `hostname` = "merlat"        ]; then
21    FORC_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018"
22elif [ `hostname` = "luitel"        ]; then
23    FORC_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018"
24elif [ `hostname` = "ige-meom-cal1" ]; then
25    FORC_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018"
26elif [ `hostname` = "salvelinus" ]; then
27    FORC_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018"
28else
29    echo "Boo!"; exit
30fi
31#======================
32mkdir -p ${WORK_DIR}
33
34
35if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi
36
37NEMO_EXPREF="${NEMO_DIR}/tests/STATION_ASF/EXPREF"
38if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi
39
40rsync -avP ${NEMO_EXE}          ${WORK_DIR}/
41
42for ff in "context_nemo.xml" "domain_def_nemo.xml" "field_def_nemo-oce.xml" "file_def_nemo-oce.xml" "grid_def_nemo.xml" "iodef.xml" "namelist_ref"; do
43    if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi
44    rsync -avPL ${NEMO_EXPREF}/${ff} ${WORK_DIR}/
45done
46
47# Copy forcing to work directory:
48rsync -avP ${FORC_DIR}/Station_PAPA_50N-145W*.nc ${WORK_DIR}/
49
50for CASE in "ECMWF" "COARE3p6" "NCAR" "ECMWF-noskin" "COARE3p6-noskin"; do
51
52    echo ; echo
53    echo "============================="
54    echo " Going for ${CASE} experiment"
55    echo "============================="
56    echo
57
58    scase=`echo "${CASE}" | tr '[:upper:]' '[:lower:]'`
59
60    rm -f ${WORK_DIR}/namelist_cfg
61    rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${WORK_DIR}/namelist_cfg
62
63    cd ${WORK_DIR}/
64    echo
65    echo "Launching NEMO !"
66    ./nemo.exe 1>out_nemo.out 2>err_nemo.err
67    echo "Done!"
68    echo
69
70    # Moving output files:
71    mkdir -p output
72    mv -f STATION_ASF-${CASE}_*_grid*.nc output/
73   
74    # Saving logs:
75    mkdir -p ${CASE}_log
76    mv -f *.out *.err ocean.output output.namelist.dyn ${CASE}_log/
77
78done
Note: See TracBrowser for help on using the repository browser.