Changeset 24530
- Timestamp:
- 01/27/20 06:20:05 (5 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/SMBgradientscomponents.m
r24525 r24530 46 46 function md=checkconsistency(self,md,solution,analyses) % {{{ 47 47 if ismember('MasstransportAnalysis',analyses), 48 md = checkfield(md,'fieldname','smb.accuref','single series',1,'NaN',1,'Inf',1);48 md = checkfield(md,'fieldname','smb.accuref','singletimeseries',1,'NaN',1,'Inf',1); 49 49 md = checkfield(md,'fieldname','smb.accualti','numel',1,'NaN',1,'Inf',1); 50 50 md = checkfield(md,'fieldname','smb.accugrad','numel',1,'NaN',1,'Inf',1); 51 md = checkfield(md,'fieldname','smb.runoffref','single series',1,'NaN',1,'Inf',1);51 md = checkfield(md,'fieldname','smb.runoffref','singletimeseries',1,'NaN',1,'Inf',1); 52 52 md = checkfield(md,'fieldname','smb.runoffalti','numel',1,'NaN',1,'Inf',1); 53 53 md = checkfield(md,'fieldname','smb.runoffgrad','numel',1,'NaN',1,'Inf',1); -
issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.m
r21648 r24530 1 function export_netCDF(md,filename) 2 1 function export_netCDF(md,filename) 2 3 3 %Now going on Real treatment 4 4 if exist(filename), … … 17 17 mode = bitor(mode,netcdf.getConstant('NC_NOCLOBBER'));%NOCLOBBER to avoid overwrite 18 18 ncid = netcdf.create(filename,mode); 19 netcdf.putAtt(ncid,netcdf.getConstant('NC_GLOBAL'),' Title',['Results for run ' md.miscellaneous.name]);20 netcdf.putAtt(ncid,netcdf.getConstant('NC_GLOBAL'),' Date',['Created ' datestr(now)]);21 19 netcdf.putAtt(ncid,netcdf.getConstant('NC_GLOBAL'),'description',['Results for run ' md.miscellaneous.name]); 20 netcdf.putAtt(ncid,netcdf.getConstant('NC_GLOBAL'),'history',['Created ' datestr(now)]); 21 22 22 %gather geometry and timestepping as dimensions 23 23 resfields=fieldnames(md.results); … … 27 27 else 28 28 StepNum=1; 29 end 29 end 30 30 31 31 dimlist=[40,2,md.mesh.numberofelements,md.mesh.numberofvertices,size(md.mesh.elements,2)]; 32 32 33 33 %define netcdf dimensions 34 34 DimSize(1).index=netcdf.defDim(ncid,'Dimension1',StepNum); … … 44 44 45 45 typelist=[{'numeric'} {'logical'} {'string'} {'char'} {'cell'}]; 46 46 47 47 %get all model classes and create respective groups 48 48 groups=fieldnames(md); … … 79 79 elseif isprop(Var{l},'step') 80 80 lname=Var{l}.step 81 else 81 else 82 82 lname=[class(Var{l}) int2str(l)]; 83 83 end … … 260 260 end 261 261 end 262 %if we have a cell variable we need to add a stringlength dimension 262 %if we have a cell variable we need to add a stringlength dimension 263 263 if isa(Var,'struct'), 264 264 if DimValue(3)~=2
Note:
See TracChangeset
for help on using the changeset viewer.