Philippe 25/03/2016: add kind=IDCDF_KIND for NetCDF integers (necessary to use NetCDF...
[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 MPIVIDE                               #
199 ##########################################################
200 #
201 ifndef VER_MPI
202 VER_MPI=MPIVIDE
203 endif
204 #VER_MPI=MPIVIDE,LAMMPI,LAMMPI-IB,MPICH-IB
205 #
206 #   MPIVIDE
207 #
208 ifeq "$(VER_MPI)" "MPIVIDE"
209 DIR_MPI               += LIB/MPIvide
210 INC_MPI                = -I$(B)$(DIR_MPI)
211 DIR_MASTER            += $(DIR_MPI)
212 OBJS_LISTE_MASTER     += mpivide.o
213 INC                   += $(INC_MPI)
214 mpivide.o  : CPPFLAGS += -DFUJI -DMNH_INT=$(MNH_INT)\
215                         -I$(DIR_MPI)/include
216 VPATH                 += $(DIR_MPI)
217 endif
218 #
219 #   LAMMPI
220 #
221 ifeq "$(VER_MPI)" "LAMMPI"
222 # Standard Lam mpi
223 #INC_MPI     = -I$(B)/opt/lam/include
224 #LIB_MPI     = -L/opt/lam/lib   -lmpi -llammpi++ -llammpio -llamf77mpi -lmpi -llam -lpthread -ldl
225 # default 64 bits SUSE 9 version
226 INC_MPI     = -I$(B)/usr/include
227 LIB_MPI     = -lmpi -llammpi++ -llammpio -llamf77mpi -lmpi -llam -lpthread -ldl -lutil 
228 INC            += $(INC_MPI)
229 LIBS           += $(LIB_MPI)
230 endif
231 #
232 #   LAMMPI-IB
233 #
234 ifeq "$(VER_MPI)" "LAMMPI-IB"
235 INC_MPI     = -I/home/sila/LAM-7.1.1/include
236 LIB_MPI     = -L/usr/local/ibgd/driver/infinihost/lib64 -L/home/sila/LAM-7.1.1/lib \
237 -llammpio -llamf77mpi -lmpi -llam -lutil -lmosal -lmpga -lmtl_common -lvapi -ldl  -lpthread
238 INC            += $(INC_MPI)
239 LIBS           += $(LIB_MPI)
240 endif
241 #
242 #   MPICH-IB
243 #
244 ifeq "$(VER_MPI)" "MPICH-IB"
245 INC_MPI     = -I/usr/local/ibgd/mpi/osu/f95/mvapich-0.9.5/include
246 LIB_MPI     = -L/usr/local/ibgd/driver/infinihost/lib64 \
247                  -L/usr/local/ibgd/mpi/osu/f95/mvapich-0.9.5/lib \
248                  -lmpich -lmtl_common -lvapi -lmosal -lmpga -lpthread
249 INC            += $(INC_MPI)
250 LIBS           += $(LIB_MPI)
251 endif
252 #
253 #   MPICH-2 CNRM
254 #
255 ifeq "$(VER_MPI)" "MPICH2"
256 INC_MPI     = -I/usr/include
257 LIB_MPI     = -lmpichf90 -lmpich 
258 INC            += $(INC_MPI)
259 LIBS           += $(LIB_MPI)
260 endif
261
262 #
263 #   OPENMPI 1.1 CNRM
264 #
265 ifeq "$(VER_MPI)" "OMPICNRM"
266 MPI_ROOT=/opt/openmpi
267 INC_MPI = -I${MPI_ROOT}/include  -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib64
268 LIB_MPI     = -L${MPI_ROOT}/lib64 -lmpi -lopen-rte -lopen-pal -lutil -lnsl -ldl -Wl,--export-dynamic -lm -lutil -lnsl -ldl
269 INC            += $(INC_MPI)
270 LIBS           += $(LIB_MPI)
271 endif
272
273 #
274 #   OPENMPI 1.1 BPROC + OPENIB + IFORT
275 #
276 ifeq "$(VER_MPI)" "OMPIIFORT"
277 MPI_ROOT=/home/sila/DEV/OPEN-MPI-11-IFORT-BPROC-OPENIB
278 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
279 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi -lorte -lopal -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.4 IFORT BPROC
286 #
287 ifeq "$(VER_MPI)" "OMPI114IFORT"
288 MPI_ROOT=/home/sila/DEV/OPEN-MPI-114-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.2.2 G95 BPROC
297 #
298 ifeq "$(VER_MPI)" "OMPI122G95"
299 MPI_ROOT=/home/sila/DEV/OPEN-MPI-122-G95-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_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -Wl,--export-dynamic -lm -lutil -lnsl -ldl
302 INC            += $(INC_MPI)
303 LIBS           += $(LIB_MPI)
304 endif
305 #
306 #   OPENMPI12X
307 #
308 ifeq "$(VER_MPI)" "OMPI12X"
309 INC_MPI     = -I${MPI_ROOT}/include -I${MPI_ROOT}/include/openmpi/ompi -I${MPI_ROOT}/lib
310 LIB_MPI     = -L${MPI_ROOT}/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -Wl,--export-dynamic -lm -lutil -lnsl -ldl
311 INC            += $(INC_MPI)
312 LIBS           += $(LIB_MPI)
313 endif
314 #
315 #   MPI for SGI-ICE 
316 #
317 ifeq "$(VER_MPI)" "MPIICE"
318 INC_MPI     = 
319 LIB_MPI     = -lmpi
320 INC            += $(INC_MPI)
321 LIBS           += $(LIB_MPI)
322 endif
323
324
325 ARCH_XYZ    := $(ARCH_XYZ)-$(VER_MPI)
326 ##########################################################
327 #           Librairie GRIBEX                             #
328 ##########################################################
329 #ifneq "$(ARCH)" "BG"
330 # Gribex bypass on BG for the moment
331 #DIR_GRIBEX     +=  LIB/GRIBEX
332 #endif
333 #
334 #ifdef DIR_GRIBEX
335 #LIB_GRIBEX     =  $(DIR_GRIBEX)_$(ARCH)/libgribexR64.a
336 #LIBS          +=    $(LIB_GRIBEX)
337 #R64_GRIBEX=R64
338 #endif
339 ##########################################################
340 #           Librairie GRIBAPI                            #
341 ##########################################################
342 #ifneq "$(ARCH)" "BG"
343 # Gribapi bypass on BG for the moment
344 DIR_GRIBAPI?=${SRC_MESONH}/src/LIB/grib_api-${VERSION_GRIBAPI}
345 GRIBAPI_PATH?=${OBJDIR_MASTER}/GRIBAPI-${VERSION_GRIBAPI}
346 #GRIBAPI_PATH?=${DIR_GRIBAPI}-${ARCH}${MNH_INT}
347 GRIBAPI_INC?=${GRIBAPI_PATH}/include/grib_api.mod
348 #endif
349 #
350 ifdef DIR_GRIBAPI
351 INC_GRIBAPI   ?= -I${GRIBAPI_PATH}/include
352 LIB_GRIBAPI   ?= -L${GRIBAPI_PATH}/lib -L${GRIBAPI_PATH}/lib64 -lgrib_api_f90 -lgrib_api
353 INC           += $(INC_GRIBAPI)
354 LIBS          += $(LIB_GRIBAPI)
355 VPATH         += $(GRIBAPI_PATH)/include
356 R64_GRIBAPI=R64
357 endif
358 ##########################################################
359 #           Librairie NETCDF4                            #
360 ##########################################################
361 # NETCDF4 INPUT/OUTPUT in MesoNH 
362 ifdef MNH_IOCDF4
363 CPPFLAGS_MNH += -DMNH_IOCDF4
364 endif
365 #
366 # NetCDF  : AUTO install of netcdf-4.X.X on PC linux to avoid problem with compiler
367 #  
368 #
369 ifeq "$(VER_CDF)" "CDFAUTO"
370 DIR_CDF?=${SRC_MESONH}/src/LIB/netcdf-${VERSION_CDF}
371 CDF_PATH?=${DIR_CDF}-${ARCH}I${MNH_INT}
372 CDF_INC?=${CDF_PATH}/include/netcdf.inc
373 #
374 INC_NETCDF     ?= -I${CDF_PATH}/include
375 LIB_NETCDF     ?= -L${CDF_PATH}/lib -L${CDF_PATH}/lib64 -lnetcdff -lnetcdf  -lhdf5_hl -lhdf5
376 INC            += $(INC_NETCDF)
377 LIBS           += $(LIB_NETCDF)
378 #
379 DIR_HDF?=${SRC_MESONH}/src/LIB/hdf5-${VERSION_HDF}
380 endif
381 #
382 # NetCDF in beaufix (bull meteo-france)
383 ifeq "$(VER_CDF)" "CDFBFIX"
384 CDF_PATH?=/opt/softs/libraries/ICC13.1.4.183/netcdf-4.3.0
385 INC_NETCDF     ?= -I${CDF_PATH}/include
386 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf -lnetcdff
387 INC            += $(INC_NETCDF)
388 LIBS           += $(LIB_NETCDF)
389 endif
390 #
391 # NetCDF in BGQ
392 #
393 ifeq "$(VER_CDF)" "CDFBGQ"
394 CDF_PATH?=/bglocal/cn/pub/NetCDF/4.1.3/
395 INC_NETCDF     ?= -I${CDF_PATH}/include
396 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdff -lnetcdf_c++ -lnetcdf
397 INC            += $(INC_NETCDF)
398 LIBS           += $(LIB_NETCDF)
399 HDF5_PATH?=/bglocal/cn/pub/HDF5/1.8.9/par/
400 LIB_HDF5       ?= -L${HDF5_PATH}/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm
401 LIBS           += $(LIB_HDF5)
402 LIBZ_PATH?=/bglocal/cn/pub/zlib/1.2.5
403 LIB_LIBZ       ?= -L${LIBZ_PATH}/lib -lz
404 LIBS           += $(LIB_LIBZ)
405
406 endif
407 #
408 # NetCDF in SGI ICE
409 #
410 ifeq "$(VER_CDF)" "CDFICE"
411 CDF_PATH?=/opt/software/SGI/netcdf/4.0
412 INC_NETCDF     ?= -I${CDF_PATH}/include
413 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdff  -lnetcdf -i_dynamic 
414 INC            += $(INC_NETCDF)
415 LIBS           += $(LIB_NETCDF)
416 endif
417 #
418 # NetCDF in NEC SX
419 #
420 ifeq "$(VER_CDF)" "CDFSX"
421 CDF_PATH?=/SXlocal/pub/netcdf/3.6.1
422 INC_NETCDF     ?= -I${CDF_PATH}/include
423 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf_c++ -lnetcdf
424 INC            += $(INC_NETCDF)
425 LIBS           += $(LIB_NETCDF)
426 endif
427 #
428 ifeq "$(VER_CDF)" "CDFMFSX"
429 CDF_PATH?=/usr/local/SX/lib/NETCDF_size_t32
430 INC_NETCDF     ?= -I${CDF_PATH}/include
431 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf
432 INC            += $(INC_NETCDF)
433 LIBS           += $(LIB_NETCDF)
434 endif
435 #
436 # NetCDF in prefix (bull meteo-france)
437 ifeq "$(VER_CDF)" "CDFBULL"
438 CDF_PATH?=/home_nfs/local/Icc13.0.1/netcdf-4.2.1.1
439 INC_NETCDF     ?= -I${CDF_PATH}/include
440 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf -lnetcdff
441 INC            += $(INC_NETCDF)
442 LIBS           += $(LIB_NETCDF)
443 endif
444 #
445
446 # NetCDF in AIX S
447 #
448 ifeq "$(VER_CDF)" "CDFAIX"
449 CDF_PATH?=/usr/local/pub/NetCDF/3.6.2
450 INC_NETCDF     ?= -I${CDF_PATH}/include
451 LIB_NETCDF     ?= -L${CDF_PATH}/lib -lnetcdf_c++ -lnetcdf
452 INC            += $(INC_NETCDF)
453 LIBS           += $(LIB_NETCDF)
454 endif
455
456 #
457 # Linux with gfortran SUSE10.3
458 #
459 ifeq "$(VER_CDF)" "CDFGFOR"
460 INC_NETCDF     ?=  -I/usr/include
461 LIB_NETCDF     ?=  -lnetcdf -lnetcdff /usr/lib64/libgfortran.so.2
462 #LIB_NETCDF     ?=  -lnetcdf -lnetcdff 
463 INC            += $(INC_NETCDF)
464 LIBS           += $(LIB_NETCDF)
465 endif
466
467 #
468 # Linux with netcdf CTI 3.6.3
469 #
470 ifeq "$(VER_CDF)" "CDFCTI"
471 CDF_PATH?=/usr
472 INC_NETCDF     = -I${CDF_PATH}/include
473 LIB_NETCDF     = -L${CDF_PATH}/lib64 -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -lz
474 INC            += $(INC_NETCDF)
475 LIBS           += $(LIB_NETCDF)
476 endif
477
478 #
479 # Linux with gfortran SUSE11.1
480 #
481 ifeq "$(VER_CDF)" "CDF3GFOR"
482 CDF_PATH       ?=/opt/netcdf3
483 INC_NETCDF     ?=  -I${CDF_PATH}/include
484 LIB_NETCDF     ?=  -L${CDF_PATH}/lib64  -lnetcdf_c++ -lnetcdf
485 INC            +=  $(INC_NETCDF)
486 LIBS           +=  $(LIB_NETCDF)
487 endif
488
489 ##########################################################
490 #           Number of NESTED MODEL                       #
491 ##########################################################
492 NSOURCE=8
493 ##########################################################
494 #                                                        #
495 # PROG_LIST : Main program liste to compile              #
496 #                                                        #
497 ##########################################################
498 #
499 #ifeq "$(ARCH)" "BGQ"
500 #PROG_LIST += MESONH PREP_IDEAL_CASE PREP_PGD
501 #else
502 PROG_LIST += MESONH  LATLON_TO_XY PREP_IDEAL_CASE PREP_REAL_CASE PREP_PGD \
503             PREP_NEST_PGD SPAWNING DIAG PREP_SURFEX ZOOM_PGD SPECTRE \
504             MNH2LPDM
505 #endif
506 ##########################################################
507 #                                                        #
508 # LIB_OBJS : Librarie of all *.o                         #
509 #                                                        #
510 ##########################################################
511 #
512 ARCH_XYZ        := $(ARCH_XYZ)-$(OPTLEVEL)
513 OBJDIR_ROOT     := $(OBJDIR_ROOT)-$(ARCH_XYZ)
514 LIB_OBJS_ROOT   := $(LIB_OBJS_ROOT)-$(ARCH_XYZ)
515 #
516 ##########################################################
517 #                                                        #
518 # IGNORE_OBJS : some *.o to ignore                       #
519 #       ---> unused unsupported old routines             #
520 #                                                        #
521 ##########################################################
522 #
523 IGNORE_OBJS += spll_olwu.o spll_olwv.o spll_rad1driv.o spll_radlsw.o spll_suovlp.o \
524             spll_ch_init_model0d.o spll_ch_model0d.o spll_ch_svode_fcn.o spll_ch_svode_jac.o
525 IGNORE_DEP_MASTER += modules_diachro.D
526 IGNORE_DEP_MASTER += ch_svode.D ch_model0d.D  \
527           create_file.D def_var_netcdf.D get_dimlen_netcdf.D \
528           handle_err.D init_outfn_isban.D init_outfn_sean.D \
529           init_outfn_surf_atmn.D init_outfn_tebn.D init_outfn_watern.D \
530           ol_find_file.D ol_read_atm.D ol_time_interp_atm.D \
531           read_surf_ol.D write_surf_ol.D \
532 close_file_ol.D close_namelist_ol.D end_io_surf_oln.D \
533 init_io_surf_oln.D modd_io_surf_ol.D modd_ol_fileid.D \
534 open_file_ol.D open_namelist_ol.D read_surf_ol.D write_surf_ol.D offline.D
535
536 #
537 #
538 ##########################################################
539 #                                                        #
540 #  VPATH_EXCLUDE : Some sources directory to exclude     #
541 #                                                        #
542 ##########################################################
543 #
544 VPATH_EXCLUDE= %/CVS
545 #
546
547
548