[Thread Prev][Thread Next][Index]

Re: [ferret_users] ppl commands for a Vector overlay on a projection.



Thank you so much, this worked for me!

Alexander

On Tue, Jun 22, 2021 at 3:55 PM Ansley Manke <a.c.manke@xxxxxxxxx> wrote:

Hi Alexander,

(The x_page,y_page coordinates in my example wrapped to the next line - I meant them to be included.)

What is happening here is that the /xskip and /yskip are not being applied when using vector/set.  The plot is all black because it's drawing all of the vectors on a fine grid which just fills in the entire plot. 

For VECTOR/SET_UP, I see some details in the documentation, which says that /xskip and /yskip aren't applied if /SET is used.  This example shows what to do instead:

yes? USE coads_climatology
yes? VECTOR/SET uwnd,vwnd
yes? PPL axset,1,1,0,0
yes? PPL VECTOR,3,4 ! specifies XSKIP=3 and YSKIP=4
yes? ! If it were an overlay plot, that would be PPL VECTOR/OVER,3,4

I was incorrect yesterday - you do not need the vectors to be on the same grid as the underlying plot, so what you did with a new call to "go mp_grid" for the vector dataset is fine.

Ansley


On 6/22/2021 8:07 AM, Alexander Audet wrote:
When trying your suggestion with:

VECTOR/overlay/Thickness=0.25/Xskip=60/Yskip=40/set Uwind_ov, Vwind_ov

the vector does not appear to be on the projected grid.

ERA5_WS500_annual.png

Then trying with

VECTOR/over/NOLABELS/KEY/Thickness=0.25/Xskip=60/Yskip=40/set uwnd_ov, vwnd_ov, x_page, y_page

The same black result ensues. 

ERA5_WS500_annual1.png

Cheers!

Alexander

On Mon, Jun 21, 2021 at 8:35 PM Ansley Manke <a.c.manke@xxxxxxxxx> wrote:
Hi Alexander,

I haven't tried your examples in any detail, but I think for the map
projection vector overlay to work correctly, you would need to have the
vector variables on the same grid as the underlying plot.  That way the
x_page, y_page coordinate variables are defined once and are consistent
for the plot:

USE RawERA5WindSpeed500Annual.nc
USE RawERA5WindSpeedComp500annual.nc
go mp_mcbryde_fpq
go mp_grid p[D=1]

Set window/asp=0.7 1
SHADE/PALETTE=difference/nolab/LEVELS=(-38, 38, 2) p[D=1], x_page, y_page

let uwnd_ov = uwnd[d=2,gxy=p[d=1]]
let vwnd_ov = vwnd[d=2,gxy=p[d=1]]

VECTOR/overlay/Thickness=0.25/Xskip=60/Yskip=40/set Uwind_ov, Vwind_ov,
x_page, y_page
ppl VECSET 0.25,25
ppl VECKEY/NOUSER 3.5,1,,(f3.0," m/s")
ppl vector/overlay




On 6/21/2021 9:05 AM, Alexander Audet wrote:
> Hello ferret community,
>
>                     Not sure if this is an impossible combination, but
> I was trying to see if I could refine my vector overlay over my
> projected shade. In one method, I try to use PPlus commands after
> setting up the vector overlay, however, without fail this creates a
> black map and does not seem to produce the desired effect with the legend.
>
> USE RawERA5WindSpeed500Annual.nc
> USE RawERA5WindSpeedComp500annual.nc
> go mp_mcbryde_fpq
> go mp_grid p[D=1]
> go mp_grid Vwind, Uwind
> Set window/asp=0.7 1
> SHADE/PALETTE=difference/nolab/LEVELS=(-38, 38, 2) p[D=1], x_page, y_page
> VECTOR/overlay/Thickness=0.25/Xskip=60/Yskip=40/set Uwind, Vwind,
> x_page, y_page
> ppl VECSET 0.25,25
> ppl VECKEY/NOUSER 3.5,1,,(f3.0," m/s")
> ppl vector/overlay
> GO mp_land
> go mp_label 675,80,0,0,0.13  "ERA5"
> PPL COLOR,6,50,50,50
> Go mp_graticule 0, 360, 20, -90, 90, 20, 6, 1
>
> In another variation, I can use PPlus commands before shading,
> however, while this does impact the standard vector length, and the
> format of the vactor key, it does not place the key where desired. It
> even seems to have mixed results about getting the scale correct, and
> I think when it gets it correct, it might just be due to rounding.
>
> USE RawERA5WindSpeed500Annual.nc
> USE RawERA5WindSpeedComp500annual.nc
> go mp_mcbryde_fpq
> go mp_grid p[D=1]
> go mp_grid Vwind, Uwind
> Set window/asp=0.7 1
> SHADE/PALETTE=difference/nolab/LEVELS=(-38, 38, 2)/set p[D=1], x_page,
> y_page
> ppl VECSET 0.25,25
> ppl VECKEY 1,1,,(f3.0," m/s")
> ppl shade
> VECTOR/over/NOLABELS/KEY/Thickness=0.25/Xskip=60/Yskip=40 Uwind,
> Vwind, x_page, y_page
> GO mp_land
> go mp_label 520,80,0,0,0.13  "ERA5"
> PPL COLOR,6,50,50,50
> Go mp_graticule 0, 360, 20, -90, 90, 20, 6, 1
>
> I can live without the scale placement as I can always move it in
> illustrator, though it may be a pain to keep it the correct size when
> resizing my images, however not being able to control the scale could
> be a dealbreaker.
>
> Cheers!
>
> Alexander

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement