From ffc573d55c4057b464b4266fd6e574a1e77fcf1c Mon Sep 17 00:00:00 2001 From: mmorligh Date: Tue, 17 Dec 2024 15:01:07 -0500 Subject: [PATCH] NEW: moved to IBCSO v2 2024 --- src/m/modeldata/interpIBCSO2.m | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/m/modeldata/interpIBCSO2.m b/src/m/modeldata/interpIBCSO2.m index fe5bf618d..9a3eb1b67 100644 --- a/src/m/modeldata/interpIBCSO2.m +++ b/src/m/modeldata/interpIBCSO2.m @@ -1,14 +1,29 @@ -function [bedout sid] = interpIBCSO2(X,Y), +function [bedout tid] = interpIBCSO2(X,Y) %read data -switch (oshostname()), +switch (oshostname()) case {'totten'} - ncpath='/totten_1/ModelData/Antarctica/IBCSO2/IBCSO_v2_bed.nc'; - sidpath='/totten_1/ModelData/Antarctica/IBCSO2/IBCSO_v2_TID.nc'; + %2022 + ncpath = '/totten_1/ModelData/Antarctica/IBCSO2/2022/IBCSO_v2_bed.nc'; + sidpath = '/totten_1/ModelData/Antarctica/IBCSO2/2022/IBCSO_v2_TID.nc'; + %2024 + bedpath = '/totten_1/ModelData/Antarctica/IBCSO2/2024/IBCSO_bed.tif'; + tidpath = '/totten_1/ModelData/Antarctica/IBCSO2/2024/IBCSO_TID.tif'; otherwise error('hostname not supported yet'); end +disp(' -- IBCSOv2-2024: interpolating bathymetry'); +bedout = interpFromGeotiff(bedpath, X, Y, -32768); + +if nargout==2 + disp(' -- IBCSOv2-2024: interpolating TID'); + tid = interpFromGeotiff(tidpath, X, Y, -32768, false, 'nearest'); +end + +return + +%Old code using NetCDF product, keeping here for now disp(' -- IBCSOv2: Changing Coordinate system from 3031 to 9354'); [X Y]=CoordTransform(double(X),double(Y),'EPSG:3031','EPSG:9354');