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

Adam Phillips asphilli at ucar.edu
Mon Sep 16 10:43:11 MDT 2019


Hi Zoe,
To use tmYLValues/tmYLLabels, you need to also set tmYLMode = "Explicit".
All three resources need to be set if you are wanting to set the tick mark
labels explicitly. The same goes for the tmXB resources. Note that by
default the tmYR/tmXT resources are linked to the tmYL/tmXB settings.
Adam

On Sat, Sep 14, 2019 at 10:48 AM zoe jacobs <zoejacobs1990 at gmail.com> wrote:

> Dear Adam,
> I have tried example 7, but did not get any reasonable result. I tried
> example 9 (check the attached script) , from the same page that you have
> suggested. I got some errors(attached). How can I sort out these
> errors, please?
> Best wishes,
>
> On Mon, Sep 9, 2019 at 9:58 PM Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Zoe,
>> Whenever you need to find out how to do something graphically in NCL, a
>> good place to start is the NCL examples page here:
>> http://www.ncl.ucar.edu/Applications/
>>
>> There are a lot of categories, and it can be hard to find exactly what
>> you're looking for, but in this case if you click on "Tickmarks: Map", look
>> at example #7 as it shows you how to turn on the tickmarks on the top and
>> right hand side of the map:
>> http://www.ncl.ucar.edu/Applications/mptick.shtml#ex7
>>
>> Adam
>>
>>
>>
>>
>> On Mon, Sep 9, 2019 at 11:21 AM zoe jacobs via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> Hi Dennis,
>>> Thanks for your help. I also need to know how to plot a map to have
>>> lat/lon on each axes parallel to each other, like the attached one.
>>> Regards,
>>>
>>> On Mon, Sep 9, 2019 at 8:42 PM Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> 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
>>>>
>>>> _______________________________________________
>>> 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190916/3e1c6bf7/attachment.html>


More information about the ncl-talk mailing list