Skip to content

Commit

Permalink
NEW: moved to IBCSO v2 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuMorlighem committed Dec 17, 2024
1 parent 40ce928 commit ffc573d
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/m/modeldata/interpIBCSO2.m
Original file line number Diff line number Diff line change
@@ -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');

Expand Down

0 comments on commit ffc573d

Please sign in to comment.