Changeset 13264 for NEMO/trunk/tests/STATION_ASF/EXPREF
- Timestamp:
- 2020-07-08T12:47:03+02:00 (4 years ago)
- Location:
- NEMO/trunk/tests/STATION_ASF/EXPREF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/STATION_ASF/EXPREF/launch_sasf.sh
r13226 r13264 1 1 #!/bin/bash 2 2 3 # NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup: 4 NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"` 3 ################################################################ 4 # 5 # Script to launch a set of STATION_ASF simulations 6 # 7 # L. Brodeau, 2020 8 # 9 ################################################################ 5 10 6 echo "Using NEMO_DIR=${NEMO_DIR}" 7 8 # what directory inside "tests" actually contains the compiled test-case? 11 # What directory inside "tests" actually contains the compiled "nemo.exe" for STATION_ASF ? 9 12 TC_DIR="STATION_ASF2" 10 13 11 # => so the executable to use is: 12 NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 14 expdir=`basename ${PWD}`; # we expect "EXPREF" or "EXP00" normally... 13 15 14 # Directory where to run the simulation:15 WORK_DIR="${HOME}/tmp/STATION_ASF" 16 # NEMOGCM root directory: 17 NEMO_ROOT_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 16 18 17 # DATA_IN_DIR => Directory containing sea-surface + atmospheric forcings 18 # (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/): 19 if [ `hostname` = "merlat" ]; then 20 DATA_IN_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 21 elif [ `hostname` = "luitel" ]; then 22 DATA_IN_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018" 23 elif [ `hostname` = "ige-meom-cal1" ]; then 24 DATA_IN_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018" 25 elif [ `hostname` = "salvelinus" ]; then 26 DATA_IN_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 27 else 28 echo "Oops! We don't know `hostname` yet! Define 'DATA_IN_DIR' in the script!"; exit 29 fi 30 31 32 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi 33 34 # NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe + setup: 35 NEMO_WRK_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 19 # NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe: 20 SASF_WRK_DIR="${NEMO_ROOT_DIR}/tests/${TC_DIR}" 36 21 37 22 # Directory where to run the simulation: … … 43 28 #================================================================================ 44 29 30 SASF_REF_DIR="${NEMO_ROOT_DIR}/tests/STATION_ASF" 31 if [ ! -d ${SASF_REF_DIR} ]; then echo " Mhhh, no EXPREF directory ${SASF_REF_DIR} !"; exit; fi 32 45 33 # NEMO executable to use is: 46 NEMO_EXE="${NEMO_WRK_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 34 NEMO_EXE="${SASF_WRK_DIR}/BLD/bin/nemo.exe" 35 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 36 37 DATA_IN_DIR="${SASF_REF_DIR}/input_data" ; # Directory containing sea-surface + atmospheric input data 38 if [ ! -d ${DATA_IN_DIR} ]; then echo "PROBLEM!!! => did not find directory 'input_data' with input forcing..."; exit; fi 39 40 SASF_EXPREF=${SASF_REF_DIR}/${expdir} ; # STATION_ASF EXPREF directory from which to use namelists and XIOS xml files... 41 if [ ! -d ${SASF_EXPREF} ]; then echo " Mhhh, no ${expdir} directory ${SASF_EXPREF} !"; exit; fi 47 42 48 43 … … 51 46 echo "###########################################################" 52 47 echo 53 echo " We shall work in here: ${STATION_ASF_DIR}/" 54 echo " NEMOGCM work depository is: ${NEMO_WRK_DIR}/" 55 echo " ==> NEMO EXE to use: ${NEMO_EXE}" 56 echo " Input forcing data into: ${DATA_IN_DIR}/" 57 echo " Production will be done into: ${PROD_DIR}/" 48 echo " * NEMO reference root directory is: ${NEMO_ROOT_DIR}" 49 echo " * STATION_ASF work directory is: ${SASF_WRK_DIR}" 50 echo " ==> NEMO EXE to use: ${NEMO_EXE}" 51 echo 52 echo " * Input forcing data into: ${DATA_IN_DIR}" 53 echo " * Production will be done into: ${PROD_DIR}" 54 echo " * Directory in which namelists and xml files are fetched:" 55 echo " ==> ${SASF_EXPREF}" 58 56 echo 59 57 60 58 mkdir -p ${PROD_DIR} 61 59 62 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi63 64 echo65 echo " *** Using the following NEMO executable:"66 echo " ${NEMO_EXE} "67 echo68 69 NEMO_EXPREF="${NEMO_WRK_DIR}/tests/STATION_ASF/EXPREF"70 if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi71 72 60 rsync -avP ${NEMO_EXE} ${PROD_DIR}/ 73 61 74 62 for 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 75 if [ ! -f ${ NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi76 rsync -avPL ${ NEMO_EXPREF}/${ff} ${PROD_DIR}/63 if [ ! -f ${SASF_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${SASF_EXPREF} !"; exit; fi 64 rsync -avPL ${SASF_EXPREF}/${ff} ${PROD_DIR}/ 77 65 done 78 66 … … 91 79 92 80 rm -f ${PROD_DIR}/namelist_cfg 93 rsync -avPL ${ NEMO_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg81 rsync -avPL ${SASF_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 94 82 95 83 cd ${PROD_DIR}/ -
NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py
r12629 r13264 26 26 sys.setdefaultencoding('utf8') 27 27 28 cy1 = '201 6' ; # First year28 cy1 = '2018' ; # First year 29 29 cy2 = '2018' ; # Last year 30 31 jt0 = 032 jt0 = 1751933 34 30 35 31 dir_figs='.' … … 104 100 # Getting time array from the first file: 105 101 id_in = Dataset(cf_in[0]) 106 vt = id_in.variables['time_counter'][ jt0:]102 vt = id_in.variables['time_counter'][:] 107 103 cunit_t = id_in.variables['time_counter'].units ; print(' "time_counter" is in "'+cunit_t+'"') 108 104 id_in.close() … … 138 134 if ctest == 'skin': id_in = Dataset(cf_in[ja]) 139 135 if ctest == 'noskin': id_in = Dataset(cf_in_ns[ja]) 140 xF[:,ja] = id_in.variables[L_VNEM[jv]][ jt0:,1,1] # only the center point of the 3x3 spatial domain!136 xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 141 137 if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 142 138 id_in.close() … … 211 207 for ja in range(nb_algos-1): 212 208 id_in = Dataset(cf_in[ja]) 213 xF[:,ja] = id_in.variables[L_VNEM[jv]][ jt0:,1,1] # only the center point of the 3x3 spatial domain!209 xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 214 210 if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 215 211 id_in.close() 216 212 # 217 213 id_in = Dataset(cf_in_ns[ja]) 218 xFns[:,ja] = id_in.variables[L_VNEM[jv]][ jt0:,1,1] # only the center point of the 3x3 spatial domain!214 xFns[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 219 215 if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 220 216 id_in.close()
Note: See TracChangeset
for help on using the changeset viewer.