A few simple questions!

From: Mateus da Silva Teixeira <mtex2k3_at_nyahnyahspammersnyahnyah>
Date: Fri, 09 Feb 2007 14:41:48 -0200

Dear NCL users,

I've two simple questions:
1) I have a sequential access binary file created in a little_endian
plataform in which the dimension data are (time | 21185, lat | 50, lon |
50). So, to read this file I should use fbinrecread() function. My
doubt: what's the difference reading this file with two different ways?
These different ways are below:

          prec = new((/21185,51,51/),float)
          prec = fbinrecread("brazil.daily.prcp.le.b19480101.e20051231",
0, (/21185,51,51/), "float")

and
          prec = new((/21185,51,51/),float)
          do i=0,21184
           prec(i,:,:) =
fbinrecread("brazil.daily.prcp.le.b19480101.e20051231", i, (/51,51/),
"float")
          end do

I ask it because the precipitation plots obtained with the same data,
but read with these different ways, aren't equal. The plots from the
first way of reading these data appears to move to right (or east),
while with the second way they are correct.

2) My following question is about resources. I've resources that are
defaults depending of the kind of the plot. So, I made some tests with
the load command, putting it inside the code, instead of putting it at
beginning of the script, like illustrated below:

        load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
        load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
        begin
               vento_u=addfile("u.200.jun.2002.nc","r")
               ventu_v=addfile("v.200.jun.2002.nc","r")
               u=vento_u->uwnd(0,0,:,:)
               v=ventu_v->vwnd(0,0,:,:)
               arquivo="vectors"

               Xwks = gsn_open_wks("ps",arquivo)
               load "./vectors.res" ; <<=== LOADING RESOURCES FROM
EXTERNAL FILE
               plot = gsn_csm_streamline_map(Xwks,u,v,res)
        end

VECTORS.RES
res = True
        res_at_mpOutlineBoundarySets = "National"
        res_at_mpLimitMode = "LatLon"
        res_at_mpMinLonF = 270
        res_at_mpMaxLonF = 330
        res_at_mpMinLatF = -60
        res_at_mpMaxLatF = 15
        res_at_mpPerimOn = True

Is it a good programming practice? There is another way to read default
resources for specific kind of plots?

Thanks

Mateus

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Feb 09 2007 - 09:41:48 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 13 2007 - 14:07:37 MST