earth2studio.data
.CBottle3D#
- class earth2studio.data.CBottle3D(core_model, sst_ds, lat_lon=True, sigma_max=80, batch_size=4, seed=0, cache=False, verbose=True)[source]#
Climate in a bottle data source Climate in a Bottle (cBottle) is an AI model for emulating global km-scale climate simulations and reanalysis on the equal-area HEALPix grid. The cBottle data source uses the a globally-trained coarse-resolution image generator that generates 100km (50k-pixel) fields given monthly average sea surface temperatures and solar conditioning.
Note
For more information see the following references:
- Parameters:
core_model (torch.nn.Module) – Core Pytorch model
sst_ds (xr.Dataset) – Sea surface temperature xarray dataset
lat_lon (bool, optional) – Lat/lon toggle, if true data source will return output on a 0.25 deg lat/lon grid. If false, the native nested HealPix grid will be returned, by default True
sigma_max (float, optional) – Noise amplitude used to generate latent variables, by default 80
batch_size (int, optional) – Batch size to generate time samples at, consider adjusting based on hardware being used, by default 4
seed (int, optional) – Random generator seed for latent variables, by default 0
cache (bool, optional) – Does nothing at the moment, by default False
verbose (bool, optional) – Print generation progress, by default True
- __call__(time, variable)[source]#
Function to get data.
- Parameters:
time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).
variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in CBottle3D lexicon.
- Returns:
Generated data from CBottle
- Return type:
xr.DataArray
- classmethod load_default_package()[source]#
Default pre-trained CBottle3D model package from Nvidia model registry
- Return type:
- classmethod load_model(package, lat_lon=True, sigma_max=80, batch_size=4, seed=0, verbose=True)[source]#
Load AI datasource from package
- Parameters:
package (Package) – CBottle AI model package
lat_lon (bool, optional) – Lat/lon toggle, if true data source will return output on a 0.25 deg lat/lon grid. If false, the native nested HealPix grid will be returned, by default True
sigma_max (float, optional) – Noise amplitude used to generate latent variables, by default 80
batch_size (int, optional) – Batch size to generate time samples at, consider adjusting based on hardware being used, by default 4
seed (int, optional) – Random generator seed for latent variables, by default 0
verbose (bool, optional) – Print generation progress, by default True
- Returns:
Data source
- Return type:
DataSource