source: LMDZ5/trunk/makelmdz @ 2102

Last change on this file since 2102 was 2098, checked in by lguez, 10 years ago

Replaced 360 in calbeta_clim by length of current year according to
chosen calendar. Length of current year is given by
ioget_year_len. Since we already need this for ozone, moved the call
to ioget_year_len from physiq to phys_cal_mod and created variable
year_len of module phys_cal_mod.

Control the output from minmaxqfi.

Non-ASCII characters in comments are not always rendered properly and
they risk being lost. See revision 1740.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:executable set to *
File size: 18.5 KB
Line 
1#!/bin/bash
2#
3# $Id$
4#
5#
6########################################################################
7# for debug, uncomment line below
8#set -xv
9########################################################################
10# options par defaut pour la commande make
11########################################################################
12dim="96x72x19"
13physique=lmd
14code=gcm
15filtre=filtrez
16grille=reg
17couple=false
18veget=false
19chimie=false
20parallel=none
21paramem="par"
22compil_mod=prod
23io=ioipsl
24LIBPREFIX=""
25fcm_path=none
26cosp=false
27sisvat=false
28rrtm=false
29
30# guess a default 'arch'
31arch="local" # start with assuming we're on a local machine with local arch file
32## try to recognise machine and infer arch from it
33machine=`hostname`
34if [[ "${machine:0:3}" == "ada" ]]
35then
36  arch="X64_ADA"
37fi
38if [[ "${machine:0:7}" == "platine" ]]
39then
40  arch="IA64_PLATINE"
41fi
42if [[ "${machine:0:6}" == "titane" ]]
43then
44  arch="X64_TITANE"
45fi
46if [[ "${machine:0:8}" == "mercure1" ]]
47then
48  arch="SX8_MERCURE"
49fi
50if [[ "${machine:0:8}" == "mercure2" ]]
51then
52  arch="SX9_MERCURE"
53fi
54
55LMDGCM=`pwd -P`
56LIBFGCM=$LMDGCM/libf
57LIBOGCM=$LMDGCM/libo
58if [[ ! -d $LIBOGCM ]]
59then
60  # create the directory
61  mkdir $LIBOGCM
62  if [[ ! $? ]]
63  then
64  echo "Failed to create directory $LIBOGCM"
65  exit
66  fi
67fi
68COSP_PATH=$LMDGCM/.void_dir
69
70
71
72localdir=`pwd -P`
73########################################################################
74#  Quelques initialisations de variables du shell.
75########################################################################
76
77CPP_KEY="" 
78INCLUDE='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/filtrez -I. '
79LIB=""
80adjnt=""
81##COMPIL_FFLAGS="%PROD_FFLAGS"
82PARA_FFLAGS=""
83PARA_LD=""
84EXT_SRC=""
85
86########################################################################
87# lecture des options
88########################################################################
89
90while (($# > 0))
91  do
92  case $1 in
93      "-h") cat <<fin
94Usage :
95makelmdz [options] -arch nom_arch exec
96[-h]                       : brief help
97[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: $dim)
98[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
99[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
100[-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
101[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
102          false       : no vegetation model
103          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
104          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
105          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
106[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
107[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
108[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
109[-io ioipsl/mix/xios]                   : Input/Output library (default: ioipsl)
110[-include INCLUDES]        : extra include path to add
111[-cpp CPP_KEY]             : additional preprocessing definitions
112[-adjnt]                   : adjoint model, not operational ...
113[-mem]                     : reduced memory dynamics (if in parallel mode)
114[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
115[-link LINKS]              : additional links with other libraries
116[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
117[-ext_src path]            : path to an additional set of routines to compile with the model
118 -arch nom_arch            : target architecture
119 exec                      : executable to build
120fin
121          exit;;
122      "-d")
123          dim=$2 ; shift ; shift ;;
124     
125      "-p")
126          physique="$2" ;  shift ; shift ;;
127
128      "-g")
129          grille="$2" ; shift ; shift ;;
130
131      "-c")
132          couple="$2" ; shift ; shift ;;
133
134      "-prod")
135          compil_mod="prod" ; shift ;;
136
137      "-dev")
138          compil_mod="dev" ; shift ;;
139
140      "-debug")
141          compil_mod="debug" ; shift ;;
142
143      "-io")
144          io="$2" ; shift ; shift ;;
145
146      "-v")
147          veget="$2" ; shift ; shift ;;
148
149      "-chimie")
150          chimie="$2" ; shift ; shift ;;
151
152      "-parallel")
153          parallel="$2" ; shift ; shift ;;
154     
155      "-include")
156          INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
157
158      "-cpp")
159          CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
160
161      "-cosp")
162          cosp="$2" ; shift ; shift ;;
163     
164      "-sisvat")
165          sisvat="$2" ; shift ; shift ;;
166     
167      "-rrtm")
168          rrtm="$2" ; shift ; shift ;;
169     
170      "-mem")
171          paramem="mem" ; shift ;;
172
173      "-filtre")
174          filtre=$2 ; shift ; shift ;;
175
176      "-link")
177          LIB="$LIB $2" ; shift ; shift ;;
178
179      "-fcm_path")
180          fcm_path=$2 ; shift ; shift ;;
181
182      "-ext_src")
183          EXT_SRC=$2 ; shift ; shift ;;
184
185      "-arch")
186          arch=$2 ; shift ; shift ;;
187
188      *)
189          code="$1" ; shift ;;
190  esac
191done
192
193###############################################################
194# lecture des chemins propres \`a l'architecture de la machine #
195###############################################################
196rm -f .void_file
197echo > .void_file
198rm -rf .void_dir
199mkdir .void_dir
200rm -f arch.path
201if [[ -r arch/arch-${arch}.path ]]
202then
203  ln -s arch/arch-${arch}.path ./arch.path
204  source arch.path
205else
206  echo "Error: missing arch/arch-${arch}.path file !"
207  exit
208fi
209rm -f arch.fcm
210if [[ -r arch/arch-${arch}.fcm ]]
211then
212  ln -s arch/arch-${arch}.fcm arch.fcm
213else
214  echo "Error: missing arch/arch-${arch}.fcm file !"
215  exit
216fi
217########################################################################
218# Definition des clefs CPP, des chemins des includes et modules
219#  et des libraries
220########################################################################
221
222# basic compile flags from arch.fcm file
223archfileline=$( grep -i '^%BASE_FFLAGS' arch.fcm )
224COMPIL_FFLAGS=$( echo ${archfileline##%BASE_FFLAGS} )
225
226# other compile flags, depending on compilation mode
227if [[ "$compil_mod" == "prod" ]]
228then
229## read COMPIL_FFLAGS from arch.fcm file
230  archfileline=$( grep -i '^%PROD_FFLAGS' arch.fcm )
231  archfileopt=$( echo ${archfileline##%PROD_FFLAGS} )
232  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
233elif [[ "$compil_mod" == "dev" ]]
234then
235## read %DEV_FFLAGS from arch.fcm file
236  archfileline=$( grep -i '^%DEV_FFLAGS' arch.fcm )
237  archfileopt=$( echo ${archfileline##%DEV_FFLAGS} )
238  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
239elif [[ "$compil_mod" == "debug" ]]
240then
241## read %DEBUG_FFLAGS from arch.fcm file
242  archfileline=$( grep -i '^%DEBUG_FFLAGS' arch.fcm )
243  archfileopt=$( echo ${archfileline##%DEBUG_FFLAGS} )
244  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
245fi
246
247# add CPP_KEY defined in arch.fcm file
248archfileline=$( grep -i '^%FPP_DEF' arch.fcm )
249archfileopt=$( echo ${archfileline##%FPP_DEF} )
250CPP_KEY="$CPP_KEY ${archfileopt}"
251
252# get compiler name from arch.fcm file
253archfileline=$( grep -i '^%COMPILER' arch.fcm )
254fcompiler=$( echo ${archfileline##%COMPILER} )
255
256# get linker name from arch.fcm file
257archfileline=$( grep -i '^%LINK' arch.fcm )
258linker=$( echo ${archfileline##%LINK} )
259
260# get ar command from arch.fcm file
261archfileline=$( grep -i '^%AR' arch.fcm )
262arcommand=$( echo ${archfileline##%AR} )
263
264# get make utility from arch.fcm file
265archfileline=$( grep -i '^%MAKE' arch.fcm )
266makecommand=$( echo ${archfileline##%MAKE} )
267
268# get basic libraries to link with arch.fcm file
269archfileline=$( grep -i '^%BASE_LD' arch.fcm )
270archfileopt=$( echo ${archfileline##%BASE_LD} )
271LIB="$LIB  ${archfileopt}"
272
273# add Include files defined in arch.fcm file for pre-processing
274archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm )
275for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done
276
277if [[ "$physique" != "nophys" ]]
278then
279   #We'll use some physics
280   CPP_KEY="$CPP_KEY CPP_PHYS"
281   if [[ "${physique:0:3}" == "lmd" ]]
282   then
283   #For lmd physics, default planet type is Earth
284   CPP_KEY="$CPP_KEY CPP_EARTH"
285   fi
286fi
287
288if [[ "$chimie" == "INCA" ]]
289then
290   CPP_KEY="$CPP_KEY INCA"
291   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
292   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
293   libchimie=" -L${INCA_LIBDIR} -lchimie"
294fi
295
296if [[ "$couple" != "false" ]]
297then
298   CPP_KEY="$CPP_KEY CPP_COUPLE"
299   INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
300   LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
301fi
302
303if [[ "$parallel" == "none" ]]
304then
305  FLAG_PARA=''
306else
307  FLAG_PARA="$paramem"
308fi
309
310if [[ "$parallel" == "mpi" ]]
311then
312   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
313  # MPI additional compilation options
314  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
315  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
316  # MPI additional links
317  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
318  PARA_LD=$( echo ${archfileline##%MPI_LD} )
319elif [[ "$parallel" == "omp" ]]
320then
321   CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
322  # OMP additional compilation options
323  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
324  PARA_FFLAGS=$( echo ${archfileline##%OMP_FFLAGS} )
325  # OMP additional links
326  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
327  PARA_LD=$( echo ${archfileline##%OMP_LD} )
328elif [[ "$parallel" == "mpi_omp" ]]
329then
330   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
331  # MPI additional compilation options
332  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
333  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
334  # OMP additional compilation options
335  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
336  PARA_FFLAGS="${PARA_FFLAGS} "$( echo $archfileopt ${archfileline##%OMP_FFLAGS} )
337  # MPI additional links
338  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
339  PARA_LD=$( echo ${archfileline##%MPI_LD} )
340  # OMP additional links
341  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
342  PARA_LD="${PARA_LD} "$( echo $archfileopt ${archfileline##%OMP_LD} )
343fi
344
345if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \
346   && "$compil_mod" == "debug" ]]
347then
348    echo "Usually, parallelization with OpenMP requires some optimization."
349    echo "We suggest switching to \"-dev\"."
350fi
351
352
353#==============================================================================
354if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
355then
356
357   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
358   CPP_KEY="$CPP_KEY CPP_VEGET"
359# temporary, for Orchidee versions 1.9.* (before openmp activation)
360   if [[ "$veget" == "orchidee1.9" ]] ; then
361      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
362   fi
363   if [[ "$veget" == "orchidee2.0" ]] ; then
364      orch_libs="sechiba parameters stomate parallel orglob orchidee"
365   else
366      orch_libs="sechiba parameters stomate parallel orglob"
367   fi
368   LIB="${LIB} -L${ORCH_LIBDIR}"
369   for lib in ${orch_libs} ; do
370      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
371         LIB="${LIB} -l${LIBPREFIX}$lib "
372      fi
373   done
374elif [[ "$veget" != "false" ]] ; then
375   echo "Option -v $veget does not exist"
376   echo "Use ./makelmdz -h for more information"
377   exit 
378fi
379
380#===============================================================================
381if [[ $io == ioipsl ]]
382then
383   CPP_KEY="$CPP_KEY CPP_IOIPSL"
384   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
385   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
386elif [[ $io == mix ]]
387then
388   # For now, xios implies also using ioipsl
389   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
390   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
391   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
392elif [[ $io == xios ]]
393then
394   # For now, xios implies also using ioipsl
395   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
396   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
397   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
398fi
399
400if [[ "$cosp" == "true" ]]
401then
402   CPP_KEY="$CPP_KEY CPP_COSP"
403   COSP_PATH="$LIBFGCM/cosp"
404#   LIB="${LIB} -l${LIBPREFIX}cosp"
405   opt_dep="$opt_dep cosp"
406   lcosp="-l${LIBPREFIX}cosp"
407   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
408fi
409
410if [[ "$sisvat" == "true" ]]
411then
412   CPP_KEY="$CPP_KEY CPP_SISVAT"
413fi
414
415if [[ "$rrtm" == "true" ]]
416then
417   CPP_KEY="$CPP_KEY CPP_RRTM"
418fi
419
420
421INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
422LIB="$LIB ${NETCDF_LIBDIR}"
423
424########################################################################
425# calcul du nombre de dimensions
426########################################################################
427
428
429dim_full=$dim
430dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
431set $dim
432dimc=$#
433echo calcul de la dimension
434echo dim $dim
435echo dimc $dimc
436
437
438########################################################################
439# Gestion des dimensions du modele.
440# on cree ou remplace le fichier des dimensions
441########################################################################
442
443cd $LIBFGCM/grid
444if [[ -f dimensions.h ]]
445then
446  echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
447  echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
448  echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
449  echo  vous pouvez continuer en repondant oui.
450  echo "Voulez-vous vraiment continuer?"
451  echo ""
452  echo "WARNING: you are probably already compiling the model somewhere else."
453  echo "Wait until the first compilation is finished before launching this one."
454  echo "If you are sure that you are not compiling elsewhere, just answer "
455  echo "yes (or 'oui') to the question below to proceed."
456  echo "Do you wish to continue?"
457  read reponse
458  if [[ $reponse == "oui" || $reponse == "yes" ]]
459  then
460    \rm -f $LIBFGCM/grid/dimensions.h
461  else
462    exit
463  fi
464fi
465
466
467cd $LIBFGCM/grid/dimension
468./makdim $dim
469cat $LIBFGCM/grid/dimensions.h
470cd $LMDGCM
471
472
473########################################################################
474# Differentes dynamiques (3d, 2d, 1d)
475########################################################################
476
477if (( $dimc == 3 )) ; then
478   cd $LIBFGCM/grid
479   \rm fxyprim.h
480   cp -p fxy_${grille}.h fxyprim.h
481   filtre="FILTRE=$filtre"
482   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} -I$(LIBF)/dyn3d_common '
483elif (( $dimc == 2 )) ; then
484   filtre="FILTRE= L_FILTRE= "
485   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
486elif (( $dimc == 1 )) ; then
487   CPP_KEY="$CPP_KEY CPP_1D"
488   filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique "
489   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d -I$(LIBF)/dyn3d_common ' # Pas tres propre
490else
491   echo Dimension dimc=$dimc pas prevu ; exit
492fi
493
494
495cd $LMDGCM
496
497
498########################################################################
499#  Avant de lancer le make, on recree le makefile si necessaire
500########################################################################
501########################################################################
502# c'est a dire dans 3 cas:
503# 1. si la liste des fichiers .F et .h a ete modifiee depuis la
504#    derniere creation du makefile
505# 2. si le fichier contenant cette liste "liste_des_sources"
506#    n'existe pas.
507# 3. Si le makefile n'existe pas.
508########################################################################
509cd $LMDGCM
510
511find libf -name '*.[Fh]' -print > tmp77
512find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
513find libf -name '*.F90' -print >> tmp90
514
515if [[ ! ( -r makefile ) || ! ( -r liste_des_sources_f90 ) || ! ( -r liste_des_sources_f77 ) || ` diff tmp77 liste_des_sources_f77 | wc -w ` -ne 0 || ` diff tmp90 liste_des_sources_f90 | wc -w ` -ne 0 ]]
516then
517  echo "les fichiers suivants ont ete crees ou detruits"
518  echo "ou les fichiers suivants sont passes ou ne sont plus en Fortran 90"
519  diff liste_des_sources_f77 tmp77
520  diff liste_des_sources_f90 tmp90
521  \cp -f tmp77 liste_des_sources_f77
522  \cp -f tmp90 liste_des_sources_f90
523  echo "on recree le makefile"
524  ./create_make_gcm > tmp
525  \mv -f tmp makefile
526  echo "Nouveau makefile cree"
527fi
528
529#################################################################
530# Preparation de l'execution de la comande make
531#################################################################
532
533source_code=${code}.F
534if [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.F90 ]]
535then
536  source_code=${code}.F90
537elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then
538  source_code=${code}.F90
539fi
540
541# library directory name:
542nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
543echo $nomlib
544
545if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
546then
547  mkdir ${LIBOGCM}/${nomlib}
548  # check we indeed managed to create the directory
549  if [[ ! $? ]]
550  then
551    echo "Error: could not create directory ${LIBOGCM}/${nomlib}"
552    exit
553  fi
554fi
555
556# where module files are created
557mod_loc_dir=$localdir
558
559if [[ "$physique" != "nophys" ]]
560then
561  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
562fi
563INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
564
565# ranlib utility (check it exists or else default to ls)
566if [[ `which ranlib > /dev/null 2>&1 ; echo $?` -eq 0 ]]
567then
568  ranlib="ranlib"
569else
570  ranlib="ls"
571fi
572
573# add CPP keys to COMPIL_FLAGS
574# (but first add -D before all CPP_KEY items)
575cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-D&/g'`
576# (but add a -WF,-D before all CPP_KEY items) => for xlf on Vargas
577if [[ "${fcompiler:0:3}" == "xlf" ]]
578then
579cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-WF,-D&/g'`
580fi
581COMPIL_FFLAGS="${COMPIL_FFLAGS} ${cpp_definitions}"
582
583#################################################################
584# Execution du make
585#################################################################
586echo $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
587OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
588OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
589OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
590OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
591INCLUDE="$INCLUDE" \
592$filtre \
593LIBO=${LIBOGCM}/${nomlib} \
594"PHYS=$physique" \
595DIM=$dimc \
596FLAG_PARA=$FLAG_PARA \
597L_ADJNT=$adjnt \
598L_COSP="$lcosp" \
599L_CHIMIE="$libchimie" \
600LOCAL_DIR="$localdir"  \
601F77="$fcompiler" \
602F90="$fcompiler" \
603OPLINK="$LIB" \
604LINK="$linker" \
605GCM="$LMDGCM" \
606MOD_LOC_DIR=$mod_loc_dir \
607MOD_SUFFIX="mod" \
608AR=$arcommand \
609SOURCE=$source_code \
610PROG=$code
611
612$makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
613OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
614OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
615OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
616OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
617INCLUDE="$INCLUDE" \
618$filtre \
619LIBO=${LIBOGCM}/${nomlib} \
620"PHYS=$physique" \
621DIM=$dimc \
622FLAG_PARA=$FLAG_PARA \
623L_ADJNT=$adjnt \
624L_COSP="$lcosp" \
625L_CHIMIE="$libchimie" \
626LOCAL_DIR="$localdir"  \
627F77="$fcompiler" \
628F90="$fcompiler" \
629OPLINK="$LIB" \
630LINK="$linker" \
631GCM="$LMDGCM" \
632MOD_LOC_DIR=$mod_loc_dir \
633MOD_SUFFIX="mod" \
634AR=$arcommand \
635SOURCE=$source_code \
636PROG=$code
637
638
639if [[ -r $LIBFGCM/grid/dimensions.h ]]
640then
641  # Cleanup: remove dimension.h file
642  \rm -f $LIBFGCM/grid/dimensions.h
643fi
Note: See TracBrowser for help on using the repository browser.