[ncl-talk] same data but different spatial pattern

Md. Jalal Uddin dmjalal90 at gmail.com
Wed Feb 13 06:40:59 MST 2019


Hi Toni,
I understood your sound explanation. How could I create an empty array and
every loop will paste that array? Actually, I need to extract whole hourly
data over land for further PDF analysis. I tried to plot first because I
wanted to confirm that I could produce plot correctly for whole hourly
data.

Any suggestions would be appreciated?

Best wishes,
Jalal

On Wed, Feb 13, 2019 at 9:19 PM Toni Klemm <toni-klemm at tamu.edu> wrote:

> Hi Jalal,
>
> You mean you want to create a plot for each of your 2444 loops (since your
> data is hourly and you want hourly plots)? In that case you should use your
> original first attempt and include code to create a plot within the loop.
> You should include “i” in the output file name to get a different file name
> for each loop, so that your plot doesn’t get overwritten each time.
>
> As a thought, 2444 files in one folder can be slow to access I noticed
> from my own work. You might want to think about some kind of file
> organization, like include a loop to create a new folder every time “i” is
> divisible by 100 or so, thereby limiting the number of files to 100 per
> folder.
>
> Good luck,
> Toni
>
>
> *Toni Klemm**, Ph.D.*
> Postdoctoral Research Associate
> Department of Ecosystem Science and Management
> College of Agriculture and Life Sciences
> Texas A&M University, College Station, TX
> Contributor to the Early Career Climate Forum <https://www.eccforum.org/>
> www.toni-klemm.de | @toniklemm <https://twitter.com/ToniKlemm>
>
>
> On Feb 13, 2019, at 2:14 AM, Md. Jalal Uddin <dmjalal90 at gmail.com> wrote:
>
> My data is hourly. I want to plot hourly data without dimension average.
> Could you tell me where I need to change from my loop? I want to take whole
> time 2444.
>
> f = addfile("bob_dd.nc
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__bob-5Fdd.nc_&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=iIs8A7ehPl3cQYVG_plfyWLyMecJ6Ilr3w5-W8sbF_w&e=>
> ","r")
> do i =0,2443
>   TRMM = f->pcp(i,{0:30},{65:110})
>  end do
>
> Best Regards,
> Jalal
>
> On Wed, Feb 13, 2019 at 12:46 PM Toni Klemm <toni-klemm at tamu.edu> wrote:
>
>> Hi Jamal,
>>
>> It looks like your do loop in your first attempt does not average. You’re
>> simply replacing the first dimension in TRMM with the next dataset every
>> time you repeat the loop. That’s why your first and second plot look so
>> different.
>>
>> In your second attempt you're copying the entire first dimension and then
>> average, that’s why it looks different. If you mean to do that (average the
>> first dimension), your second attempt seems fine.
>>
>> I hope that makes sense.
>>
>> Toni
>>
>>
>>
>> *Toni Klemm, Ph.D.*Postdoctoral Research Associate
>> Department of Ecosystem Science and Management
>> College of Agriculture and Life Sciences
>> Texas A&M University, College Station, TX
>> Contributor to the Early Career Climate Forum
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=AZ0H73b1OhlqI7lxkFnFPPN6IxQb6pKG3ClLV6AAGDc&e=>
>> www.toni-klemm.de
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=dMeCBsXP44WME1b8UafCArrcC3EuwRRuixwnyRkV3ic&e=>
>>  | @toniklemm
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_toniklemm&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=D4MPz7NB8pDKZKx28FwwZYge4Nu234sYnmMJHHMAffw&e=>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Feb 12, 2019, at 2:20 PM, Md. Jalal Uddin <dmjalal90 at gmail.com> wrote:
>>
>>  Hi all,
>> When I did loop over time, I got a spatial figure that I did not expect
>> (dd_loop figure).
>> f = addfile("bob_dd.nc
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__bob-5Fdd.nc&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=00Y6K5t3WswGmNOO6WFFhxReMcZp10_pqq3Gh_aSm1c&s=1UQT6wjQp2nsSrxV7rcEPkMkD2C2aMAPttXb-3HRnnw&e=>
>> ","r")
>> do i =0,2443
>>   TRMM = f->pcp(i,{0:30},{65:110})
>>  end do
>>
>> I got the right spatial pattern when I did dimension average (dd_avg
>> figure).
>> f = addfile("bob_dd.nc
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__bob-5Fdd.nc&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=00Y6K5t3WswGmNOO6WFFhxReMcZp10_pqq3Gh_aSm1c&s=1UQT6wjQp2nsSrxV7rcEPkMkD2C2aMAPttXb-3HRnnw&e=>
>> ","r")
>> TRMM = f->pcp(:,{0:30},{65:110})
>>  dd_ave = dim_avg_n_Wrap(TRMM,0)
>>
>> How can I get similar spatial pattern? What is the difference between
>> time loop and dimension average? Could you explain, please?
>>
>> 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
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dmjalal90.weebly.com&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=00Y6K5t3WswGmNOO6WFFhxReMcZp10_pqq3Gh_aSm1c&s=84I3BnXlOpSL3H8dxEaHylU9iBYalkvo1MlMON5vUsQ&e=>
>>
>> Facebook: jalal.hossen.39
>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__bd.linkedin.com_in_md-2Djalal-2Duddin-2D80a026b0&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=00Y6K5t3WswGmNOO6WFFhxReMcZp10_pqq3Gh_aSm1c&s=6UgI5FMI3Ol23LyLDegxH5Kymdnzb6kdbxyqtVgYRbY&e=>
>>
>> Twitter: dmjalal90
>> Skype: dmjalal90
>> <dd_loop.png><dd_avg.png>_______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=NA7lfYlsnxa80pXhMWITDURNdvpg9QVV_UG4UQZLC78&e=>
>>
>>
>>
>
> --
> *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
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dmjalal90.weebly.com&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=nlnHQsToXZfWCUsnknszbKOra4zU3isLtkAD8zudZqY&e=>
>
> Facebook: jalal.hossen.39
> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__bd.linkedin.com_in_md-2Djalal-2Duddin-2D80a026b0&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=CXUkFnTzzr5qrit9QEbg0vsqVwKx_8rF2UVms6aMoAI&s=ux_TEWVwZ4QDVZeE2c1flYT56zUid4Es-rejlnMVaOA&e=>
>
> 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/20190213/7bf1604a/attachment.html>


More information about the ncl-talk mailing list