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

File format not supported or file is corrupted for WRF output

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 trying to plot simple figures using NCL script for WRF output file, file named 'wrfout_d01_2018-10-24_00:00:00'. NCL is giving me an error message saying that 'File format not supported or file is corrupted'. ncl_filedump is giving me the same message with an extra message saying 'Variable: f (0) File Missing Value : -1'.

In NCAR WRF NCL page, it is mentioned that WRF output netcdf is different than that of CESM output netcdf. Though, I could not find any special instructions for WRF netcdf. Am I missing something here? Can anyone help?

I've been using NCL in the past for CESM output without any problems. For your information I am using NCL version 6.5.0.

Thank you.

Make sure you have a *.nc behind the name of your wrf file. I know that the file doesn't actually end in *.nc, but NCL doesn't automatically know it is a netCDF file, so we need to tell it. For example:

a = addfile("","r")
Thank you for your reply.

Yes, I did try putting ".nc" at the end of the file name and it was giving me the same error message. Even by renaming the file name to *.nc did not make any difference....

I did properly load the WRFUserARW.ncl file and other things.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

a = addfile("","r")
type = "x11"
wks = gsn_open_wks(type,"plt_Surface1")


I was trying very basic things because the code does not work from the function call 'addfile()'