Start+count exceeds dimension bound (NC_EEDGE)

조회 수: 68 (최근 30일)
Steven . 2016년 1월 28일
댓글: Steven . 2016년 1월 28일
I'm trying to load netcdf data, crop it, and then save it to a new netcdf file. For some reason I'm getting the following error and it's driving me crazy.
Error using netcdflib
The NetCDF library encountered an error during execution of 'putVaraDouble' function - 'Start+count exceeds dimension bound
Error in netcdf.putVar (line 84)
Error in (line 831)
netcdf.putVar(gid, varid,start, count, varData);
Error in ncwrite (line 75)
ncObj.write(varName, varData, start, stride);
Error in Make_initial_rst_file_no_single (line 289)
The script that it is choking on is as follows...
All I am doing is loading in "h" from an existing netcdf file, cropping it with the i and j start and end values, and trying to save it to a new netcdf file.
I have double checked the dimensions and they are correct. 32 x 37 is the dimension of the new "h" array after cropping.

채택된 답변

Ashish Uthama
Ashish Uthama 2016년 1월 28일
편집: Ashish Uthama 님. 2016년 1월 28일
The ncread call in you ncwrite call returns the full variable, did you mean to use the variable h instead of the function call?
  댓글 수: 1
Steven 2016년 1월 28일
Doh! Well that was silly. Found my mistake. Thank you for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)


Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by