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