Changeset 28104


Ignore:
Timestamp:
02/20/24 13:51:13 (13 months ago)
Author:
jdquinn
Message:

CHG: Reverting last commit for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp

    r28103 r28104  
    1010
    1111IssmDouble PddSurfaceMassBalance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec,
    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){
     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){
    1717
    1818  // output:
     
    7070  IssmDouble pddtj, hmx2;
    7171  IssmDouble pddsnowfac0=4.3, pddicefac0=8.3;
    72   IssmDouble snowfac, icefac;
    73  
    74   IssmDouble snow;
     72  IssmDouble snowfac, icefac;
    7573
    7674  sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
     
    138136  icefac=pddicefac0;
    139137  if (pddsnowfac>0) {
    140           if (pddsnowfac<1.65) {
    141                   _printf0_("WARNING: Pdd snow factor input, " << pddsnowfac << ", results in a negative value. It will be ignored. \n");
    142           }
    143           else{
    144                 snowfac=pddsnowfac;
    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    }
    146144  }
    147145  if (pddicefac>0) {
    148           if (pddicefac>17.22) {
    149                   _printf0_("WARNING: Pdd ice factor input, " << pddicefac << ", results in a negative value. It will be ignored. \n");
    150           }
    151           else{
    152             icefac=pddicefac;
    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    }
    154152  }
    155153
     
    160158  }
    161159  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;
    166163  }
    167164  else{
     
    249246  pddtj=pddt;
    250247
    251   //cout << sizeof(snwm);
    252   //snw = mean(snwm);
    253 
    254   //std::cout << snwm << std::endl;
    255   //printf("snowmelt %f\n",snow);
    256  
    257248  return B;
    258249}
Note: See TracChangeset for help on using the changeset viewer.