source: CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh @ 6299

Last change on this file since 6299 was 6299, checked in by jgipsl, 18 months ago

Add a quickfix related to the subversion module. If there was a module for subversion loaded in the begining of the compilation, the same module will be loaded after the arch.env file has been sourced. We here suppose that the arch.env file contains a module purge which is currently the case for the arch.env in ARCH folder. This quickfix was done previously in ICOLMDZ configurations by A. Caubel.

Note that for compile_lmdzorinca.sh only an echo was added.

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