Skip to content
Discussion options

You must be logged in to vote

You can simply add fields in the dictionary of variables. For example, if you have a field called PV

filenames = {'U': fnameU, 'V': fnameV, 'PV': fnamePV}
variables = {'U': 'u', 'V': 'v', 'PV': 'PV'}
dimensions = {'lat': 'lat', 'lon': 'lon'}
set = FieldSet.from_netcdf(filenames, variables, dimensions)

The resulting fset now has three fields: U, V and PV. You can do this for how many fields you want, and by making dimensions a dict-of-dicts (i.e. a separate dictionary for each variable), you can even combine fields with different dimensions.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MiriamSterl
Comment options

Answer selected by MiriamSterl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants