[ncl-talk] dim_variance_n_Wrap

Md. Jalal Uddin dmjalal90 at gmail.com
Sat Jan 19 17:39:47 MST 2019


The minimum and maximum value showed nan:
(0)     precipitation (mm) : min=-nan   max=-nan
(0)     Rain Total on Rain Days: prcTrace=1 (mm) : min=-nan   max=-nan
(0)     Rain Varianceon Rain Days: prcTrace=1 (mm) : min=-nan   max=-nan

Please find the printVarSummary, errors, and script in the attachment.


On Sat, Jan 19, 2019 at 11:49 PM Dennis Shea <shea at ucar.edu> wrote:

>
>  f  = addfile("all_BoB.nc", "r")
>  prc =f->pre(:,{65:110},{0:30})
>
>  prc_reorder = prc(time|:,latitude|:,longitude|:)
> ;printVarSummary(prc_reorder)
> ;printMinMax(prc_reorder,0)
>
>  prcTrace = 1.0   ; mm
>  prcRain   = *where*
> <https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml>(prc_reorder.ge.prcTrace,
> prc_reorder,  prc_reorder at _FillValue)
>  *copy_VarMeta*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarMeta.shtml>(prc_reorder,
> prcRain)
> ;printVarSummary(prcRain)
> ;printMinMax(prcRain,0)
>
>  prcDayRainAvg = *dim_avg_n_Wrap*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml>(prcRain,
> 0)
>  prcDayRainAvg at long_name = "Rain Total on Rain Days: prcTrace="+prcTrace
>  prcDayRainVar  = *dim_variance_n_Wrap*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_variance_n_Wrap.shtml>
> (prcRain,0)
>  rcDayRainVar at long_name = "Rain Varianceon Rain Days: prcTrace="+prcTrace
>
> ;printVarSummary(prcDayRainAvg)
> ;printMinMax(prcDayRainAvg,0)
>
> ;printVarSummary(prcDayRainVar)
> ;printMinMax(prcDayRainVar,0)
>
> You will still get large variance numbers. Rain amounts span prcTrace to
> (say) 500.
>
>
>
> On Fri, Jan 18, 2019 at 11:38 PM Md. Jalal Uddin <dmjalal90 at gmail.com>
> wrote:
>
>> Thanks for your kind explanation. Could I calculate and plot of per day
>> variance, also for greater than 0 rainfall?
>>
>> On Thu, Jan 17, 2019 at 1:58 PM Dennis Shea <shea at ucar.edu> wrote:
>>
>>> More:
>>> *dim_variance_n_Wrap*(prc_reorder,*0*)   ; variance over *all days*:  *DRY
>>> and WET* seasons
>>>
>>> Consider Pune, India.
>>>    (say; made up numbers) day 170:   mean over DRY and WET seasons 10mm;
>>> range 0-500mm
>>>
>>>
>>> On Thu, Jan 17, 2019 at 2:12 PM Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> Well, you live with the monsoon.
>>>>
>>>> Some days have zero precipitation and some monsoon days have VERY LARGE
>>>> daily amounts.
>>>> Hence large variance.
>>>>
>>>> On Wed, Jan 16, 2019 at 10:53 PM Md. Jalal Uddin <dmjalal90 at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I am getting a too large variation of rainfall. I used
>>>>> dim_variance_n_Wrap function to calculate variance. The first figure is for
>>>>> the mean rainfall and the second one is for variance at the same time.
>>>>>
>>>>> Could anyone help me to understand where I am wrong?
>>>>>
>>>>> Variable: prc_reorder
>>>>> Type: double
>>>>> Total Size: 491961600 bytes
>>>>>             61495200 values
>>>>> Number of Dimensions: 3
>>>>> Dimensions and sizes: [time | 2847] x [latitude | 120] x [longitude |
>>>>> 180]
>>>>> Coordinates:
>>>>>             time: [ 120..6939]
>>>>>             latitude: [0.125..29.875]
>>>>>             longitude: [65.125..109.875]
>>>>> Number Of Attributes: 4
>>>>>   missing_value : -nan
>>>>>   _FillValue : -nan
>>>>>   units : mm
>>>>>   long_name : precipitation
>>>>>
>>>>> Best regards,
>>>>> Jalal
>>>>> --
>>>>> *Md. Jalal Uddin*
>>>>> MSc in Applied Meteorology (English Language)
>>>>> Nanjing University of Information, Science and Technology, China
>>>>> B.Sc. in Disaster Management (Hons.)
>>>>> Patuakhali Science and Technology University, Bangladesh.
>>>>> Cell: +8613260859092, +8801792052662
>>>>> Web: www.dmjalal90.weebly.com
>>>>> Facebook: jalal.hossen.39
>>>>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>>>>> Twitter: dmjalal90
>>>>> Skype: dmjalal90
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>
>>
>> --
>> *Md. Jalal Uddin*
>> MSc in Applied Meteorology (English Language)
>> Nanjing University of Information, Science and Technology, China
>> B.Sc. in Disaster Management (Hons.)
>> Patuakhali Science and Technology University, Bangladesh.
>> Cell: +8613260859092, +8801792052662
>> Web: www.dmjalal90.weebly.com
>> Facebook: jalal.hossen.39
>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>> Twitter: dmjalal90
>> Skype: dmjalal90
>>
>

