[ncl-talk] ADO + removing title on map plot

Dennis Shea shea at ucar.edu
Mon Sep 9 10:12:20 MDT 2019


Zoe:

Attached is a simple script that reads/plot the hdf5  [HDF-EOS] file
---
If you are 'new' to NCL, please look at the excellent DKRZ manual:

*https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_A4.pdf*
<https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_A4.pdf>

There is no 'magic': all languages [computer and spoken] require the user
to spend time to learn.
---

On Mon, Sep 9, 2019 at 7:56 AM Toni Klemm via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hi Zoe,
>
> Could you send your new script with the changes I suggested. Although I’ve
> never worked with HDF data, it should have worked.
>
> The file you sent contains the variable
> Deep_Blue_Aerosol_Optical_Depth_550_Land_Mean, which you are extracting
> in line 9 of your original code.
>
>     short Deep_Blue_Aerosol_Optical_Depth_550_Land_Mean(YDim=180,
> XDim=360);
>       :valid_range = 0S, 5000S; // short
>       :_FillValue = -9999S; // short
>       :long_name = "Deep blue aerosol optical depth at 0.55 microns for
> land (corrected): Mean";
>       :units = "none";
>       :scale_factor = 0.0010000000474974513; // double
>       :add_offset = 0.0; // double
>       :Masked_With_QA_Usefulness_Flag = "True";
>       :Level_2_Pixel_Values_Read_As = "Real";
>       :Derived_From_Level_2_Data_Set =
> "Deep_Blue_Aerosol_Optical_Depth_550_Land";
>       :Included_Level_2_Nighttime_Data = "False";
>       :Quality_Assurance_Data_Set = "Quality_Assurance_Land";
>       :Statistic_Type = "Simple";
>       :QA_Byte = 4S; // short
>       :QA_Useful_Flag_Bit = 0S; // short
>       :QA_Value_Start_Bit = 1S; // short
>       :QA_Value_Num_Bits = 2S; // short
>       :Aggregation_Data_Set = "None";
>
> The variable has a number of attributes, which you see above, the third of
> which is long_name. That is what NCL uses to determine the title of your
> map, unless you tell it something else, for example by setting
>
> res at tiMainString = “[your custom map title]"
>
> Make sure there is no semicolon in front of res at tiMainString !
>
> If it still doesn’t work, please attach your script, and I can take a look
> what is wrong.
>
> Also, check out Panoply (https://www.giss.nasa.gov/tools/panoply/) to
> view your HDF files and all the metadata and attributes (and netCDF files,
> too) It’s a great program and has helped me a lot figuring out problems
> with my data.
>
> Good luck,
> Toni
>
>
>
> *Toni Klemm, Ph.D.*Postdoctoral Research Associate
> Department of Ecosystem Science and Management
> College of Agriculture and Life Sciences
> Texas A&M University, College Station, TX
> www.toni-klemm.de | @toniklemm <http://www.twitter.com/toniklemm>
> Editorial Board member, Early Career Climate Forum
> <http://www.eccforum.org>
>
>
>
>
>
>
>
>
> On Sep 8, 2019, at 4:03 PM, zoe jacobs <zoejacobs1990 at gmail.com> wrote:
>
> Dear Toni,
> Please check the attached file.
> Best wishes,
>  01-01.hdf
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__drive.google.com_file_d_1JUtlZ7FFggSaPd5IosGMDBOmbF1YcfeN_view-3Fusp-3Ddrive-5Fweb&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UsnBcgdnIR3NL175E-6P7QWpWE7wKOO9TXnYD8t44QI&s=JyjJcvay9k7mR_eBhQONqhQn2N02piSnWG1cYoF7UDU&e=>
>
> On Mon, Sep 9, 2019 at 12:56 AM Toni Klemm <toni-klemm at tamu.edu> wrote:
>
>> Could you attach your netCDF file if it’s not too big? Also, please also
>> respond to ncl-talk at ucar.edu so that the conversation is archived for
>> future reference.
>>
>> Toni
>>
>>
>> *Toni Klemm**, Ph.D.*
>> Postdoctoral Research Associate
>> Department of Ecosystem Science and Management
>> College of Agriculture and Life Sciences
>> Texas A&M University, College Station, TX
>> www.toni-klemm.de
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de_&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UsnBcgdnIR3NL175E-6P7QWpWE7wKOO9TXnYD8t44QI&s=OPWK3YEYM3ciFs1ObreyjdHO1Wkv43QCVjWgI3V2xNQ&e=>
>>  | @toniklemm
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_ToniKlemm&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UsnBcgdnIR3NL175E-6P7QWpWE7wKOO9TXnYD8t44QI&s=KUlUjvom6bloeTRmtIELV_mWMAA_MVxqyHQhj7_1ca0&e=>
>> Editorial Board member, Early Career Climate Forum
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eccforum.org_&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UsnBcgdnIR3NL175E-6P7QWpWE7wKOO9TXnYD8t44QI&s=sRvWLTsJ-deu-64UBXdoeH0NYUaZnYVNNrTmSz9EYzM&e=>
>>
>>
>>
>>
>> On Sep 8, 2019, at 3:14 PM, zoe jacobs <zoejacobs1990 at gmail.com> wrote:
>>
>> Dear Toni,
>> Thank you for your advice. But, it did not work. NCL derives the title
>> automatically from the file and I do not know how!
>> best wishes,
>>
>> On Sun, Sep 8, 2019 at 11:18 PM Toni Klemm <toni-klemm at tamu.edu> wrote:
>>
>>> Hi Zoe,
>>>
>>> Remove the semicolon at the beginning of this line in your script:
>>>
>>> ; res at tiMainString = "Deep blue aerosol optical depth”
>>>
>>> and replace that line with:
>>>
>>> res at tiMainString = ""
>>>
>>> This way the map title should be blank.
>>>
>>> As a side note, if no map or plot title is explicitly provided in the
>>> script, NCL defaults to what is written in the metadata field long_name.
>>>
>>> Good luck,
>>> Toni
>>>
>>>
>>> *Toni Klemm**, Ph.D.*
>>> Postdoctoral Research Associate
>>> Department of Ecosystem Science and Management
>>> College of Agriculture and Life Sciences
>>> Texas A&M University, College Station, TX
>>> www.toni-klemm.de
>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de_&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UTWVYnFKZ8Q2Yv4W6_804zllkROE5jc4YQDSxEiV7bo&s=1C0Kr40EBujBrul5R_nhNwVSQ8In7Bb-iTGHTQfEooo&e=>
>>>  | @toniklemm
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_ToniKlemm&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UTWVYnFKZ8Q2Yv4W6_804zllkROE5jc4YQDSxEiV7bo&s=Q9Wyvz-XcEd96oXOQz-5kJ8lV2M83wI48IiWXOd3KlI&e=>
>>> Editorial Board member, Early Career Climate Forum
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eccforum.org_&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=UTWVYnFKZ8Q2Yv4W6_804zllkROE5jc4YQDSxEiV7bo&s=_IMTKMzkAj7om4knQYkX4SPyy_RjKKY6Qa91Ip05V6I&e=>
>>>
>>>
>>>
>>>
>>> On Sep 8, 2019, at 1:34 PM, zoe jacobs via ncl-talk <ncl-talk at ucar.edu>
>>> wrote:
>>>
>>> Hi all,
>>> I have plotted AOD [ Aerosol Optical Depth], from MODIS data (hdf file).
>>> However, I need to remove the title on my map ( the image attached). Would
>>> you please give me suggestions on how to remove the title? I also attached
>>> my script.
>>> Best wishes,
>>> <a_modis.png><aod-modis.ncl>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>>
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwICAg&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=c977kCbW5XgIWAVaYwrsuObLHJRSNx_W6C9EWccIlvg&s=Bs-os1nWvYnqVIl324moV7Uds-QIg5bxnOk39RjKu1U&e=
>>>
>>>
>>>
>>
> _______________________________________________
> 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/20190909/dff592ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aod-modis.ncl
Type: application/octet-stream
Size: 2611 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190909/dff592ba/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aod_modis.png
Type: image/png
Size: 58252 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190909/dff592ba/attachment.png>


More information about the ncl-talk mailing list