MET Online Tutorial

MET Online Tutorial for METv3.0

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, IBM, and Intel compilers. Make a copy of the desired Makefile using one of the following commands:

    cp METv3.0/Makefile_gnu Makefile
    cp METv3.0/Makefile_pgi Makefile
    cp METv3.0/Makefile_ibm Makefile
    cp METv3.0/Makefile_intel Makefile

Now open up the Makefile using the editor of your choice and edit it as described below.

arrow When editing the Makefile, do not add trailing spaces at the end of the lines which cause problems for the make utility.

Compilers and options

The default Makefile for each set of compilers includes default values for many of the settings below. However, individual machines may require changes, in particular, for the -DBLOCK4 entry in the ARCH_FLAGS line:

  • 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, Intel icc, 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 gfortran, PGI pgf77, Intel ifort 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.

NetCDF Library

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 Library

  • 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 Library

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.11).
  • 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 Library

F2C or G2C may be used when compiling MET. If required for your compiler, and it is 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).

arrow If F2C is not required for your FORTRAN compiler, leave ALL of the variables described above blank.

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_GEN_POLY_MASK
  • DISABLE_MODE
  • DISABLE_GRID_STAT
  • DISABLE_PB2NC
  • DISABLE_ASCII2NC
  • DISABLE_POINT_STAT
  • DISABLE_WAVELET_STAT
  • DISABLE_ENSEMBLE_STAT
  • DISABLE_STAT_ANALYSIS
  • DISABLE_MODE_ANALYSIS
  • DISABLE_TOOLS

arrow Users not wishing to use PrepBufr point observations in MET, can set the DISABLE_PB2NC flag to disable to compilation of the PB2NC tool.

arrow By default, the compilation of the optional tools directory is disabled. If you'd like to compile it, edit the entry for the DISABLE_TOOLS flag.