data array dimension size

From: Matt Fearon <matt_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Jul 2007 16:11:32 -0400

Hi,

I am experimenting with a grib file, trying to perform calculations on
the data, and then map. See the grib file attached. When reading the
attached grib file with NCL, the dim order for the imported variable is
var(x=881,y=1121). When printing the statistics on the grib file with
wgrib, the dim order is the same, ie, var(x,y), but the dim sizes are
reversed, var(x=1121,y=881). GDAL is consistent with wgrib. I would like
to have NCL read these data the same as GDAL, or be able to have NCL
perform some array reordering to make the data arrangement consistent.
How can I do this in NCL?

I am familiar with how NCL and fortran differ in array dim order, ie,
NCL var(y,x) would translate to var(x,y) in fortran. However, in this
case, my findings retain the dim order, but reverse the dim sizes. If
working with GDAL alone, I can map data fine with no trouble. But I
would like to also use NCL for performing calculations. I have tried
many combinations of array reordering unsuccessfully, ie,
combination 1:
var!0="lon"
var!1="lat"
varnew=var(lat|:,lon|:)

combination 2,3, and 4:
varnew=var(::-1,:), or varnew=var(:,::-1), or varnew=var(::-1,::-1)

Help and advice would be greatly appreciated.
thanks,
Matt

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu Jul 12 2007 - 14:11:32 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 17 2007 - 06:52:01 MDT