Re: array definitions

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Oct 11 2013 - 10:12:12 MDT

In reverse order:

[1] creating a time dimension of size 1

   ntim = 1
   YesNoArray = new((/ntim, dimlc(0),dimlc(1)/),integer) ; time, lat, lon
   UArray = new((/ntim, dimlc(0),dimlc(1)/),float)
   VArray = new((/ntim, dimlc(0),dimlc(1)/),float)

   YesNoArray = 1 ; array syntax; se all values to 1
   UArray(0,tempj,tempi) = u_wnd(k)
   VArray(0,tempj,tempi) = v_wnd(k)

[2] No harm but there is no reason to do the following.

   nlat!0 = "lat"
   mlon!0 = "lon"

[3] FYI: You can force NCL to read the GRIB file with a singleton
     dimension (aka, degenerate dimension). Add the following
     to your code

http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml

     setfileoption("grb","SingleElementDimensions","Initial_time")
     f = addfile (filename, "r")

     u = f->U_GRD_221_ISBL ; (time,lev,j,i)
     v = f->V_GRD_221_ISBL
     msl = f->PRMSL_221_MSL ; (time,j,i)

Also, you can use the following to 'see' the file

     %> ncl_filedump -itime foo.grb | less

[4] Unless the 'jet profile signature' data file jet_{lat/lon} match
     exactly with the structure of the NARR grid, it seem to me that
     you must do some interpolation.

     Since there is no info provided on the 'jet profile signature'
     data file, there is not much advice that can be offered.

On 10/10/13 9:12 PM, Claudia Walters wrote:
> I am having difficulty with some array definitions. I am using NARR data for
> part of the study and would like to create arrays from text files that use the
> same geographic coordinates as the NARR data. In addition, I would like to
> store the data from the 2D array in a 3D array with time as an additional
> dimension. What is the best way to achieve that?
>
> Thank you,
>
> Claudia K. Walters, Ph.D.
> Assistant Research Scientist
> Collegiate Lecturer
> Department of Social Sciences
> University of Michigan - Dearborn
> 4901 Evergreen Road
> Dearborn, MI 48128
> Email: ckwalter@umich.edu <mailto:ckwalter@umich.edu>
> Phone: (313) 593-5636
>
>
>
>
>
> _______________________________________________
> 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
Received on Fri Oct 11 10:12:17 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT