[Thread Prev][Thread Next][Index]

a problem writing a NetCDF file



Hi;

I'm working on a project in which I would like to merge an 'improved'
dataset in a small geographic area with a world-wide dataset (etopo5) to
create a single world-wide variable with better data in small patches. 
Ferret seems to let me create this variable, but it balks when I try to
write the final result to a NetCDF file.  Here's the details. 

I start with 2 data sets, one big and one small:

yes? sho dat/var
     currently SET data sets:
    1> ./etopo5vl.cdf.bak
  name     title                             I         J         K   L
 TOPOL    ETOPO5                          1:4320    1:2161    1:1  1:1
               on grid GFS1 with -1.E+34 for missing data
             X=0.04W(-0.04):0.04W(360)  Y=90S:90N  
 
    2> ./kodiak_block.cdf  (default)
  name     title                             I         J         K   L
 BATHY    NGDC bathymetry via GMT, edited  1:121     1:121     1:1  1:1
             M on grid GHK1 with -1.E+34 for missing data
             X=155W(205):145W(215)  Y=52N:62N  


I merge them together to make one big variable:
yes? let temp=if bathy[g=topol[d=1]] then bathy[g=topol[d=1]] else topol[d=1]
yes? set variable/title="ETOPO5vl with Detailed Alaska"/units="M" temp


I can contour plot temp as if it were the big data set (ie. set limits
outside the limits of the smaller data set), and my new variable seems to
have the same grid as the original big data set: 

yes? sho grid temp
    GRID GFS1
 name       axis              # pts   start                end
 XAN       LONGITUDE         4320mr   0E        0.084015W(359.92)
 YAN       LATITUDE          2161 r   90S                  90N
 normal    Z
 normal    T
yes? sho grid topol[d=1]
    GRID GFS1
 name       axis              # pts   start                end
 XAN       LONGITUDE         4320mr   0E        0.084015W(359.92)
 YAN       LATITUDE          2161 r   90S                  90N
 normal    Z
 normal    T


But when I try to write temp to a NetCDF file, I get this error message:

yes? LIST/FORMAT=CDF/file="etopo5vl.cdf" temp
 **ERROR: inconsistent sizes of data regions: X axis
          TOPOL[D=1] has 4321 points (I=0001:4321)
          expression has 121 points (I=2461:2581)
yes? LIST/FORMAT=CDF/file="etopo5vl.cdf" temp[g=topol[d=1]]
 **ERROR: inconsistent sizes of data regions: X axis
          TOPOL[D=1] has 4321 points (I=0001:4321)
          expression has 121 points (I=2461:2581)


Where did I go wrong?

Thanks,
Liz

*********************
Elizabeth L. Dobbins
Research Scientist
JISAO/PMEL
phone: (206) 526-4581

Fine words butter no parsnips.





[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement