[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NUD-579800]: Read netcdf wrf output file in MATLAB



Hello,

I'm afraid I'm not familiar with Matlab's netcdf support.  Have you tried 
examining the file using the netcdf command line tools?  That would help 
determine if the issue is with netcdf, the file itself, or with Matlab's netcdf 
support.  If not, would it be possible for me to get a copy of the wrf file so 
that I can examine it and try to determine what is happening?

-Ward

> Dear Support,
> 
> I need your help.
> 
> When I run TempTimeSeriesE.m, I got the following errors:
> 'Start+count exceeds dimension bound (NC_EEDGE)'.
> 
> The variable dimensions for temperature T is 90 x 70 x 27 with a time
> records (periods) of  5.
> 
> A. Code
> 
> filename = 'wrfout_d01_2011-01-15_00.nc'
> ncid = netcdf.open(filename, 'NC_NOWRITE')
> %
> lvl_num = 1
> lat_num = 98
> lon_num = 70
> count = [lon_num, lat_num, lvl_num, 1]
> start = [0, 0, 0, 1]
> temp_name = ' T '
> temp_varid = netcdf.inqVarID(ncid, temp_name)
> lon =44
> lat =51
> temp = netcdf.getVar(ncid, temp_varid, start, count)
> fprintf(1, 'temperature: %g\n',  temp (lon, lat, 1, 1))
> netcdf.close(ncid)
> 
> B. Ouput Errors
> 
> Error using netcdflib
> The NetCDF library encountered an error during execution of 'getVaraFloat'
> function -
> 'Start+count exceeds dimension bound (NC_EEDGE)'.
> 
> Error in netcdf.getVar (line 133)
> data = netcdflib(funcstr,ncid,varid,varargin{:});
> 
> Error in TempTimeSeriesE (line 13)
> temp = netcdf.getVar(ncid, temp_varid, start, count)
> 
> Thanks.
> 
> Best regards,
> 
> 
> Chester
> 
> C.H.(Chester) Huang
> 
> Bureau of Ocean Energy Management, DOI
> Environmental Sciences Section
> 1201 Elmwood Park Blvd
> New Orleans, LA 70123
> Phone: (504) 736-3248
> Fax: (504) 736-2901
> 
> 


Ticket Details
===================
Ticket ID: NUD-579800
Department: Support netCDF
Priority: Normal
Status: Closed