[ncl-talk] Program that reads Instantaneous Precipitation from NW&CT
Dennis Shea
shea at ucar.edu
Mon Oct 30 12:51:20 MDT 2017
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171030/57469c84/attachment.html>
More information about the ncl-talk
mailing list