Re: FW: I mean regridding the data to a rectiliniear lat / lon grid

From: Gualberto Hernández Juárez <betoic_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 08 2012 - 12:35:04 MDT



Dave,This is how I see it in ArcGIS, corresponds to the same variable MSLP. As you said the picture you sent me is a little shaky.Gualberto.



From: dbrown@ucar.edu
Subject: Re: [ncl-talk] FW: I mean regridding the data to a rectiliniear lat / lon grid
Date: Wed, 8 Aug 2012 11:17:02 -0600
To: betoic@hotmail.com

I was hoping for an image with the continental boundaries correctly placed. To show you what I mean here is the best I have been able to do using NCL. The trick is to figure out the correct projection parameters and the lat/lon locations of the lower left and upper right corner points. I did this using the PROJ4 projection tool (similar in capabilities to the tool Dave Allured recommended -- MPS Geotrans). But I am not sure I got the right values because it looks to me like the data does not quite fit the map outlines. I would not trust any re-gridding operation if I could not first get the the map outlines correctly placed. It looks to me (based on plotting a number of the pressure and temperature time steps) that the lower part of Mexico and Central America is skewed to the right and that not so much of South America should be visible. Anyway so you know what I am talking about I am attaching the plot I came up with in NCL. Also the script as it exists now. Perhaps you have access to more information about the projection parameters?
 -dave










On Aug 7, 2012, at 8:20 PM, Gualberto Hern�ndez Ju�rez wrote:



 


Dave,
 
I send the image
 

From: dbrown@ucar.edu
Subject: Re: [ncl-talk] FW: I mean regridding the data to a rectiliniear lat / lon grid
Date: Tue, 7 Aug 2012 18:16:24 -0600
To: betoic@hotmail.com

Sorry maybe I misunderstand. I have the NetCDF file MMOUT_DOMAIN1.nc. But I thought you said you uploaded an image (picture ??) of the plot you made in ArcMap. I would like to see the picture if you can send it.
 -dave



On Aug 7, 2012, at 5:23 PM, Gualberto Hern�ndez Ju�rez wrote:


This is the file MMOUT_DOMAIN1.nc
 
The file you put in place it ftp://ftp.cgd.ucar.edu/incoming/

 




From: dbrown@ucar.edu
Subject: Re: [ncl-talk] FW: I mean regridding the data to a rectiliniear lat / lon grid
Date: Tue, 7 Aug 2012 17:19:16 -0600
To: betoic@hotmail.com

(offline)
I need to know what you called the file in order to retrieve it.
 -dave



On Aug 7, 2012, at 5:10 PM, Gualberto Hern�ndez Ju�rez wrote:


Thanks for your reply Dave,

I plot the file only in ArcMap of ArcGIS, place an image in the directory:

 
ftp://ftp.cgd.ucar.edu/incoming/
 
 
I just have to put the map of the Mexican republic.

 




Subject: Re: [ncl-talk] FW: I mean regridding the data to a rectiliniear lat / lon grid
From: dbrown@ucar.edu
Date: Tue, 7 Aug 2012 16:41:41 -0600
CC: ncl-talk@ucar.edu
To: betoic@hotmail.com

Hi Gaulberto,
Here is a way to write the text file as X/Y pairs as Dave Allured suggested:



  f = addfile ("MMOUT_DOMAIN1.nc", "r")
  x = f->lon
  y = f->lat
  nx = dimsizes(x)
  ny = dimsizes(y)
  x2d = conform_dims((/ny,nx/),x,1)
  y2d = conform_dims((/ny,nx/),y,0)
  outstr = sprintf("%9.3f",x2d) + " " + sprintf("%9.3f",y2d)
  asciiwrite("xy.txt",outstr)


I wonder if you have a plot of this grid in its native (Lambert Conformal) configuration. I have tried to plot it based on the LC parameters given in the data file, but so far I have been unsuccessful.
A correct plot of the domain would help.


If you can get NCL to plot the data correctly in its native projection, then it is possible to compute the lat/lon coordinates using NCL by itself.
 -dave





On Aug 7, 2012, at 2:06 PM, Gualberto Hern�ndez Ju�rez wrote:


Dave,
How to make the text file, which you mention in the first point.



Thanks
Gualberto