-- 
*Md. Jalal Uddin*
MSc in Applied Meteorology (English Language)
Nanjing University of Information, Science and Technology, China
B.Sc. in Disaster Management (Hons.)
Patuakhali Science and Technology University, Bangladesh.
Cell: +8613260859092, +8801792052662
Web: www.dmjalal90.weebly.com
Facebook: jalal.hossen.39
LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
Twitter: dmjalal90
Skype: dmjalal90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190120/1fa1148e/attachment.html>
-------------- next part --------------
Variable: prcRain
Type: double
Total Size: 491961600 bytes
            61495200 values
Number of Dimensions: 3
Dimensions and sizes:   [time | 2847] x [latitude | 120] x [longitude | 180]
Coordinates:
            time: [ 120..6939]
            latitude: [0.125..29.875]
            longitude: [65.125..109.875]
Number Of Attributes: 4
  missing_value :       -nan
  long_name :   precipitation
  units :       mm
  _FillValue :  -nan
(0)     precipitation (mm) : min=-nan   max=-nan


Variable: prcDayRainAvg
Type: double
Total Size: 172800 bytes
            21600 values
Number of Dimensions: 2
Dimensions and sizes:   [latitude | 120] x [longitude | 180]
Coordinates:
            latitude: [0.125..29.875]
            longitude: [65.125..109.875]
Number Of Attributes: 5
  _FillValue :  -nan
  long_name :   Rain Total on Rain Days: prcTrace=1
  units :       mm
  missing_value :       -nan
  average_op_ncl :      dim_avg_n over dimension(s): time
(0)     Rain Total on Rain Days: prcTrace=1 (mm) : min=-nan   max=-nan



Variable: prcDayRainVar
Type: double
Total Size: 172800 bytes
            21600 values
Number of Dimensions: 2
Dimensions and sizes:   [latitude | 120] x [longitude | 180]
Coordinates:
            latitude: [0.125..29.875]
            longitude: [65.125..109.875]
Number Of Attributes: 5
  _FillValue :  -nan
  long_name :   Rain Varianceon Rain Days: prcTrace=1
  units :       mm
  missing_value :       -nan
  variance_op_ncl :     dim_variance_n over dimension(s): time
(0)     Rain Varianceon Rain Days: prcTrace=1 (mm) : min=-nan   max=-nan



;;;errors
warning:CvtGenSFObjToFloatSFObj: sfDataMinV greater than sfDataMaxV: exchanging
fatal:ContourPlotInitialize: internal error creating levels, invalid max or min data value
fatal:ContourPlotInitialize: error getting contour level information
fatal:ContourPlotInitialize: error initializing dynamic arrays
fatal:Unable to initialize layer-Can't Create
fatal:Unable to access object with id:-4
fatal:PID #-4 can't be found in NhlSetValues
warning:overlay: bad HLU id passed in, ignoring
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 8143 in file /usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 11303 in file /usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 65 in file variance.ncl


; line 65:
 plot = gsn_csm_contour_map(wks, prcDayRainVar,res)  ; create plot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: variance.ncl
Type: application/octet-stream
Size: 2228 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190120/1fa1148e/attachment.obj>


More information about the ncl-talk mailing list