This repository has been archived by the owner on Jan 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (41 loc) · 1.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Location of RTE+RRTMGP libraries, module files.
RRTMGP_BUILD = $(RRTMGP_ROOT)/build
# Sets macros FC, FCFLAGS consistent with RTE+RRTMGP
include $(RRTMGP_BUILD)/Makefile.conf
# Location of netcdf C and Fortran libraries. Could specify with environment variables if file doesn't exist
-include $(RRTMGP_ROOT)/examples/rfmip-clear-sky/Makefile.libs
#
# RRTMGP library, module files
#
LDFLAGS += -L$(RRTMGP_BUILD)
LIBS += -lrrtmgp -lrte
FCINCLUDE += -I$(RRTMGP_BUILD)
#
# netcdf library, module files
# C and Fortran interfaces respectively
#
FCINCLUDE += -I$(NFHOME)/include
LDFLAGS += -L$(NFHOME)/lib -L$(NCHOME)/lib
LIBS += -lnetcdff -lnetcdf
VPATH = ./:$(RRTMGP_BUILD):$(RRTMGP_ROOT)/extensions/:$(RRTMGP_ROOT)/examples
# Compilation rules
%.o: %.F90
$(FC) $(FCFLAGS) $(FCINCLUDE) -c $<
%: %.o
$(FC) $(FCFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
#
# Extra sources -- extensions to RRTMGP classes, shared infrastructure, local sources
#
ADDITIONS = mo_load_coefficients.o mo_simple_netcdf.o
ADDITIONS += mo_garand_atmos_io.o mo_heating_rates.o mo_fluxes_byband.o mo_fluxes_byband_kernels.o
#
# Targets
#
all: rrtmgp_garand_atmos
rrtmgp_garand_atmos: $(ADDITIONS) rrtmgp_garand_atmos.o
rrtmgp_garand_atmos.o: $(ADDITIONS) rrtmgp_garand_atmos.F90
mo_fluxes_byband.o: mo_fluxes_byband.F90 mo_fluxes_byband_kernels.o
mo_load_coefficients.o: mo_simple_netcdf.o mo_load_coefficients.F90
mo_garand_atmos_io.o: mo_simple_netcdf.o mo_garand_atmos_io.F90
clean:
-rm ../rrtmgp_garand_atmos *.o *.optrpt ../*.optrpt *.mod