diff --git a/compass/ocean/mesh/remap_topography.cfg b/compass/ocean/mesh/remap_topography.cfg index 53cf2cd3f..de659dabd 100644 --- a/compass/ocean/mesh/remap_topography.cfg +++ b/compass/ocean/mesh/remap_topography.cfg @@ -2,7 +2,7 @@ [remap_topography] # the name of the topography file in the bathymetry database -topo_filename = BedMachineAntarctica_v3_and_GEBCO_2023_0.0125_degree_20230831.nc +topo_filename = BedMachineAntarctica_v3_and_GEBCO_2023_0.0125_degree_20240611.nc # variable names in topo_filename lon_var = lon @@ -12,6 +12,7 @@ ice_thickness_var = thickness ice_frac_var = ice_mask grounded_ice_frac_var = grounded_mask ocean_frac_var = ocean_mask +bathy_frac_var = bathymetry_mask # the description to include in metadata description = Bathymetry is from GEBCO 2023, combined with BedMachine diff --git a/compass/ocean/mesh/remap_topography.py b/compass/ocean/mesh/remap_topography.py index 985bb7278..e1c164b93 100644 --- a/compass/ocean/mesh/remap_topography.py +++ b/compass/ocean/mesh/remap_topography.py @@ -135,7 +135,8 @@ def run(self): 'ice_thickness_var': 'landIceThkObserved', 'ice_frac_var': 'landIceFracObserved', 'grounded_ice_frac_var': 'landIceGroundedFracObserved', - 'ocean_frac_var': 'oceanFracObserved'} + 'ocean_frac_var': 'oceanFracObserved', + 'bathy_frac_var': 'bathyFracObserved'} for option, out_var in rename.items(): in_var = config.get('remap_topography', option) @@ -146,11 +147,12 @@ def run(self): # make sure fractions don't exceed 1 for var in ['landIceFracObserved', 'landIceGroundedFracObserved', - 'landIceFloatingFracObserved', 'oceanFracObserved']: + 'landIceFloatingFracObserved', 'oceanFracObserved', + 'bathyFracObserved']: ds_out[var] = np.minimum(ds_out[var], 1.) # renormalize elevation variables - norm = ds_out.oceanFracObserved + norm = ds_out.bathyFracObserved valid = norm > renorm_threshold for var in ['bed_elevation', 'landIceThkObserved']: ds_out[var] = xr.where(valid, ds_out[var] / norm, 0.) diff --git a/compass/ocean/tests/global_ocean/mesh/__init__.py b/compass/ocean/tests/global_ocean/mesh/__init__.py index da9884177..280bf49b9 100644 --- a/compass/ocean/tests/global_ocean/mesh/__init__.py +++ b/compass/ocean/tests/global_ocean/mesh/__init__.py @@ -147,6 +147,7 @@ def configure(self, config=None): description = 'Bathymetry is from GEBCO 2022, combined with ' \ 'BedMachine Antarctica v2 around Antarctica.' config.set('remap_topography', 'topo_filename', filename) + config.set('remap_topography', 'bathy_frac_var', 'ocean_mask') config.set('remap_topography', 'description', description) config.set('remap_topography', 'ntasks', '64') config.set('remap_topography', 'min_tasks', '4')