-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75 handle pre built json objects (#92)
* handling pre-built jsons for grid and point data * refactoring loading tests * updating point loading example * loading examples updates * grid example typo * example notebook updates, get_dataset credentials * docstring updates * version, readme and changelog updates * version bump, kerchunk method name, remove filecmp * version bump commit * fix changelog --------- Co-authored-by: Sam Lamont <[email protected]>
- Loading branch information
Showing
39 changed files
with
1,396 additions
and
2,334 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
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,236 @@ | ||
from datetime import datetime | ||
|
||
import numpy as np | ||
|
||
NWM_BUCKET = "national-water-model" | ||
NWM22_UNIT_LOOKUP = {"m3 s-1": "m3/s"} | ||
NWM30_START_DATE = datetime(2023, 9, 19, 0) | ||
NWM_S3_JSON_PATH = "s3://ciroh-nwm-zarr-copy" | ||
|
||
|
||
NWM22_ANALYSIS_CONFIG = { | ||
"analysis_assim": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"analysis_assim_extend": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend", | ||
}, | ||
"analysis_assim_extend_no_da": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend_no_da", | ||
}, | ||
"analysis_assim_long": { | ||
"num_lookback_hrs": 12, | ||
"cycle_z_hours": np.arange(0, 24, 6), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_long", | ||
}, | ||
"analysis_assim_long_no_da": { | ||
"num_lookback_hrs": 12, | ||
"cycle_z_hours": np.arange(0, 24, 6), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_long_no_da", | ||
}, | ||
"analysis_assim_hawaii": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_hawaii_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_cycle_z_hourstimes": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"analysis_assim_puertorico": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_puertorico_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"forcing_analysis_assim": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"forcing_analysis_assim_extend": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend", | ||
}, | ||
"forcing_analysis_assim_hawaii": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"forcing_analysis_assim_puertorico": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
} | ||
|
||
NWM30_ANALYSIS_CONFIG = { | ||
"analysis_assim": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"analysis_assim_extend": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend", | ||
}, | ||
"analysis_assim_extend_no_da": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend_no_da", | ||
}, | ||
"analysis_assim_long": { | ||
"num_lookback_hrs": 12, | ||
"cycle_z_hours": np.arange(0, 24, 6), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_long", | ||
}, | ||
"analysis_assim_long_no_da": { | ||
"num_lookback_hrs": 12, | ||
"cycle_z_hours": np.arange(0, 24, 6), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_long_no_da", | ||
}, | ||
"analysis_assim_alaska": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "alaska", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_alaska_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "alaska", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"analysis_assim_extend_alaska": { | ||
"num_lookback_hrs": 32, | ||
"cycle_z_hours": [20], | ||
"domain": "alaska", | ||
"configuration_name_in_filepath": "analysis_assim_extend", | ||
}, | ||
"analysis_assim_extend_alaska_no_da": { | ||
"num_lookback_hrs": 32, | ||
"cycle_z_hours": [20], | ||
"domain": "alaska", | ||
"configuration_name_in_filepath": "analysis_assim_extend_no_da", | ||
}, | ||
"analysis_assim_hawaii": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_hawaii_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_cycle_z_hourstimes": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"analysis_assim_puertorico": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"analysis_assim_puertorico_no_da": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim_no_da", | ||
}, | ||
"forcing_analysis_assim": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"forcing_analysis_assim_extend": { | ||
"num_lookback_hrs": 28, | ||
"cycle_z_hours": [16], | ||
"domain": "conus", | ||
"configuration_name_in_filepath": "analysis_assim_extend", | ||
}, | ||
"forcing_analysis_assim_alaska": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "alaska", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"forcing_analysis_assim_hawaii": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "hawaii", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
"forcing_analysis_assim_puertorico": { | ||
"num_lookback_hrs": 3, | ||
"cycle_z_hours": np.arange(0, 24, 1), | ||
"domain": "puertorico", | ||
"configuration_name_in_filepath": "analysis_assim", | ||
}, | ||
} | ||
|
||
|
||
# WKT strings extracted from NWM grids | ||
CONUS_NWM_WKT = 'PROJCS["Lambert_Conformal_Conic",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6370000.0,0.0]], \ | ||
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["false_easting",0.0],\ | ||
PARAMETER["false_northing",0.0],PARAMETER["central_meridian",-97.0],PARAMETER["standard_parallel_1",30.0],\ | ||
PARAMETER["standard_parallel_2",60.0],PARAMETER["latitude_of_origin",40.0],UNIT["Meter",1.0]]' # noqa | ||
|
||
HI_NWM_WKT = 'PROJCS["Lambert_Conformal_Conic",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6370000.0,0.0]],\ | ||
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["false_easting",0.0],\ | ||
PARAMETER["false_northing",0.0],PARAMETER["central_meridian",-157.42],PARAMETER["standard_parallel_1",10.0],\ | ||
PARAMETER["standard_parallel_2",30.0],PARAMETER["latitude_of_origin",20.6],UNIT["Meter",1.0]]' # noqa | ||
|
||
PR_NWM_WKT = 'PROJCS["Sphere_Lambert_Conformal_Conic",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6370000.0,0.0]],\ | ||
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["false_easting",0.0],\ | ||
PARAMETER["false_northing",0.0],PARAMETER["central_meridian",-65.91],PARAMETER["standard_parallel_1",18.1],\ | ||
PARAMETER["standard_parallel_2",18.1],PARAMETER["latitude_of_origin",18.1],UNIT["Meter",1.0]]' # noqa | ||
|
||
AL_NWM_WKT = 'PROJCS["Sphere_Stereographic",GEOGCS["Sphere",DATUM["Sphere",SPHEROID["unnamed",6370000,0]], \ | ||
PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]], \ | ||
PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",60],PARAMETER["central_meridian",-135], \ | ||
PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1],AXIS["Easting",SOUTH], \ | ||
AXIS["Northing",SOUTH]]' # noqa |
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
Oops, something went wrong.