[ncl-talk] drawing satellite passes(14 per day)

Adam Phillips asphilli at ucar.edu
Fri Nov 20 14:02:08 MST 2015


Hi Ipsita,
I have run your script with mixed success. When using NCL v6.3.0 the script
would either take a very long time or core-dump. When using the unreleased
test version of NCL (v6.3.1) I was able to quickly run to completion each
time.  I suspect this has something to do with your HDF5 files but am not
sure.

I have passed your script and data on to the developers for further
examination; they or I will get back to you once we know something more.

Finally, adding res at trGridType = "TriangularMesh" significantly sped up
your script. See this snippet from a previous ncl-talk reply:

However, if you are using 2D lat/lon coordinate arrays to plot over a map
projection, RasterFill can also become very slow. Moreover, if the 2D
coordinates have missing values, like many HDFEOS swath data sets do, this
plotting method breaks down entirely. The cure for this problem is to
switch to the triangular mesh plotting method. To do this, set the resource
trGridType to "TriangularMesh". If you also set cnRasterSmoothingOn to
True, then the plot will look very similar to an AreaFill plot.
Unfortunately if you want to see the shape of the individual cells, they do
not retain their original rectangular character because of the
triangulation.

http://www.ncl.ucar.edu/Support/talk_archives/2012/2638.html

Adam


On Thu, Nov 19, 2015 at 10:13 PM, Ipsita Putatunda <
ipsita.putatunda at gmail.com> wrote:

