Changeset 28104
- Timestamp:
- 02/20/24 13:51:13 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp
r28103 r28104 10 10 11 11 IssmDouble PddSurfaceMassBalance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec, 12 IssmDouble* pdds, IssmDouble* pds, IssmDouble* melt, IssmDouble* accu,13 14 15 16 12 IssmDouble* pdds, IssmDouble* pds, IssmDouble* melt, IssmDouble* accu, 13 IssmDouble signorm, IssmDouble yts, IssmDouble h, IssmDouble s, IssmDouble desfac, 14 IssmDouble s0t,IssmDouble s0p, IssmDouble rlaps,IssmDouble rlapslgm, 15 IssmDouble TdiffTime,IssmDouble sealevTime, IssmDouble pddsnowfac,IssmDouble pddicefac, 16 IssmDouble rho_water,IssmDouble rho_ice){ 17 17 18 18 // output: … … 70 70 IssmDouble pddtj, hmx2; 71 71 IssmDouble pddsnowfac0=4.3, pddicefac0=8.3; 72 IssmDouble snowfac, icefac; 73 74 IssmDouble snow; 72 IssmDouble snowfac, icefac; 75 73 76 74 sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months … … 138 136 icefac=pddicefac0; 139 137 if (pddsnowfac>0) { 140 141 142 143 144 145 138 if (pddsnowfac<1.65) { 139 _printf0_("WARNING: Pdd snow factor input, " << pddsnowfac << ", results in a negative value. It will be ignored. \n"); 140 } 141 else{ 142 snowfac=pddsnowfac; 143 } 146 144 } 147 145 if (pddicefac>0) { 148 149 150 151 152 153 146 if (pddicefac>17.22) { 147 _printf0_("WARNING: Pdd ice factor input, " << pddicefac << ", results in a negative value. It will be ignored. \n"); 148 } 149 else{ 150 icefac=pddicefac; 151 } 154 152 } 155 153 … … 160 158 } 161 159 else if(Tsum< 10){ 162 snwmf = (0.15*(Tsum+1) + (2.65+snowfac-pddsnowfac0))*0.001; 163 smf = (((17.22-pddicefac0)/(pow(11,3)))*pow((10.-Tsum),3) + icefac)*0.001;//icefac)*0.001;//pddicefac0)*0.001; 164 //2024: Prior Calculation SMF: smf = (((17.22-icefac)/(pow(11,3)))*pow((10.-Tsum),3) + pddicefac0)*0.001; 165 //Original: Tarasov and Peltier: smf = (((icefac-pddicefac0)/(Tsum+1))*pow((10.-Tsum),3) + pddicefac0)*0.001; 160 snwmf = (0.15*(Tsum+1) + (2.65+snowfac-pddsnowfac0))*0.001; 161 smf = (((17.22-icefac)/(pow(11,3)))*pow((10.-Tsum),3) + pddicefac0)*0.001; 162 //JC,smf = (((icefac-pddicefac0)/(Tsum+1))*pow((10.-Tsum),3) + pddicefac0)*0.001; 166 163 } 167 164 else{ … … 249 246 pddtj=pddt; 250 247 251 //cout << sizeof(snwm);252 //snw = mean(snwm);253 254 //std::cout << snwm << std::endl;255 //printf("snowmelt %f\n",snow);256 257 248 return B; 258 249 }
Note:
See TracChangeset
for help on using the changeset viewer.