[ncl-talk] Errors while trying to plot IAGOS data. Only the contour map plot, but the data is missing.

Adam Phillips asphilli at ucar.edu
Fri Oct 13 12:24:04 MDT 2017


Hi Najib,
As a reminder, always include any error messages that you getting as that
would assist the ncl-talk community with diagnosing the problem.

You have the following coding:
data = new((/15,500/),double)
data0 = ozone1
data1 = ozone2
<snip>
data14 = ozone15

You are copying the ozone1 array to a new array named data0, the ozone2
array to data1, and so on. You are not infilling your data array.

Then, you are calling the plotting function like this:
plot = gsn_csm_xy(wks,time,data,res)

Thus, I am guessing that nothing is being plotted as data is empty.

Swap this:
data = new((/15,500/),double)
data0 = ozone1
data1 = ozone2
<snip>
data14 = ozone15

with this:

data = new((/15,500/),double)
data(0,:) = ozone1
data(1,:) = ozone2
<snip>
data(14,:) = ozone15

If you have any further questions please respond to the ncl-talk email list.
Adam


On Fri, Oct 13, 2017 at 4:25 AM, <najib.yusuf at carnasrda.com> wrote:

>
>  Dear ncl talk,
>
>  Thank you for your guidance all the time. I am able to plot using time
> series. However, I proceeded to modify the script to plot multiple time
> series  (15 files) by following the example in NCL_User_Guide " This
> example is saved in NUG_multi_timeseries.ncl." But i am having a problem
> with multidimensional array because my files have different sizes. Kindly
> direct me.
>
> Attached are the two files.
>
> Thank you
>
> Najib
>
>
>
>
>
>
>
>
> On 2017-09-27 13:41, Dennis Shea wrote:
>
>> You stated:  "I tried solving but couldn't get it"
>>
>> Please look at the output from your commands.
>>
>> The  output is  for *you* to look at.
>>
>> ----
>>
>> More on David's comment ...
>>
>> re: GOLDEN RULE OF DATA PROCESSING... LOOK AT YOUR DATA
>>
>> You used:
>>
>>    var = f->O3_PM(0)   <==== the reads only the 1st value [index (0) ]
>>
>> Variable: var
>> Type: double
>> Total Size: 8 bytes
>>             1 values           <=== ONE VALUE ... how do you contour
>> one value?
>>
>> ---
>>
>> The min & max are _FillValue. Look at the output from your script.
>>
>> (0)    min/max var = -9999/-9999
>> ---
>>
>> Even if you read  the entire *time  series* ... all values are
>> _FillValue
>>
>>    var = f->O3_PM    ;   entire series
>>
>>    printVarSummary(var)
>>
>> Variable: var
>> Type: double
>> Total Size: 63024 bytes
>>             7878 values
>> Number of Dimensions: 1
>> Dimensions and sizes:   [UTC_time | 7878]    <=========
>> Coordinates:
>>             UTC_time: [70841..106359]
>> Number Of Attributes: 8
>>   standard_name :       mole_fraction_of_ozone_in_air
>>   long_name :   Ozone mixing ratio
>>   comment :     Measured by MOZAIC package
>>   units :       0.000000001
>>   missing_value :       -9999
>>   _FillValue :  -9999
>>   scale_factor :         1
>>   availability :         0
>>
>> print ("min/max var = " + min(var) + "/" + max(var))
>> (0)     MIN/MAX VAR = -9999/-9999
>>
>> ---
>>
>> It should be plotted as a time series not as a contour plot.
>>
>> On Wed, Sep 27, 2017 at 10:34 AM, David Brown <dbrown at ucar.edu> wrote:
>>
>> You will never be able to contour the O3_PM variable from this file
>>> because it contains only fill values:
>>>
>>> ncl 0> f = addfile("IAGOS_timeseries_2013101819404151.nc [1]","r")
>>> ncl 1> printMinMax(f->O3_PM,0)
>>> (0) Ozone mixing ratio (0.000000001) : min=-9999   max=-9999
>>>
>>> Presumably this is what the attribute "availability" means: no valid
>>> values for this variable.
>>>
>>> Also for some reason your variable "var" contains only a single
>>> value.
>>> There is no way to make a contour plot with only one point even if
>>> it
>>> were a valid value. Since the only dimension in the file is a time
>>> dimension, maybe this data set would be better displayed as a time
>>> series x-y plot.
>>> -dave
>>>
>>> On Wed, Sep 27, 2017 at 8:16 AM,  <najib.yusuf at carnasrda.com> wrote:
>>>
>>>>
>>>> Dear Sirs,
>>>>
>>>> I try to plot contour map of O3_PM variable from .nc IAGOS file
>>>>
>>> but I am
>>>
>>>> getting strange errors, I tried solving but couldn't get it.
>>>>
>>> Kindly assist
>>>
>>>> to guide. Attached is the file and the IAGOS.ncl as script.Thank
>>>>
>>> you.
>>>
>>>>
>>>> The summary of the print var is;
>>>>
>>>> Variable: var
>>>> Type: double
>>>> Total Size: 8 bytes
>>>> 1 values
>>>> Number of Dimensions: 1
>>>> Dimensions and sizes:   [UTC_time | 1]
>>>> Coordinates:
>>>> Number Of Attributes: 9
>>>> UTC_time :    70841
>>>> standard_name :       mole_fraction_of_ozone_in_air
>>>> long_name :   Ozone mixing ratio
>>>> comment :     Measured by MOZAIC package
>>>> units :       0.000000001
>>>> missing_value :       -9999
>>>> _FillValue :  -9999
>>>> scale_factor :         1
>>>> availability :         0
>>>>
>>>>
>>>> Variable: var
>>>> Type: double
>>>> Total Size: 8 bytes
>>>> 1 values
>>>> Number of Dimensions: 1
>>>> Dimensions and sizes:   [UTC_time | 1]
>>>> Coordinates:
>>>> Number Of Attributes: 9
>>>> UTC_time :    70841
>>>> standard_name :       mole_fraction_of_ozone_in_air
>>>> long_name :   Ozone mixing ratio
>>>> comment :     Measured by MOZAIC package
>>>> units :       0.000000001
>>>> missing_value :       -9999
>>>> _FillValue :  -9999
>>>> scale_factor :         1
>>>> availability :         0
>>>> (0)     -9999
>>>> (0)     min/max var = -9999/-9999
>>>> fatal:MeshScalarFieldInitialize: Insufficient number of elements
>>>>
>>> in
>>>
>>>> sfDataArray
>>>> fatal:Unable to initialize layer-Can't Create
>>>> fatal:Unable to access object with id:-4
>>>> fatal:Unable to access object with id:-4
>>>> warning:Unable to add DataItem "(null)" to DataList
>>>>
>>> "cnScalarFieldData"
>>>
>>>> fatal:CompileDataList:DataList has no valid members
>>>> warning:ContourPlotSetValues: cnLevelSpacingF value causes level
>>>>
>>> count to
>>>
>>>> exceed maximum: using AUTOMATICLEVELS mode
>>>> ncl 48>
>>>>
>>>> Thank you
>>>>
>>>> Najib
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk [2]
>>>>
>>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk [2]
>>>
>>
>>
>>
>> Links:
>> ------
>> [1] http://2013101819404151.nc
>> [2] 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
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726 <(303)%20497-1726>

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171013/e8834ae3/attachment.html>


More information about the ncl-talk mailing list