NOTE: The decoders
mailing list is no longer active. The list archives are made available for historical reasons.
Rich, I have the formulas needed but the results don't seem correct to me. The pole is lat/lon (-32.5, 10). So ( -24, -5 ) -> ( -32.5, 10 ) and (-7,063, 9.563 ) -> ( -15.563, 24.563 ) Since the rotation angle is 0, there is no rotation. The lat/lon increment is .065535004 The problem is the calculated corner from the starting point of ( -32.5, 10 ) ends up at ( -17.23, 27.76 ) instead of the given one ( -15.563, 24.563 ). It's a couple of degrees off. I don't think it's a rounding err, so I must be missing something. Attached is latest cdl. Robb... On Mon, 29 Mar 2004, Richard Signell wrote:
Robb, If it's helpful, here is my MATLAB function for deriving true lon,lat from the rotated pole lon,lat. function [almd,aphd]=rtll(tlm0d,tph0d,tlmd,tphd); %------------------------------------------------------------------------- % RTLL transforms rotated coordinates (tlmd,tphd) into % ordinary geographic coordinates (almd,aphd). i/o decimal degrees (DD) % tlm0d, tph0d: lon e lat of the center of rotation ("North Pole") in DD. % dtr=pi/180.; ctph0=cos(tph0d*dtr); stph0=sin(tph0d*dtr); stph=sin(tphd*dtr); ctph=cos(tphd*dtr); ctlm=cos(tlmd*dtr); stlm=sin(tlmd*dtr); aph=asin(stph0.*ctph.*ctlm+ctph0.*stph); cph=cos(aph); almd=tlm0d+asin(stlm.*ctph./cph)/dtr; aphd=aph/dtr; % end -Rich Robb Kambic wrote: > > On Fri, 26 Mar 2004, Richard Signell wrote: > > > Robb, > > > > Does this mean that the produced netcdf would have the > > true lon/lat values added as 2D arrays, e.g. something > > like this: > > > Rich, > > This is the aim, but I'm still having problems getting the tranforms > correct. The Di and Dj values are valid on the tranformed values, the > initial grid has variable spacing. Also, the rotation angle is 0, so > the grid is just slid to the polar coordinates. The main guy is out of > town until next week so I'll put it on hold until his input. > > Thanks for your patience, > Robb.. > > > > > netcdf dwd_lokal { > > dimensions: > > time = UNLIMITED ; // (13 currently) > > j = 205 ; > > i = 187 ; > > variables: > > > > float lat_pole(j) ; > > lat_pole:long_name = "latitude in rotated pole > > coordinates" ; > > float lon_pole(i) ; > > lon_pole:long_name = "longitude in rotated pole > > coordinate" ; > > float lat(j, i) ; > > lat:units = "degrees_north" ; > > lat:long_name = "latitude" ; > > float lon(j, i) ; > > lon:units = "degrees_east" ; > > lon:long_name = "longitude" ; > > short U10(time, j, i) ; > > U10:long_name = "Eastward wind component" ; > > U10:units = "m/s" ; > > U10:scale_factor = 0.001525925f ; > > U10:add_offset = 0.f ; > > U10:coordinates = "lon lat" ; > > short V10(time, j, i) ; > > V10:long_name = "Northward wind component" ; > > V10:units = "m/s" ; > > V10:scale_factor = 0.001525925f ; > > V10:add_offset = 0.f ; > > V10:coordinates = "lon lat" ; > > double time(time) ; > > time:units = "days since 1968-5-23" ; > > time:long_name = "modified julian day (ROMS-style)" ; > > > > > > > > > > > I didn't have a full understanding of rotated lon/lat grids until I talked > > > with my co-workers. Now I can probably code the the creation of the > > > lat/lon part of the cdl. > > > > > > Robb... > > > > > > > -- > > Dr. Richard P. Signell | signell@xxxxxxxxxxxxxxxxx > > NATO/SACLANT Undersea Research Centre | Tel: (+39) 0187 527 381 > > Viale San Bartolomeo 400 | Fax: (+39) 0187 527 331 > > 19138 La Spezia, ITALY --> From USA/CANADA, use: APO AE 09613-5000 > > > > > > ***PRIVILEGED AND CONFIDENTIAL*** > > The information contained in this e-mail message (including any attached files) is intended for the use of the addressee(s) only and is priviliged information. The information should neither be posted to the Internet, nor published in any other public domain, without the express permission of the sender. If you are not the intended recipient(s) or the recipient's representative, you are hereby notified that any use, disclosure, copying or distribution of this communication is prohibited. If you have received this communication in error please notify us immediately at postmaster@xxxxxxxxxxxxxxxxx, and remove this message from your system. > > > > > > ============================================================================== > Robb Kambic Unidata Program Center > Software Engineer III Univ. Corp for Atmospheric Research > rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/ > ============================================================================== -- Dr. Richard P. Signell | signell@xxxxxxxxxxxxxxxxx NATO/SACLANT Undersea Research Centre | Tel: (+39) 0187 527 381 Viale San Bartolomeo 400 | Fax: (+39) 0187 527 331 19138 La Spezia, ITALY --> From USA/CANADA, use: APO AE 09613-5000 ***PRIVILEGED AND CONFIDENTIAL*** The information contained in this e-mail message (including any attached files) is intended for the use of the addressee(s) only and is priviliged information. The information should neither be posted to the Internet, nor published in any other public domain, without the express permission of the sender. If you are not the intended recipient(s) or the recipient's representative, you are hereby notified that any use, disclosure, copying or distribution of this communication is prohibited. If you have received this communication in error please notify us immediately at postmaster@xxxxxxxxxxxxxxxxx, and remove this message from your system.
============================================================================== Robb Kambic Unidata Program Center Software Engineer III Univ. Corp for Atmospheric Research rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/ ==============================================================================
decoders
archives: