Re: Error: scalar_field: If the input data is 1-dimensional ...

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 30 2014 - 12:01:58 MDT

This is too hard to debug without having access to your script and data. I
think you are doing something fundamentally wrong with the metadata, but I
can't verify this without being able to see the original data that you are
reading in, and then the variable you are calculating.

Can you provide me with your script and data?

--Mary


On Wed, Jun 25, 2014 at 12:57 PM, VanĂșcia Schumacher <
vanucia-schumacher@hotmail.com> wrote:

> Sorry: this error:
>
> Error: scalar_field: If the input data is 1-dimensional, you must set
> sfXArray and sfYArray to 1-dimensional arrays of the same length.
> warning:create: Bad HLU id passed to create, ignoring it
> warning:ContourPlotSetValues: Data values out of range of levels set by
> MANUALLEVELS mode
>
>
>
> ---
> VanĂșcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia AgrĂ­cola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
>
> ------------------------------
> From: vanucia-schumacher@hotmail.com
> To: haley@ucar.edu
> Subject: RE: [ncl-talk] Error: scalar_field: If the input data is
> 1-dimensional ...
> Date: Wed, 25 Jun 2014 18:55:24 +0000
>
>
> Hi Mary,
>
> Correcting and doing what you suggested, this error appears:
>
> fatal:Variable (lon) is undefined
>
>
> ---
> VanĂșcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia AgrĂ­cola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
>
> ------------------------------
> Date: Wed, 25 Jun 2014 12:39:12 -0600
> Subject: Re: Error: scalar_field: If the input data is
> 1-dimensional ...
> From: haley@ucar.edu
> To: vanucia-schumacher@hotmail.com
> CC: ncl-talk@ucar.edu
>
> VanĂșcia,
>
> This script is confusing, because you are calling "copy_VarCoords" to cop=
y
> coordinate arrays from t to tsm, and then you are attaching what appears =
to
> be coordinate arrays to "t".
> If "t" already has coordinate arrays, then why are you reattaching them?
>
> However, the printVarSummary for "t" indicates that "t" does *not* have
> coordinate arrays. You can tell this very easily with:
>
> Variable: t
> Type: float
> Total Size: 134217728 bytes
> 33554432 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 4096] x [lon | 8192]
> Coordinates:
> Number Of Attributes: 28
>
> Note that after "Coordinates:", there is no actual list of coordinate
> arrays. This means you either don't have coordinate arrays, or something =
is
> wrong with the files you read in.
>
> Are your latitudes and longitudes on the file both dimensioned 4096 x
> 8192? If so, you will need to do something like this:
>
> media@lat2d = f[0]->lat
> media@lon2d = f[0]->lon
>
> You may also need:
>
> res@gsnAddCyclic = False
>
> --Mary
>
>
>
> On Fri, Jun 20, 2014 at 12:47 PM, VanĂșcia Schumacher <
> vanucia-schumacher@hotmail.com> wrote:
>
> Hi users,
>
> I am trying to run my script with satellite data, and the following error
> appears:
>
>
> Error: scalar_field: If the input data is 1-dimensional, you must set
> sfXArray and sfYArray to 1-dimensional arrays of the same length.
> warning:create: Bad HLU id passed to create, ignoring it
> warning:ContourPlotSetValues: Data values out of range of levels set by
> MANUALLEVELS mode
>
> my code:
>
> fils = systemfunc("ls *.nc")
> f = addfiles(fils, "r")
> ListSetType(f,"join")
> t =short2flt(f[:]->bsst)
> printVarSummary(t)
> tsm = t - 273.15
> copy_VarCoords(t, tsm)
>
> t!0="lat"
> t!1="lon"
> t&lat=f[0]->lat
> t&lon=f[0]->lon
> t&lat@units="degrees_north"
> t&lon@units="degrees_east"
>
> media= dim_avg_n_Wrap(tsm, 0)
>
> .....
>
> res@gsnPolar = "SH" ; specify the hemispher=
e
> plot = gsn_csm_contour_map_polar(wks,media,res)
> end
>
> Variable: t
> Type: float
> Total Size: 134217728 bytes
> 33554432 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 4096] x [lon | 8192]
> Coordinates:
> Number Of Attributes: 28
> _FillValue : 1e+20
> bsst.dsp_PixelType : 1
> bsst.dsp_PixelSize : 2
> bsst.dsp_Flag : 0
> bsst.dsp_nBits : 16
> bsst.dsp_LineSize : 0
> bsst.dsp_cal_name : Temperature
> bsst.units : Temp
> bsst.dsp_cal_eqnNumber : 2
> bsst.dsp_cal_CoeffsLength : 8
> bsst.dsp_cal_coeffs : ( 0.075, -3 )
> bsst.scale_factor : 0.075
> bsst.add_off : -3
> dsp_PixelType : 1
> dsp_PixelSize : 2
> dsp_Flag : 0
> dsp_nBits : 16
> dsp_LineSize : 0
> dsp_cal_name : Temperature
> units : Temp
> dsp_cal_eqnNumber : 2
> dsp_cal_CoeffsLength : 8
> dsp_cal_coeffs : ( 0.075, -3 )
> add_off : -3
> dim_0.name : lat
> dim_0.long_name : latitude
> dim_1.name : lon
> dim_1.long_name : longitude
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

Received on Mon Jun 30 06:01:58 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT