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

Cannot compile WRF

moxSedai

New member
I'm attempting to compile WRF on my desktop and keep running into issues. I get the following output and error message when I try to run configure:

Code:
######################
------------------------------------------------------------------------
Settings listed above are written to configure.wrf.
If you wish to change settings, please edit that file.
If you wish to change the default options, edit the file:
     arch/configure.defaults
NetCDF users note:
 This installation of NetCDF supports large file support.  To DISABLE large file
 support in NetCDF, set the environment variable WRFIO_NCD_NO_LARGE_FILE_SUPPORT
 to 1 and run configure again. Set to any other value to avoid this message.
 

Testing for NetCDF, C and Fortran compiler

This installation of NetCDF is 64-bit
                 C compiler is 64-bit
           Fortran compiler is 64-bit
              It will build in 64-bit
 
NetCDF version: 4.9.2
Enabled NetCDF-4/HDF-5: yes
NetCDF built with PnetCDF: no
 

************************** W A R N I N G ************************************
 
The moving nest option is not available due to missing rpc/types.h file.
Copy landread.c.dist to landread.c in share directory to bypass compile error.
 
*****************************************************************************
************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF           
  /media/big_hhd/applications/weather_project/WRF/Libs/WRF/Libs/NETCDF
DOES NOT support these IO features.                                         

Please make sure NETCDF version is 4.1.3 or later and was built with         
--enable-netcdf4                                                             

OR set NETCDF_classic variable                                               
   bash/ksh : export NETCDF_classic=1                                       
        csh : setenv NETCDF_classic 1                                       

Then re-run this configure script                                           

!!! configure.wrf has been REMOVED !!!

*****************************************************************************


I'm attempting to use NetCDF 4.9.2, HDF 1.14.0 (1.12.0 also fails), NetCDF-Fortran 4.6.1, and everything else is similarly up to date. I'm trying to compile WRF 4.5.1.

The warning that matters most is the second one regarding NetCDF, since a fix exists for the first warning but requires modifying the config file (that this script autodeletes). The exact same process worked on an installation of WSL, but running PopOS (Ubuntu), it has these issues.
 
Hi,
You only need to set the NETCDF_classic environment variable in your command line - not in the configure.wrf script. Try the following commands:

Code:
./clean -a

export NETCDF_classic=1

./configure

./compile em_real >& compile.log

(or if you are using a csh environment, use the "setenv NETCDF_classic 1" command in place of the "export..." command above.
 
Hi,
You only need to set the NETCDF_classic environment variable in your command line - not in the configure.wrf script. Try the following commands:

Code:
./clean -a

export NETCDF_classic=1

./configure

./compile em_real >& compile.log

(or if you are using a csh environment, use the "setenv NETCDF_classic 1" command in place of the "export..." command above.
I was intending to still use NETCDF 4.
 
Are you needing to use the netCDF4 features, such as HDF5 compression, or are you just wanting to use version 4 of netCDF? If it's the latter, you can still set the NETCDF_classic variable, while using netCDF, version 4.
 
I'm attempting to compile WRF on my desktop and keep running into issues. I get the following output and error message when I try to run configure:

Code:
######################
------------------------------------------------------------------------
Settings listed above are written to configure.wrf.
If you wish to change settings, please edit that file.
If you wish to change the default options, edit the file:
     arch/configure.defaults
NetCDF users note:
 This installation of NetCDF supports large file support.  To DISABLE large file
 support in NetCDF, set the environment variable WRFIO_NCD_NO_LARGE_FILE_SUPPORT
 to 1 and run configure again. Set to any other value to avoid this message.
 

Testing for NetCDF, C and Fortran compiler

This installation of NetCDF is 64-bit
                 C compiler is 64-bit
           Fortran compiler is 64-bit
              It will build in 64-bit
 
NetCDF version: 4.9.2
Enabled NetCDF-4/HDF-5: yes
NetCDF built with PnetCDF: no
 

************************** W A R N I N G ************************************
 
The moving nest option is not available due to missing rpc/types.h file.
Copy landread.c.dist to landread.c in share directory to bypass compile error.
 
*****************************************************************************
************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF          
  /media/big_hhd/applications/weather_project/WRF/Libs/WRF/Libs/NETCDF
DOES NOT support these IO features.                                        

Please make sure NETCDF version is 4.1.3 or later and was built with        
--enable-netcdf4                                                            

OR set NETCDF_classic variable                                              
   bash/ksh : export NETCDF_classic=1                                      
        csh : setenv NETCDF_classic 1                                      

Then re-run this configure script                                          

!!! configure.wrf has been REMOVED !!!

*****************************************************************************


I'm attempting to use NetCDF 4.9.2, HDF 1.14.0 (1.12.0 also fails), NetCDF-Fortran 4.6.1, and everything else is similarly up to date. I'm trying to compile WRF 4.5.1.

The warning that matters most is the second one regarding NetCDF, since a fix exists for the first warning but requires modifying the config file (that this script autodeletes). The exact same process worked on an installation of WSL, but running PopOS (Ubuntu), it has these issues.
Try netcdf 4.9.0 and 4.6.0

There's been an issue reported to their developers where 4.9.2 and 4.6.1 has had issues on some OS
 
Top