Building WRF with NetCDF-c and NetCDF-fortran Libraries

Moderator: NCAR/MMM

Post Reply
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Building WRF with NetCDF-c and NetCDF-fortran Libraries

Post by kwerner » Tue Dec 15, 2020 4:44 pm

If you have built NetCDF with separate installations of NetCDF-c and NetCDF-fortran, you will need to combine the components so that the WRF model will be able to find the libraries. To do this, you can create a NetCDF directory, which should contain subdirectories called "lib," "include," and "bin." You can then link all files from the corresponding NetCDF-c and NetCDF-fortran lib/include/bin directories into these new/combined directories (for e.g., all library files from NetCDF-c/lib and NetCDF-fortran/lib into the new NetCDF/lib/ directory). This will ensure everything is under a single top-level directory. You will then be able to add the appropriate paths to your environment settings:

export NETCDF=path-to-your-netcdf/NetCDF
export PATH=path-to-your-netcdf/NetCDF/bin:$PATH

Post Reply

Return to “FAQ: Configuring/Compiling/Hardware”