-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for 2D advection in from_croco
- Loading branch information
1 parent
0ced1ec
commit 9fefe5b
Showing
5 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os | ||
|
||
import parcels | ||
|
||
|
||
def create_fieldset(indices=None): | ||
file = os.path.join(os.path.dirname(__file__), "CROCO_idealized.nc") | ||
|
||
variables = {"U": "u", "V": "v"} | ||
dimensions = { | ||
"U": {"lon": "x_rho", "lat": "y_rho", "time": "time"}, | ||
"V": {"lon": "x_rho", "lat": "y_rho", "time": "time"}, | ||
} | ||
fieldset = parcels.FieldSet.from_croco( | ||
file, | ||
variables, | ||
dimensions, | ||
allow_time_extrapolation=True, | ||
mesh="flat", | ||
) | ||
|
||
return fieldset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters