[ncl-talk] sub: css grid and objective analysis...(with input file)

Adv advita6 at gmail.com
Wed Dec 9 07:40:34 MST 2015


Hi,
Could someone help me in this? Its quite confusing. I would like to compute
objective analysis of all the station data sets to plot them spatially..

Thank you

On Tue, Dec 8, 2015 at 2:15 PM, Adv <advita6 at gmail.com> wrote:

>
> ---------- Forwarded message ----------
> From: Adv <advita6 at gmail.com>
> Date: Tue, Dec 8, 2015 at 2:10 PM
> Subject: sub: css grid and objective analysis...
> To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
>
>
> Hi,
> I have been trying to compute objective analysis of station data sets.
>
> begin
>  strll  = asciiread("stationmac.txt", -1, "string") ;
>   print(strll)   ; STATION","STATION_NAME", "LAT", "LON"
>   print("=====")
>
> sloc = str_get_field(strll , 2, ",")
>   lat  = tofloat( str_get_field(strll , 3, ",")  )
>   lon  = tofloat( str_get_field(strll , 4, ",")  )
>   print(sloc +" : "+lat+" "+lon)
>
>  NOBS  = 65
> diri="/home/dailysimms/prec-obs/01/"
> z1 = asciiread(diri+"PrecJan1965-2014",-1,"float")
> print(z1)
> printVarSummary(z1)
> ;a = (/1,2,3,4,5,6,7,8/)
> ;391 rows by 50 columns
> a0 = onedtond(z1,(/391,50/))
> ;print(a0)
> x=dim_avg(a0)
>
> ;------------------------------------------------------------------
> ; Read data
> ;------------------------------------------------------------------
>
>   diri = "./"
>   fili = "Ecearth320x160x1961-2005.nc"
>   f    = addfile(diri+fili, "r")
>   Z    = f->t2(0,{40:49},{242:264})
>   Z1    = f->t2(0,{40:49},{242:264})*86400
> printVarSummary(Z)
>
> ;------------------------------------------------------------------
> ; Generate N random values from the above
> ;------------------------------------------------------------------
>  dimz  = dimsizes( Z )
> nlat  = dimz(0)
>   mlon  = dimz(1)
>   nx = 8
>   ny = 19
>   plat =  90.*fspan(-1.,1.,nx)
>   plon = 180.*fspan(-1.,1.,ny)
>   N     = nlat*mlon
>   iZ    = generate_unique_indices( N )
>  trip  = cssgrid(lat, lon, x,nlat,mlon)
> dlon=0.1
>   reps  = random_uniform (-dlon, dlon, N)  ; minor location perturbations
>
>   IOBS  = iZ(0:NOBS)   ; convenience
>                        ; clarity only ... create explicit variables
>  rlon  = trip(0,IOBS) + reps(IOBS)
>  rlat  = trip(1,IOBS) + reps(IOBS(::-1))
>  rZ    = trip(2,IOBS)
> ;******************************************************************
> ; call Wrap version of obj_anal_ic
> ;******************************************************************
>
>   opt    = True
>   opt at timing = True
>
>  dcrit  = (/45,35,25, 15,10 /)
>   grid   = obj_anal_ic_Wrap(lon, lat, x, rlon, rlat, dcrit, opt)
> printVarSummary(grid)
> print(grid)
> return
>
> ERROR:
>
> CSSGRID - error  -319, coordinates   319 and M coincide for some M  >
> 319 >= 1 (coordinate numbering starting at 1).
> Error number -319 returned from c_cssgridd
> fatal:cssgrid: Error number -319.
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 45 in
> file oban.ncl
>
> Could someone help me to fix this bug?
> Thank you
> Adv
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151209/884dcf6a/attachment.html 


More information about the ncl-talk mailing list