[Wrf-users] WRFV2.2 & netCDF

Craig.Arthur at ga.gov.au Craig.Arthur at ga.gov.au
Thu Jan 11 15:21:49 MST 2007


Hi wrf-users,

I'm attempting to compile WRFV2.2 using g95 and netCDF 3.6.1.
My compilation logs show no errors, and the executable ideal.exe initially
runs as expected. When it reaches the wrf_io routines
(ext_ncd_open_for_write_begin specifically), the program starts throwing
errors about invalid dimension sizes, namely when trying to define an
unlimited dimension:

NetCDF error: Invalid dimension size
NetCDF error in ext_ncd_open_for_write_begin wrf_io.F90, line 1200

The corresponding code snippet that causes the error (from wrf_io.f90):

  DH%FileStatus  = WRF_FILE_OPENED_NOT_COMMITTED
  DH%FileName    = FileName
  stat = NF_DEF_DIM(DH%NCID,DH%DimUnlimName,NF_UNLIMITED,DH%DimUnlimID)
  call netcdf_err(stat,Status)
  if(Status /= WRF_NO_ERR) then
    write(msg,*) 'NetCDF error in ext_ncd_open_for_write_begin'
    call wrf_debug ( WARN , TRIM(msg))
    return
  endif

Since the variable is being defined with the NF_UNLIMITED keyword, I'd assume
that the only possible cause of the 'invalid dimension' error is that there
is already a defined unlimited dimension in the netCDF. This cannot be the
case though, as the call to NF_DEF_DIM() immediately follows a successful
call to NF_CREATE(), with no intervening NF_DEF_DIM() calls. A quick check
with a call to NF_INQ() revealed that the unlimited dimension ID was -1
immediately before the call in question.

Similar errors occur at other points where dimensions are being defined.

ideal.exe runs through to completion, *claiming* it was successful. The
resulting netCDF file wrfinput_d01 is all of 4kb and contains only three
global attributes, no data.

Having successfully run some of the example programs provided on the Unidata
netCDF site, I'm reasonably comfortable in saying that my netCDF install is
not to blame. 

Have any other users encountered issues such as the above? If so, why does it
occur and what's the resolution of the problem (if any)?

Regards

------------------------------------------------------------
Craig Arthur                   |  Computational Scientist    
Risk Research Group            |  E: craig.arthur at ga.gov.au
Geospatial & Earth Monitoring  |  Ph:  +61 2 6249 9432
Division, Geoscience Australia |  Fax: +61 2 6249 9986 
Canberra, Australia            |  www.ga.gov.au
------------------------------------------------------------






More information about the Wrf-users mailing list