Opened 10 years ago

Last modified 10 years ago

#645 closed defect

making read_mask.m more robust — at Initial Version

Reported by: wilkin Owned by: arango
Priority: minor Milestone: Matlab Processing Scripts
Component: Matlab Version: 3.7
Keywords: Cc:

Description

editmask.m throws some errors due to conflicts with new or incomplete grid files.

These can be solved by making a few changes to read_mask.m

A grid file may have a variable hraw that has not been filled with data. This will cause an error in editmask. I suggest test for the case hraw has an empty dimension:

case {Vname.hraw}

got.hraw=true; if any(V.Variables(n).Size==0)

got.hraw=false;

end

read_mask presently only checks for "spherical" in the form of a character, and always returns false even when spherical=1 (numeric). Make this robust and compatible with both conventions with:

if (got.spher)

spher=nc_read(ncfile,Vname.spher); if ischar(spher)

if strcmpi(spher,'T')

spherical=true;

end

else

spherical=spher;

end

end

Change History (0)

Note: See TracTickets for help on using tickets.