[ncl-talk] Fwd: Sub: linint2 error..
David Brown
dbrown at ucar.edu
Fri Nov 10 12:24:58 MST 2017
iz is a file variable. It is actually scalar and definitely not
2-dimensional. That is what the message is telling you. Presumably you want
to use a data variable from inside the file. That would be P1 in your code.
So replace iz with P1. Also note that you do not need to subscript if you
are using the whole dataset. It just slows things down a bit. So don't use
P1(:,:), just P1.
-dave
On Fri, Nov 10, 2017 at 12:11 PM, Adv <advita6 at gmail.com> wrote:
> Hi ,
> Could someone help me fix this error?
>
> Thanks,
> DZ
>
> fatal:Argument type mismatch on argument (2) of (linint2_Wrap) can not
> coerce
>
> ---------- Forwarded message ----------
> From: dale zuri <dalezuri at gmail.com>
> Date: Thu, Nov 9, 2017 at 4:41 PM
> Subject: [ncl-talk] Sub: linint2 error..
> To: ncl-talk at ucar.edu
>
>
> Hi NCL users,
> Could someone help me fix this?
> Thanks
> DZ
> fatal:Number of subscripts do not match number of dimensions of
> variable,(2) Subscripts used, (1) Subscripts expected
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 17 in
> file Interp.ncl
>
> Variable: iz
> Type: file
> filename: pmask_cv2
> path: pmask_cv2.nc
> file global attributes:
> dimensions:
> lon = 76
> lat = 26
> variables:
> float mask ( lat, lon )
> _FillValue : -999.9
>
> float lat ( lat )
> units : degrees_north
> long_name : latitude
>
> float lon ( lon )
> units : degrees_east
> long_name : longitude
>
>
> Variable: p
> Type: float
> Total Size: 26422272 bytes
> 6605568 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 366] x [lat | 94] x [lon | 192]
> Coordinates:
> time: [1297320..1306080]
> lat: [88.542..-88.542]
> lon: [ 0..358.125]
> Number Of Attributes: 15
> long_name : mean Daily Net Longwave Radiation Flux at Surface
> units : W/m^2
> precision : 1
> least_significant_digit : 0
> GRIB_id : 112
> GRIB_name : NLWRS
> var_desc : Net Longwave Radiation Flux
> dataset : NCEP Reanalysis Daily Averages
> level_desc : Surface
> statistic : Mean
> parent_stat : Individual Obs
> missing_value : -9.96921e+36
> actual_range : ( -69.19995, 237.2 )
> valid_range : ( -100, 400 )
> _FillValue : -9.96921e+36
>
>
> PROGRAM:
>
> begin
> ;;;;;;;;;;;;;;;;;ERA;;;;;;;;;;;;;;;;;;;;;;;;;;;
> iz = addfile("pmask.nc","r")
> print(iz)
> printVarSummary(iz)
> P1=iz->mask
> ds = addfile("nlwrs.sfc.gauss.1948.nc","r")
> p = ds->nlwrs(:,:,:)
> printVarSummary(p)
> ;****************************************************
> fo = linint2_Wrap(P1&lon,P1&lat,iz(:,:), True, p&lon,p&lat, 0)
>
> end
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171110/6852a483/attachment.html>
More information about the ncl-talk
mailing list