# # ################################################################## # Script to compile all RTTOV-91 library and tests programs # You can either specifically give options in command line: # make FC=frt FFLAGS='-Ad -Am -O3 -M .' # or # remove the comment '#' from the definitions you want to use # on your machine below. # If this makefile is executed with options, like example above # they will be passed along to the other make files # You can run make like "make basic" to just compile # the part of the code for clear air RTTOV or # "make all" to compile all the code, options are: # # direct : only compile forward model code # tangent: only compile forward and TL model code # adjoint only compile forward,TL and AD code # basic (default): classical RTTOV code # scat: for scattering case # all: to make the code for all cases # parallel: to make the code compile for parallel running at ECMWF # # R Saunders Jan 2008 ###################################################################### # Compilers in sections below select yours by removing # in 1st column # #SUN compilers #FC = f90 #FC77 = f90 #FFLAGS= -O3 -M. -Usun #FFLAGS= -g -M. -Usun #Fujitsu compiler #FC = f95 #FC77=f77 #FFLAGS= -Am -O3 -M . #IBM compiler #FC = f90 #FC77 = f77 #FC=xlf90_r #FFLAGS= -g -O3 -qmaxmem=8192 -qstrict \ # -qarch=pwr5 -qdpc=e -qsuffix=cpp=F90 -qfree=F90 -qspillsize=860 #Intel compiler #FC = ifort #FC77 = ifort #FFLAGS= -g -cm -w95 -debug-parameters -debug extended #FFLAGS= -g -cm -C -w95 -debug-parameters -debug extended #FFLAGS= -cm -w95 -auto #FFLAGS= -g -cm -w95 # HP compiler #FC = f90 #FC77 = f77 #FFLAGS = -O2 -I. -maxcontin=70 #NEC compiler (N.B. additionally uncomment section in Makefile_lib) #FC = sxf90 #FC77 = sxf90 # Compile all code with flags on next line. Then recompile alloc_prof, alloc_predictors and rttov_tl # with -Cvsafe option below. For RTTOVSCATT in addition rttov_ad also needs to be compiled with this option # #FFLAGS= -ftrace -c -Chopt -Wf,-pvctl loopcnt=200000 -Wf,-pvctl nomsg -Wf,-O nomove,-O nomsg \ # -V -Wf,-pvctl fullmsg -Wf,-L fmtlist mrgmsg transform summary map source -DRTTOV_ARCH_VECTOR #FFLAGS= -ftrace -Chopt -Wf,-pvctl loopcnt=200000 -Wf,-pvctl nomsg -Wf,-O nomove,-O nomsg -DRTTOV_ARCH_VECTOR #FFLAGS= -ftrace -Cvsafe -Wf,-pvctl loopcnt=200000 -Wf,-pvctl nomsg -Wf,-O nomove,-O nomsg #FFLAGS= -ftrace -Cdebug -Wf,-pvctl loopcnt=200000 -Wf,-pvctl nomsg -Wf,-O nomove,-O nomsg #gnu compiler #FC=g95 #FC77=g95 #FFLAGS = -fcase-upper -fno-second-underscore -fno-underscoring -ftrace=full #NAG compiler #FC= f95 #FC77= f95 -dusty #FFLAGS= -gline -C=all -nan -maxcontin=70 #FFLAGS= -g -gline -kind=byte -w -maxcontin=200 -PIC -O0 -C -nan # Portland compiler (AER could only get success with 2nd set of flags) FC= pgf90 FC77= pgf77 #FFLAGS= -g -O2 -r8 -fastsse -Kieee -tp k8-32 -Mvect=nosizelimit #FFLAGS= -O2 -r8 -fastsse -Kieee -Mvect=nosizelimit FFLAGS= -O2 -fastsse -Kieee -Mvect=nosizelimit # g fortran compiler #FC=gfortran #FC77=gfortran #FFLAGS=-g -fopenmp -O3 # Main targets basic: lib_basic main_basic direct: lib_direct main_basic tangent: lib_tangent main_basic adjoint: lib_adjoint main_basic scat: lib_basic lib_scat main_scat all: lib_basic lib_scat main_basic main_scat parallel: lib_basic lib_direct lib_tangent lib_adjoint @ ${MAKE} -f Makefile_parallel "FC=$(FC)" "FFLAGS=$(FFLAGS)" mv test_rttov_parallel.out ../scripts/test_rttov_parallel.out mv example_fwd_parallel.out ../scripts/example_fwd_parallel.out mv tstrad_parallel.out ../scripts/tstrad_parallel.out # Make main programs remove # in column 1 for those you want to make main_basic: @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=etl_rttov91" mv etl_rttov91.out ../scripts/etl_rttov91.out # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=rttov_ascii2bin_coef" # mv rttov_ascii2bin_coef.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=test_2_coef" # mv test_2_coef.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=test_coef" # mv test_coef.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=example_fwd" # mv example_fwd.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=tstrad_multi_sats" # mv tstrad_multi_sats.out ../scripts/tstrad_multi_sats.out # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=tstrad_indep" # mv tstrad_indep.out ../scripts/tstrad_indep.out # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=tstrad_sx6" # mv tstrad_sx6.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=tstrad_rttov7" # mv tstrad_rttov7.out ../scripts # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=test_errorhandling" # mv test_errorhandling.out ../scripts/test_errorhandling.out # @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=tstrad_indep" # mv tstrad_indep.out ../scripts main_scat: @ ${MAKE} -f Makefile_main "FC=$(FC)" "FFLAGS=$(FFLAGS)" "PROG=rttovscatt_test" mv rttovscatt_test.out ../scripts/rttovscatt_test.out # Make of RTTOV Library lib_basic: @ ${MAKE} -f Makefile_lib lib_basic "FC=${FC}" "FC77=$(FC77)" "FFLAGS=$(FFLAGS)" lib_direct: @ ${MAKE} -f Makefile_lib lib_direct "FC=${FC}" "FC77=$(FC77)" "FFLAGS=$(FFLAGS)" lib_tangent: @ ${MAKE} -f Makefile_lib lib_tangent "FC=${FC}" "FC77=$(FC77)" "FFLAGS=$(FFLAGS)" lib_adjoint: @ ${MAKE} -f Makefile_lib lib_adjoint "FC=${FC}" "FC77=$(FC77)" "FFLAGS=$(FFLAGS)" lib_scat: @ ${MAKE} -f Makefile_lib lib_scat "FC=${FC}" "FC77=$(FC77)" "FFLAGS=$(FFLAGS)" # Clean all clean: @ ${MAKE} -f Makefile_lib clean @ ${MAKE} -f Makefile_main clean @ ${MAKE} -f Makefile_parallel clean #