> Hi,
>  I have uploaded three of my data files in the NCL ftp site.
>
> Thanks,
> Ipsita
>
> On Fri, Nov 20, 2015 at 3:01 AM, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Ipsita,
>> It is very strange that you can draw each swath individually but when
>> overlaid one swath goes black. Can you upload the two data files to our ftp
>> site so one of us can take a look? Please follow the directions here:
>> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
>>
>> Note that for security reasons, you cannot list the contents of this
>> directory, and neither can we. We need to know the *exact *names of the
>> files in order to retrieve them.
>>
>> Let me know when the files have been uploaded.
>> Thanks,
>> Adam
>>
>>
>> On Thu, Nov 19, 2015 at 4:02 AM, Ipsita Putatunda <
>> ipsita.putatunda at gmail.com> wrote:
>>
>>> Hi,
>>>   I have already attached the overlay plots which I tried earlier with
>>> the previous scripts. The modified script is giving individual 2 plots (if
>>> am using 2 files); the first 2 plots attached herewith (Mt2..).
>>>
>>> I have tried to put a secondary resource  like "res= True" and
>>> "res1=True" and take "res" for the first plot and rest of the plots with
>>> "res1", now am getting 2 plots, where 1st plot is with the first file
>>> (plotA say) and second plot is a overlay plot (plotA, plotB) but for plotB
>>> it is coming in black color.Please find the plots attached (last 2 plots
>>> Mt1...).
>>>
>>> Any help in this issue wil be appreciated.
>>>
>>> Thanks,
>>> Ipsita
>>>
>>>
>>> On Thu, Nov 19, 2015 at 12:33 AM, Adam Phillips <asphilli at ucar.edu>
>>> wrote:
>>>
>>>> Hi Ipsita,
>>>> First, a developer noted that when I stated earlier that cnRasterSmoothingOn
>>>> = True would slow things down that I was incorrect. That resource should
>>>> not slow things down (that much).
>>>> I was thinking of cnSmoothingOn = True, which can slow things down.
>>>>
>>>> So you are able to draw each swath individually (+correctly). I had you
>>>> do that to make sure that you could draw each individually before
>>>> overlaying. When you go to overlay them you state "it is not giving me
>>>> the expected plot with multiple overlying orbital swath." Can you please
>>>> send us a picture showing the overlay plot and tell us what is incorrect
>>>> about it?
>>>>
>>>> As always respond to ncl-talk and not to me personally.
>>>> Adam
>>>>
>>>>
>>>> On Wed, Nov 18, 2015 at 1:15 AM, Ipsita Putatunda <
>>>> ipsita.putatunda at gmail.com> wrote:
>>>>
>>>>> Thanks for your suggestions, I have modified my script as per Adam's
>>>>> suggestions though the script has speed up a bit, but it is giving two
>>>>> separate plots instead of overlaying plot. If I plot each file separately
>>>>> it is showing single orbital swath, but while overlaying it is not giving
>>>>> me the expected plot with multiple overlying orbital swath.
>>>>> Any help in this issue will be appreciated.
>>>>>
>>>>> Thanks,
>>>>> Ipsita
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Nov 17, 2015 at 10:30 PM, Adam Phillips <asphilli at ucar.edu>
>>>>> wrote:
>>>>>
>>>>>> Hi Ipsita,
>>>>>> I do not see anything amiss with your script. However, I would
>>>>>> definitely comment out this line:
>>>>>> res at cnRasterSmoothingOn = True
>>>>>> As I believe that will really slow down your script.
>>>>>>
>>>>>> If that does not fix the issue I would suggest the following:
>>>>>> 1) set res at gsnDraw = True and res at gsnFrame = True.
>>>>>> 2) Comment out the overlay(PLOT,plot), draw(PLOT) and frame(wks)
>>>>>> lines.
>>>>>> 3) Change the output format from pdf to png
>>>>>>
>>>>>> Do you get each swath drawn on its own frame correctly?
>>>>>>
>>>>>> As always, please respond to the ncl-talk email list.
>>>>>> Adam
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Nov 16, 2015 at 2:57 AM, Ipsita Putatunda <
>>>>>> ipsita.putatunda at gmail.com> wrote:
>>>>>>
>>>>>>> Thanks a lot for your suggestions. I have modified my script as per
>>>>>>> your suggestions, but instead of overlaying plot am getting a single plot,
>>>>>>> and it is taking a lot of time for only two files (for testing purpose I am
>>>>>>> doing with 2 files out of 14) not able to understand where am I making the
>>>>>>> mistake. The plot and the modified script is attached herewith.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Ipsita
>>>>>>>
>>>>>>> On Sat, Nov 14, 2015 at 12:50 AM, Dennis Shea <shea at ucar.edu> wrote:
>>>>>>>
>>>>>>>>    diri  = "./"           ; input directory
>>>>>>>>    fili    = systemfunc("cd "+diri+" ; ls MT1SAPS*h5")   ; all
>>>>>>>> desired files
>>>>>>>>    print(fili)
>>>>>>>>    nfili  = dimsizes(fili)
>>>>>>>>
>>>>>>>>    res = True                                             ; define
>>>>>>>> once
>>>>>>>>    res at gsnDraw           = False
>>>>>>>>    res at gsnFrame         = False
>>>>>>>>    res at gsnAddCyclic    = False
>>>>>>>>
>>>>>>>>    res1 = True
>>>>>>>>        :
>>>>>>>>    wks   = gsn_open_wks ("PDF","xx1")
>>>>>>>>
>>>>>>>>    do nf=0,nfili-1                                               ;
>>>>>>>> loop over each file
>>>>>>>>          rh  =
>>>>>>>>          if (nf.eq.0) then
>>>>>>>>               PLOT = gsn_csm_contour_map (wks, rh, res)
>>>>>>>>          else
>>>>>>>>              plot      =  gsn_csm_contour(wks, rh, res)
>>>>>>>>              overlay(PLOT, plot)
>>>>>>>>          end if
>>>>>>>>     end do           ; nf loop
>>>>>>>>
>>>>>>>>    draw(PLOT)
>>>>>>>>    frame(wks)
>>>>>>>>
>>>>>>>> ===============
>>>>>>>>
>>>>>>>> Why are you doing this
>>>>>>>>
>>>>>>>>  delete(fn)
>>>>>>>>  delete(f)
>>>>>>>>  delete(vnlon)
>>>>>>>>  delete(ulon)
>>>>>>>>  delete(vnlat)
>>>>>>>>  delete(ulat)
>>>>>>>>  delete(vnrr)
>>>>>>>>  delete(urr)
>>>>>>>>  delete(rr)
>>>>>>>>  delete(dims)
>>>>>>>>  delete(nlon)
>>>>>>>>  delete(nlat)
>>>>>>>>
>>>>>>>> If the variables are the same size, they will overwrite the
>>>>>>>> previous values.
>>>>>>>>
>>>>>>>> If they are not the same size:
>>>>>>>>
>>>>>>>>     delete( [/ fn, f, vnlon, ulon,......... /] )     delete multiple
>>>>>>>> variable in one command
>>>>>>>>
>>>>>>>> or, use NCL's   := reassignment syntax
>>>>>>>>
>>>>>>>>      urr := f->$vnrr$   ; if urr exists; delete and  write with new
>>>>>>>> values
>>>>>>>>
>>>>>>>>
>>>>>>>> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Reassignment
>>>>>>>>
>>>>>>>> ====
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Nov 12, 2015 at 10:25 PM, Ipsita Putatunda
>>>>>>>> <ipsita.putatunda at gmail.com> wrote:
>>>>>>>> > Dear NCL users,
>>>>>>>> >      I want to make a single plot for all satellite passes (15
>>>>>>>> swath per
>>>>>>>> > day) data. the script and the plot am getting from this is as
>>>>>>>> attached. for
>>>>>>>> > testing purpose I made it with only two files, but still the plot
>>>>>>>> is not
>>>>>>>> > coming exactly what I want. Could you please help me to fix this
>>>>>>>> issue. Is
>>>>>>>> > there any simpler way to do this plot? Any help in this issue
>>>>>>>> will be
>>>>>>>> > appreciated.
>>>>>>>> >
>>>>>>>> > Thanks in advance,
>>>>>>>> > Ipsita
>>>>>>>> >
>>>>>>>> > _______________________________________________
>>>>>>>> > ncl-talk mailing list
>>>>>>>> > ncl-talk at ucar.edu
>>>>>>>> > List instructions, subscriber options, unsubscribe:
>>>>>>>> > 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
>>>>>>
>>>>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> 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>
>>>>
>>>
>>>
>>
>>
>> --
>> 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>
>>
>
>


-- 
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151120/c5173869/attachment.html 


More information about the ncl-talk mailing list