blaylockbk / Carpenter_Workshop

Brian's python workshop, where he keeps his tools, paint, and anything else useful.
https://blaylockbk.github.io/Carpenter_Workshop/
BSD 3-Clause "New" or "Revised" License
36 stars 7 forks source link

common_features: add terrain background map plotted from GFS #8

Open blaylockbk opened 1 year ago

blaylockbk commented 1 year ago

I would like to add this as a map background option for the cartopy_tools.common_features class...

image

Could be terrain field from GFS, HRRR, or another model

This would require Herbie being installed, and getting the data.

from herbie import Herbie

model = 'hrrr'

def TERRAIN2(self, date, model):
    H = Herbie(date, model)
    ds = H.terrain()

    # color the map background water
    self.ax.set_facecolor(water_color)

    # plot the terrain
    ax.pcolormesh(
        ds.longitude,
        ds.latitude,
        ds.orog,
        transform=pc,
        **cm_terrain(water=False, land_top=5500).cmap_kwargs
    )
blaylockbk commented 1 year ago

Maybe add some more details to this, like ice