diff --git a/latest/_modules/compass/ocean/mesh/remap_topography.html b/latest/_modules/compass/ocean/mesh/remap_topography.html index 76af212c34..67164ca7b5 100644 --- a/latest/_modules/compass/ocean/mesh/remap_topography.html +++ b/latest/_modules/compass/ocean/mesh/remap_topography.html @@ -113,6 +113,7 @@

Source code for compass.ocean.mesh.remap_topography

 import os
 
+import numpy as np
 import xarray as xr
 from mpas_tools.io import write_netcdf
 from pyremap import LatLonGridDescriptor, MpasCellMeshDescriptor, Remapper
@@ -264,6 +265,11 @@ 

Source code for compass.ocean.mesh.remap_topography

out_var = rename[option] ds_out[out_var] = ds_in[in_var] + # make sure fractions don't exceed 1 + for var in ['landIceFracObserved', 'landIceGroundedFracObserved', + 'oceanFracObserved']: + ds_out[var] = np.minimum(ds_out[var], 1.) + # renormalize elevation variables norm = ds_out.oceanFracObserved valid = norm > renorm_threshold