Changeset 17403
- Timestamp:
- 03/10/14 09:14:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp
r17087 r17403 162 162 163 163 /*Intermediaries*/ 164 IssmDouble z_critical = 200.; 165 IssmDouble a = 2.; 166 IssmDouble b = 3.; 167 IssmDouble smb,smbref,z; 168 164 IssmDouble z_critical = 1675.; 165 IssmDouble dz = 0; 166 IssmDouble a = -15.86; 167 IssmDouble b = 0.00969; 168 IssmDouble c = -0.235; 169 IssmDouble f = 1.; 170 IssmDouble g = -0.0011; 171 IssmDouble h = -1.54e-5; 172 IssmDouble smb,smbref,anomaly,yts,z; 173 174 /* Get constants */ 175 femmodel->parameters->FindParam(&yts,ConstantsYtsEnum); 176 /*iomodel->Constant(&yts,ConstantsYtsEnum);*/ 177 /*this->parameters->FindParam(&yts,ConstantsYtsEnum);*/ 178 /*Mathieu original*/ 179 /*IssmDouble smb,smbref,z;*/ 180 169 181 /*Loop over all the elements of this partition*/ 170 182 for(int i=0;i<femmodel->elements->Size();i++){ … … 182 194 for(int v=0;v<numvertices;v++){ 183 195 184 /*Get vertex elevation, referencesmb*/196 /*Get vertex elevation, anoma smb*/ 185 197 z = surfacelist[v]; 186 smbref = smblistref[v]; 187 188 /*Compute corrected smb*/ 189 if(z<z_critical){ 190 smb = smbref; 198 anomaly = smblistref[v]; 199 200 /* Henning edited acc. to Riannes equations*/ 201 /* Set SMB maximum elevation, if dz = 0 -> z_critical = 1675 */ 202 z_critical = z_critical + dz; 203 204 /* Calculate smb acc. to the surface elevation z */ 205 if(z<z_critical){ 206 smb = a + b*z + c; 191 207 } 192 208 else{ 193 smb = a*smbref*smbref+b+z;209 smb = (a + b*z)*(f + g*(z-z_critical) + h*(z-z_critical)*(z-z_critical)) + c; 194 210 } 195 211 212 /* Compute smb including anomaly, 213 correct for number of seconds in a year [s/yr]*/ 214 smb = smb + anomaly*yts; 215 196 216 /*Update array accordingly*/ 197 217 smblist[v] = smb;
Note:
See TracChangeset
for help on using the changeset viewer.