Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Problems with the wrfio_nf library on CentOS 8.1

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

I'm trying to compile the app (v4.1) on CentOS 8.1. Initially the command ld was unable to find the netcdf library (on CentOS 8, netcdf creates its libraries at /opt/netcdf/lib64 rather than at /opt/netcdf/lib) so I modified configure.wrf (line 222). However, the compilation still seems unable to find several nf functions from the wrfio_nf library. I even added the subdirectory ($HOME/WRD/external/io_netcdf to the ld library path) but made no difference. It's unclear if the problem is caused by the said modification or if I'm missing something (the odd thing is that this issue didn't occur with other OS). Thanks.
Would you please take a look at the webpage here:

This website describes in detail how to install required libraries for compiling WRF. Hope it is helpful.
Hi @Ming Chen,
I'm familiar with that webpage. However, the issue is with the library that WRF is generating during its own compilation (wrfio_nf). I mentioned the modification in order to link with the library (netcdf) built by the user. Without it, the compilation just stops claiming that it cannot find any netcdf component. Thanks.
Please try to create your own netcdf directory, which should contain "lib," "include," and "bin." Then link all files from the corresponding netcdf-c and netcdf-fortran lib/include/bin directories into your own directories. This will make everything under a single top-level directory. You need to add the path to your own netcdf directory to PATH, and set your NETCDF environment variable to your netcdf directory. WRF should be able to find everything it needs. Let me know whether the above approach works for you.
Hi @Ming Chen,
The key is to tell cmake to create the subdirectory lib rather than lib64 when building netcdf. WRF doesn't seem to build correctly if the netcdf libraries are at lib64 even after modifying the configuration file. Thanks.