credit.transforms.transforms_les#
- Content
NormalizeLES
ToTensorLES
Attributes#
Classes#
Module Contents#
- credit.transforms.transforms_les.logger#
- class credit.transforms.transforms_les.NormalizeLES(conf)#
- mean_ds#
- std_ds#
- mean_tensors#
- std_tensors#
- levels#
- varname_upper_air#
- num_upper_air#
- flag_surface#
- flag_dyn_forcing#
- flag_diagnostic#
- flag_forcing#
- flag_static#
- __call__(sample, inverse: bool = False)#
- transform_array(x: torch.Tensor) torch.Tensor#
This function applies to y_pred, so there won’t be dynamic forcing, forcing, and static variables.
- transform(sample: Dict[str, numpy.ndarray]) Dict[str, numpy.ndarray]#
- This function transforms training batches, it handles forcing & static as follows:
forcing & static don’t need to be transformed; users should transform them and save them to the file
other variables (upper-air, surface, dynamic forcing, diagnostics) need to be transformed
- inverse_transform(x: torch.Tensor) torch.Tensor#
This function applies to y_pred, so there won’t be dynamic forcing, forcing, and static vars
- inverse_transform_input(x: torch.Tensor) torch.Tensor#
Inverse transform for input x. Forcing and static variables are not transformed (they were not transformed in the transform function).