[ncl-talk] Manual Array Creation
Dennis Shea
shea at ucar.edu
Fri Mar 15 08:20:24 MDT 2019
PLEASE look at what you are doing.
f = addfile("bob_dd.nc","r")
rain = f->pcp(:,{0:30},{75:100})
rain = where(rain.gt.0,rain,rain at _FillValue)
printVarSummary(rain) ; <=== ; [time | 2440] x [lat | 120] x [lon | 100]
printMinMax(rain,0)
rain = *where*(rain.gt.0,rain,rain at _FillValue)
printMinMax(rain,0)
On Thu, Mar 14, 2019 at 9:13 PM Md. Jalal Uddin <dmjalal90 at gmail.com> wrote:
> rain(2444, 120,100) ; rain (time,lat,lon)
>
> ১১:১০ AM এ শুক্র, ১৫ মার্চ, ২০১৯ এ Md. Jalal Uddin <dmjalal90 at gmail.com>
> লিখেছেন:
>
>> I don’t want to overwrite the rainrate array each time. I want to keep
>> them in the rainrate array. How can I do? I hope I could explain what I
>> want.
>>
>> ৪:০৬ AM এ শুক্র, ১৫ মার্চ, ২০১৯ এ Adam Phillips <asphilli at ucar.edu>
>> লিখেছেন:
>>
>>> Hi Jalal,
>>> Your do loop is overwriting the rainrate array (with rain(i,:,:)) each
>>> time through the do loop:
>>> rainrate = rain(i,:,:)
>>>
>>> I am honestly not sure what you are after here, but that at least
>>> explains why you are getting the result you described.
>>>
>>> If you have any further questions let ncl-talk know.
>>> Adam
>>>
>>>
>>> On Thu, Mar 14, 2019 at 3:15 AM Md. Jalal Uddin <dmjalal90 at gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>> I created an empty array for 'do loop'. I am just getting the last time
>>>> of rainrate value. How can I get the whole time value by using 'new'
>>>> function? Or other possible options?
>>>>
>>>> f = addfile("bob_dd.nc","r")
>>>> TRMM = f->pcp(:,{0:30},{75:100}) ;TRMM(time, latitude,
>>>> longitude)
>>>> rain = where(TRMM.gt.0,TRMM,TRMM at _FillValue)
>>>> copy_VarMeta(TRMM, rain)
>>>>
>>>> rainrate = new((/120,100/),float)
>>>> do i =0,dimsizes(rain(:,0,0))-1
>>>> rainrate = rain(i,:,:)
>>>> end do
>>>>
>>>> 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
>>>
>>>
>>>>
>>>
>>> --
>>> Adam Phillips
>>> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
>>> www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
>>>
>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>
>> --
>> *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
> _______________________________________________
> 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/20190315/532031d9/attachment.html>
More information about the ncl-talk
mailing list