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

WRF V3.7 with netCDF4

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.

Dorit J

New member
Dear WRF user support team,

I am using the ARW model version 3.7.1 and I would like to have the wrf output files directly in netcdf4 format instead of netcdf classic format. From the user guide (ARWUsersGuideV3.7) I take the following information:

Beginning with V3.5, the compression function in netCDF4 is supported. This option will
typically reduce the file size by more than 50%. It will require netCDF4 to be installed
with the option --enable-netcdf-4. Before compiling WRF, you will need to set
the environment variable NETCDF4. In a C-shell environment, type setenv NETCDF4
1, followed by ‘configure’ and ‘compile’.

For more detailed information, visit:

I followed all the provided instructions above and I also set the environment variable WRFIO_NCD_LARGE_FILE_SUPPORT to 1 (as advised by the configure script) but after compilation the wrf output files are still in the netcdf classic format.

Is there any important step that I missed? Unfortunately the link provided in the user guide leads to “Page not found” and I couldn’t find any other information regarding WRF and netcdf4. So I hope you can help me.

Thanks in advance.
I don't think you miss anything. This is what we follow to build WRF with netCDF4. How did you find that your wrfout are not in netCDF4 format?
Hi Ming, thanks for your reply.

I checked the format of the wrf output files by using the command "ncdump -k", which tells me the format is "classic". Also, the file size is still approx. 6GB, the same as it was before I recompiled WRF with the netCDF4 option included. I was expecting the file size to be much smaller if the output were in netCDF4 format.

I can compress the classic netCDF files to netCDF4 afterwards by using the "ncpdq" tool, but I was hoping I could save that step as it is quite time consuming.
Hi Ming,

I could resolve the problem myself. A clean -a did the trick.

For future User Guides: maybe you could fix that broken link (see my first post). I checked with the most current version of the user guide and the link given is still the same.
Thanks for letting me know. I am sorry for the inconvenience caused by the invalid link. We will fix the issue.