[ncl-talk] Unable to generate plot from Lambert_conformal grid data

Adam Phillips asphilli at ucar.edu
Tue Nov 15 11:56:14 MST 2022


Hi Debasish,
I have downloaded your simple3.nc file, and modified and ran your
Test_lambert2.ncl file.  I believe you were plotting the data correctly,
and I am attaching my script and resulting plot. In short, I believe your
data spans a very narrow range from 99.9999->100.0001. When I ran your
simple3.nc array dust array through a simple statistical function of mine
(that is similar to stat_dispersion
<https://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml>),
here's what it shows:

Type: double
Total Size: 15241128 bytes
            1905141 values
Number of Dimensions: 2
Dimensions and sizes: [grid_yt | 1059] x [grid_xt | 1799]
Coordinates:
            grid_yt: [   0..3174000]
            grid_xt: [   0..5394000]
Number Of Attributes: 8
  _FillValue : -10000000000
  pfull : 3.176593
  time : 0.01666666666666667
  cell_methods : time: point
  long_name : dust mixing ratio
  output_file : dyn
  units : ug/kg
  missing_value : -10000000000
(0) Min of array = 99.99990879805409, max = 100.0001006445927, mean =
100.0000030975023, std dev = 9.552738461320711e-06
(0) 1 std dev range =99.99999354476387:100.0000126502408 (68%)
(0) 2 std dev range =99.99998399202541:100.0000222029793 (95%)
(0) 3 std dev range =99.99997443928694:100.0000317557177 (99%)
(0) No missing data is present in this array

Hope this helps!
Adam

On Fri, Nov 11, 2022 at 6:04 PM Debasish Hazra <debasish.hazra5 at gmail.com>
wrote:

> Hi Adam,
> Thanks. I have put first 8 variables as you suggested and put them in
> google drive (as putting in ftp failed again) :
>
> https://drive.google.com/drive/folders/1FCFWNVf95sLpjhBYfMt7zZyqz_hiNZ2i?usp=sharing
>
> and shared it among ncl-talk group. I have worked on the ncl script and
> attached the current code and figure.
> Any help on this is appreciated.
> Debasish
>
>
> On Fri, Nov 11, 2022 at 2:38 PM Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Debasish,
>> As a reminder, please do not write to any ncl-talk contributor directly
>> unless asked to do so. This way the community can see the complete
>> discussion.
>> The ftp site seemingly works for some people but fails for others, and
>> there unfortunately is nothing that can be done about it. The best way
>> forward is for ncl-talk participants to reduce the size of their data file
>> to a size less than 15MB, and to email the file to ncl-talk, as you have
>> done here.
>>
>> With regards to the file you sent (simple2.nc): The file does not
>> include variables that are needed to correctly plot the data. For example,
>> the lat and lon arrays were not included. Please include the first 8
>> variables shown in your ncdump output shown in your original message.
>>
>> Finally, you say the plot did not work, but ncl-talk needs more
>> information to be able to help. What did not work? Was a plot created? If
>> so, was the data displayed incorrectly? Were there any error messages
>> returned to the terminal? If so, what were they?
>>
>> Unfortunately, less folks are participating in ncl-talk discussions, and
>> there are no longer any NCAR staff that are paid to respond. The more
>> information users provide in initial ncl-talk queries, the cleaner/easier
>> the included script is to inspect, the better the odds are that the query
>> will be answered.
>> Adam
>>
>>
>>
>> On Wed, Nov 9, 2022 at 11:11 AM Debasish Hazra <debasish.hazra5 at gmail.com>
>> wrote:
>>
>>> I am not able to put the full data file on ucar ftp. But extracted the
>>> variable in 2D and attached in the email.
>>> Thanks
>>> Debasish
>>>
>>> On Wed, Nov 9, 2022 at 10:55 AM Debasish Hazra <
>>> debasish.hazra5 at gmail.com> wrote:
>>>
>>>> Thanks Adam, unfortunately It did not work. I have attached a tried
>>>> script . I ma trying to put data in ftp, using this link
>>>> https://www.ncl.ucar.edu/ftp_files.shtml .But is not working.
>>>> Any help is appreciated.
>>>> Thanks,
>>>> Debasish.
>>>>
>>>> On Mon, Nov 7, 2022 at 4:28 PM Adam Phillips <asphilli at ucar.edu> wrote:
>>>>
>>>>> Hi Debasish,
>>>>> I do not have any experience working with lambert_conformal gridded
>>>>> data, but looking at your ncdump output there are variables named lat and
>>>>> lon that are 2D variables that I think you can use to plot the data
>>>>> directly using the lat2d/lon2d assignment method.
>>>>> I would try this:
>>>>>
>>>>> dustsfc = flt2dble(a1->dust)
>>>>> lev = a1->pfull
>>>>> dustsfc2 at lat2d = a1->lat
>>>>> dustsfc2 at lon2d = a1->lon
>>>>> labes = (/"Dust conc(ug/kg) at surface : 00FH"/)
>>>>>
>>>>>  wks_type = "png"
>>>>> ..... (continue using the rest of your script)
>>>>>
>>>>> If that does not work I would recommend creating a new netCDF file
>>>>> that only contains a single 3D variable, along with the first 8 variables
>>>>> shown in your ncdump output (pfull->lat), and send that new file to the
>>>>> ncl-talk email list. Include your most recent script and any error messages
>>>>> that you are getting as well.
>>>>> Good luck,
>>>>> Adam
>>>>>
>>>>> On Mon, Nov 7, 2022 at 12:35 PM Debasish Hazra via ncl-talk <
>>>>> ncl-talk at mailman.ucar.edu> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I am trying to plot variable which is in lambert_conformal grid, but
>>>>>> I am not able to generate the plot. Attached is ncl_filedump and ncl
>>>>>> script.Can anyone point out how to do it. Thanks
>>>>>>
>>>>>> Debasish.
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at mailman.ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Adam Phillips
>>>>> Associate Scientist IV, Climate Analysis Section
>>>>> Climate and Global Dynamics Laboratory
>>>>> National Center for Atmospheric Research
>>>>> www.cgd.ucar.edu/staff/asphilli/
>>>>>
>>>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>>>
>>>>
>>
>> --
>> Adam Phillips
>> Associate Scientist IV, Climate Analysis Section
>> Climate and Global Dynamics Laboratory
>> National Center for Atmospheric Research
>> www.cgd.ucar.edu/staff/asphilli/
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>>
>

-- 
Adam Phillips
Associate Scientist IV, Climate Analysis Section
Climate and Global Dynamics Laboratory
National Center for Atmospheric Research
www.cgd.ucar.edu/staff/asphilli/

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221115/e198a6d2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RRFSSD_TestDust.png
Type: image/png
Size: 122450 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221115/e198a6d2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_lambert3.ncl
Type: application/octet-stream
Size: 3606 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221115/e198a6d2/attachment.obj>


More information about the ncl-talk mailing list