Hi,
I've run into two issues which I think are bugs. I'm using ISSM version 4.21, downloaded as pre-compiled binaries from the ISSM website (compilation date is shown as Aug 1, 2022).
when specifying md.thermal.spctemperature
as a matrix (to account for changes in time) when md
is a 2D-mesh, then in some cases* only the first column gets expanded to the appropriate size and filled with the appropriate values, while the other columns are discarded.
*I couldn't reproduce this error for the SquareIceShelf example
when using md.smb = SMBgradients()
when 'md' is a 2D-mesh, then after extruding the mesh the fields in md.smb
keep their original size, causing an error in transient runs.
Both md.thermal.spctemperature
and md.smb
are fields for functions on the surface, which is why I think the behaviors are bugs. There is much less chance for error to specify these fields in 2D and have the extrusion fill up the vectors with 0, NaN, etc as appropriate than if the user is expected to generate these vectors for the 3D-mesh my hand.
I've posted an example below to reproduce both errors.
Best regards,
Nicole
Example:
In the ISSM example Greenland/runme.m
, replace step 2 with:
if any(steps==2)
disp(' Step 2: Parameterization');
md = loadmodel('./Models/Greenland.Mesh_generation');
md = setmask(md,'','');
md = parameterize(md,'./Greenland.par');
yolo = md.thermal.spctemperature;
md.thermal.spctemperature = [yolo, yolo];
fprintf('before extrusion: \n')
fprintf('size(md.thermal.spctemperature, 2) = %i \n', size(md.thermal.spctemperature, 2))
yolo = md.smb.mass_balance;
md.smb = SMBgradients();
md.smb.href = md.geometry.surface;
md.smb.smbref = yolo;
md.smb.b_pos = zeros(md.mesh.numberofvertices, 1);
md.smb.b_neg = zeros(md.mesh.numberofvertices, 1);
md = extrude(md, 8, 1.3);
md = setflowequation(md,'HO','all');
fprintf('after extrusion: \n')
fprintf('size(md.thermal.spctemperature, 2) = %i \n', size(md.thermal.spctemperature, 2))
fprintf('size(md.smb.href, 1) = %i \n', size(md.smb.href, 1))
fprintf('size(md.geometry.surface, 1) = %i', size(md.geometry.surface, 1))
save ./Models/Greenland.Parameterization md;
end
and comment out the lines in step 4 about setting smb
. Then run steps 1-4. For the first bug, compare the printouts in step 2. For the second bug, wait for the model consistency check in step 4 (or check size of md.smb
fields after running step 2).