[ncl-talk] overlay_11.ncl
Mary Haley
haley at ucar.edu
Tue Nov 20 07:39:56 MST 2018
Hi Jalal,
Thanks for sending the script. I do not understand what you are trying to
do, however, because you are referencing several variables that don't even
exist. It looks like you did a printVarSummary of the data variables from
the "uvt.nc" data file, which is the original data file that was used for
this particular example.
In your script, you are referencing "grid_lont", "grid_latt", "aqual", but
I don't see them being calculated or read off a file.
What I'm trying to get you to do is look at the variables you are trying to
plot, so you can better understand why they are not plotting on the map
correctly.
What are grid_lont and grid_latt ? Why are they in your script? What is
"aqual"? You are plotting this variable, but I don't see where it is being
calculated.
If you are struggling with plotting data over a map, then I suggest looking
at our "plotting data on a map" examples page:
http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml
This will help explain how to examine your data so you can better
understand how to plot it.
--Mary
--Mary
On Tue, Nov 20, 2018 at 2:11 AM Md. Jalal Uddin <dmjalal90 at gmail.com> wrote:
> Dear Mary,
>
> Please find the variable overview as follows:
>
> Variable: u
> Type: float
> Total Size: 32768 bytes
> 8192 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 1] x [lat | 64] x [lon | 128]
> Coordinates:
> time: [0..0]
> lat: [-87.8638..87.8638]
> lon: [-180..177.1875]
> Number Of Attributes: 5
> lev : 500
> _FillValue : -999
> long_name : Zonal Wind
> short_name : U
> units : m/s
>
> Variable: v
> Type: float
> Total Size: 32768 bytes
> 8192 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 1] x [lat | 64] x [lon | 128]
> Coordinates:
> time: [0..0]
> lat: [-87.8638..87.8638]
> lon: [-180..177.1875]
> Number Of Attributes: 5
> lev : 500
> _FillValue : -999
> long_name : Meridional Wind
> short_name : V
> units : m/s
> (0) Zonal Wind (m/s) : min=-13.8651 max=40.7452
> (0) Meridional Wind (m/s) : min=-13.8738 max=12.5208
>
>
> I did not find grid_lont and grid_latt in the data (uvt.nc,
> http://www.ncl.ucar.edu/Applications/Data/). Please find the script in
> the attachment.
>
> fatal:Variable (grid_lont) is undefined
>
> What can I do?
>
> Best Regards,
> Jalal
>
>
> On Tue, Nov 20, 2018 at 1:18 AM Mary Haley <haley at ucar.edu> wrote:
>
>> Dear Jalal,
>>
>> You sent your message over the weekend, which is why it was not answered
>> right away.
>>
>> Are you getting any errors or warnings from this script? It's crucial to
>> include this information when you have a question about NCL.
>>
>> Usually the reason why data doesn't appear on a map correctly is because
>> the lat/lon data being provided in the script is not correct for the data
>> you are trying to plot.
>>
>> It looks like you are doing everything correctly, as you have these two
>> lines which tell NCL where to place the data on the map:
>>
>> res at sfXArray = grid_lont ; Required to tell NCL
>> where to
>> res at sfYArray = grid_latt ; overlay data on globe.
>>
>>
>> Did you look at grid_lont and grid_latt? I suggest doing a printMinMax
>> to make sure that the lat/lon values look correct:
>>
>> printMinMax(grid_lont,0)
>> printMinMax(grid_latt,0)
>>
>> These values should be around 23 latitude and 90 longitude, if this data
>> is over Bangladesh.
>>
>> A useful debugging tool is to use the gsn_coordinates procedure to draw
>> the location of your grid_lont and grid_latt arrays on your map. For
>> example, after this call:
>>
>> plot = gsn_csm_contour_map(wks,aqual,res)
>>
>> add the lines:
>>
>> mkres = True
>> mkres at gsnCoordsLat = grid_latt
>> mkres at gsnCoordsLon = grid_lont
>> ;mkres at gsMarkerSizeF = 5 ; may need to adjust this if markers are
>> too large or too small
>> gsn_coordinates(wks,plot,aqual,mkres)
>>
>> For more information on gsn_coordinates, see some examples at:
>>
>> http://www.ncl.ucar.edu/Applications/datagrid.shtml
>> If you continue to have problems, then it would really help if you could
>> do one or more of the following:
>>
>> Provide the output from doing a printVarSummary and printMinMax on all
>> the variables you are trying to plot *and* grid_lont and gridlatt.
>>
>> Provide the full script and the data. If the data is > 2 MB, then put it
>> somewhere that we can download it, or use ftp:
>>
>> http://www.ncl.ucar.edu/ftp_files.shtml
>>
>> Thank you,
>>
>> --Mary
>>
>>
>>
>>
>>
>> On Mon, Nov 19, 2018 at 2:11 AM Md. Jalal Uddin <dmjalal90 at gmail.com>
>> wrote:
>>
>>> Could anyone tell me why I am not getting temperature contour for
>>> Bangladesh?
>>>
>>> On Sun, Nov 18, 2018 at 4:19 PM Md. Jalal Uddin <dmjalal90 at gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I followed overlay_11.ncl example (
>>>> https://www.ncl.ucar.edu/Applications/overlay.shtml) code and data;
>>>> however, I am getting the temperature contour. I tried to mask out over
>>>> Bangladesh.
>>>>
>>>> How can I get the temperature contour?
>>>>
>>>> Best regards,
>>>> Jalal
>>>> --
>>>> *Md. Jalal Uddin*
>>>> MSc in Applied Meteorology (English Language)
>>>> Nanjing University of Information, Science and Technology, China
>>>> B.Sc. in Disaster Management (Hons.)
>>>> Patuakhali Science and Technology University, Bangladesh.
>>>> Cell: +8613260859092, +8801792052662
>>>> Web: www.dmjalal90.weebly.com
>>>> Facebook: jalal.hossen.39
>>>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>>>> Twitter: dmjalal90
>>>> Skype: dmjalal90
>>>>
>>>
>>>
>>> --
>>> *Md. Jalal Uddin*
>>> MSc in Applied Meteorology (English Language)
>>> Nanjing University of Information, Science and Technology, China
>>> B.Sc. in Disaster Management (Hons.)
>>> Patuakhali Science and Technology University, Bangladesh.
>>> Cell: +8613260859092, +8801792052662
>>> Web: www.dmjalal90.weebly.com
>>> Facebook: jalal.hossen.39
>>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>>> Twitter: dmjalal90
>>> Skype: dmjalal90
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
> --
> *Md. Jalal Uddin*
> MSc in Applied Meteorology (English Language)
> Nanjing University of Information, Science and Technology, China
> B.Sc. in Disaster Management (Hons.)
> Patuakhali Science and Technology University, Bangladesh.
> Cell: +8613260859092, +8801792052662
> Web: www.dmjalal90.weebly.com
> Facebook: jalal.hossen.39
> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
> Twitter: dmjalal90
> Skype: dmjalal90
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181120/e53f3dfd/attachment.html>
More information about the ncl-talk
mailing list