credit.transforms.transforms_wrf#

Content
  • NormalizeWRF

  • ToTensorWRF

Attributes#

Classes#

Module Contents#

credit.transforms.transforms_wrf.logger#
class credit.transforms.transforms_wrf.NormalizeWRF(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#
mean_ds_outside#
std_ds_outside#
mean_tensors_outside#
std_tensors_outside#
levels_outside#
varname_upper_air_outside#
num_upper_air_outside#
flag_surface_outside#
__call__(sample, inverse: bool = False)#
transform_array(x: torch.Tensor) torch.Tensor#

This function applies to y_pred, so there won’t be boundary input, forcing, and static variables.

transform(sample: Dict[str, numpy.ndarray]) Dict[str, numpy.ndarray]#
This function transforms training batches
  • forcing & static don’t need to be transformed; users should transform them and save them to the file

  • other variables 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

class credit.transforms.transforms_wrf.ToTensorWRF(conf)#
conf#
output_dtype = Ellipsis#
hist_len#
for_len#
flag_surface#
flag_dyn_forcing#
flag_diagnostic#
flag_forcing#
flag_static#
varname_upper_air#
num_forcing_static = 0#
hist_len_outside#
for_len_outside#
flag_surface_outside#
varname_upper_air_outside#
__call__(sample)#