earth2mip.initial_conditions package#
Submodules#
earth2mip.initial_conditions.base module#
- class earth2mip.initial_conditions.base.DataSource(*args, **kwargs)#
Bases:
Protocol
- property channel_names: List[str]#
-
grid:
LatLonGrid
#
earth2mip.initial_conditions.cds module#
- class earth2mip.initial_conditions.cds.DataSource(channel_names, client=<factory>, _cache=None)#
Bases:
object
- property cache#
-
channel_names:
List
[str
]#
-
client:
Client
#
- property grid: LatLonGrid#
- property time_means#
- class earth2mip.initial_conditions.cds.PressureLevelCode(id, level=0)#
Bases:
object
-
id:
int
#
-
level:
int
= 0#
-
id:
- earth2mip.initial_conditions.cds.keys_to_vals(d)#
- earth2mip.initial_conditions.cds.parse_channel(channel)#
- Return type:
Union
[PressureLevelCode
,SingleLevelCode
]
earth2mip.initial_conditions.gfs module#
- class earth2mip.initial_conditions.gfs.DataSource(channels)#
Bases:
DataSource
- property channel_names: List[str]#
- property grid: LatLonGrid#
- class earth2mip.initial_conditions.gfs.GFSChunk(variable_name='phoo', meta_data='', start_byte=0, end_byte=0)#
Bases:
object
- property byte_range: int#
- property channel_id: str#
-
end_byte:
int
= 0#
-
meta_data:
str
= ''#
-
start_byte:
int
= 0#
-
variable_name:
str
= 'phoo'#
- earth2mip.initial_conditions.gfs.get(time, gfs_channels)#
- Return type:
ndarray
- earth2mip.initial_conditions.gfs.get_gfs_chunks(time)#
- earth2mip.initial_conditions.gfs.get_gfs_grib_file(time, gfs_chunks, channel_id, output_file)#
- earth2mip.initial_conditions.gfs.gfs_available(time)#
- Return type:
bool
earth2mip.initial_conditions.hdf5 module#
- class earth2mip.initial_conditions.hdf5.DataSource(root, metadata, channel_names=None)#
Bases:
DataSource
HDF5 Data Sources
Works with a directory structure like this:
data.json subdirA/2018.h5 subdirB/2017.h5 subdirB/2016.h5
data.json should have fields
h5_path - the name of the data within the hdf5 file coords.channel - list of channels coords.lat - list of lats coords.lon - list of lons dhours - timestep in hours (default 6 hours)
- property channel_names#
- classmethod from_path(root, **kwargs)#
- Return type:
- property grid#
- property time_means#
- earth2mip.initial_conditions.hdf5.open_xarray(time)#
- Return type:
DataArray
earth2mip.initial_conditions.hrmip module#
- class earth2mip.initial_conditions.hrmip.HDFPlSl(path)#
Bases:
DataSource
- property channel_names: List[str]#
- property grid: LatLonGrid#
earth2mip.initial_conditions.ifs module#
- class earth2mip.initial_conditions.ifs.DataSource(channel_names)#
Bases:
DataSource
- property channel_names: List[str]#
- property grid: LatLonGrid#
- earth2mip.initial_conditions.ifs.get(time, channels)#
Module contents#
- earth2mip.initial_conditions.get_data_source(channel_names, netcdf='', initial_condition_source=InitialConditionSource.era5)#
- Return type: