Conditional Spatial Plotting with GRIB2 data #3367
-
Hi all! I am trying to plot on a cartopy map in one shaded color where the following is true: Temperature >=75F, Relative Humidity <=25% and Wind Speed >=15mph. Does anyone have any tips on how I can compare all those 3 parameters and plot them as one shaded area where those 3 conditions hold true? To be a little more specific, I am plotting the current RTMA data and I used MetPy to calculate RH from temperature and dewpoint. Thanks! Here is the section code I have so far but it doesn't work at the end where I am trying to use the where() method in xarray: P.S. I set the temperature to 15F for now even though that isn't RFW criteria since I am testing this out for Alaska where there won't be any RFW criteria for several months :)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
One approach I've used you can try:
|
Beta Was this translation helpful? Give feedback.
Try this:
mask = (rtma_rh <= 25) & (rtma_wind >= 15)
I think it's my oops for suggesting
where()
when writing the pseudo-code!