Skip to content

Examples of seachString #105

Answered by blaylockbk
blaylockbk asked this question in Q&A
Discussion options

You must be logged in to vote

Essentially, the searchString argument defines a regex search string done on the GRIB2 inventory file to find where the variables you want are located in the file.
Look at this page for more examples of what to set "searchString" to
🪂 Subset with searchString

For U and V winds at 10 m, you can set

searchString=":(?:U|V)GRD:10 m above ground"

Here's an example with GFS

from herbie import Herbie
H = Herbie('2022-01-01', model='gfs')

To show the inventory file as a dataframe, you can do

H.read_idx()

this produces a dataframe for each of the rows in the index file

In fact, you can use that command to try out different search strings until you get what you want

H.read_idx(searchString=":(?:U|…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by blaylockbk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant