-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from rom-py/125-schism-winds-sflux-generation…
…-produces-misinterpreted-netcdf 125 schism winds sflux generation produces misinterpreted netcdf
- Loading branch information
Showing
7 changed files
with
1,323 additions
and
232 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,59 @@ | ||
# If you are working in a notebook or ipython environment, you may need to uncomment the line below to install the oceanum python library | ||
#!pip install oceanum | ||
|
||
import xarray as xr | ||
# Define your datamesh token in evironment variables as DATAMESH_TOKEN or insert into argument below. | ||
from oceanum.datamesh import Connector | ||
|
||
datamesh = Connector() | ||
|
||
from oceanum.datamesh import Connector | ||
|
||
geom = [ | ||
140, | ||
-26, | ||
157, | ||
-15, | ||
] | ||
|
||
times = ["2023-01-01T00:00:00.000Z", "2023-01-02T00:00:00.000Z"] | ||
|
||
# Put your datamesh token in the Jupyterlab settings, or as argument in the constructor below | ||
datamesh = Connector() | ||
|
||
era5_mslp = datamesh.query( | ||
{ | ||
"id": "00bcb40ecbeea137e7350ae9f9f9a3b3", | ||
"label": "era5_mslp_00bcb4", | ||
"geofilter": { | ||
"geom": geom, | ||
"type": "bbox", | ||
"interp": "linear", | ||
}, | ||
"variables": ["msl"], | ||
"datasource": "era5_mslp", | ||
"timefilter": { | ||
"times": ["2023-01-01T00:00:00.000Z", "2023-01-04T00:00:00.000Z"] | ||
}, | ||
"description": "ECMWF ERA5 global mean sea leve pressure hindcast", | ||
} | ||
) | ||
era5_wind10m = datamesh.query( | ||
{ | ||
"id": "bdaab8e6341f95e35764bcd1a9f737b5", | ||
"label": "era5_wind10m_bdaab8", | ||
"geofilter": { | ||
"geom": geom, | ||
"type": "bbox", | ||
"interp": "linear", | ||
}, | ||
"variables": ["u10", "v10"], | ||
"datasource": "era5_wind10m", | ||
"timefilter": { | ||
"times": ["2023-01-01T00:00:00.000Z", "2023-01-04T00:00:00.000Z"] | ||
}, | ||
"description": "ECMWF ERA5 global 10m wind reanalysis", | ||
} | ||
) | ||
|
||
xr.merge([era5_mslp, era5_wind10m]).to_netcdf("era5.nc") |
Binary file not shown.