MET Online Tutorial for METv1.1
Compilation: Configure MET
In order to build MET, the Makefile must be configured to the local environment. Sample Makefiles are provided for use with the GNU, PGI, or IBM compilers. Make a copy of the desired Makefile using one of the following commands:
-
cp METv1.1/Makefile_gnu Makefile
cp METv1.1/Makefile_pgi Makefile
cp METv1.1/Makefile_ibm Makefile
Now open up the Makefile using the editor of your choice and edit it as described below.
When editing the Makefile, be sure not to add any trailing spaces at the end of the lines as this may cause problems for the make utility.
Compilers and options
- Set MAKE to the full path for the GNU Make utility.
- Set ARCH_FLAGS architecture flags as needed.
- Set CXX to the full path for your C++ compiler (recommend GNU g++, PGI pgCC, or IBM xlC).
- Set CXX_FLAGS to the C++ compiler flags to be used.
- Set CXX_LIBS to link to any additional libraries required for the C++ compiler.
- Set FC to the full path for your Fortran compiler (recommend GNU g77/gfortran, PGI pgf77, or IBM xlf).
- Set FC_FLAGS to the Fortran compiler flags to be used.
- Set FC_LIBS to link to any additional libraries required for the Fortran compiler.
- Set PRINT_OPTS to the print options to be used for make.
If using the gfortran compiler, be sure to uncomment -lgfortran in the FC_FLAGS line of the Makefile.
NetCDF
If the NetCDF Library is installed in a non-standard location on your machine, set the following variables:
- NETCDF_BASE may be set to the top-level of your NetCDF library for use in defining the next two variables (e.g. /usr/local/netcdf-3.6.2).
- Set NETCDF_INCS to "-I" followed by the full path to the directory containing the NetCDF C/C++ header files ending in .h and .hh (e.g. -I$(NETCDF_BASE)/include).
- Set NETCDF_LIBS to "-L" followed by the full path to the directory containing the NetCDF C/C++ library archive files, libnetcdf.a and libnetcdf_c++.a (e.g. -L$(NETCDF_BASE)/lib).
BUFRLIB
- BUFR_BASE may be set to the top-level of your BUFRLIB library for use in defining the next two variables (e.g. /home/user/BUFRLIB).
- Set BUFR_INCS to "-I" followed by the full path to the directory containing the BUFRLIB header files ending in .h (e.g. -I$(BUFR_BASE)).
- Set BUFR_LIBS to "-L" followed by the full path to the directory containing the BUFRLIB library archive file, libbufr.a (e.g. -L$(BUFR_BASE)).
GSL
If the GNU Scientific Library (GSL) is installed in a non-standard location on your machine, set the following variables:
- GSL_BASE may be set to the top-level of your GSL library for use in defining the next two variables (e.g. /home/user/gsl-1.9).
- Set GSL_INCS to "-I" followed by the full path to the directory containing the GSL header file subdirectory gsl/ (e.g. -I$(GSL_BASE)/include which contains gsl/*.h).
- Set GSL_LIBS to "-L" followed by the full path to the directory containing the GSL library archive file, libgsl.a (e.g. -L$(GSL_BASE)/lib).
F2C
F2C or G2C may be used when compiling MET. If they are installed in a non-standard location on your machine, set the following variables:
- F2C_BASE may be set to the top-level of your F2C (or G2C) library for use in defining the next two variables (e.g. /home/user/libf2c).
- Set F2C_INCS to "-I" followed by the full path to the directory containing the F2C (or G2C) header files ending in .h (e.g. -I$(F2C_BASE)).
- Set F2C_LIBS to "-L" followed by the full path to the directory containing the F2C (or G2C) library archive file, libf2c.a or libg2c.a (e.g. -L$(F2C_BASE)).
- Set F2C_LIBNAME to either "-lf2c" or "-lg2c" to indicate which Fortran-to-C library is to be used (e.g. -lf2c).
Disable Flags
For a variety of reasons, users may only be interested in a subset of tools available in MET. To disable building any of the MET tools, set the corresponding disable flag to a non-zero value:
- DISABLE_PCP_COMBINE
- DISABLE_MODE
- DISABLE_GRID_STAT
- DISABLE_PB2NC
- DISABLE_ASCII2NC
- DISABLE_POINT_STAT
- DISABLE_VSDB_ANALYSIS
- DISABLE_MODE_ANALYSIS
For users not wishing to use PrepBufr point observations in MET, set the DISABLE_PB2NC flag to disable to compilation of the PB2NC tool.

