source: CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh @ 6329

Last change on this file since 6329 was 6329, checked in by aclsce, 17 months ago

Modified IPSLCM7 to use :

  • OASIS3_MCT.5.0
  • MOSAIX weights version 3 (ICO40 <-> eORCA1.2 NEMO3.6)
  • lag of 900s (instead of 6300s) for exchange of calving and runoff from atm to oce.
  • Property svn:executable set to *
File size: 19.2 KB
RevLine 
[5479]1#!/bin/bash
2# Default options
3#
4#
5#
6date
7#### 1  Set up the compiling options
8#### Define some directories
9submitdir=$( pwd )
10modipsl=$submitdir/../..
11arch_path=$submitdir/ARCH
12mysrc_path=$submitdir/SOURCES
13export ROOT=$modipsl/modeles/DYNAMICO
14#### Set default options
15# Resolution if compiling LMDZ in regular mode without DYNAMICO
16# Use for example following "./compile_icolmdzor.sh -regular_latlon 144x142x79"
17regular_latlon=no
18# Atmospheric resolution, for LMDZ/ORCHIDEE in regular mode
19resol_atm=144x142x79
20# Oceanic resolution, for NEMO (ORCA2/ORCA1/ORCA025)
21resol_oce=ORCA1
22# Version of ice model lim2/lim3
23icemodel=lim3
24# Coupled with ocean biogeochemistry (y/n)
25oceanbio=y
26# Version ESM CO2: CO2 interactif ocean/atmosphere (y/n)
27esmco2=n
28# Optimization mode
29# optmode=prod/dev/debug
30optmode=prod
31# Resolution if compiling LMDZ in regular mode without DYNAMICO
32# Use for example following "./compile_icolmdzor.sh -regular_latlon 144x142x79"
33regular_latlon=no
34# fcm_arch
35fcm_arch=default
36# Default values to be overritten
37parallel=mpi_omp
38export fcm_arch parallel xios
39full_flag=""
40full_nemo=n
41full_inca=""
42full_xios=""
43full_lmdz=""
44full_orch=""
45full_dyna=""
[6296]46# choose radiative code compilation option
47rad=rrtm
48opt_rad=""
[5479]49# Default netcdf_lib is used for XIOS but can be change by argument
50netcdf_lib=""
51
52# Output text file for compilation of each component
53datestr=`LC_ALL=C date +"%Y%m%dT%H%M"`
54outfile=$submitdir/out_compile_ipslcm7.$datestr
55echo > $outfile
56echo; echo "Text output from compilation will be stored in file out_compile_ipslcm7.$datestr"; echo 
57
58#### Read arguments
59# Loop over all arguments to modify default set up
60while (($# > 0)) ; do
61    case $1 in
62        "-h") cat <<end_help
63########################################################################
64# Usage of the script compile_ipslcm7.sh
65#
66########################################################################
67
68./compile_ipslcm7.sh [Options]
69
70
71Options: [-full] Full recompilation of all components. This option can be added to all other options.
72         [-cleannemo] Full recompilation of NEMO component only.
73         [-regular_latlon]
74         [-debug / -dev / -prod] Level of optimization. One of these can be added to all other compile options. Default: -prod.
75
76
77Example 1: Default compilation of IPSLCM7 for resolution LR
78          (Resolution atmos: nbp40, ocean: ORCA1)
79./compile_ipslcm7.sh
80
81Example 2: Default resoltuion (LR) compiled in debug mode
82./compile_ipslcm7.sh -debug
83
84Example 3: Default compilation with full recompilation of all components. No clean is needed.
85./compile_ipslcm7.sh -full
86
87Example 4: Compilation of LMDZ in regular lat-lon for dimension 144x142x79.
88The dimension can be changed to any other 3d dimension. DYNAMICO is also compiled as default.
89./compile_ipslcm7.sh -regular_latlon 144x142x79
90
91end_help
92            exit;;
93
94        "-parallel")   parallel=$2 ; shift ; shift ;;
95        "-arch")       fcm_arch="$2" ; shift ; shift ;;
96        "-debug")      optmode=debug ; shift ;;
97        "-dev")        optmode=dev ; shift ;;
98        "-prod")       optmode=prod ; shift ;;
99        "-regular_latlon")  regular_latlon=yes ; resol_atm=$2 ; shift ; shift ;;
100        "-full")       full_flag="-full"; full_nemo=y ; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;;
101        "-full_xios")  full_xios="--full" ; shift ;;  # Note only full_xios is using double dash: --full
102        "-full_lmdz")  full_lmdz="-full"  ; shift ;;
103        "-full_orch")  full_orch="-full"  ; shift ;;
104        "-full_nemo")  full_nemo=y ; shift ;;
105        "-full_inca")  full_inca="-clean"; shift ;;
106        "-cleannemo")  full_nemo=y ; shift ;;
[6296]107        "-rad")        rad=$2; shift ; shift ;;
[5479]108        *)             echo "unknown option "$1" , exiting..." ; exit
109    esac
110done
111
112echo "Following options are set in current compiling:" >> $outfile
113echo "   regular_latlon=$regular_latlon (if yes, then resol_atm=${resol_atm})" >> $outfile 
114echo "   resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, oceanbio=${oceanbio}" >> $outfile 
115echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 
116echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_nemo=$full_nemo, full_dyna=$full_dyna" >> $outfile 
117echo >> $outfile
118
119### Read host dependent default values
120### These variables will not be changed if they were set as argument
121###./host.sh $host
122# Later : Following lines should be set in host.sh file
123# begin host.sh
124if [ $fcm_arch == default ] ; then
125    # Find out current host and source specific paths and commands for the host
126    case $( hostname -s ) in
127        jean-zay*)
128            fcm_arch=X64_JEANZAY;;
129        irene170|irene171|irene190|irene191|irene192|irene193)
130            fcm_arch=X64_IRENE;;
131        irene172|irene173|irene194|irene195)
132            fcm_arch=X64_IRENE-AMD;;
133        asterix*|obelix*)
134            fcm_arch=ifort_LSCE
135            if [ "${parallel}" == "mpi_omp" ] ; then
136                echo "Warning!! Currently at Obelix hybrid mode is not possible."
137                echo "          Option -parallel mpi_omp is now changed to -parallel mpi"
138                echo ""
139                parallel=mpi
140            else
141                echo "You used -parallel" $parallel
142            fi ;;
[6296]143        spirit*)
144            fcm_arch=ifort_MESOIPSL;;
[5479]145        ciclad*|climserv*|loholt*|camelot*)
146            fcm_arch=ifort_CICLAD;;
147        *)
148            echo Current host is not known. You must use option -arch to specify which architecuture files to use.
149            echo Exit now.
150            exit
151    esac
152fi
153
154# Set a link to arch.env if arch-${fcm_arch}.env file exist for current fcm_arch.
155# The link arch.env is also set in config.card and will be used by libIGCM to ensure the same running environnement.
156if [ -f ARCH/arch-${fcm_arch}.env ] ; then
157    echo >> $outfile
158    echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation for all components."
[6296]159    echo "Note that this new environement might be kept after compilation."
160    echo "If this is the case, source again your personal environment after compilation."
161    echo " Personal module list before sourcing of ARCH/arch.env file:"    >> $outfile 
162    module list   >> $outfile 2>&1
163    svn_version=$(module list -t | grep subversion)
164       
[5479]165    # Make a link to this file, to be used also in config.card
166    rm -f ARCH/arch.env
167    ln -s arch-${fcm_arch}.env ARCH/arch.env
168
169    # Source the file
[6296]170    source ARCH/arch.env   >> $outfile 2>&1
171    if [ X$svn_version != X ] ; then
172        module load ${svn_version}
173    fi
174    echo >> $outfile
175    echo " New module list after sourcing of ARCH/arch.env file:"    >> $outfile 
176    module list   >> $outfile 2>&1
[5479]177fi
178
179#### 2 Do the compilation
180## 2.1 Compile ioipsl
181cd $modipsl/modeles/IOIPSL
182echo; echo "NOW COMPILE IOIPSL"
183echo >> $outfile ; echo " NOW COMPILE IOIPSL"   >> $outfile 
184
185echo ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile 
186     ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile 2>&1
187# Test if compiling succeded
188if [[ $? != 0 ]] ; then
189    echo "THERE IS A PROBLEM IN IOIPSL COMPILATION - STOP"
190    exit
191fi
192
193## 2.2 Compile oasis3-mct
194cd $modipsl/oasis3-mct/util/make_dir
195echo; echo "NOW COMPILE OASIS3-MCT"
196echo >> $outfile ; echo " NOW COMPILE OASIS3-MCT"   >> $outfile
197cp $mysrc_path/OASIS3-MCT/make_${fcm_arch} make.inc
198
199echo make -f TopMakefileOasis3 >> $outfile
200     make -f TopMakefileOasis3 >> $outfile 2>&1
201
202
203## 2.3 Compile xios
204cd $modipsl/modeles/XIOS
205echo; echo "NOW COMPILE XIOS"
206echo >> $outfile ; echo " NOW COMPILE XIOS"   >> $outfile 
207echo ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 
208     ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 2>&1
209# Test if compiling succeded
210if [[ $? != 0 ]] ; then
211    echo "THERE IS A PROBLEM IN XIOS COMPILATION - STOP"
212    exit
213fi
214# Move executables to modipsl/bin
215if [ -f $modipsl/modeles/XIOS/bin/xios_server.exe ] ; then
216    mv $modipsl/modeles/XIOS/bin/xios_server.exe $modipsl/bin/xios_server_${optmode}.exe
217else
218    echo "THERE IS A PROBLEM IN XIOS COMPILATION EXECUTABLE MISSING - STOP"
219    exit
220fi
221
222
223## 2.4 Compile orchidee
224cd $modipsl/modeles/ORCHIDEE
225echo; echo "NOW COMPILE ORCHIDEE"
226echo >> $outfile ; echo " NOW COMPILE ORCHIDEE"   >> $outfile 
227
228# Check if the compilation of ORCHIDEE was previsouly interupted prematured.
229# In that case, the files fcm.bld.lock exist. If the file exist, it is here removed to avoid makeorchidee_fcm
230# to ask question and wait for interactivly answer from the user.
231if [ -f build/fcm.bld.lock ] ; then
232    echo >> $outfile
233    echo " WARNING!! The file ORCHIDEE/build/fcm.bld.lock exist. "   >> $outfile
234    echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
235    echo "           The file will now be removed. "   >> $outfile
236    echo >> $outfile
237    rm -f build/fcm.bld.lock
238fi
239
240echo    ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch   >> $outfile 
241        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch   >> $outfile 2>&1
242# Test if compiling finished
243if [[ $? != 0 ]] ; then
244    echo "THERE IS A PROBLEM IN ORCHIDEE COMPILATION - STOP"
245    exit
246fi
247
248
249## 2.5 Compile NEMO
250nemo_root=$modipsl/modeles/NEMOGCM/CONFIG
251if [ ${icemodel} == lim2 ] ; then
252   addkeys="key_lim2_vp key_diahth key_oasis3"
253   delkeys="key_nosignedzero key_mpp_rep"
254else
[6329]255   addkeys="key_top key_pisces key_age key_cfc key_cpl_carbon_cycle key_gas key_oasis3 key_oa3mct_v3"
[5479]256   if [ ${oceanbio} == y ] ; then
257      if [ ${esmco2} == y ] ; then
258         delkeys="key_nosignedzero key_mpp_rep"
259      else
260         delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle key_gas"
261      fi
262   else
263      delkeys="key_nosignedzero key_mpp_rep key_top key_pisces key_cfc key_age key_cpl_carbon_cycle key_gas"
264   fi
265fi
266
267if [ ${oceanbio} == n ] ; then
268   echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES"
269   echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES"   >> $outfile
270else
271   echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES"
272   echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES"   >> $outfile
273fi
274echo >> $outfile ; echo cd $nemo_root  >> $outfile
275echo >> $outfile ; echo cp $modipsl/config/IPSLCM7/SOURCES/NEMO/arch-${fcm_arch}.fcm ../ARCH/.   >> $outfile
276echo >> $outfile
277
278cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm ../ARCH/.
279
280if [ ${resol_oce} == ORCA2 ]   ; then  cfg_wrk=ORCA2_LIM_PISCES    ; fi
281if [ ${resol_oce} == ORCA1 ]   ; then  cfg_wrk=ORCA1_LIM3_PISCES    ; fi
282if [ ${resol_oce} == ORCA025 ] ; then  cfg_wrk=ORCA025_LIM3_PISCES  ; fi
283
284echo cp $modipsl/config/IPSLCM7/SOURCES/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/   >> $outfile
285echo >> $outfile
286cp $mysrc_path/NEMO/*.*90  $nemo_root/$cfg_wrk/MY_SRC/
287
288if [ $full_nemo == y ] ; then
289   # To make a full compilation, first make a clean to remove all files produced during previous compilation
290   echo ./makenemo -m ${fcm_arch} -n $cfg_wrk clean   >> $outfile
291   echo >> $outfile
292   ./makenemo -m ${fcm_arch} -n $cfg_wrk clean  >> $outfile 2>&1
293fi
294echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys"  del_key "$delkeys"   >> $outfile
295echo >> $outfile
296./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys"  del_key "$delkeys"  >> $outfile 2>&1
297
298
299# Test if compiling finished
300if [[ $? != 0 ]] ; then
301    echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP"
302    exit
303fi
304
305echo >> $outfile
306echo "Move nemo executable to modipsl/bin" >> $outfile
307echo ls -lrt $nemo_root/$cfg_wrk/BLD/bin   >> $outfile
308ls -lrt $nemo_root/$cfg_wrk/BLD/bin  >> $outfile
309echo >> $outfile
310
311if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then
312    if [ ${esmco2} == y ] ;  then
313        mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCO2_${resol_oce}_${optmode}
314    else
315        mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${resol_oce}_${optmode}
316    fi
317fi
318
319# Compile LMDZ
320cd $modipsl/modeles/LMDZ
321# Compile LMDZ as library to couple to DYNAMICO
322echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"
323echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile 
[6296]324# Retrieve the final svn release number, needed for radiative code suffix of executable
325lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'`
[5479]326# Temporary use of SOURCES/LMDZ to handle modifications needed by IPSLCM7
327cp $mysrc_path/LMDZ/*.*90  libf/phylmd/.
328
329# Check if the compilation of LMDZ was previsouly interupted prematured.
330# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm
331# to ask question and wait for interactivly answer from the user.
332if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
333  echo >> $outfile
334  echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
335  echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
336  echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
337  echo >> $outfile
338  rm -f libf/grid/dimensions.h
339  rm -f .lock
340fi
341
[6296]342# Need to define the proper option for radiative code compilation. By default, we use rrtm
343case $rad in
344    oldrad) opt_rad="" ;;
345    rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;;
346    ecrad)  opt_rad="-rad ecrad" ;;
347    *) echo Only oldrad rrtm ecrad for rad option ; exit
348esac
349
350if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi
351
352echo ./makelmdz_fcm -p lmd -c OMCT $opt_rad -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 
353     ./makelmdz_fcm -p lmd -c OMCT $opt_rad -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1
[5479]354# Test if compiling finished
355if [[ $? != 0 ]] ; then
356    echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP"
357    exit
358fi
359
360
361## 2.5 Compile DYNAMICO
362cd $modipsl/modeles/DYNAMICO
363echo; echo "NOW COMPILE DYNAMICO "
364echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
365
[6296]366echo ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl -with_oasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
367     ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl -with_oasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1
[5479]368# Test if compiling finished
369if [[ $? != 0 ]] ; then
370    echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP"
371    exit
372fi
373
374## 2.6 Compile interface ICOSA_LMDZ
375cd $modipsl/modeles/ICOSA_LMDZ
376echo; echo "NOW COMPILE ICOSA_LMDZ "
377echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile 
378
379echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_oasis -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
380     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_oasis -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1
381# Test if compiling finished
382if [[ $? != 0 ]] ; then
383    echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP"
384    exit
385fi
386# Move executables to modipsl/bin
387if [ -f $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then
388    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}.exe
389else
390    echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
391    exit
392fi
393
394
395
396## 2.7 Compile LMDZ for regular latlon configuration
397if [ $regular_latlon = yes ] ; then
398
399    cd $modipsl/modeles/LMDZ
400    # Compile LMDZ regular lat-lon exectuable
401    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"
402    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile 
403    # Check if the compilation of LMDZ was previsouly interupted prematured.
404    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm
405    # to ask question and wait for interactivly answer from the user.
406    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
407        echo >> $outfile
408        echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
409        echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
410        echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
411        echo >> $outfile
412        rm -f libf/grid/dimensions.h
413        rm -f .lock
414    fi
[6296]415    echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 
416         ./makelmdz_fcm -d ${resol_atm} -c OMCT -p lmd $opt_rad -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1
[5479]417    # Test if compiling finished
418    if [[ $? != 0 ]] ; then
419        echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
420        exit
421    fi
422
423    # Compile ce0l initialization program for LMDZ regular lat-lon exectuable
424    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"
425    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
426
427    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 
428         ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 2>&1
429    # Test if compiling finished
430    if [[ $? != 0 ]] ; then
431        echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
432        exit
433    fi
434
[6296]435# Find executable suffix
436suffix=_${resol_atm}_phylmd
437if [ $lmdzsvn -ge 4186 ] ; then suffix=${suffix}_${rad} ; fi
438if [ $parallel == seq ] || [ $parallel == none ] ; then
439    suffix=${suffix}_seq_orch.e
440else
441    suffix=${suffix}_para_mem_orch.e
442fi
443echo gcm suffix = $suffix
444
[5479]445   
446    # Move executables to modipsl/bin folder
447    echo "Move gcm.e and ce0l executable to modipsl/bin"
448    if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then
449        mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e
450    else
451        echo "ERROR gcm${suffix} executable does not exist." 
452        echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
453        exit
454    fi
455
456    if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then
457        mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e
458    else
459        echo "ERROR ce0l${suffix} executable does not exist." 
460        echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
461        exit
462    fi
463fi
464
465echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile
466echo ls -lrt modipsl/bin >> $outfile
467ls -lrt $modipsl/bin >> $outfile
468
469echo; echo "ALL COMPILING FINISHED" ; echo
470echo "Executables are found in modipsl/bin"
471echo "Check that executable names correspond with the name set in config.card before launching the job"
472echo ls -lrt modipsl/bin
473ls -lrt $modipsl/bin
474
475date
476
477exit
478
479
Note: See TracBrowser for help on using the repository browser.