﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
645	making read_mask.m more robust	wilkin	arango	"'''editmask.m''' throws some errors due to conflicts with new or incomplete grid files when variable '''hraw''' has not been loaded.

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
}}}
"	defect	closed	minor	Matlab Processing Scripts	Matlab	3.7	Fixed		
