@@ -486,6 +486,7 @@ def _get_loaders(
486486 sst_input : bool = True ,
487487 ibtracs_input : bool = False ,
488488 variable_config : VariableConfig = _default_config ,
489+ sst_offset : float = 0.0 ,
489490):
490491 """Get the appropriate loaders for a given dataset.
491492
@@ -494,6 +495,7 @@ def _get_loaders(
494495 sst_input: Whether to include SST input
495496 ibtracs_input: Whether to include IBTrACS input
496497 variable_config: Variable configuration for the dataset
498+ sst_offset: Uniform SST offset in Kelvin
497499
498500 Returns:
499501 List of loaders for the specified dataset
@@ -568,12 +570,13 @@ def _get_loaders(
568570 HPX_LEVEL , pixel_order = earth2grid .healpix .PixelOrder .NEST
569571 )
570572 if variable_config == VARIABLE_CONFIGS ["aimip" ]:
571- loaders .append (AImip_SSTLoader (grid ))
573+ loaders .append (AImip_SSTLoader (grid , sst_offset = sst_offset ))
572574 print ("used aimip sst data" )
573575 else :
574576 loaders .append (
575577 AmipSSTLoader (
576578 grid ,
579+ sst_offset = sst_offset ,
577580 )
578581 )
579582 if ibtracs_input :
@@ -587,11 +590,12 @@ def _get_loaders(
587590 HPX_LEVEL , pixel_order = earth2grid .healpix .PixelOrder .NEST
588591 )
589592 if variable_config == VARIABLE_CONFIGS ["aimip" ]:
590- loaders = [AImip_SSTLoader (grid )]
593+ loaders = [AImip_SSTLoader (grid , sst_offset = sst_offset )]
591594 else :
592595 loaders = [
593596 AmipSSTLoader (
594597 grid ,
598+ sst_offset = sst_offset ,
595599 )
596600 ]
597601
@@ -700,13 +704,15 @@ def get_dataset(
700704 frame_masker : Optional [FrameMasker ] = None ,
701705 variable_config : VariableConfig = _default_config ,
702706 map_style : bool = False ,
707+ sst_offset : float = 0.0 ,
703708) -> TimeMergedDataset | TimeMergedMapStyle :
704709 # Get the appropriate loaders for the dataset
705710 loaders = _get_loaders (
706711 dataset ,
707712 sst_input = sst_input ,
708713 ibtracs_input = ibtracs_input ,
709714 variable_config = variable_config ,
715+ sst_offset = sst_offset ,
710716 )
711717 times = _get_splits (dataset )[split ]
712718 if times .size == 0 :
0 commit comments