Juan 8/12/2016: add management of LEN_HREC in MNH & SURFEX
[MNH-git_open_source-lfs.git] / src / Makefile.MESONH.mk
1 #MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 #MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3 #MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
4 #MNH_LIC for details. version 1.
5 ##########################################################
6 #                                                        #
7 #           Initialisation of some variables             #
8 #                                                        #
9 ##########################################################
10 ifdef OBJDIR_PATH
11 OBJDIR_ROOT=${OBJDIR_PATH}/dir_obj
12 else
13 OBJDIR_ROOT=${PWD}/dir_obj
14 endif
15 LIB_OBJS_ROOT=lib
16 #
17 ARCH_XYZ=${ARCH}${MNH_REAL}I${MNH_INT}-${VERSION_XYZ}
18 ##########################################################
19 #                                                        #
20 #            Source DIRECTORY                            #
21 #                                                        #
22 ##########################################################
23
24 ##########################################################
25 #           Source MYSRC                                 #
26 ##########################################################
27 ifdef VER_USER
28 DIR_USER += ${VER_USER}
29 endif
30 ##########################################################
31 #           Source MNH                                   #
32 ##########################################################
33 # PRE_BUG TEST !!!
34 #DIR_MNH += ARCH_SRC/bug_mnh
35 # PRE_BUG TEST !!!
36 #
37 DIR_MNH += MNH
38 INC_MNH += -I$(B)include
39 #CPPFLAGS_MNH =
40 #
41 ifdef DIR_MNH
42 DIR_MASTER += $(DIR_MNH)
43 CPPFLAGS   += $(CPPFLAGS_MNH)
44 INC        += $(INC_MNH)
45
46 ifeq "$(MNH_INT)" "8"
47 CPPFLAGS   += -DMNH_INT8
48 endif
49
50 #
51 #  Len of HREC characters 
52 #
53 CPPFLAGS   += -DLEN_HREC=$(LEN_HREC)
54 #
55
56 OBJS_NOCB +=  spll_dxf.o spll_dxm.o spll_dyf.o spll_dym.o \
57         spll_dzf.o spll_dzm.o spll_mxf.o \
58         spll_mxm.o spll_myf.o spll_mym.o spll_mzf.o \
59         spll_mzm.o spll_mzf4.o spll_mzm4.o  \
60         spll_gx_m_m.o spll_gx_m_u.o spll_gy_m_m.o \
61         spll_gy_m_v.o spll_gz_m_m.o spll_gz_m_w.o \
62         spll_dzf_mf.o spll_dzm_mf.o spll_mzf_mf.o spll_mzm_mf.o
63
64 $(OBJS_NOCB) : OPT = $(OPT_NOCB)
65
66 OBJS0 += spll_switch_sbg_lesn.o spll_mode_mppdb.o
67
68 $(OBJS0)     : OPT = $(OPT0) 
69
70 endif
71 ##########################################################
72 #           Source SURFEX                                #
73 ##########################################################
74 # PRE_BUG TEST !!!
75 #DIR_SURFEX += ARCH_SRC/bug_surfex
76 # PRE_BUG TEST !!!
77 #
78 DIR_SURFEX += ARCH_SRC/surfex
79 DIR_SURFEX += SURFEX
80 CPPFLAGS_SURFEX += -DMNH_PARALLEL
81 #
82 ifdef DIR_SURFEX
83 DIR_MASTER += $(DIR_SURFEX)
84 CPPFLAGS   += $(CPPFLAGS_SURFEX)
85 VER_SURFEX=SURFEX-4-8-0
86 #ARCH_XYZ    := $(ARCH_XYZ)-$(VER_MYSRC)
87
88 OBJS_NOCB +=  spll_mode_cover_301_573.o 
89
90 $(OBJS0): OPT = $(OPT0) 
91
92 endif
93 ##########################################################
94 #           Source SURCOUCHE                             #
95 ##########################################################
96 # PRE_BUG TEST !!!
97 #DIR_SURCOUCHE += ARCH_SRC/bug_surcouche
98 # PRE_BUG TEST !!!
99 #
100 DIR_SURCOUCHE += LIB/SURCOUCHE/src
101 #CPPFLAGS_SURCOUCHE = -DMNH_MPI_DOUBLE_PRECISION -DMNH_LINUX -DMNH_MPI_BSEND -DNAGf95
102 #
103 ifdef DIR_SURCOUCHE
104 DIR_MASTER   += $(DIR_SURCOUCHE)
105 CPPFLAGS     += $(CPPFLAGS_SURCOUCHE)
106 #VER_SURCOUCHE=
107 #ARCH_XYZ    := $(ARCH_XYZ)-$(VER_SURCOUCHE)
108 endif
109 ##########################################################
110 #           Source RAD                                   #
111 ##########################################################
112 # PRE_BUG TEST !!!
113 #DIR_RAD      += ARCH_SRC/bug_rad
114 # PRE_BUG TEST !!!
115 #
116 DIR_RAD      +=  LIB/RAD/ECMWF_RAD
117 #CPPFLAGS_RAD =
118 INC_RAD      = -I$(B)LIB/RAD/ECMWF_RAD
119 #
120 ifdef DIR_RAD
121 DIR_MASTER  += $(DIR_RAD)
122 CPPFLAGS    += $(CPPFLAGS_RAD)
123 INC         += $(INC_RAD)
124
125 IGNORE_DEP_MASTER   += olwu.D olwv.D rad1Driv_MACLATMOSPH_60LEVELS_ICRCCM3.D tstrad.D tstrad_chansubset.D tstrad_rttov7.D \
126                        tstrad_sx6.D
127
128 OBJS0 += spll_rrtm_kgb1.o spll_rrtm_kgb14.o spll_rrtm_kgb3_a.o spll_rrtm_kgb4_b.o \
129         spll_rrtm_kgb5_c.o spll_rrtm_kgb10.o spll_rrtm_kgb15.o spll_rrtm_kgb3_b.o \
130         spll_rrtm_kgb4_c.o spll_rrtm_kgb6.o spll_rrtm_kgb11.o spll_rrtm_kgb16.o \
131         spll_rrtm_kgb3_c.o spll_rrtm_kgb5.o spll_rrtm_kgb7.o spll_rrtm_kgb12.o \
132         spll_rrtm_kgb2.o spll_rrtm_kgb4.o spll_rrtm_kgb5_a.o spll_rrtm_kgb8.o \
133         spll_rrtm_kgb13.o spll_rrtm_kgb3.o spll_rrtm_kgb4_a.o spll_rrtm_kgb5_b.o \
134         spll_rrtm_kgb9.o spll_read_xker_raccs.o spll_read_xker_rdryg.o spll_read_xker_sdryg.o \
135         spll_suecaebc.o  spll_suecaec.o  spll_suecaeor.o  spll_suecaesd.o \
136         spll_suecaess.o  spll_suecaesu.o spll_suecozc.o  spll_suecozo.o
137
138 $(OBJS0): OPT = $(OPT0) 
139
140 endif
141 ##########################################################
142 #           Source RTTOV                                 #
143 ##########################################################
144 ifdef MNH_RTTOV
145 DIR_RTTOV      +=  LIB/RTTOV/src
146 CPPFLAGS_RTTOV = -DMNH_RTTOV
147 INC_RTTOV      = -I$(B)LIB/RTTOV/src
148 #
149 DIR_MASTER  += $(DIR_RTTOV)
150 CPPFLAGS    += $(CPPFLAGS_RTTOV)
151 INC         += $(INC_RTTOV)
152 CPPFLAGS_MNH += -DMNH_RTTOV=${MNH_RTTOV}
153 #VER_RTTOV      = RTTOV87
154 #ARCH_XYZ    := $(ARCH_XYZ)-$(VER_RAD)
155 endif
156 ##########################################################
157 #           Source NEWLFI                                #
158 ##########################################################
159 DIR_NEWLFI      += LIB/NEWLFI/src
160 #CPPFLAGS_NEWLFI = -DSWAPIO -DLINUX
161 INC_NEWLFI      = -I$(B)LIB/NEWLFI/src
162 #
163 ifdef DIR_NEWLFI
164 #
165 # Management/parametrisation of size of INTEGER ofr file > 16 GO & RECL for LFI
166 #
167 LFI_INT?=4
168 ifneq "$(findstring 8,$(LFI_INT))" ""
169 OBJS_I8=spll_NEWLFI_ALL.o
170 $(OBJS_I8) : OPT = $(OPT_BASE) $(OPT_PERF2) $(OPT_INT8)
171 endif
172 #
173 # Management/parametrisation of size of RECL for LFI I/O speedup 
174 #
175 LFI_RECL?=512
176 #
177 DIR_MASTER          += $(DIR_NEWLFI)
178 CPPFLAGS            += $(CPPFLAGS_NEWLFI)
179 OBJS_LISTE_MASTER   += fswap8buff.o
180 INC                 += $(INC_NEWLFI)
181 VPATH               += $(DIR_NEWLFI)
182 #VER_NEWLFI=
183 #ARCH_XYZ    := $(ARCH_XYZ)-$(VER_NEWLFI)
184 endif
185 ##########################################################
186 #           Source NCWRIT                                #
187 ##########################################################
188 ifdef MNH_NCWRIT
189 CPPFLAGS_MNH += -DMNH_NCWRIT=${MNH_NCWRIT}
190 endif
191 ##########################################################
192 #           Source FOREFIRE                              #
193 ##########################################################
194 ifdef MNH_FOREFIRE
195 DIR_FOREFIRE          += LIB/FOREFIRE
196 INC_FOREFIRE           = -I$(B)$(DIR_FOREFIRE)
197 DIR_MASTER            += $(DIR_FOREFIRE)
198 OBJS_LISTE_MASTER     += C_ForeFire_Interface.o
199 INC                   += $(INC_FOREFIRE)
200 VPATH                 += $(DIR_FOREFIRE)
201 CPPFLAGS              += -DMNH_FOREFIRE
202 endif
203 ##########################################################
204 #           Source TOOLS                                 #
205 ##########################################################
206 ifdef MNH_TOOLS
207 DIR_TOOLS  += ../LIBTOOLS/tools/lfi2cdf/src
208 INC_TOOLS  += -I$(B)$(DIR_TOOLS)
209 DIR_MASTER += $(DIR_TOOLS)
210 INC        += $(INC_TOOLS)
211 VPATH      += $(DIR_TOOLS)
212 CPPFLAGS   += -DLOWMEM
213 endif
214 ##########################################################
215 #           Source MPIVIDE                               #
216 ##########################################################
217 #
218 ifndef VER_MPI
219 VER_MPI=MPIVIDE
220 endif
221 #VER_MPI=MPIVIDE,LAMMPI,LAMMPI-IB,MPICH-IB
222 #
223 #   MPIVIDE
224 #
225 ifeq "$(VER_MPI)" "MPIVIDE"
226 DIR_MPI               += LIB/MPIvide
227 INC_MPI                = -I$(B)$(DIR_MPI)
228 DIR_MASTER            += $(DIR_MPI)
229 OBJS_LISTE_MASTER     += mpivide.o
230 INC                   += $(INC_MPI)
231 mpivide.o  : CPPFLAGS += -DFUJI -DMNH_INT=$(MNH_INT)\
232                         -I$(DIR_MPI)/include
233 VPATH                 += $(DIR_MPI)
234 endif
235 #
236 #   LAMMPI
237 #
238 ifeq "$(VER_MPI)" "LAMMPI"
239 # Standard Lam mpi
240 #INC_MPI     = -I$(B)/opt/lam/include
241 #LIB_MPI     = -L/opt/lam/lib   -lmpi -llammpi++ -llammpio -llamf77mpi -lmpi -llam -lpthread -ldl
242 # default 64 bits SUSE 9 version
243 INC_MPI     = -I$(B)/usr/include
244 LIB_MPI     = -lmpi -llammpi++ -llammpio -llamf77mpi -lmpi -llam -lpthread -ldl -lutil 
245 INC            += $(INC_MPI)
246 LIBS           += $(LIB_MPI)
247 endif
248 #
249 #   LAMMPI-IB
250 #
251 ifeq "$(VER_MPI)" "LAMMPI-IB"
252 INC_MPI     = -I/home/sila/LAM-7.1.1/include
253 LIB_MPI     = -L/usr/local/ibgd/driver/infinihost/lib64 -L/home/sila/LAM-7.1.1/lib \
254 -llammpio -llamf77mpi -lmpi -llam -lutil -lmosal -lmpga -lmtl_common -lvapi -ldl  -lpthread
255 INC            += $(INC_MPI)
256 LIBS           += $(LIB_MPI)
257 endif
258 #
259 #   MPICH-IB
260 #
261 ifeq "$(VER_MPI)" "MPICH-IB"
262 INC_MPI     = -I/usr/local/ibgd/mpi/osu/f95/mvapich-0.9.5/include
263 LIB_MPI     = -L/usr/local/ibgd/driver/infinihost/lib64 \
264                  -L/usr/local/ibgd/mpi/osu/f95/mvapich-0.9.5/lib \
265                  -lmpich -lmtl_common -lvapi -lmosal -lmpga -lpthread
266 INC            += $(INC_MPI)
267 LIBS           += $(LIB_MPI)
268 endif
269 #
270 #   MPICH-2 CNRM
271 #
272 ifeq "$(VER_MPI)" "MPICH2"
273 INC_MPI     = -I/usr/include
274 LIB_MPI     = -lmpichf90 -lmpich 
275 INC            += $(INC_MPI)
276 LIBS           += $(LIB_MPI)
277 endif
278
279 #
280 #   OPENMPI 1.1 CNRM
281 #
282 ifeq "$(VER_MPI)" "OMPICNRM"
283 MPI_ROOT=/opt/openmpi
284 INC_MPI = -I${MPI_ROOT}/include  -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib64
285 LIB_MPI     = -L${MPI_ROOT}/lib64 -lmpi -lopen-rte -lopen-pal -lutil -lnsl -ldl -Wl,--export-dynamic -lm -lutil -lnsl -ldl
286 INC            += $(INC_MPI)
287 LIBS           += $(LIB_MPI)
288 endif
289
290 #
291 #   OPENMPI 1.1 BPROC + OPENIB + IFORT
292 #
293 ifeq "$(VER_MPI)" "OMPIIFORT"
294 MPI_ROOT=/home/sila/DEV/OPEN-MPI-11-IFORT-BPROC-OPENIB
295 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
296 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi -lorte -lopal -lutil -lnsl -ldl -Wl,--export-dynamic -lm -lutil -lnsl -ldl
297 INC            += $(INC_MPI)
298 LIBS           += $(LIB_MPI)
299 endif
300
301 #
302 #   OPENMPI 1.1.4 IFORT BPROC
303 #
304 ifeq "$(VER_MPI)" "OMPI114IFORT"
305 MPI_ROOT=/home/sila/DEV/OPEN-MPI-114-IFORT-BPROC-OPENIB
306 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
307 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi -lorte -lopal -lutil -lnsl -ldl -Wl,--export-dynamic -lm -lutil -lnsl -ldl
308 INC            += $(INC_MPI)
309 LIBS           += $(LIB_MPI)
310 endif
311
312 #
313 #   OPENMPI 1.2.2 G95 BPROC
314 #
315 ifeq "$(VER_MPI)" "OMPI122G95"
316 MPI_ROOT=/home/sila/DEV/OPEN-MPI-122-G95-BPROC-OPENIB
317 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
318 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -Wl,--export-dynamic -lm -lutil -lnsl -ldl
319 INC            += $(INC_MPI)
320 LIBS           += $(LIB_MPI)
321 endif
322 #
323 #   OPENMPI12X
324 #
325 ifeq "$(VER_MPI)" "OMPI12X"
326 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
327 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -Wl,--export-dynamic -lm -lutil -lnsl -ldl
328 INC            += $(INC_MPI)
329 LIBS           += $(LIB_MPI)
330 endif
331 #
332 #   MPI for SGI-ICE 
333 #
334 ifeq "$(VER_MPI)" "MPIICE"
335 INC_MPI     = 
336 LIB_MPI     = -lmpi
337 INC            += $(INC_MPI)
338 LIBS           += $(LIB_MPI)
339 endif
340
341
342 ARCH_XYZ    := $(ARCH_XYZ)-$(VER_MPI)
343 ##########################################################
344 #           Librairie GRIBEX                             #
345 ##########################################################
346 #ifneq "$(ARCH)" "BG"
347 # Gribex bypass on BG for the moment
348 #DIR_GRIBEX     +=  LIB/GRIBEX
349 #endif
350 #
351 #ifdef DIR_GRIBEX
352 #LIB_GRIBEX     =  $(DIR_GRIBEX)_$(ARCH)/libgribexR64.a
353 #LIBS          +=    $(LIB_GRIBEX)
354 #R64_GRIBEX=R64
355 #endif
356 ##########################################################
357 #           Librairie GRIBAPI                            #
358 ##########################################################
359 #ifneq "$(ARCH)" "BG"
360 # Gribapi bypass on BG for the moment
361 DIR_GRIBAPI?=${SRC_MESONH}/src/LIB/grib_api-${VERSION_GRIBAPI}
362 GRIBAPI_PATH?=${OBJDIR_MASTER}/GRIBAPI-${VERSION_GRIBAPI}
363 #GRIBAPI_PATH?=${DIR_GRIBAPI}-${ARCH}${MNH_INT}
364 GRIBAPI_INC?=${GRIBAPI_PATH}/include/grib_api.mod
365 #endif
366 #
367 ifdef DIR_GRIBAPI
368 INC_GRIBAPI   ?= -I${GRIBAPI_PATH}/include
369 LIB_GRIBAPI   ?= -L${GRIBAPI_PATH}/lib -L${GRIBAPI_PATH}/lib64 -lgrib_api_f90 -lgrib_api
370 INC           += $(INC_GRIBAPI)
371 LIBS          += $(LIB_GRIBAPI)
372 VPATH         += $(GRIBAPI_PATH)/include
373 R64_GRIBAPI=R64
374 endif
375 ##########################################################
376 #           Librairie NETCDF4                            #
377 ##########################################################
378 # NETCDF4 INPUT/OUTPUT in MesoNH 
379 ifdef MNH_IOCDF4
380 CPPFLAGS_MNH += -DMNH_IOCDF4
381 endif
382 #
383 # NetCDF  : AUTO install of netcdf-4.X.X on PC linux to avoid problem with compiler
384 #  
385 #
386 ifeq "$(VER_CDF)" "CDFAUTO"
387 DIR_CDF?=${SRC_MESONH}/src/LIB/netcdf-${VERSION_CDF}
388 CDF_PATH?=${DIR_CDF}-${ARCH}I${MNH_INT}
389 CDF_INC?=${CDF_PATH}/include/netcdf.inc
390 #
391 INC_NETCDF     ?= -I${CDF_PATH}/include
392 LIB_NETCDF     ?= -L${CDF_PATH}/lib -L${CDF_PATH}/lib64 -lnetcdff -lnetcdf  -lhdf5_hl -lhdf5
393 INC            += $(INC_NETCDF)
394 LIBS           += $(LIB_NETCDF)
395 #
396 DIR_HDF?=${SRC_MESONH}/src/LIB/hdf5-${VERSION_HDF}
397 endif
398 #
399 # NetCDF in beaufix (bull meteo-france)
400 ifeq "$(VER_CDF)" "CDFBFIX"
401 CDF_PATH?=/opt/softs/libraries/ICC13.1.4.183/netcdf-4.3.0
402 INC_NETCDF     ?= -I${CDF_PATH}/include
403 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf -lnetcdff
404 INC            += $(INC_NETCDF)
405 LIBS           += $(LIB_NETCDF)
406 endif
407 #
408 # NetCDF in BGQ
409 #
410 ifeq "$(VER_CDF)" "CDFBGQ"
411 CDF_PATH?=/bglocal/cn/pub/NetCDF/4.1.3/
412 INC_NETCDF     ?= -I${CDF_PATH}/include
413 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdff -lnetcdf_c++ -lnetcdf
414 INC            += $(INC_NETCDF)
415 LIBS           += $(LIB_NETCDF)
416 HDF5_PATH?=/bglocal/cn/pub/HDF5/1.8.9/par/
417 LIB_HDF5       ?= -L${HDF5_PATH}/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm
418 LIBS           += $(LIB_HDF5)
419 LIBZ_PATH?=/bglocal/cn/pub/zlib/1.2.5
420 LIB_LIBZ       ?= -L${LIBZ_PATH}/lib -lz
421 LIBS           += $(LIB_LIBZ)
422
423 endif
424 #
425 # NetCDF in SGI ICE
426 #
427 ifeq "$(VER_CDF)" "CDFICE"
428 CDF_PATH?=/opt/software/SGI/netcdf/4.0
429 INC_NETCDF     ?= -I${CDF_PATH}/include
430 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdff  -lnetcdf -i_dynamic 
431 INC            += $(INC_NETCDF)
432 LIBS           += $(LIB_NETCDF)
433 endif
434 #
435 # NetCDF in NEC SX
436 #
437 ifeq "$(VER_CDF)" "CDFSX"
438 CDF_PATH?=/SXlocal/pub/netcdf/3.6.1
439 INC_NETCDF     ?= -I${CDF_PATH}/include
440 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf_c++ -lnetcdf
441 INC            += $(INC_NETCDF)
442 LIBS           += $(LIB_NETCDF)
443 endif
444 #
445 ifeq "$(VER_CDF)" "CDFMFSX"
446 CDF_PATH?=/usr/local/SX/lib/NETCDF_size_t32
447 INC_NETCDF     ?= -I${CDF_PATH}/include
448 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf
449 INC            += $(INC_NETCDF)
450 LIBS           += $(LIB_NETCDF)
451 endif
452 #
453 # NetCDF in prefix (bull meteo-france)
454 ifeq "$(VER_CDF)" "CDFBULL"
455 CDF_PATH?=/home_nfs/local/Icc13.0.1/netcdf-4.2.1.1
456 INC_NETCDF     ?= -I${CDF_PATH}/include
457 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf -lnetcdff
458 INC            += $(INC_NETCDF)
459 LIBS           += $(LIB_NETCDF)
460 endif
461 #
462
463 # NetCDF in AIX S
464 #
465 ifeq "$(VER_CDF)" "CDFAIX"
466 CDF_PATH?=/usr/local/pub/NetCDF/3.6.2
467 INC_NETCDF     ?= -I${CDF_PATH}/include
468 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf_c++ -lnetcdf
469 INC            += $(INC_NETCDF)
470 LIBS           += $(LIB_NETCDF)
471 endif
472
473 #
474 # Linux with gfortran SUSE10.3
475 #
476 ifeq "$(VER_CDF)" "CDFGFOR"
477 INC_NETCDF     ?=  -I/usr/include
478 LIB_NETCDF     ?=  -lnetcdf -lnetcdff /usr/lib64/libgfortran.so.2
479 #LIB_NETCDF     ?=  -lnetcdf -lnetcdff 
480 INC            += $(INC_NETCDF)
481 LIBS           += $(LIB_NETCDF)
482 endif
483
484 #
485 # Linux with netcdf CTI 3.6.3
486 #
487 ifeq "$(VER_CDF)" "CDFCTI"
488 CDF_PATH?=/usr
489 INC_NETCDF     = -I${CDF_PATH}/include
490 LIB_NETCDF     = -L${CDF_PATH}/lib64 -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -lz
491 INC            += $(INC_NETCDF)
492 LIBS           += $(LIB_NETCDF)
493 endif
494
495 #
496 # Linux with gfortran SUSE11.1
497 #
498 ifeq "$(VER_CDF)" "CDF3GFOR"
499 CDF_PATH       ?=/opt/netcdf3
500 INC_NETCDF     ?=  -I${CDF_PATH}/include
501 LIB_NETCDF     ?=  -L${CDF_PATH}/lib64  -lnetcdf_c++ -lnetcdf
502 INC            +=  $(INC_NETCDF)
503 LIBS           +=  $(LIB_NETCDF)
504 endif
505
506 ##########################################################
507 #           Number of NESTED MODEL                       #
508 ##########################################################
509 NSOURCE=8
510 ##########################################################
511 #                                                        #
512 # PROG_LIST : Main program liste to compile              #
513 #                                                        #
514 ##########################################################
515 #
516 #ifeq "$(ARCH)" "BGQ"
517 #PROG_LIST += MESONH PREP_IDEAL_CASE PREP_PGD
518 #else
519 PROG_LIST += MESONH  LATLON_TO_XY PREP_IDEAL_CASE PREP_REAL_CASE PREP_PGD \
520             PREP_NEST_PGD SPAWNING DIAG PREP_SURFEX ZOOM_PGD SPECTRE \
521             MNH2LPDM
522 ifdef MNH_TOOLS
523 PROG_LIST += LFI2CDF
524 endif
525 #endif
526 ##########################################################
527 #                                                        #
528 # LIB_OBJS : Librarie of all *.o                         #
529 #                                                        #
530 ##########################################################
531 #
532 ARCH_XYZ        := $(ARCH_XYZ)-$(OPTLEVEL)
533 OBJDIR_ROOT     := $(OBJDIR_ROOT)-$(ARCH_XYZ)
534 LIB_OBJS_ROOT   := $(LIB_OBJS_ROOT)-$(ARCH_XYZ)
535 #
536 ##########################################################
537 #                                                        #
538 # IGNORE_OBJS : some *.o to ignore                       #
539 #       ---> unused unsupported old routines             #
540 #                                                        #
541 ##########################################################
542 #
543 IGNORE_OBJS += spll_olwu.o spll_olwv.o spll_rad1driv.o spll_radlsw.o spll_suovlp.o \
544             spll_ch_init_model0d.o spll_ch_model0d.o spll_ch_svode_fcn.o spll_ch_svode_jac.o
545 IGNORE_DEP_MASTER += modules_diachro.D
546 IGNORE_DEP_MASTER += ch_svode.D ch_model0d.D  \
547           create_file.D def_var_netcdf.D get_dimlen_netcdf.D \
548           handle_err.D init_outfn_isban.D init_outfn_sean.D \
549           init_outfn_surf_atmn.D init_outfn_tebn.D init_outfn_watern.D \
550           ol_find_file.D ol_read_atm.D ol_time_interp_atm.D \
551           read_surf_ol.D write_surf_ol.D \
552 close_file_ol.D close_namelist_ol.D end_io_surf_oln.D \
553 init_io_surf_oln.D modd_io_surf_ol.D modd_ol_fileid.D \
554 open_file_ol.D open_namelist_ol.D read_surf_ol.D write_surf_ol.D offline.D
555
556 #
557 #
558 ##########################################################
559 #                                                        #
560 #  VPATH_EXCLUDE : Some sources directory to exclude     #
561 #                                                        #
562 ##########################################################
563 #
564 VPATH_EXCLUDE= %/CVS
565 #
566
567
568