source: CONFIG/UNIFORM/v6/IPSLCM6.3/compile_ipslcm6.sh @ 6800

Last change on this file since 6800 was 6664, checked in by acosce, 7 months ago

update IPSLCM6.3 configuration
1- remove option ESMCO2 from compilation
2- add option multi_sources_nat for futur commit in INCA

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