Changeset 25374
- Timestamp:
- 08/11/20 17:32:58 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp
r25317 r25374 78 78 iomodel->FindConstant(&isdelta18o,"md.smb.isdelta18o"); 79 79 iomodel->FindConstant(&ismungsm,"md.smb.ismungsm"); 80 iomodel->FindConstant(&issetpddfac,"md.smb.issetpddfac"); 80 81 iomodel->FetchDataToInput(inputs2,elements,"md.thermal.spctemperature",ThermalSpctemperatureEnum); 81 82 iomodel->FetchDataToInput(inputs2,elements,"md.smb.s0p",SmbS0pEnum); … … 89 90 iomodel->FetchDataToDatasetInput(inputs2,elements,"md.smb.precipitation",SmbPrecipitationEnum); 90 91 iomodel->FetchDataToDatasetInput(inputs2,elements,"md.smb.monthlytemperatures",SmbMonthlytemperaturesEnum); 92 } 93 if(issetpddfac){ 94 iomodel->FetchDataToInput(inputs2,elements,"md.smb.pddfac_snow",SmbPddfacSnowEnum,-1.); 95 iomodel->FetchDataToInput(inputs2,elements,"md.smb.pddfac_ice",SmbPddfacIceEnum,-1.); 91 96 } 92 97 break; -
issm/trunk-jpl/src/m/classes/SMBd18opdd.m
r24806 r25374 47 47 if(self.istemperaturescaled==0),self.temperatures_reconstructed=project3d(md,'vector',self.temperatures_reconstructed,'type','node');end 48 48 if(self.isprecipscaled==0),self.precipitations_reconstructed=project3d(md,'vector',self.precipitations_reconstructed,'type','node');end 49 if(self.issetpddfac), self.pddfac_snow=project3d(md,'vector',self.pddfac_snow,'type','node');end50 if(self.issetpddfac), self.pddfac_ice=project3d(md,'vector',self.pddfac_ice,'type','node');end51 49 self.s0p=project3d(md,'vector',self.s0p,'type','node'); 52 50 self.s0t=project3d(md,'vector',self.s0t,'type','node'); … … 124 122 disp(sprintf('\n PDD and deltaO18 parameters:')); 125 123 fielddisplay(self,'isd18opd','is delta18o parametrisation from present day temperature and precipitation activated (0 or 1, default is 0)'); 126 fielddisplay(self,'issetpddfac','is user passing in defined pdd factors at each vertex(0 or 1, default is 0)');124 fielddisplay(self,'issetpddfac','is user passing in defined pdd factors (0 or 1, default is 0)'); 127 125 fielddisplay(self,'desfac','desertification elevation factor (between 0 and 1, default is 0.5) [m]'); 128 126 fielddisplay(self,'s0p','should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'); … … 145 143 end 146 144 if(self.issetpddfac==1) 147 fielddisplay(self,'pddfac_snow','Pdd factor for snow , at each vertex[mm ice equiv/day/degree C]');148 fielddisplay(self,'pddfac_ice','Pdd factor for ice , at each vertex[mm ice equiv/day/degree C]');145 fielddisplay(self,'pddfac_snow','Pdd factor for snow for all the domain [mm ice equiv/day/degree C]'); 146 fielddisplay(self,'pddfac_ice','Pdd factor for ice for all the domain [mm ice equiv/day/degree C]'); 149 147 end 150 148 fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'); -
issm/trunk-jpl/src/m/classes/SMBd18opdd.py
r24793 r25374 48 48 49 49 string = "%s\n%s" % (string, fielddisplay(self, 'isd18opd', 'is delta18o parametrisation from present day temperature and precipitation activated (0 or 1, default is 0)')) 50 string = "%s\n%s" % (string, fielddisplay(self, 'issetpddfac', 'is user passing in defined pdd factors at each vertex(0 or 1, default is 0)'))50 string = "%s\n%s" % (string, fielddisplay(self, 'issetpddfac', 'is user passing in defined pdd factors (0 or 1, default is 0)')) 51 51 string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (between 0 and 1, default is 0.5) [m]')) 52 52 string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]')) … … 70 70 71 71 if self.issetpddfac == 1: 72 string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_snow', 'Pdd factor for snow , at each vertex[mm ice equiv/day/degree C]'))73 string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_ice', 'Pdd factor for ice , at each vertex[mm ice equiv/day/degree C]'))72 string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_snow', 'Pdd factor for snow for all the domain [mm ice equiv/day/degree C]')) 73 string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_ice', 'Pdd factor for ice for all the domain [mm ice equiv/day/degree C]')) 74 74 string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step')) 75 75 string = "%s\n%s" % (string, fielddisplay(self, 'averaging', 'averaging methods from short to long steps')) … … 94 94 if self.isd18opd: 95 95 self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node') 96 if self.issetpddfac:97 self.pddfac_snow = project3d(md, 'vector', self.pddfac_snow, 'type', 'node')98 if self.issetpddfac:99 self.pddfac_ice = project3d(md, 'vector', self.pddfac_ice, 'type', 'node')100 96 self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node') 101 97 self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node') -
issm/trunk-jpl/src/m/classes/SMBpdd.m
r24806 r25374 25 25 precipitations_presentday = NaN; 26 26 precipitations_lgm = NaN; 27 pddfac_snow = NaN; 28 pddfac_ice = NaN; 27 29 steps_per_step = 1; 28 30 averaging = 0; … … 75 77 self.rlaps = 6.5; 76 78 self.rlapslgm = 6.5; 79 self.issetpddfac = 0; 77 80 78 81 end % }}} … … 106 109 md = checkfield(md,'fieldname','smb.sealev','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1); 107 110 end 111 if(self.issetpddfac==1) 112 md = checkfield(md,'fieldname','smb.pddfac_snow','>=',0,'NaN',1,'Inf',1); 113 md = checkfield(md,'fieldname','smb.pddfac_ice','>=',0,'NaN',1,'Inf',1); 114 end 108 115 end 109 116 md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]); … … 118 125 fielddisplay(self,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)'); 119 126 fielddisplay(self,'ismungsm','is temperature and precipitation mungsm parametrisation activated (0 or 1, default is 0)'); 127 fielddisplay(self,'issetpddfac','is user passing in defined pdd factors (0 or 1, default is 0)'); 120 128 fielddisplay(self,'desfac','desertification elevation factor (between 0 and 1, default is 0.5) [m]'); 121 129 fielddisplay(self,'s0p','should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'); … … 143 151 fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated'); 144 152 fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated'); 153 end 154 if(self.issetpddfac==1) 155 fielddisplay(self,'pddfac_snow','Pdd factor for snow for all the domain [mm ice equiv/day/degree C]'); 156 fielddisplay(self,'pddfac_ice','Pdd factor for ice for all the domain [mm ice equiv/day/degree C]'); 145 157 end 146 158 fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'); … … 190 202 WriteData(fid,prefix,'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2,'yts',md.constants.yts); 191 203 end 204 if self.issetpddfac==1 205 WriteData(fid,prefix,'object',self,'class','smb','fieldname','pddfac_snow','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 206 WriteData(fid,prefix,'object',self,'class','smb','fieldname','pddfac_ice','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 207 end 192 208 193 209 %process requested outputs -
issm/trunk-jpl/src/m/classes/SMBpdd.py
r24793 r25374 34 34 self.precipitations_presentday = float('NaN') 35 35 self.precipitations_lgm = float('NaN') 36 self.pddfac_snow = float('NaN') 37 self.pddfac_ice = float('NaN') 36 38 self.steps_per_step = 1 37 39 self.averaging = 0 … … 47 49 string = "%s\n%s" % (string, fielddisplay(self, 'isdelta18o', 'is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)')) 48 50 string = "%s\n%s" % (string, fielddisplay(self, 'ismungsm', 'is temperature and precipitation mungsm parametrisation activated (0 or 1, default is 0)')) 51 string = "%s\n%s" % (string, fielddisplay(self, 'issetpddfac', 'is user passing in defined pdd factors (0 or 1, default is 0)')) 49 52 string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (between 0 and 1, default is 0.5) [m]')) 50 53 string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]')) … … 73 76 string = "%s\n%s" % (string, fielddisplay(self, 'Tdiff', 'time interpolation parameter for temperature, 1D(year), required if mungsm is activated')) 74 77 string = "%s\n%s" % (string, fielddisplay(self, 'sealev', 'sea level [m], 1D(year), required if mungsm is activated')) 75 78 76 79 string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step')) 77 80 string = "%s\n%s" % (string, fielddisplay(self, 'averaging', 'averaging methods from short to long steps')) … … 101 104 self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node') 102 105 self.precipitations_lgm = project3d(md, 'vector', self.precipitations_lgm, 'type', 'node') 103 106 107 if self.issetpddfac: 108 self.pddfac_snow = project3d(md, 'vector', self.pddfac_snow, 'type', 'node') 109 if self.issetpddfac: 110 self.pddfac_ice = project3d(md, 'vector', self.pddfac_ice, 'type', 'node') 104 111 self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node') 105 112 self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node') … … 130 137 self.rlaps = 6.5 131 138 self.rlapslgm = 6.5 139 self.issetpddfac = 0 132 140 133 141 return self … … 164 172 md = checkfield(md, 'fieldname', 'smb.sealev', 'NaN', 1, 'Inf', 1, 'size', [2, np.nan], 'singletimeseries', 1) 165 173 174 if self.issetpddfac: 175 md = checkfield(md, 'fieldname', 'smb.pddfac_snow', '>=', 0, 'NaN', 1, 'Inf', 1) 176 md = checkfield(md, 'fieldname', 'smb.pddfac_ice', '>=', 0, 'NaN', 1, 'Inf', 1) 177 166 178 md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1]) 167 179 md = checkfield(md, 'fieldname', 'smb.averaging', 'numel', [1], 'values', [0, 1, 2]) … … 206 218 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts) 207 219 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts) 220 221 if self.issetpddfac: 222 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_snow', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) 223 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_ice', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) 208 224 209 225 #process requested outputs -
issm/trunk-jpl/test/NightlyRun/test237.m
r24584 r25374 18 18 % creating Present day and lgm temperatures 19 19 % Same temperature over the all region: 20 tmonth(1:12)=238.15+20.; 20 curve=sin(0:pi/11:pi); 21 tmonth(1:12)=238.15+20.0+20.0*curve; 21 22 for imonth=0:11 22 23 md.smb.temperatures_presentday(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1); … … 48 49 md.smb.sealev(2,iint)=(iint-1)*20; 49 50 end 51 52 md.smb.issetpddfac=1; 53 md.smb.pddfac_snow=2; 54 md.smb.pddfac_ice=2; 50 55 51 56 md=extrude(md,3,1); -
issm/trunk-jpl/test/NightlyRun/test239.m
r24584 r25374 19 19 % creating Present day temperatures 20 20 % Same temperature over the all region: 21 tmonth(1:12)=238.15+20.; 21 curve=sin(0:pi/11:pi); 22 tmonth(1:12)=238.15+20.0+20.0*curve; 22 23 for imonth=0:11 23 24 md.smb.temperatures_presentday(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1); … … 40 41 md.settings.output_frequency=1; 41 42 md.timestepping.final_time=2; 43 44 md.smb.issetpddfac = 1; 45 md.smb.pddfac_snow = 3; 46 md.smb.pddfac_ice = 3; 42 47 43 48 md=setflowequation(md,'SSA','all'); -
issm/trunk-jpl/test/NightlyRun/test247.m
r24624 r25374 19 19 % creating Present day temperatures 20 20 % Same temperature over the all region: 21 tmonth(1:12)=238.15+20.; 21 curve=sin(0:pi/11:pi); 22 tmonth(1:12)=238.15+20.0+20.0*curve; 22 23 for imonth=0:11 23 24 md.smb.temperatures_presentday(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1); … … 56 57 md.smb.s0t = (max(md.geometry.surface,0)); 57 58 md.smb.issetpddfac = 1; 58 md.smb.pddfac_snow = 4.3;59 md.smb.pddfac_ice = 8.3;59 md.smb.pddfac_snow = 8; 60 md.smb.pddfac_ice = 10; 60 61 61 62 md=extrude(md,5,1.2);
Note:
See TracChangeset
for help on using the changeset viewer.