Opened 12 years ago
Closed 12 years ago
#149 closed help (fixed)
Help with co-ordinate transformations
Reported by: | bethan.white | Owned by: | um_support |
---|---|---|---|
Component: | UM Model | Keywords: | |
Cc: | b.white@… | Platform: | |
UM Version: |
Description
To whom it may concern,
I am having problems with model/real co-ordinate transformations when
plotting UM data. I've had a read of the UM model grid documentation but I
haven't found that it's helped me.
I have data from a 12km mesoscale run of the UM for the CSIP campaign of
- I am converting the data to netcdf format using xconv, and then
reading it into IDL for plotting. I was told by someone at Leeds that I
would need to use the IDL/PV-WAVE procedure eqtoll.pro to transform from
model co-ordinates to true lat-long. I then want to plot variables
corresponding to true lat-long over a coastline map created in IDL.
The x array I am feeding in to eqtoll is 146 data points long. The y array
is 182 data points long. When I put these through eqtoll.pro, the resulting
latitude array is truncated from 182 to 146 data points. I have tried to get
around this by creating 2D arrays, x2d and y2d. x2d consists of the set of
146 x data points repeated 182 times (ie, 182 identical rows of data, each
row 146 data points long). y2d consist of the set of 182 y data points
repeated 146 times, eg;
x2d=fltarr( (size(x))(1), (size(y))(1) )
y2d=fltarr( (size(x))(1), (size(y))(1) )
for i=0,(size(y))(1)-1 do x2d(*,i)=x
for i=0,(size(x))(1)-1 do y2d(i,*)=y
eqtoll, y2d,x2d, lat2d,long2d, 37.5,177.5
However, when I put this through eqtoll, the rows of data which are output
in lat2d and long2d are no longer identical (eg, where x2d(*,0)=x2d(*,181)
etc, but long2d(*,0) is not =long2d(*,181), and the same for the latitudes
), and I am unsure as to which rows, if any, correspond to true latitude and
longitude.
I was told by someone else that perhaps I don't need to use eqtoll, since
they thought that converting to netcdf in xconv included a co-ordinate
transform. I have tried plotting diagnostics without using eqtoll to rotate,
and the diagnostics for the UK to Northern Spain area end up over West
Africa on the IDL map. It is not clear from this output whether a simple
rotation northwards (and perhaps east-west also) to bring the diagnostics
back to northern Europe would suffice, or whether the area over which they
are plotted also needs to be skewed to make it line up correctly.
I would be most grateful if you could offer any advice as to:
- whether I need to use eqtoll or not in order to be able to plot over the
IDL continental coastline map
- whether I can eqtoll x and y, where the number of x points does not equal
the number of y points, without losing any points
- whether the method of creating 2d arrays will work, and if so, which sets
of latitudes and longitudes are the correct ones to use.
Thanks very much for your time,
Bethan.
Change History (2)
comment:1 Changed 12 years ago by ros
- Cc b.white@… added
- Reporter changed from "Bethan White" <b.white@…> to bethan.white
comment:2 Changed 12 years ago by jeff
- Resolution set to fixed
- Status changed from new to closed
Hi Bethan,
I think that although you've input regularly spaced points the output grid is irregular. i.e.
each point in lat2d,long2d is a distinct point and irregularly spaced.
If I put
HELP, y2d,x2d, lat2d,long2d
after the call to eqtoll I get
so all the arrays look to be the correct size to me.
I think you really do need to use eqtoll or you won't get the correct grid for your points.
I've seen this before and as above the eqtoll lon/lat correction is needed to get the correct grid.
Your output plot looks fine to me.
So in answer to your questions:
Yes, you definitely need to use eqtoll.
Y2D, X2D, LAT2D, LONG2D are all the same size so I believe this to be true. The attached plot also shows a realistic rotated grid.
Use LAT2D, LONG2D for your latitude and longitude grid coordinates.
Please let me know if you have any more questions.