#645 closed defect (Fixed)
making read_mask.m more robust — at Version 2
Reported by: | wilkin | Owned by: | arango |
---|---|---|---|
Priority: | minor | Milestone: | Matlab Processing Scripts |
Component: | Matlab | Version: | 3.7 |
Keywords: | Cc: |
Description (last modified by )
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
Change History (2)
comment:1 by , 11 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Yes, thank for reporting these problems. Now, we have:
and