# This config file contains the compile options for compilation # of the GSI code on the NOAA HPCS. # ---------------------------------- # Redefine variables for NOAA HPCS # ---------------------------------- # # ON Hera, The NCEPDEV/nwprod/NCEPLIBS library versions are now set # with the module load command, from the modulefiles/hera/HWRF directory, # and thereby using the environment variables that are being set. # # If you load these modules you can use this Makefile.conf file. # module use -a /scratch2/NCEPDEV/nwprod/NCEPLIBS/modulefiles # module load bacio/2.0.3 # module load bufr/11.3.0 # module load crtm/2.2.6 # module load nemsio/2.2.4 # module load sfcio/1.1.1 # module load sigio/2.1.1 # module load sp/2.0.2 # module load w3emc/2.3.1 # module load w3nco/2.0.6 # This is just information from the previous setup .. # previously was BACIO_VER = 2.0.1 # previously was BUFR_VER = 10.2.5 # previously was CRTM_VER = 2.2.3 # previously was NEMSIO_VER = 2.2.1 # previously was SFCIO_VER = 1.0.0 # previously was SIGIO_VER = 2.0.1 # previously was SP_VER = 2.0.2 # previously was W3EMC_VER = 2.0.5 # previously was W3NCO_VER = 2.0.6 # CORELIB = /scratch3/NCEPDEV/nwprod/lib # CORECRTM = /scratch4/NCEPDEV/da/save/Michael.Lueken/nwprod/lib # CORELIB or COREINC are no longer required in this Makefile.conf # However, setting them since the Makefile references them. # Set them dynamically using dirname command based off the NEMSIO_LIB. # Could have used any of the libraries used by gsi, since all the libraries # are under the same family of compilers, for example. #NEMSIO_LIB=/scratch2/NCEPDEV/nwprod/NCEPLIBS/compilers/intel/18.0.5.274/lib/libnemsio_v2.2.4.a #NEMSIO_INC=/scratch2/NCEPDEV/nwprod/NCEPLIBS/compilers/intel/18.0.5.274/include/nemsio_v2.2.4 CORELIB = `dirname $(NEMSIO_LIB)` COREINC = `dirname $(NEMSIO_INC)` # These are set as env vars by module load # SFCIO_INC4 is using sfcio_v$(SFCIO_VER)_4 # SIGIO_INC4 is using sigio_v$(SIGIO_VER)_4 # NEMSIO_INC is using nemsio_v$(NEMSIO_VER) # W3EMC_INCd is using w3emc_v$(W3EMC_VER)_d # CRTM_INC is using crtm_v$(CRTM_VER) INCsfcio = $(SFCIO_INC4) INCsigio = $(SIGIO_INC4) INCnemsio= $(NEMSIO_INC) INCw3 = $(W3EMC_INCd) INCcrtm = $(CRTM_INC) # These are set as env vars by module load # CRTM_LIB is using $(CORELIB)/libcrtm_v$(CRTM_VER).a # BACIO_LIB4 is using $(CORELIB)/libbacio_v$(BACIO_VER)_4.a # BUFR_LIBd is using $(CORELIB)/libbufr_v$(BUFR_VER)_d_64.a # NEMSIO_LIB is using $(CORELIB)/libnemsio_v$(NEMSIO_VER).a # SFCIO_LIB4 is using $(CORELIB)/libsfcio_v$(SFCIO_VER)_4.a # SIGIO_LIB4 is using $(CORELIB)/libsigio_v$(SIGIO_VER)_4.a # SP_LIBd is using $(CORELIB)/libsp_v$(SP_VER)_d.a # W3EMC_LIBd is using $(CORELIB)/libw3emc_v$(W3EMC_VER)_d.a # W3NCO_LIBd is using $(CORELIB)/libw3nco_v$(W3NCO_VER)_d.a WRFPATH = /scratch3/NCEPDEV/nceplibs/ext/WRF/3.7/WRFV3 LIBwrfio_int = $(WRFPATH)/external/io_int/libwrfio_int.a LIBwrfio_netcdf = $(WRFPATH)/external/io_netcdf/libwrfio_nf.a OBJwrf_frame_pk = $(WRFPATH)/frame/pack_utils.o OBJwrf_sizeof_int = $(WRFPATH)/frame/module_machine.o WRFLIB = $(LIBwrfio_int) $(LIBwrfio_netcdf) $(OBJwrf_frame_pk) $(OBJwrf_sizeof_int) INCnetcdf = ${NETCDF}/include LIBnetcdf = -L${NETCDF}/lib -lnetcdf # Empty out definition of libs use by GMAO GSI building structure LIBtransf = #-L$(CORELIB) -ltransf LIBhermes = #-L$(CORELIB) -lhermes LIBgfio = #-L$(CORELIB) -lgfio INChdf = #-I$(BASEDIR)/$(ARCH)/include/hdf LIBhdf = #-L$(BASEDIR)/$(ARCH)/lib -lmfhdf -ldf -lhdfjpeg -lhdfz -lsz # --------------------------- # General targets/definitions # --------------------------- AR = ar -rv # ---------------------------- # Fortran compiler and options # ---------------------------- CF = mpif90 -f90=ifort FC = $(CF) #--- Normal mode options PROF= #-pg OMP = #-qsmp=noauto FFLAGS_F90 = -D_REAL8_ -qopenmp FFLAGS_COM_N = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCnemsio) \ -I $(INCnetcdf) -I $(INCw3) -O3 -traceback -convert big_endian -assume byterecl \ -g -fp-model source FFLAGS_COM_N_NOSWAP = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) \ -I $(INCnemsio) -I $(INCnetcdf) -I $(INCw3) \ -O3 -traceback -g -fp-model source \ -convert big_endian -assume byterecl FFLAGS_N = $(FFLAGS_F90) $(FFLAGS_COM_N) $(PROF) FFLAGS_NOSWAP_N = $(FFLAGS_F90) $(FFLAGS_COM_N_NOSWAP) $(PROF) FFLAGS_f = $(FFLAGS_COM_N) $(PROF) FFLAGS = $(FFLAGS_N) $(PROF) #--- Debug mode options FFLAGS_COM_D = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCnemsio) \ -I $(INCnetcdf) -I $(INCw3) \ -O0 -fp-model strict -convert big_endian -assume byterecl \ -implicitnone -g -traceback -debug \ -ftrapuv -check all -fp-stack-check -fstack-protector -warn FFLAGS_COM_NOSWAP_D = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) \ -I $(INCnemsio) -I $(INCnetcdf) -I $(INCw3) \ -O0 -fp-model strict -convert big_endian -assume byterecl \ -implicitnone -g -traceback -debug \ -ftrapuv -check all -fp-stack-check -fstack-protector -warn FFLAGS_D = $(FFLAGS_F90) $(FFLAGS_COM_D) FFLAGS_NOSWAP_D = $(FFLAGS_F90) $(FFLAGS_COM_NOSWAP_D) # ---------------------- # C Compiler and options # ---------------------- CC = gcc #--- Normal mode options CFLAGS_N = -DLINUX -Dfunder -I ./ -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -O3 $(PROF) #--- Debug mode options CFLAGS_D = -DLINUX -Dfunder -I ./ -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -g # ------------------ # Linker and options # ------------------ LD = $(CF) -mkl -Wl,-Map,loadmap.txt #--- Normal mode options # LIBS_N = -L$(CORELIB) -lsp_d -lnemsio -lbacio_4 -lsigio_4 \ # -lsfcio_4 -lbufr_d_64 -lw3lib-2.0_d $(LIBcrtm) $(WRFLIB) $(LIBnetcdf) # LIBS_N = -L$(CORELIB) -lsp_d -lnemsio -lbacio_4 -lsigio_4 \ # -lsfcio -lbufr_d_64 -lw3nco_d -lw3emc_d -lcrtm_v2.1.3 $(WRFLIB) $(LIBnetcdf) LIBS_N = $(SP_LIBd) $(NEMSIO_LIB) $(BACIO_LIB4) $(SIGIO_LIB4) \ $(SFCIO_LIB4) $(BUFR_LIBd) $(W3NCO_LIBd) $(W3EMC_LIBd) \ $(CRTM_LIB) $(WRFLIB) $(LIBnetcdf) # -L../lib/GSD/gsdcloud4nmmb -lgsdcloud # LIBS_N = $(LIBnemsio) -L$(CORELIB) -lsp_d -lsigio_4 \ # -lsfcio_4 -lbufr_dc -lw3lib-2.0_d $(LIBcrtm) $(WRFLIB) $(LIBbacio) $(LIBnetcdf) LDFLAGS_N = LDFLAGS = $(LDFLAGS_N) #--- Debug mode options LIBS_D = $(LIBS_N) LDFLAGS_D = #--- Empty out mpi library definition: embedded in compiler LIBmpi =