[ncl-talk] draw order issue
Gurer, Kemal@ARB
kemal.gurer at arb.ca.gov
Thu Sep 15 15:53:17 MDT 2022
I agree with your assessment. Thank you very much for your help Rick. With regards. - Kemal.
From: Rick Brownrigg <brownrig at ucar.edu>
Sent: Thursday, September 15, 2022 2:49 PM
To: Gurer, Kemal at ARB <kemal.gurer at arb.ca.gov>
Cc: ncl-talk at ucar.edu forum <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] draw order issue
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hmmm...it looks to me everything is working as it expected. Figure 1 looks right. Figure 2 -- yes that's a larger spatial domain and the MPAS cells overwhelm the map. You could try something like making the map outlines white some other contrasting color (and probably would want PostDraw for this purpose). But I'm not sure the resultant map would be any more useful. Figure 3 is again out over the ocean, and is more than half as small a domain, spatially, as Fig 2.
A final thought on Fig 2. -- you could play with the opacity of the grid; make it highly translucent. Probably still too dense.
HTH...
Rick
On Thu, Sep 15, 2022 at 3:21 PM Gurer, Kemal at ARB <kemal.gurer at arb.ca.gov<mailto:kemal.gurer at arb.ca.gov>> wrote:
Hi Rick,
I feel really bad that I didn't see invoking map twice. Since I was playing around with map, I simply forgot to delete the second call. It is my mistake. I apologize for this mistake and taking your time.
I can now plot the grid cells with map on it. Yet, the problem actually still persists. I can plot both map grid outlines and MPAS grid cells if I zoom in very close to the map. Here is the code that I change to play with map and grid cells:
; ---------- This plots both map boundaries and MPAS grid cells due to zooming in on the map at San Francisco Bay. Both of them are visible. Please see attached figure 1 ----------
res at mpMinLatF = 36
res at mpMaxLatF = 39 ; choose subregion
res at mpMinLonF = -124
res at mpMaxLonF = -121
map = gsn_csm_map(wks,res)
; --------- This plots both map boundaries and MPAS grid cells. But, MPAS grid cells crowd the plot and map and grid cells are not discernible. Map boundary is just outside of California and Nevada. Please see figure 2 -----
res at mpMinLatF = 31.5
res at mpMaxLatF = 43 ; choose subregion
res at mpMinLonF = -127.5
res at mpMaxLonF = -113
map = gsn_csm_map(wks,res)
; -------- This only plots MPAS grid cells. Map boundaries are not plotted. Map boundary is slightly bigger than the domain covering in Figure 2. Please see figure 3--------
res at mpMinLatF = 30
res at mpMaxLatF = 35
res at mpMinLonF = -130
res at mpMaxLonF = -125
; ------------------------------------------
Kemal.
From: Rick Brownrigg <brownrig at ucar.edu<mailto:brownrig at ucar.edu>>
Sent: Thursday, September 15, 2022 1:38 PM
To: Gurer, Kemal at ARB <kemal.gurer at arb.ca.gov<mailto:kemal.gurer at arb.ca.gov>>
Cc: ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu> forum <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Subject: Re: [ncl-talk] draw order issue
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
OK,
In the script, as presented to us, there are two calls to gsn_csm_map. They have different lat/lon extents and they both assign the result to the variable "map" (I'm suprised there was no error/warning). In any case, the 2nd set of lat/lon extents are off the coast. That second set is what the MPAS appears to be drawing on top of.
HTH...
Rick
On Thu, Sep 15, 2022 at 1:56 PM Gurer, Kemal at ARB <kemal.gurer at arb.ca.gov<mailto:kemal.gurer at arb.ca.gov>> wrote:
Hi Rick,
I tried that before. It didn't help. That is, MPAS grid cells are still plotted without map outlines.
Kemal.
From: Rick Brownrigg <brownrig at ucar.edu<mailto:brownrig at ucar.edu>>
Sent: Thursday, September 15, 2022 12:39 PM
To: Gurer, Kemal at ARB <kemal.gurer at arb.ca.gov<mailto:kemal.gurer at arb.ca.gov>>
Cc: ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu> forum <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Subject: Re: [ncl-talk] draw order issue
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kemal,
What does the plot look like when you try to plot both map and lines together? Have you tried without the
mpOutlineDrawOrder resource?
Rick
On Thu, Sep 15, 2022 at 1:22 PM Gurer, Kemal at ARB via ncl-talk <ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>> wrote:
Hello ncl'ers,
I am trying to plot MPAS grid cells on the top of US map using ncl. I attached the script that plots map and outlines. I can draw maps and MPAS grid cells separately, but I cannot plot map outline on the top of MPAS grid cells even though I set the draw order to "PostDraw". Could you help me to identify what I am doing wrong?
Thanks,
Kemal.
_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.ucar.edu%2Fmailman%2Flistinfo%2Fncl-talk&data=05%7C01%7Ckemal.gurer%40arb.ca.gov%7C75b8cac16f7c40ab962a08da97643154%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C1%7C637988753849920968%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=DbFhjVAV44kvO52zza%2FiuSl%2FghdY229la02jL9hgKQE%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220915/65ca5d30/attachment.htm>
More information about the ncl-talk
mailing list