Changeset 23777
- Timestamp:
- 03/08/19 09:18:13 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/basalforcingsismip6.m
r23769 r23777 6 6 classdef basalforcingsismip6 7 7 properties (SetAccess=public) 8 num_basins = 0; 8 9 basin_id = NaN; 9 10 gamma_0 = 0.; 10 11 tf = NaN; 11 tf_depths = 0.; 12 tf_depths = NaN; 13 tf_times = NaN; 12 14 delta_t = NaN; 13 15 geothermalflux = NaN; … … 22 24 self.groundedice_melting_rate=project3d(md,'vector',self.groundedice_melting_rate,'type','node','layer',1); 23 25 end % }}} 24 function self = basalforcings pico(varargin) % {{{26 function self = basalforcingsismip6(varargin) % {{{ 25 27 switch nargin 26 28 case 0 … … 49 51 function md = checkconsistency(self,md,solution,analyses) % {{{ 50 52 51 md = checkfield(md,'fieldname','basalforcings.basin_id','Inf',1,'>=',0,'<=',md.basalforcings.num_basins,'size',[md.mesh.numberofelements 1]); 52 md = checkfield(md,'fieldname','basalforcings.gamma_0','numel',1,'NaN',1,'Inf',1,'>',0); 53 md = checkfield(md,'fieldname','basalforcings.tf','Inf',1,'NaN',1); 54 md = checkfield(md,'fieldname','basalforcings.tf_depths','numel',1,'NaN',1,'Inf',1,'>',0); 55 md = checkfield(md,'fieldname','basalforcings.delta_t','NaN',1,'Inf',1,'size',[md.basalforcings.num_basins NaN]); 56 md = checkfield(md,'fieldname','basalforcings.geothermalflux','NaN',1,'Inf',1,'>=',0,'timeseries',1); 57 md = checkfield(md,'fieldname','basalforcings.groundedice_melting_rate','NaN',1,'Inf',1,'timeseries',1); 53 md = checkfield(md,'fieldname','basalforcings.num_basins','numel',1,'NaN',1,'Inf',1,'>',0); 54 md = checkfield(md,'fieldname','basalforcings.basin_id','Inf',1,'>=',0,'<=',md.basalforcings.num_basins,'size',[md.mesh.numberofelements 1]); 55 md = checkfield(md,'fieldname','basalforcings.gamma_0','numel',1,'NaN',1,'Inf',1,'>',0); 56 md = checkfield(md,'fieldname','basalforcings.tf_times','NaN',1,'Inf',1); 57 md = checkfield(md,'fieldname','basalforcings.tf_depths','NaN',1,'Inf',1); 58 md = checkfield(md,'fieldname','basalforcings.tf','size',[md.mesh.numberofvertices,numel(md.basalforcings.delta_t),numel(md.basalforcings.tf_depths)],'NaN',1,'Inf',1); 59 md = checkfield(md,'fieldname','basalforcings.delta_t','NaN',1,'Inf',1,'numel',md.basalforcings.num_basins); 60 md = checkfield(md,'fieldname','basalforcings.geothermalflux','NaN',1,'Inf',1,'>=',0,'timeseries',1); 61 md = checkfield(md,'fieldname','basalforcings.groundedice_melting_rate','NaN',1,'Inf',1,'timeseries',1); 58 62 59 63 end % }}} 60 64 function disp(self) % {{{ 61 65 disp(sprintf(' ISMIP6 basal melt rate parameterization:')); 66 fielddisplay(self,'num_basins','number of basins the model domain is partitioned into [unitless]'); 62 67 fielddisplay(self,'basin_id','basin number assigned to each node (unitless)'); 63 68 fielddisplay(self,'gamma_0','melt rate coefficient (m/yr)'); 69 fielddisplay(self,'tf_depths','Number of vertical layers in ocean thermal forcing dataset'); 70 fielddisplay(self,'tf_times','time for each tf (in yr) '); 64 71 fielddisplay(self,'tf','thermal forcing (ocean temperature minus freezing point) (degrees C)'); 65 fielddisplay(self,'tf_depths','Number of vertical layers in ocean thermal forcing dataset');66 72 fielddisplay(self,'delta_t','Ocean temperature correction per basin (degrees C)'); 67 73 fielddisplay(self,'geothermalflux','geothermal heat flux (W/m^2)'); … … 74 80 yts=md.constants.yts; 75 81 76 WriteData(fid,prefix,'name','md.basalforcings.model','data',5,'format','Integer'); 82 WriteData(fid,prefix,'name','md.basalforcings.model','data',6,'format','Integer'); 83 WriteData(fid,prefix,'object',self,'fieldname','num_basins','format','Integer'); 77 84 WriteData(fid,prefix,'object',self,'fieldname','basin_id','data',self.basin_id-1,'name','md.basalforcings.basin_id','format','IntMat','mattype',2); %0-indexed 78 85 WriteData(fid,prefix,'object',self,'fieldname','gamma_0','format','Double');
Note:
See TracChangeset
for help on using the changeset viewer.