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

Install: Netcdf and Netcdf-fortran on REHL - error: netcdf.h could not be found

j_snow

New member
Hello There,

I am trying to compile netcdf-c-4.7.2 and netcdf-fortran-4.5.2 on a Red Hat Enterprise Linux v9.1 machine. I am running into this error ‘configure: error: netcdf.h could not be found. Please set CPPFLAGS.’ I configured netcdf-c-4.7.2 with the following command:
./configure --prefix=$DIR/cetcdf --disable-netcdf-4 --disable-dap

After install I found the ‘netcdf.h’ file located at ‘/netcdf/include/netcdf.h’. I set my CPPFLAG using the following:
export CPPFLAGS="-I$DIR/netcdf/include"

I attempted to configure netcdf-fortran-4.5.2 with the following command:
./configure --prefix=$DIR/netcdf

After all of that I am still running into the same error. Can anyone please advise?

Best, J
 
This forum is specific to the WRF model. You will need to contact a support member with netCDF or a systems administrator at your institution for questions specific to NetCDF.
 
Hi all, I was wondering if anyone had a solution for the above error. 'configure: error: netcdf.h could not be found. Please set CPPFLAGS.' I am working to install WRF on MacBook Pro M2.
 
Top