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

Compiling WRF 4.0.1 with PGI

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.


New member
I am getting an error trying to build WRF 4.0.1 using the PGI compiler. It appears to be related to NETCDF. The compile log is attached. In line 15569, the link to build the wrf.exe fails within the module_physics_init.f90 section with two un-resolved references.

I am using the "classic" (non-HDF) netCDF version 4.1.3. This is the same version of netCDF I used when compiling WRF 3.7 - I care more about speed instead of file sizes, so I wanted to first compile WRF 4 without dealing with the additional complication of netCDF+HDF.

A side note...Using the identical version of netCDF 4.1.3 compiled using the Intel compiler on a different machine, I was able to successfully build WRF 4.0.1 using Intel.


  • compile.log
    1.2 MB · Views: 50
  • configure.wrf
    20.1 KB · Views: 49
Unfortunately I do not have access to the version of PGI you are using (15.7.0) or the version of netCDF (4.1.3), and with my updated versions of both of those, I am able to compile without any problem. I am using PGI V17.9 and netCDF V4.4.1.1. Since you mention that your version of netCDF works with the Intel compiler, Is it possible for you to update your PGI to see if that makes a difference? Often as the WRF code advances, older compilers are no longer as reliable, and can fail to compile the code.