New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
launch_sasf.sh in NEMO/branches/2020/r12581_ticket2418/tests/STATION_ASF/EXPREF – NEMO

source: NEMO/branches/2020/r12581_ticket2418/tests/STATION_ASF/EXPREF/launch_sasf.sh @ 12704

Last change on this file since 12704 was 12704, checked in by laurent, 4 years ago

Fixes so STATION_ASF works fine!

  • Property svn:executable set to *
File size: 2.7 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
37echo
38echo " *** Using the following NEMO executable:"
39echo "  ${NEMO_EXE} "
40echo
41
42
43NEMO_EXPREF="${NEMO_DIR}/tests/STATION_ASF/EXPREF"
44if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi
45
46rsync -avP ${NEMO_EXE}          ${WORK_DIR}/
47
48for 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
49    if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi
50    rsync -avPL ${NEMO_EXPREF}/${ff} ${WORK_DIR}/
51done
52
53# Copy forcing to work directory:
54rsync -avP ${FORC_DIR}/Station_PAPA_50N-145W*.nc ${WORK_DIR}/
55
56for CASE in "ECMWF" "COARE3p6" "NCAR" "ECMWF-noskin" "COARE3p6-noskin"; do
57
58    echo ; echo
59    echo "============================="
60    echo " Going for ${CASE} experiment"
61    echo "============================="
62    echo
63
64    scase=`echo "${CASE}" | tr '[:upper:]' '[:lower:]'`
65
66    rm -f ${WORK_DIR}/namelist_cfg
67    rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${WORK_DIR}/namelist_cfg
68
69    cd ${WORK_DIR}/
70    echo
71    echo "Launching NEMO !"
72    ./nemo.exe 1>out_nemo.out 2>err_nemo.err
73    echo "Done!"
74    echo
75
76    # Moving output files:
77    mkdir -p output
78    mv -f STATION_ASF-${CASE}_*_grid*.nc output/
79   
80    # Saving logs:
81    mkdir -p ${CASE}_log
82    mv -f *.out *.err ocean.output output.namelist.dyn ${CASE}_log/
83
84done
Note: See TracBrowser for help on using the repository browser.