Changeset 27236


Ignore:
Timestamp:
08/25/22 17:18:07 (3 years ago)
Author:
schlegel
Message:

CHG: new GEMB class for manuscript

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/SMBgemb.m

    r27196 r27236  
    7272                % 1: default value of 1, in areas with grain radius below teThresh
    7373                % 2: default value of 1, in areas with grain radius below teThresh and areas of dry snow (not bare ice or wet) at the surface
     74
     75                tcIdx   = NaN; %method for calculating thermal conductivity (default is 1)
     76                % 1: after Sturm et al, 1997
     77                % 2: after Calonne et al., 2011
    7478
    7579                swIdx  = NaN; %apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 0, if swIdx=1 and aIdx=2, function of effective radius (Brun et al., 1992) or else dependent on snow density (taken from Bassford, 2002))
     
    203207                                '2: default value of 1, in areas with grain radius below teThresh and areas of dry snow (not bare ice or wet) at the surface'});
    204208
     209                        fielddisplay(self,'tcIdx',{'method for calculating thermal conductivity (default is 1)',...
     210                                '1: after Sturm et al, 1997',...
     211                                '2: after Calonne et al., 2011'});
     212
    205213                        %snow properties init
    206214                        fielddisplay(self,'Dzini','Initial cell depth when restart [m]');
     
    343351                        self.aIdx = 1;
    344352                        self.eIdx = 1;
     353                        self.tcIdx = 1;
    345354                        self.swIdx = 0;
    346355                        self.denIdx = 2;
     
    426435                        md = checkfield(md,'fieldname','smb.aIdx','NaN',1,'Inf',1,'values',[0,1,2,3,4]);
    427436                        md = checkfield(md,'fieldname','smb.eIdx','NaN',1,'Inf',1,'values',[0,1,2]);
     437                        md = checkfield(md,'fieldname','smb.tcIdx','NaN',1,'Inf',1,'values',[1,2]);
    428438                        md = checkfield(md,'fieldname','smb.swIdx','NaN',1,'Inf',1,'values',[0,1]);
    429439                        md = checkfield(md,'fieldname','smb.denIdx','NaN',1,'Inf',1,'values',[1,2,3,4,5,6,7]);
     
    509519                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','aIdx','format','Integer');
    510520                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','eIdx','format','Integer');
     521                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','tcIdx','format','Integer');
    511522                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','swIdx','format','Integer');
    512523                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','denIdx','format','Integer');
  • issm/trunk-jpl/src/m/classes/SMBgemb.py

    r27196 r27236  
    7979        # 1: default value of 1, in areas with grain radius below teThresh
    8080        # 2: default value of 1, in areas with grain radius below teThresh and areas of dry snow (not bare ice or wet) at the surface
     81
     82        self.tcIdx                   = np.nan    #method for calculating thermal conductivity (default is 1)
     83        # 1: after Sturm et al, 1997
     84        # 2: after Calonne et al., 2011
    8185
    8286        self.swIdx                  = np.nan    # apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 0, if swIdx=1 and aIdx=2, function of effective radius (Brun et al., 1992) or else dependent on snow density (taken from Bassford, 2002))
     
    207211            '1: default value of 1, in areas with grain radius below teThresh',
    208212            '2: default value of 1, in areas with grain radius below teThresh and areas of dry snow (not bare ice or wet) at the surface']))
     213        s += '{}\n'.format(fielddisplay(self, 'tcIdx', ['method for calculating thermal conductivity (default is 1)',
     214            '1: after Sturm et al, 1997',
     215            '2: after Calonne et al., 2011']))
    209216
    210217        # Snow properties init
     
    330337        self.aIdx = 1
    331338        self.eIdx = 1
     339        self.tcIdx = 1
    332340        self.swIdx = 0
    333341        self.denIdx = 2
     
    417425        md = checkfield(md, 'fieldname', 'smb.aIdx', 'NaN', 1, 'Inf', 1, 'values', [0, 1, 2, 3, 4])
    418426        md = checkfield(md, 'fieldname', 'smb.eIdx', 'NaN', 1, 'Inf', 1, 'values', [0, 1, 2])
     427        md = checkfield(md, 'fieldname', 'smb.tcIdx', 'NaN', 1, 'Inf', 1, 'values', [1, 2])
    419428        md = checkfield(md, 'fieldname', 'smb.swIdx', 'NaN', 1, 'Inf', 1, 'values', [0, 1])
    420429        md = checkfield(md, 'fieldname', 'smb.denIdx', 'NaN', 1, 'Inf', 1, 'values', [1, 2, 3, 4, 5, 6, 7])
     
    496505        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'aIdx', 'format', 'Integer')
    497506        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'eIdx', 'format', 'Integer')
     507        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'tcIdx', 'format', 'Integer')
    498508        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'swIdx', 'format', 'Integer')
    499509        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'denIdx', 'format', 'Integer')
Note: See TracChangeset for help on using the changeset viewer.