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