[ncl-talk] Program that reads Instantaneous Precipitation from NW&CT

Barry Lynn barry.h.lynn at gmail.com
Tue Oct 31 09:54:23 MDT 2017


Mary -- thank you.

Setting it to two produces a very nice plot.

On Tue, Oct 31, 2017 at 5:46 PM, Mary Haley <haley at ucar.edu> wrote:

> Barry,
>
> The reason you have white space between your plots is because you set a
> resource to add extra white space:
>
>     pnlres at gsnPanelYWhiteSpacePercent = 13       ; Add white space b/w
> plots.
>
> The default of this resource is 5, so 13 is more than double.  You can
> either not set this resource, or try setting it to 0 to have no space.
>
> --Mary
>
>
>
> On Mon, Oct 30, 2017 at 10:30 PM, Barry Lynn <barry.h.lynn at gmail.com>
> wrote:
>
>> Dear Dennis:
>>
>> I made the modifications you suggested to improve the display of the maps
>> (attached), thank you.
>>
>> I am most interested in how I can reduce the space between the rows of
>> maps.  I am really wondering if there is a simple way to reduce the space,
>> without having to set the location of the panels manually.
>>
>>
>> When I tried to attach the maps together, I got the error below. I am not
>> really able now to investigate this further, as my main goal for an
>> upcoming meeting was to make the attached set of maps.  It was also unclear
>> to me if I need to list all panels (0, to 5, I assume), and how they would
>> line up on the page (3 on top and 3 on the bottom?).  Maybe the error is
>> because plots_dbz is defined as 6 members, but there are the other
>> questions, and I can't continue at the moment.
>>
>>   _FillValue : 9.96921e+36
>>
>> (0) MaxMin before contour
>>
>> (0) min=0.002   max=4.088
>>
>> (0) Warning: gsn_attach_plots: the base plot is either spherical or
>> triangular, so can't fix the tickmarks
>>
>> *** glibc detected *** ncl: realloc(): invalid next size:
>> 0x000000000b115710 ***
>>
>> *** glibc detected *** ncl: malloc(): smallbin double linked list
>> corrupted: 0x000000000b6996a0 ***
>>
>>  have attached 6 "DPR.nc" files in case this subject interests you
>> further.
>>
>>
>> On Mon, Oct 30, 2017 at 8:51 PM, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> A few comments.
>>>
>>> (a) Nice plots
>>> (b) The plots have, as the main title:
>>>        pnlres at txString                   = "Instantaneous Precipitation
>>> (in/h)"
>>>
>>> (c) Why do you want the following redundant info on each figure?
>>>        dbres at gsnLeftString      = "Instantaneous Precipitation"
>>>        dbres at gsnRightString      = "in/h"
>>>      I suggest removing them.
>>>
>>>      If the 'dbz_sub' has a  'long_name' or 'description' or 'units'
>>> atributes, delete then
>>>        delete( [/ dbz_sub at long_name, dbz_sub at units/] )   ; if present
>>>
>>> (d) Most (?all?) journals want minimal unused space on figures, I'd
>>> minimize the blank space.
>>>
>>> (e) The individual file names for each plot are necessary. The script
>>> uses:
>>>        dbres at tiMainString      = filename
>>>       Maybe, not using the tiMainString resource but rather
>>>        dpres at gsnCenterString = filename
>>>
>>>  (f) Finally, 'for fun', See the figure associated with
>>>        http://www.ncl.ucar.edu/Applications/indices.shtml
>>>        index_amo_1.ncl
>>> <http://www.ncl.ucar.edu/Applications/Scripts/index_amo_1.ncl>
>>>
>>>        This example uses:
>>>           ... at gsnAttachPlotsXAxis = True
>>>
>>>        Your figures could possibly use;
>>>              @gsnAttachPlotsYAxis = True
>>>
>>> Just sayin'    :-)
>>>
>>> D
>>>
>>> On Mon, Oct 30, 2017 at 11:59 AM, Barry Lynn <barry.h.lynn at gmail.com>
>>> wrote:
>>>
>>>> Hi:
>>>>
>>>> I have attached the program that Mary nudged along.
>>>>
>>>> It was necessary to "grab" (->) the variables from within the file
>>>> before using the commands such as PrintVarSummary (this is pretty basic,
>>>> but somehow I had overlooked this), and to rid the "dipr" variable of NaNs
>>>> before accessing the file.
>>>>
>>>> It now makes images of instantaneous precipitation with the radar
>>>> location as the origin (example attached).
>>>>
>>>> Barry
>>>> P.S: It also sets cmap to output white as the first "color" in the
>>>> color bar.
>>>>
>>>> On Sun, Oct 29, 2017 at 5:33 PM, Barry Lynn <barry.h.lynn at gmail.com>
>>>> wrote:
>>>>
>>>>> Yes, thanks for reminding me!
>>>>>
>>>>> I took a program that worked and tried to read a different file and
>>>>> variables, which I will panel later.
>>>>>
>>>>> The clocks changed here...
>>>>>
>>>>> Barry
>>>>>
>>>>> On Sun, Oct 29, 2017 at 5:25 PM, Mary Haley <haley at ucar.edu> wrote:
>>>>>
>>>>>> Barry,
>>>>>>
>>>>>> You are trying to print the variables without reading them off the
>>>>>> file first.  You have:
>>>>>>
>>>>>>   printVarSummary(elevation)
>>>>>>   printVarSummary(rays_time)
>>>>>>   printMinMax(DigitalInstantaneousPrecipitationRate_RAW,False)
>>>>>>   printMinMax(DigitalInstantaneousPrecipitationRate,False)
>>>>>>
>>>>>> These are indeed all variables on the file, but you need to read them
>>>>>> off the file before you can do a printVarSummary on them:
>>>>>>
>>>>>>   printVarSummary(f->elevation)
>>>>>>   printVarSummary(f->rays_time)
>>>>>>   printMinMax(f->DigitalInstantaneousPrecipitationRate_RAW,False)
>>>>>>   printMinMax(f->DigitalInstantaneousPrecipitationRate,False)
>>>>>>
>>>>>> or:
>>>>>>
>>>>>>   elevation = f->elevation
>>>>>>   rays_time = f->rays_time
>>>>>>   dipr_raw  = f->DigitalInstantaneousPrecipitationRate_RAW
>>>>>>   dipr      = f->DigitalInstantaneousPrecipitationRate
>>>>>>
>>>>>>   printVarSummary(elevation)
>>>>>>   printVarSummary(rays_time)
>>>>>>   printMinMax(elevation,0)
>>>>>>   printMinMax(rays_time,0)
>>>>>>   printMinMax(dipr_raw,0)
>>>>>>   printMinMax(dipr,0)
>>>>>>
>>>>>> You will note that dipr is all NaNs. You need to replace the NaNs
>>>>>> with missing values:
>>>>>>
>>>>>> ;---Replace NaNs with missing values
>>>>>>
>>>>>>   dipr at _FillValue = default_fillvalue(typeof(dipr))
>>>>>>   replace_ieeenan (dipr,dipr at _FillValue,0)
>>>>>>
>>>>>> Finally,
>>>>>>
>>>>>> You need to fix the do loop to go from 0 to n_files-1:
>>>>>>
>>>>>>   do i_file = 0,n_files-1
>>>>>>
>>>>>> Also, none of the paneling works because none of the plots have been
>>>>>> created.  I assume this is a work in progress.
>>>>>>
>>>>>> Good luck,
>>>>>>
>>>>>>
>>>>>> --Mary
>>>>>>
>>>>>> On Sun, Oct 29, 2017 at 9:00 AM, Barry Lynn <barry.h.lynn at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi:
>>>>>>>
>>>>>>> I am trying to access the variables in this file.  I have printed
>>>>>>> them out and copied them to the ncl printVarSummary/printMinMax commands,
>>>>>>> but I get an error.
>>>>>>>
>>>>>>> Since the variables (and others) are present, I don't see a way
>>>>>>> around this.  Thank you for your help,
>>>>>>>
>>>>>>> Barry
>>>>>>>
>>>>>>> (0) elevation
>>>>>>>
>>>>>>> (1) azimuth
>>>>>>>
>>>>>>> (2) gate
>>>>>>>
>>>>>>> (3) latitude
>>>>>>>
>>>>>>> (4) longitude
>>>>>>>
>>>>>>> (5) altitude
>>>>>>>
>>>>>>> (6) rays_time
>>>>>>>
>>>>>>> (7) DigitalInstantaneousPrecipitationRate_RAW
>>>>>>>
>>>>>>> (8) DigitalInstantaneousPrecipitationRate
>>>>>>>
>>>>>>> fatal:Variable (elevation) is undefined
>>>>>>>
>>>>>>> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 18
>>>>>>> in file ./read_nc_file.ncl
>>>>>>>
>>>>>>> --
>>>>>>> Barry H. Lynn, Ph.D
>>>>>>> Senior Lecturer,
>>>>>>> The Institute of the Earth Science,
>>>>>>> The Hebrew University of Jerusalem,
>>>>>>> Givat Ram, Jerusalem 91904, Israel
>>>>>>> Tel: 972 547 231 170
>>>>>>> Fax: (972)-25662581
>>>>>>>
>>>>>>> C.E.O, Weather It Is, LTD
>>>>>>> Weather and Climate Focus
>>>>>>> http://weather-it-is.com
>>>>>>> Jerusalem, Israel
>>>>>>> Local: 02 930 9525
>>>>>>> Cell: 054 7 231 170
>>>>>>> Int-IS: x972 2 930 9525
>>>>>>> US 914 432 3108 <(914)%20432-3108>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ncl-talk mailing list
>>>>>>> ncl-talk at ucar.edu
>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Barry H. Lynn, Ph.D
>>>>> Senior Lecturer,
>>>>> The Institute of the Earth Science,
>>>>> The Hebrew University of Jerusalem,
>>>>> Givat Ram, Jerusalem 91904, Israel
>>>>> Tel: 972 547 231 170
>>>>> Fax: (972)-25662581
>>>>>
>>>>> C.E.O, Weather It Is, LTD
>>>>> Weather and Climate Focus
>>>>> http://weather-it-is.com
>>>>> Jerusalem, Israel
>>>>> Local: 02 930 9525
>>>>> Cell: 054 7 231 170
>>>>> Int-IS: x972 2 930 9525
>>>>> US 914 432 3108 <(914)%20432-3108>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Barry H. Lynn, Ph.D
>>>> Senior Lecturer,
>>>> The Institute of the Earth Science,
>>>> The Hebrew University of Jerusalem,
>>>> Givat Ram, Jerusalem 91904, Israel
>>>> Tel: 972 547 231 170
>>>> Fax: (972)-25662581
>>>>
>>>> C.E.O, Weather It Is, LTD
>>>> Weather and Climate Focus
>>>> http://weather-it-is.com
>>>> Jerusalem, Israel
>>>> Local: 02 930 9525
>>>> Cell: 054 7 231 170
>>>> Int-IS: x972 2 930 9525
>>>> US 914 432 3108 <(914)%20432-3108>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>
>>
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>> US 914 432 3108 <(914)%20432-3108>
>>
>
>


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

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171031/0f7ebab7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obs_accu_prec.png
Type: image/png
Size: 216760 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171031/0f7ebab7/attachment-0001.png>


More information about the ncl-talk mailing list