> Date: Tue, 7 Aug 2012 11:44:09 -0600
> Subject: Re: [ncl-talk] I mean regridding the data to a rectiliniear lat / lon grid
> From: dave.allured@noaa.gov
> To: betoic@hotmail.com
> CC: ncl-talk@ucar.edu
>
> Here is one way. I am sure there are others.
>
> 1. Use NCL to make a text file containing a 1-dimensional ordered
> list of all X/Y coordinate pairs.
>
> 2. Use MPS Geotrans in batch mode to translate the list of
> coordinates from Lambert Conformal to terrestrial lat/lon. It's free
> software, and it supports a huge variety of known terrestrial
> coordinate systems.
>
> http://earth-info.nga.mil/GandG/geotrans/
>
> 3. Use NCL to read in the translated coordinates, and reshape them
> into 2-D lat and lon coordinate arrays.
>
> 4. Use one of the many NCL regridding functions, plus the 2-D
> coordinates from step 3, to regrid the data array to a rectilinear
> grid of your choice.
>
> This is an overview. Steps 1 and 3 are fairly straightforward NCL
> coding. Steps 2 and 4 will involve significant study to get them
> working correctly. HTH.
>
> --Dave
>
> On Tue, Aug 7, 2012 at 10:54 AM, Gualberto Hern�ndez Ju�rez
> <betoic@hotmail.com> wrote:
> > I need *regrid* the 2D lat/lon to a rectilinear lat lon.
> >
> > any comments will be grateful enough support, I'm new to NCL.
> >
> > Thank you,
> > Gualberto
> >
> >
> >> Date: Tue, 7 Aug 2012 10:41:42 -0600
> >> From: shea@ucar.edu
> >> To: betoic@hotmail.com
> >> CC: ncl-talk@ucar.edu
> >> Subject: Re: [ncl-talk] I mean regridding the data to a rectiliniear lat /
> >> lon grid
> >>
> >> Technically, this is already a rectilinear grid.
> >>
> >> double lat ( lat )
> >> _CoordinateAxisType : GeoY
> >> axis : Y
> >> grid_spacing : 27.0 km
> >> long_name : y coordinate of projection
> >> standard_name : projection_y_coordinate
> >> units : km
> >>
> >> double lon ( lon )
> >> _CoordinateAxisType : GeoX
> >> axis : X
> >> grid_spacing : 27.0 km
> >> long_name : x coordinate of projection
> >> standard_name : projection_x_coordinate
> >> units : km
> >>
> >> float u10 ( time, lat, lon )
> >> long_name : 10 m u wind (m/sec)
> >> _FillValue : -9999
> >> grid_mapping : Lambert_Conformal
> >>
> >> The issue is that the poorly named 'lat' and 'lon' variables
> >> should be (say) 'y' and 'x'.
> >>
> >> Basically, the projection information
> >>
> >> character Lambert_Conformal ( ncl_scalar )
> >> grid_mapping_name : lambert_conformal_conic
> >> long_name :
> >> latitude_of_projection_origin : 0
> >> longitude_of_central_meridian : -124.17
> >> false_easting : 0
> >> false_northing : -27
> >> standard_parallel : 0
> >> _CoordinateTransformType : Projection
> >> _CoordinateAxisTypes : GeoX GeoY
> >> earth_shape : Earth spherical with radius of 6,371,229.0 m
> >> earth_radius : 6371229
> >>
> >> must be used to generate two-dimensional latitude and longitude
> >> coordinates for each grid point. Then the data can be plotted on the
> >> lambert map projection. Is this what you want?
> >>
> >> *** I have no idea how to do this. Maybe someone else does. ***
> >>
> >> Then, if you really want to *regrid* the 2D lat/lon to a rectilinear
> >> lat lon, you would have to use the ESMF regridding
> >> http://www.ncl.ucar.edu/Applications/ESMF.shtml
> >>
> >>
> >> On 8/7/12 10:12 AM, Gualberto Hern�ndez Ju�rez wrote:
> >> > Hi,
> >> >
> >> > I mean regridding the data to a rectiliniear lat / lon grid
> >> >
> >> > locate the file in the directory:
> >> >
> >> > ftp://ftp.cgd.ucar.edu/incoming/
> >> >
> >> > or you can download from this link:
> >> >
> >> > https://dl.dropbox.com/u/96409134/MMOUT_DOMAIN1.nc
> >> >
> >> > Thanks I'll be awaiting your response.
> >> > Gualberto
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


<Huracan Bud.jpg>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

                                               

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

PresionSNivelMar23-05-2012_4-00pm.jpg
Received on Wed Aug 8 12:35:21 2012

This archive was generated by hypermail 2.1.8 : Wed Aug 15 2012 - 08:12:08 MDT