Re [ncl-talk] Transform the lambert conformal to cylindrical equitidistant

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 22 Nov 2006 17:13:36 -0700 (MST)

Overview of issues:

[1] X2D = new ((/ntime,MLON,NLAT/), float,-999)
    and the dimension numbers/names/ordering are not correct.
    X2D!0 = "lat"
    X2D&lat = lat
    X2D!1 = "lon"
    X2D&lon = lon
    X2D_at_units = x_at_units
    
    correct:
    
    X2D = new ((/ntime,NLAT,MLON/), float,-999)
    X2D!0 = "time"
    X2D&time= time
    X2D!1 = "lat"
    X2D&lat = lat
    X2D!2 = "lon"
    X2D&lon = lon
    X2D_at_units = x_at_units
   
[2] Assignment of attributes and coordinate variables
    should only be done once.

[3] I will answer the rest offline.
      
> hello, i want to transform the lambert conformal to cylindrical
> equitidistant, i saw some examples, but my cuestion is how do it
> considering the time, one part the example is:
>
> > NLAT = 46
> > MLON = 180
>
> > dlat = 90./(NLAT-1) ; output lat
> > lat = ispan ( 0,NLAT-1,1 )*dlat
> > lat!0 = "lat"
> > lat_at_units = "degrees_north"
> > lat&lat = lat
>
> > dlon = 360./MLON ; output lon
> > lon = ispan ( 0,MLON-1,1 )*dlon - 180.
> > lon!0 = "lon"
> > lon_at_units = "degrees_east"
> > lon&lon = lon
>
> > kl = 10 ; arbitrary level, in this case 400hPa
> > X2D = triple2grid(ndtooned(lon2d),ndtooned(lat2d),ndtooned(x
> (kl,:,:)), lon,lat, False) and i try the follow:
> ntime = dimsizes(tim)
> NLAT = 90
> MLON = 180
>
> dlat = 90./(NLAT-1) ; output lat
> lat = ispan ( 0,NLAT-1,1 )*dlat
> lat!0 = "lat"
> lat_at_units = "degrees_north"
> lat&lat = lat
>
> dlon = 360./MLON ; output lon
> lon = ispan ( 0,MLON-1,1 )*dlon - 180.
> lon!0 = "lon"
> lon_at_units = "degrees_east"
> lon&lon = lon
>
>

> do i = 0,ntime-1,1
> X2D(i,:,:) = triple2grid(ndtooned(lon2d),ndtooned
> (lat2d),ndtooned(x(i,:,:)), lon,lat, False)
> X2D!0 = "lat" ; triple2grid regrids
> based on a nearest neighbor routine.
> X2D&lat = lat
> X2D!1 = "lon"
> X2D&lon = lon
> X2D_at_units = x_at_units
> end do
>
> I know that is wrong but i don't have other idea, the error tha it
> send me es:
>
> fatal:Dimension size mismatch on subscript #1, left-hand and right-
> hand side dimensions do not match
> fatal:Execute: Error occurred at or near line 49 in file
> conversion.ncl
>
> thanks for your help
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

------------- End Forwarded Message -------------

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 22 2006 - 17:13:36 MST

This archive was generated by hypermail 2.2.0 : Tue Nov 28 2006 - 15:20:59 MST