-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Canadian Meterological Center Model Support (#76)
* First pass at CMC (GDPS/GEPS) client * Fix typo * Add regex * Update tests and add examples * Fix model name * Fix renaming and order of regex * Update Readme * Fix tests * Fix mapping * Fix name splitting * Update for name * Add integration tests and address comments * Add basic options * Add basic options * Fix which Client is being used * Readd init file * Add space
- Loading branch information
1 parent
91888e9
commit 8fef095
Showing
12 changed files
with
575 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
__all__ = ["ceda", "metoffice", "ecmwf", "icon"] | ||
__all__ = ["ceda", "metoffice", "ecmwf", "icon", "cmc"] | ||
|
||
from . import ( | ||
ceda, | ||
metoffice, | ||
ecmwf, | ||
icon | ||
icon, | ||
cmc, | ||
) |
Binary file added
BIN
+4.2 MB
src/nwp_consumer/internal/inputs/cmc/CMC_glb_CAPE_SFC_0_latlon.15x.15_2023080900_P027.grib2
Binary file not shown.
Binary file added
BIN
+987 KB
src/nwp_consumer/internal/inputs/cmc/CMC_glb_TMP_TGL_2_latlon.15x.15_2023080900_P027.grib2
Binary file not shown.
Binary file added
BIN
+831 KB
...wp_consumer/internal/inputs/cmc/CMC_glb_VGRD_ISBL_200_latlon.15x.15_2023080900_P027.grib2
Binary file not shown.
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,4 @@ | ||
__all__ = ["Client"] | ||
|
||
from .client import Client | ||
|
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,62 @@ | ||
"""Defines all parameters available from GDPS.""" | ||
|
||
|
||
GDPS_VARIABLES = [ | ||
"ALBDO", | ||
"ABSV", | ||
"CWAT", | ||
"TSOIL", | ||
"SOILVIC", | ||
"SOILM", | ||
"SFCWRO", | ||
"CAPE", | ||
"CIN", | ||
"ACPCP", | ||
"DLWRF", | ||
"DSWRF", | ||
"HGT", | ||
"FPRATE", | ||
"IPRATE", | ||
"PCPNTYPE", | ||
"LHTFL", | ||
"NLWRS", | ||
"NSWRS", | ||
"PRATE", | ||
"PRES", | ||
"RH", | ||
"SKINT", | ||
"SDEN", | ||
"SNOD", | ||
"SPRATE", | ||
"SPFH", | ||
"TMP", | ||
"TCDC", | ||
"APCP", | ||
"ULWRF", | ||
"VVEL", | ||
"GUST", | ||
"UGRD", | ||
"VGRD", | ||
] | ||
|
||
GEPS_VARIABLES = [ | ||
"CAPE", | ||
"CIN", | ||
"HGT", | ||
"ICETK", | ||
"PRES", | ||
"PRMSL", | ||
"PWAT", | ||
"RH", | ||
"SCWRO", | ||
"SNOD", | ||
"SPFH", | ||
"TCDC", | ||
"TMP", | ||
"TSOIL", | ||
"UGRD", | ||
"VGRD", | ||
"WEASD", | ||
"WIND", | ||
"VVEL" | ||
] |
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 datetime as dt | ||
|
||
from nwp_consumer import internal | ||
|
||
|
||
class CMCFileInfo(internal.FileInfoModel): | ||
def __init__( | ||
self, it: dt.datetime, filename: str, currentURL: str, step: int, | ||
) -> "CMCFileInfo": | ||
self._it = it | ||
self._filename = filename | ||
self._url = currentURL | ||
self.step = step | ||
|
||
def filename(self) -> str: | ||
return self._filename | ||
|
||
def filepath(self) -> str: | ||
return self._url + "/" + self._filename | ||
|
||
def it(self) -> dt.datetime: | ||
return self._it |
Oops, something went wrong.