SHELL=/bin/sh SRCS= IJ2LL.f SIG2HYB.f read_geogrid_heights.f90 \ LL2pts.f MAKBND.f QFRMTP.f FLIP.f ROTLLE.f \ COF2GRD.f etaPTS.f SIG2HYB_init.f LL2pts_init.f \ wrf_abort.f wrf_debug.f boundary_smooth.f90 OBJS= IJ2LL.o SIG2HYB.o read_geogrid_heights.o \ LL2pts.o MAKBND.o QFRMTP.o FLIP.o ROTLLE.o \ COF2GRD.o etaPTS.o SIG2HYB_init.o LL2pts_init.o \ wrf_abort.o wrf_debug.o boundary_smooth.o # Tunable parameters # # FC Name of the fortran compiling system to use # LDFLAGS Flags to the loader # LIBS List of libraries # CMD Name of the executable # PROFLIB Library needed for profiling # FC = ncepxlf90 -qfixed F90 = ncepxlf90 LDFLAGS = -qsmp=noauto CPPFLAGS=-C -P CPP=/usr/bin/cpp WRFINC=../hwrf_v3.fd/inc # Remember to change the sigio link to /nwprod/lib once the new GFS goes operational # NOTE: don't include any -L/nwprod/lib or you'll get the wrong version of NetCDF. LIBS = -L/usr/local/lib -lessl -lmass \ /nwprod/lib/libsigio_4.a /nwprod/lib/libw3_4.a \ /nwprod/lib/libsp_4.a \ ../hwrf_v3.fd/external/io_netcdf/wrf_io.o \ ../hwrf_v3.fd/external/io_netcdf/field_routines.o \ ../hwrf_v3.fd/external/io_netcdf/module_wrfsi_static.o \ -L../hwrf_v3.fd/external/io_netcdf/ -lwrfio_nf \ ../hwrf_v3.fd/external/io_int/io_int.o \ ../hwrf_v3.fd/external/io_int/module_internal_header_util.o \ ../hwrf_v3.fd/frame/pack_utils.o \ ../hwrf_v3.fd/frame/module_machine.o \ ../hwrf_v3.fd/frame/module_wrf_error.o # The path to NetCDF below should match the path used when compiling WRF LIBS2 = -L/usrx/local/netcdf.3.5.0/lib -lnetcdf INCMOD = /nwprod/lib/incmod/sigio_4 #INCMOD = /global/save/wx23sm/2jif/f2008/sorc/sigio CMD = hwrf_prep PROFLIB = -lprof # To perform the default compilation, use the first line # To compile with flowtracing turned on, use the second line # To compile giving profile additonal information, use the third line # WARNING: SIMULTANEOUSLY PROFILING AND FLOWTRACING IS NOT RECOMMENDED #FFLAGS = -O0 -g -qfullpath -qstrict -qrealsize=4 -qmaxmem=-1 -q nosave -I$(INCMOD) -qinitauto=FF -qflttrap=ov:zero:inv:en -qsigtrap -qcheck FFLAGS = -O -g -qfullpath -qcheck -qrealsize=4 -qmaxmem=-1 -I$(INCMOD) -qstrict=all F90FLAGS=$(FFLAGS) # Lines from here on down should not need to be changed. They are the # actual rules which make uses to build a.out. # all: $(CMD) SIG2HYB.o SIG2HYB_init.o: read_geogrid_heights.o LL2pts.o: $(FC) $(FFLAGS) LL2pts.f -o LL2pts.o -c LL2pts_init.o: $(FC) $(FFLAGS) LL2pts_init.f -o LL2pts_init.o -c $(CMD): $(OBJS) $(FC) -bnoquiet $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) $(LIBS2) # Make the profiled version of the command and call it a.out.prof # $(CMD).prof: $(OBJS) $(FC) $(LIBS2) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS) .f90.o: $(CPP) $(CPPFLAGS) -I$(WRFINC) $*.f90 > $*.fortran90 $(F90) $(F90FLAGS) -qsuffix=f=fortran90 $*.fortran90 -c -o $*.o clean: -rm -f $(OBJS) *.o *.lst clobber: clean -rm -f $(CMD) $(CMD).prof void: clobber -rm -f $(SRCS) makefile