Changeset 24195
- Timestamp:
- 10/02/19 14:37:57 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/Gembx.cpp
r24191 r24195 123 123 IssmDouble F = 0.0, H=0.0, G=0.0; 124 124 const IssmDouble E = 0.09; //[mm d-1] model time growth constant E 125 // convert T from K to ºC125 // convert T from K to degC 126 126 T = T - CtoK; 127 127 … … 219 219 220 220 //set maximum water content by mass to 9 percent (Brun, 1980) 221 for(int i=0;i<m;i++)if(lwc[i]>9.0 -Wtol) lwc[i]=9.0;221 for(int i=0;i<m;i++)if(lwc[i]>9.0+Wtol) lwc[i]=9.0; 222 222 223 223 /* Calculate temperature gradiant across grid cells … … 280 280 gsp[i] += D; 281 281 } 282 283 if (gdn[i]<0.0+ Wtol)gdn[i]=0.0;284 if (gsp[i]<0.0+ Wtol)gsp[i]=0.0;285 if (gdn[i]>1.0- Wtol)gdn[i]=1.0;286 if (gsp[i]>1.0- Wtol)gsp[i]=1.0;282 // dendricity and sphericity can not be > 1 or < 0 283 if (gdn[i]<0.0+Gdntol)gdn[i]=0.0; 284 if (gsp[i]<0.0+Gdntol)gsp[i]=0.0; 285 if (gdn[i]>1.0-Gdntol)gdn[i]=1.0; 286 if (gsp[i]>1.0-Gdntol)gsp[i]=1.0; 287 287 288 288 // determine new grain size (mm) … … 304 304 IssmDouble C = (-2e8 * exp(-6e3 / T[i]) * dt) * pow(dT[i],.4); 305 305 gsp[i] +=C; 306 if (gsp[i]<0.0+ Wtol)gsp[i]=0.0;306 if (gsp[i]<0.0+Gdntol)gsp[i]=0.0; 307 307 } 308 308 /*Dry snow metamorphism (Marbouty, 1980) grouped model coefficents … … 1172 1172 1173 1173 case 4: // Kuipers Munneke and others (2015), Greenland 1174 dSnow = 481.0 + 4.834*(Tmean-CtoK +Ttol);1174 dSnow = 481.0 + 4.834*(Tmean-CtoK); 1175 1175 break; 1176 1176 }
Note:
See TracChangeset
for help on using the changeset viewer.