[ncl-talk] request

Barry Lynn barry.h.lynn at gmail.com
Thu Mar 3 11:45:07 MST 2022


Hi:

Would this help you?
https://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml

On Thu, Mar 3, 2022 at 4:14 PM ali mughal via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear Ehsan
>
> Thank you for letting me know.
>
> I didn't receive any reply to a couple of my previous messages which made
> me worried.
>
> In any case I modified the attached code which allowed me to see the
> correct values.
>
> a=addfile("../../../wrfout_d05_2016-03-31_00:00:00","r")
>
> b=addfile("../../..wrfout_d05_2016-03-31_00:00:00","r")
>
>   times  = wrf_user_list_times(a)
>   ntimes = dimsizes(times)
>
> do it = 0,ntimes-1
>
>
>   TA_MEAN_IND   = wrf_user_getvar(a,"TA_MEAN",it)
>   TA_MEAN_NO_IND   = wrf_user_getvar(b,"TA_MEAN",it)
>   ts= TA_MEAN_IND-TA_MEAN_NO_IND
>
>   ts1=ts(0,45:49,60:64)
>   t_diff= avg(ts1)
>
> print ("time="+times(it)+"   TA_Average="+t_diff)
>
> end do
>
> Now  what I want to do is reshape t_diff. t_diff is a one
> dimensional array that contains 720 values. I want to reshape to the
> following so that I can take a mean of 24 hours over a 30 day period
> t_new = reshape(t_diff,(/24,30/))
>
> but this does not work inside the loop. Could any one suggest how to
> reshape it properly so that I can take a mean and have 24 values of t_new
> at the end of the loop.
>
> Thanks again
>
>
>
>
>
>
>
>
> On Thursday, March 3, 2022, Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com>
> wrote:
>
>> Dear Ali,
>> Your email to the NCL community has been well received.
>>
>>
>>
>> *-----------------------------------------------------------------------------*
>> *Sincerely,*
>> *Ehsan Taghizadeh*
>> *Ph.D. of Meteorology*
>> *Institute of Geophysics, University of Tehran, Iran*
>> *I.R. of Iran Meteorological Organization (IRIMO)*
>>
>>
>>
>> On Saturday, February 26, 2022, 02:56:57 AM GMT+3:30, ali mughal via
>> ncl-talk <ncl-talk at mailman.ucar.edu> wrote:
>>
>>
>> Hi all
>>
>> I am not sure if the following email was received by NCL community.
>> Can anyone kindly let me know if the following email and the associated
>> attachment can be seen in the group ?
>>
>> Thanks and Regards
>>
>> ---------- Forwarded message ----------
>> From: *ali mughal* <mughalali655 at gmail.com>
>> Date: Saturday, February 19, 2022
>> Subject: request
>> To: Ncl-talk <ncl-talk at ucar.edu>
>>
>>
>> Dear Ncl users
>>
>> I would be grateful if someone can reply to my following inquiry posted a
>> few days ago.
>>
>> ---------- Forwarded message ----------
>> From: *ali mughal* <mughalali655 at gmail.com>
>> Date: Tuesday, February 15, 2022
>> Subject: request
>> To: Ncl-talk <ncl-talk at ucar.edu>
>>
>>
>> Dear NCL users
>>
>> In the attached script all values of TA_Average are equal to 0.
>>
>> But when I individually calculate t2a_sub 2_avg and t2b _sub2_avg and
>> evaluate the difference then the values are not 0. Can any one tell me what
>> could be the reason and how to write the output correctly in to a csv or a
>> text format.
>>
>> I will be grateful for the support.
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 

Barry H. Lynn, Ph.D
Senior Scientist, Lecturer,
The Institute of Earth Sciences,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

Weather It Is, LTD
Weather and Climate Focus
https://weather-it-is.com <http://weather-it-is.com>
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220303/42207d71/attachment.html>


More information about the ncl-talk mailing list