From ad05dbcd5ece44c9c8bfcd1d3b388c73a17ad810 Mon Sep 17 00:00:00 2001 From: Baptiste Vandecrux <35140661+BaptisteVandecrux@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:02:02 +0200 Subject: [PATCH] minor edit in surface height processing --- src/pypromice/process/L2toL3.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pypromice/process/L2toL3.py b/src/pypromice/process/L2toL3.py index 5c50ee93..8cd0ea5c 100755 --- a/src/pypromice/process/L2toL3.py +++ b/src/pypromice/process/L2toL3.py @@ -254,6 +254,7 @@ def process_surface_height(ds, data_adjustments_dir, station_config={}): ds['z_surf_combined'] = np.maximum(ds['z_surf_combined'], ds['z_ice_surf']) ds['snow_height'] = np.maximum(0, ds['z_surf_combined'] - ds['z_ice_surf']) + ds['z_ice_surf'] = ds['z_ice_surf'].where(ds.snow_height.notnull()) elif ds.attrs['site_type'] in ['accumulation', 'bedrock']: # Handle accumulation and bedrock site types ds['z_ice_surf'] = ('time', ds['z_surf_1'].data * np.nan)