source: LMDZ5/trunk/makelmdz_fcm @ 2337

Last change on this file since 2337 was 2336, checked in by dcugnet, 9 years ago
  • Add parallel capability for ce0l.
  • Small bug in grid_noro fixed (smoothed topography was used instead of unsmoothed one for geopotential computation at north pole).
  • Removed average of mass at poles in etat0dyn_netcdf after start_init_dyn => different results in the zoomed grid case.
  • ok_etat0=n and ok_limit=y combination now works fine (if no initial state is needed, but only limit.nc file). This required:
    • to move grid_noro0 and start_init_noro0 subroutines from etat0dyn_netcdf.F90 to limit_netcdf.F90
    • to create init_ssrf_m.F90 file, so that sub-surfaces can be initialized from limit_netcdf.F90 without any etat0*_netcdf routines call).
  • Simplified somehow the corresponding code, in particular: 1) removed obsolete flags "oldice". 2) removed flag "ibar": barycentric interpolation is used everywhere (except in start_init_subsurf, still calling grille_m - to be changed soon). 3) removed useless CPP_PHY precompilation directives, considering the possibility to run ce0l without physics is useless (ce0l is dedicated to Earth physics).
  • 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:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 17.4 KB
RevLine 
[1279]1#!/bin/bash
2# $Id: makelmdz_fcm 2336 2015-07-31 17:22:21Z dcugnet $
3# This is a script in Bash.
4
[2098]5# FH : on ne cr\'ee plus le fichier arch.mk qui est suppos\'e exister par
[783]6# FH : ailleurs.
[2098]7# FH : ulterieurement, ce fichier sera pr\'e-existant pour une s\'erie
8# FH : de configurations en versions optimis\'ees et debug qui seront
9# FH : li\'es (ln -s) avec arch.mk en fonction de l'architecture.
10# FH : Pour le moment, cette version est en test et on peut cr\'eer les
11# FH : arch.mk en lan\c{}cant une premi\`ere fois makegcm.
[783]12#
[1279]13##set -x
[2202]14set -e
[783]15########################################################################
16# options par defaut pour la commande make
17########################################################################
18
[1279]19dim="96x72x19"
20physique=lmd
21filtre=filtrez
22grille=reg
23couple=false
24veget=false
[1865]25sisvat=false
[1990]26rrtm=false
[1279]27chimie=false
28parallel=none
[1680]29paramem="par"
[1279]30compil_mod=prod
31io=ioipsl
32LIBPREFIX=""
33cosp=false
[1802]34job=1
35full=''
[783]36
[1279]37LMDGCM=`/bin/pwd`
38LIBOGCM=$LMDGCM/libo
39LIBFGCM=$LMDGCM/libf
[2239]40DYN_COMMON_PATH=$LIBFGCM/dyn3d_common
[2084]41# path for optional packages, but default set to ".void_dir"
[2239]42FILTRE_PATH=$LMDGCM/.void_dir
43DYN_PHYS_PATH=$LMDGCM/.void_dir
[2242]44DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
[2326]45PHY_COMMON_PATH=$LMDGCM/.void_dir
[2084]46RRTM_PATH=$LMDGCM/.void_dir
47SISVAT_PATH=$LMDGCM/.void_dir
[1327]48COSP_PATH=$LMDGCM/.void_dir
[1578]49fcm_path=$LMDGCM/tools/fcm/bin
[783]50
51########################################################################
52#  Quelques initialisations de variables du shell.
53########################################################################
54
[1279]55CPP_KEY="" 
56INCLUDE=""
57LIB=""
58adjnt=""
59COMPIL_FFLAGS="%PROD_FFLAGS"
60PARA_FFLAGS=""
61PARA_LD=""
62EXT_SRC=""
[783]63
64########################################################################
65# lecture des options de mymake
66########################################################################
67
[1279]68while (($# > 0))
69  do
70  case $1 in
71      "-h") cat <<fin
[783]72Usage :
[1772]73makelmdz_fcm [options] -arch nom_arch exec
74[-h]                       : brief help
75[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: $dim)
76[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
77[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
[1965]78[-c false/MPI1/OMCT]       : coupling with ocean model : MPI1/OMCT/false (default: false)
[1772]79[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
80          false       : no vegetation model
81          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
82          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
83          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
84[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
[2238]85[-cosp true/false]    : compile with/without cosp package (default: false)
86[-sisvat true/false]  : compile with/without sisvat package (default: false)
87[-rrtm true/false]    : compile with/without rrtm package (default: false)
[1772]88[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
89[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
[2097]90[-io ioipsl/mix/xios]                   : Input/Output library (default: ioipsl)
[1772]91[-include INCLUDES]        : extra include path to add
92[-cpp CPP_KEY]             : additional preprocessing definitions
93[-adjnt]                   : adjoint model, not operational ...
94[-mem]                     : reduced memory dynamics (if in parallel mode)
95[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
96[-link LINKS]              : additional links with other libraries
[1802]97[-j n]                     : active parallel compiling on ntask
98[-full]                    : full recompiling
[1772]99[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
100[-ext_src path]            : path to an additional set of routines to compile with the model
101 -arch nom_arch            : target architecture
102 exec                      : executable to build
[783]103fin
[1279]104          exit;;
[783]105
[1279]106      "-d")
107          dim=$2 ; shift ; shift ;;
108     
109      "-p")
110          physique="$2" ;  shift ; shift ;;
[783]111
[1279]112      "-g")
113          grille="$2" ; shift ; shift ;;
[783]114
[1279]115      "-c")
116          couple="$2" ; shift ; shift ;;
[783]117
[1279]118      "-prod")
119          compil_mod="prod" ; shift ;;
[1002]120
[1279]121      "-dev")
122          compil_mod="dev" ; shift ;;
[1002]123
[1279]124      "-debug")
125          compil_mod="debug" ; shift ;;
[1002]126
[1279]127      "-io")
128          io="$2" ; shift ; shift ;;
[783]129
[1279]130      "-v")
131          veget="$2" ; shift ; shift ;;
[783]132
[1865]133      "-sisvat")
134          sisvat="$2" ; shift ; shift ;;
135
[1990]136      "-rrtm")
137          rrtm="$2" ; shift ; shift ;;
138
[1279]139      "-chimie")
140          chimie="$2" ; shift ; shift ;;
[783]141
[1279]142      "-parallel")
143          parallel="$2" ; shift ; shift ;;
144     
145      "-include")
146          INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
[783]147
[1279]148      "-cpp")
149          CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
[1132]150
[1279]151      "-adjnt")
[1772]152          echo "not operational ... work to be done here ";exit
[1279]153          opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
154          optim="$optim -Dadj" ; shift ;;
[783]155
[1279]156      "-cosp")
157          cosp="$2" ; shift ; shift ;;
[1680]158     
159      "-mem")
160          paramem="mem" ; shift ;;
[783]161
[1279]162      "-filtre")
163          filtre=$2 ; shift ; shift ;;
[783]164
[1279]165      "-link")
166          LIB="$LIB $2" ; shift ; shift ;;
[1136]167
[1279]168      "-fcm_path")
169          fcm_path=$2 ; shift ; shift ;;
[783]170
[1279]171      "-ext_src")
172          EXT_SRC=$2 ; shift ; shift ;;
[1802]173      "-j")
174          job=$2 ; shift ; shift ;;
175      "-full")
176          full="-full" ; shift ;;
[783]177
[1279]178      "-arch")
179          arch=$2 ; shift ; shift ;;
[783]180
[1279]181      *)
182          code="$1" ; shift ;;
183  esac
184done
185
[1136]186###############################################################
[1755]187# path to fcm
[1136]188###############################################################
[1755]189# handle case when provided path to fcm was given as a relative
190# path (from makelmdz_fcm script directory) and not an absolute path
191if [[ ${fcm_path:0:1} != "/" ]] ; then
192  # prepend with makelmdz_fcm location
193  fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path}
194fi
[783]195
[1757]196# add fcm_path to PATH
197export PATH=${fcm_path}:${PATH}
198
[1755]199echo "Path to fcm:"
200echo ${fcm_path}
[1136]201
[783]202###############################################################
[2098]203# lecture des chemins propres \`a l'architecture de la machine #
[783]204###############################################################
[1279]205rm -f .void_file
206echo > .void_file
[1327]207rm -rf .void_dir
208mkdir .void_dir
[1279]209rm -f arch.path
210ln -s arch/arch-${arch}.path ./arch.path
[783]211source arch.path
212
213########################################################################
214# Definition des clefs CPP, des chemins des includes et modules
215#  et des libraries
216########################################################################
217
[1279]218if [[ "$compil_mod" == "prod" ]]
219then
220  COMPIL_FFLAGS="%PROD_FFLAGS"
221elif [[ "$compil_mod" == "dev" ]]
222then
223  COMPIL_FFLAGS="%DEV_FFLAGS"
224elif [[ "$compil_mod" == "debug" ]]
225then
226  COMPIL_FFLAGS="%DEBUG_FFLAGS"
227fi
[783]228
[2250]229phys_root=$physique
230if [[ "${physique:0:3}" == "lmd" ]] ; then phys_root=lmd ; fi
231if [[ "${physique:0:4}" == "mars" ]] ; then phys_root=mars ; fi
232if [[ "${physique:0:3}" == "std" ]] ; then phys_root=std ; fi
233if [[ "${physique:0:5}" == "venus" ]] ; then phys_root=venus ; fi
234if [[ "${physique:0:5}" == "titan" ]] ; then phys_root=titan ; fi
235if [[ "${physique:0:3}" == "mar" ]] ; then phys_root=mar ; fi
236if [[ "${physique:0:3}" == "dev" ]] ; then phys_root=dev ; fi
237
[1279]238if [[ "$physique" != "nophys" ]]
239then
[1615]240   #We'll use some physics
241   CPP_KEY="$CPP_KEY CPP_PHYS"
[2250]242   if [[ "${phys_root}" == "lmd" ]]
[1615]243   then
244   #For lmd physics, default planet type is Earth
[1279]245   CPP_KEY="$CPP_KEY CPP_EARTH"
[1615]246   fi
[2326]247   # set physics common utilities path
248   PHY_COMMON_PATH="${LIBFGCM}/phy_common"
[2239]249   # set the dyn/phys interface path
[2242]250   DYN_PHYS_PATH="${LIBFGCM}/dynlonlat_phylonlat"
[2250]251   DYN_PHYS_SUB_PATH="${LIBFGCM}/dynlonlat_phylonlat/phy${phys_root}"
[1279]252fi
[783]253
[2239]254if [[ "$filtre" == "filtrez" ]]
255then
256   FILTRE_PATH=${LIBFGCM}/$filtre
257fi
258
[1279]259if [[ "$chimie" == "INCA" ]]
260then
261   CPP_KEY="$CPP_KEY INCA"
262   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
263   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
264fi
[783]265
[1279]266if [[ "$couple" != "false" ]]
267then
[1965]268    if [[ "$couple" == "MPI1" ]]
269    then
270        CPP_KEY="$CPP_KEY CPP_COUPLE"
271        export OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.MPI1
272        export OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib
273        INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
274        LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lmpp_io"
275    else
276        CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT"
277        INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
278        LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu"
279    fi
[1279]280fi
[783]281
[1279]282if [[ "$parallel" == "mpi" ]]
283then
284   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
285   PARA_FFLAGS="%MPI_FFLAGS"
286   PARA_LD="%MPI_LD"
287elif [[ "$parallel" == "omp" ]]
288then
289   CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
290   PARA_FFLAGS="%OMP_FFLAGS"
291   PARA_LD="%OMP_LD"
292elif [[ "$parallel" == "mpi_omp" ]]
293then
294   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
295   PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS"
296   PARA_LD="%MPI_LD %OMP_LD"
297fi
[783]298
[1279]299if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \
300   && "$compil_mod" == "debug" ]]
301then
302    echo "Usually, parallelization with OpenMP requires some optimization."
303    echo "We suggest switching to \"-dev\"."
304fi
[783]305
[1811]306if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
[1279]307then
[1811]308#NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
309#    For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
310#    option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
[1279]311   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
[1772]312   CPP_KEY="$CPP_KEY CPP_VEGET"
[1811]313# temporary, for Orchidee versions 1.9.* (before openmp activation)
314   if [[ "$veget" == "orchidee1.9" ]] ; then
315      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
316   fi
317   if [[ "$veget" == "orchidee2.0" ]] ; then
[1854]318      orch_libs="sechiba parameters stomate parallel orglob orchidee"
[1811]319   else
320      orch_libs="sechiba parameters stomate parallel orglob"
321   fi
322   LIB="${LIB} -L${ORCH_LIBDIR}"
323   for lib in ${orch_libs} ; do
324      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
325         LIB="${LIB} -l${LIBPREFIX}$lib "
326      fi
327   done
328elif [[ "$veget" != "false" ]] ; then
[1772]329   echo "Option -v $veget does not exist"
330   echo "Use ./makelmdz_fcm -h for more information"
331   exit 
[1279]332fi
[783]333
[1865]334if [[ "$sisvat" == "true" ]]
335then
336   CPP_KEY="$CPP_KEY CPP_SISVAT"
[2084]337   SISVAT_PATH="$LIBFGCM/%PHYS/sisvat"
[1865]338fi
339
[1990]340if [[ "$rrtm" == "true" ]]
341then
342   CPP_KEY="$CPP_KEY CPP_RRTM"
[2084]343   RRTM_PATH="$LIBFGCM/%PHYS/rrtm"
[1990]344fi
345
[1279]346if [[ $io == ioipsl ]]
347then
348   CPP_KEY="$CPP_KEY CPP_IOIPSL"
349   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
350   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
[2097]351elif [[ $io == mix ]]
[1897]352then
353   # For now, xios implies also using ioipsl
354   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
355   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
356   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
[2097]357elif [[ $io == xios ]]
358then
359   # For now, xios implies also using ioipsl
360   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
361   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
362   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
[1279]363fi
[1897]364
[1279]365if [[ "$cosp" == "true" ]]
366then
367   CPP_KEY="$CPP_KEY CPP_COSP"
[2239]368   COSP_PATH="$LIBFGCM/phylmd/cosp"
[1279]369#   LIB="${LIB} -l${LIBPREFIX}cosp"
370fi
[783]371
[1551]372INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
373LIB="$LIB ${NETCDF_LIBDIR}"
374
[783]375########################################################################
376# calcul du nombre de dimensions
377########################################################################
378
379
[1279]380dim_full=$dim
381dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
382set $dim
383dimc=$#
[783]384echo calcul de la dimension
385echo dim $dim
386echo dimc $dimc
387
388
389########################################################################
390# Gestion des dimensions du modele.
[1114]391# on cree ou remplace le fichier des dimensions
[783]392########################################################################
393
[1695]394cd $LIBFGCM/grid
395if [[ -f dimensions.h ]]
396then
397  echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
398  echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
399  echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
400  echo  vous pouvez continuer en repondant oui.
401  echo "Voulez-vous vraiment continuer?"
[1755]402  echo ""
403  echo "WARNING: you are probably already compiling the model somewhere else."
404  echo "Wait until the first compilation is finished before launching this one."
405  echo "If you are sure that you are not compiling elsewhere, just answer "
406  echo "yes (or 'oui') to the question below to proceed."
407  echo "Do you wish to continue?"
[1695]408  read reponse
[1755]409  if [[ $reponse == "oui" || $reponse == "yes" ]]
[1695]410  then
[1696]411    \rm -f $LIBFGCM/grid/dimensions.h
[1695]412  else
413    exit
414  fi
415fi
416
417
[783]418cd $LIBFGCM/grid/dimension
[1114]419./makdim $dim
[783]420cat $LIBFGCM/grid/dimensions.h
421cd $LMDGCM
422
423
424########################################################################
425# Differentes dynamiques (3d, 2d, 1d)
426########################################################################
427
[1279]428dimension=`echo $dim | wc -w`
[783]429echo dimension $dimension
430
[1279]431if (( $dimension == 3 ))
432then
[783]433  cd $LIBFGCM/grid
434  \rm fxyprim.h
435  cp -p fxy_${grille}.h fxyprim.h
[2239]436#else
437#  echo "Probleme dans les dimensions de la dynamique !!"
438#  echo "Non reactive pour l'instant !!!"
[1279]439fi
[783]440
[2239]441if (( $dimension == 1 ))
442then
443  CPP_KEY="$CPP_KEY CPP_1D"
444##in 1D, add dyn3d to include path (because main prog is in physics)
445  INCLUDE="$INCLUDE -Ilibf/dyn3d -Ilibf/dyn3d_common"
446## no filtre in 1d:
447  FILTRE_PATH=$LMDGCM/.void_dir
448## no need to compile all routines in dyn3d_common either:
449  DYN_COMMON_PATH=$LMDGCM/.void_dir
450## no need to compile all routines in dynlmdz_phy... ;
451## (because key ones are included in 1D main program)
452  DYN_PHYS_PATH=$LMDGCM/.void_dir
[2242]453  DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
[2239]454fi
455
[783]456######################################################################
457#   Traitement special pour le nouveau rayonnement de Laurent Li.
458#   ---> YM desactive pour le traitemement en parallele
459######################################################################
460
[1279]461#if [[ -f $libf/phy$physique/raddim.h ]]
462#then
463# if [[ -f $libf/phy$physique/raddim.$dimh.h ]]
464#then
[783]465#  \rm -f $libf/phy$physique/raddim.h
466#  cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h
467#  echo $libf/phy$physique/raddim.$dimh.h
468#  cat $libf/phy$physique/raddim.h
469# else
470#  echo On peut diminuer la taille de l executable en creant
471#  echo le fichier $libf/phy$physique/raddim.$dimh.h
472#  \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h
[1279]473# fi
474#fi
[783]475
476######################################################################
477# Gestion du filtre qui n'existe qu'en 3d.
478######################################################################
479
[1279]480if (( `expr $dimc \> 2` == 1 ))
481then
482   filtre="FILTRE=$filtre"
[783]483else
[1279]484   filtre="FILTRE= L_FILTRE= "
485fi
[783]486echo MACRO FILTRE $filtre
487
488echo $dimc
489
490
491
492######################################################################
493# Creation du suffixe de la configuration
494######################################################################
495
496
[1279]497SUFF_NAME=_${dim_full}
498SUFF_NAME=${SUFF_NAME}_phy${physique}
[783]499
[1279]500if [[ "$parallel" != "none" ]]
501then
502  SUFF_NAME=${SUFF_NAME}_para
[1680]503  DYN=dyn${dimc}d${paramem}
504  if [[ "$paramem" == "mem" ]]
505  then
[2202]506      SUFF_NAME=${SUFF_NAME}_${paramem}
507  else
508      echo "The version of the dynamics in dyn3dpar is no longer updated."
509      echo "You should use option \"-mem\"."
510      exit 1
[1680]511  fi
[783]512else
[1279]513  SUFF_NAME=${SUFF_NAME}_seq
[2239]514  if (( $dimension == 1 ))
515  then
516    # dynamics-related routines in"dyn1d" subdirectory of phy${physique}
517    DYN=phy${physique}/dyn1d
518  else
519    DYN=dyn${dimc}d
520  fi
[1279]521fi
[783]522
[1772]523if [[ $veget != "false" ]]
[1279]524then
525  SUFF_NAME=${SUFF_NAME}_orch
526fi
[783]527
[1279]528if [[ $couple != "false" ]]
529then
530  SUFF_NAME=${SUFF_NAME}_couple
531fi
[783]532
[1279]533if [[ $chimie == "INCA" ]]
534then
535  SUFF_NAME=${SUFF_NAME}_inca
536fi
[783]537
538cd $LMDGCM
[1279]539config_fcm="config.fcm"
[783]540rm -f $config_fcm
541touch $config_fcm
542rm -f bin/${code}${SUFF_NAME}.e
543rm -f arch.fcm
[1279]544rm -f arch.opt
[783]545
546echo "%ARCH          $arch"          >> $config_fcm
547echo "%INCDIR        $INCLUDE"       >> $config_fcm 
548echo "%LIB           $LIB"           >> $config_fcm
549echo "%ROOT_PATH     $PWD"           >> $config_fcm
550echo "%LIBF          $LIBFGCM"       >> $config_fcm
551echo "%LIBO          $LIBOGCM"       >> $config_fcm
552echo "%DYN           $DYN"           >> $config_fcm
[2239]553echo "%DYN_COMMON    $DYN_COMMON_PATH" >> $config_fcm
[2326]554echo "%PHY_COMMON    $PHY_COMMON_PATH" >> $config_fcm
[2239]555echo "%FILTRE        $FILTRE_PATH"   >> $config_fcm
[783]556echo "%PHYS          phy${physique}" >> $config_fcm
[2239]557echo "%DYN_PHYS      $DYN_PHYS_PATH" >> $config_fcm
[2242]558echo "%DYN_PHYS_SUB  $DYN_PHYS_SUB_PATH" >> $config_fcm
[2084]559echo "%RRTM          $RRTM_PATH"     >> $config_fcm
560echo "%SISVAT        $SISVAT_PATH"   >> $config_fcm
[1327]561echo "%COSP          $COSP_PATH"     >> $config_fcm
[783]562echo "%CPP_KEY       $CPP_KEY"       >> $config_fcm
563echo "%EXEC          $code"          >> $config_fcm
564echo "%SUFF_NAME     $SUFF_NAME"     >> $config_fcm
[1002]565echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> $config_fcm
566echo "%PARA_FFLAGS   $PARA_FFLAGS"   >> $config_fcm
567echo "%PARA_LD       $PARA_LD"       >> $config_fcm
[1279]568echo "%EXT_SRC       $EXT_SRC"       >> $config_fcm
[783]569
[1002]570
571
[1137]572ln -s arch/arch-${arch}.fcm arch.fcm
[1279]573if test -f arch/arch-${arch}.opt &&  [ $compil_mod = "prod" ]
574  then
575  ln -s arch/arch-${arch}.opt arch.opt
576else
577  ln -s .void_file arch.opt
578fi
579
[1002]580rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock
[1802]581./build_gcm ${fcm_path} -j $job $full
[783]582
[1279]583rm -rf tmp_src
584rm -rf config
[783]585ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config config
586ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src
[1695]587
[1869]588
[1696]589if [[ -r $LIBFGCM/grid/dimensions.h ]]
[1695]590then
591  # Cleanup: remove dimension.h file
[1696]592  \rm -f $LIBFGCM/grid/dimensions.h
[1695]593fi
Note: See TracBrowser for help on using the repository browser.