Ignore:
Timestamp:
02/27/18 19:33:05 (7 years ago)
Author:
schlegel
Message:

CHG: add option for forcing albedo only above a specific surface density

File:
1 edited

Legend:

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

    r22475 r22482  
    6060                                          % 3: density and cloud amount [Greuell & Konzelmann, 1994]
    6161                                          % 4: exponential time decay & wetness [Bougamont & Bamber, 2005]
    62                                           % 5: ingest MODIS mode, direct input from aValue parameter applied to surface ice only
    6362
    6463                swIdx  = NaN; % apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 1)
     
    8988                t0dry = NaN; % warm snow timescale (30)
    9089                K     = NaN; % time scale temperature coef. (7)
     90                adThresh = NaN; %Apply aIdx method to all areas with densities below this value,
     91                                %or else apply direct input value from aValue, allowing albedo to be altered.
     92                                                         %Default value is rho water (1023 kg m-3).
    9193
    9294                %densities:
     
    125127                        self.pAir=project3d(md,'vector',self.pAir,'type','node');
    126128
    127                         if (aIdx == 0 | aIdx == 5) & ~isnan(self.aValue)
     129                        if (aIdx == 0) & ~isnan(self.aValue)
    128130                                self.aValue=project3d(md,'vector',self.aValue,'type','node');
    129131                        end
     
    169171                self.t0dry = 30;
    170172                self.K = 7;
     173                self.adThresh = 1023;
    171174
    172175                self.teValue = ones(mesh.numberofelements,1);
     
    212215                        md = checkfield(md,'fieldname','smb.teValue','timeseries',1,'NaN',1,'Inf',1,'>=',0,'<=',1);
    213216
    214                         md = checkfield(md,'fieldname','smb.aIdx','NaN',1,'Inf',1,'values',[0,1,2,3,4,5]);
     217                        md = checkfield(md,'fieldname','smb.aIdx','NaN',1,'Inf',1,'values',[0,1,2,3,4]);
    215218                        md = checkfield(md,'fieldname','smb.swIdx','NaN',1,'Inf',1,'values',[0,1]);
    216219                        md = checkfield(md,'fieldname','smb.denIdx','NaN',1,'Inf',1,'values',[1,2,3,4,5]);
     
    223226                        md = checkfield(md,'fieldname','smb.InitDensityScaling','NaN',1,'Inf',1,'>=',0,'<=',1);
    224227                        md = checkfield(md,'fieldname','smb.ThermoDeltaTScaling','NaN',1,'Inf',1,'>=',0,'<=',1);
     228                        md = checkfield(md,'fieldname','smb.adThresh','NaN',1,'Inf',1,'>=',0);
    225229
    226230                        switch self.aIdx,
     
    278282                        fielddisplay(self,'ThermoDeltaTScaling',{'scaling factor to multiply the thermal diffusion timestep (delta t)'});
    279283                        fielddisplay(self,'outputFreq','output frequency in days (default is monthly, 30)');
     284                        fielddisplay(self,'adThresh',{'Apply aIdx method to all areas with densities below this value,','or else apply direct input value from aValue, allowing albedo to be altered.'});
    280285                        fielddisplay(self,'aIdx',{'method for calculating albedo and subsurface absorption (default is 1)',...
    281286                                '0: direct input from aValue parameter',...
     
    283288                                '2: effective grain radius [Brun et al., 2009]',...
    284289                                '3: density and cloud amount [Greuell & Konzelmann, 1994]',...
    285                                 '4: exponential time decay & wetness [Bougamont & Bamber, 2005]',...
    286                                 '5: ingest MODIS mode, direct input from aValue parameter applied to surface ice only'});
     290                                '4: exponential time decay & wetness [Bougamont & Bamber, 2005]'})
    287291
    288292                        fielddisplay(self,'teValue','Outward longwave radiation thermal emissivity forcing at every element (default in code is 1)');
     
    373377                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','t0dry','format','Double');
    374378                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','K','format','Double');
     379                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','adThresh','format','Double');
    375380
    376381                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','aValue','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
Note: See TracChangeset for help on using the changeset viewer.