@@ -511,7 +511,7 @@ def regrid_to_1deg_ds(
511511 force_method = "conservative" ,
512512 realm = realm ,
513513 ) # fx always conservative
514- print ( f "using fx map: { spec .path } " )
514+ logger . info ( "using fx map: %s" , spec .path )
515515 ds_fx = _regrid_fx_once (spec .path , ds_in ) # ← uses cache
516516 if ds_fx :
517517 # Don’t overwrite if user already computed and passed them in
@@ -620,8 +620,12 @@ def regrid_to_1deg(
620620 force_method = method ,
621621 realm = realm ,
622622 )
623- print (
624- f"Regridding { varname } using { spec .method_label } map: { spec .path } for realm { realm } "
623+ logger .info (
624+ "Regridding %s using %s map: %s for realm %s" ,
625+ varname ,
626+ spec .method_label ,
627+ spec .path ,
628+ realm ,
625629 )
626630 regridder = _RegridderCache .get (spec .path , spec .method_label )
627631
@@ -642,11 +646,15 @@ def regrid_to_1deg(
642646 * non_spatial , "lon" , "lat"
643647 )
644648 da2_2d = da2_2d .assign_coords (lon = ((da2_2d .lon % 360 )))
645- print (
646- f"da2_2d range: { da2_2d ['lat' ].min ().item ()} to { da2_2d ['lat' ].max ().item ()} lat, "
647- f"{ da2_2d ['lon' ].min ().item ()} to { da2_2d ['lon' ].max ().item ()} lon"
649+ logger .info (
650+ "da2_2d range: %f to %f lat, %f to %f lon" ,
651+ da2_2d ["lat" ].min ().item (),
652+ da2_2d ["lat" ].max ().item (),
653+ da2_2d ["lon" ].min ().item (),
654+ da2_2d ["lon" ].max ().item (),
648655 )
649- if hdim == "lndgrid" :
656+
657+ if realm == "lnd" :
650658 out_norm = regridder (da2_2d , ** kwargs )
651659 out = _denormalize_land_field (out_norm , ds_in , spec .path )
652660 else :
0 commit comments