Changeset 25590


Ignore:
Timestamp:
09/23/20 19:40:30 (4 years ago)
Author:
schlegel
Message:

BUG: some code repeated for a1x 2 albedo determinaton

Location:
issm/trunk-jpl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/Gembx.cpp

    r25539 r25590  
    504504                        a[0] = sF[0]*a0 + sF[1]*a1 + sF[2]*a2;
    505505
    506                         // In a layer < 10cm, account for mix of ice and snow,
    507                         // after P. Alexander et al., 2014
    508                         IssmDouble depthsnow=0.0;
    509                         IssmDouble aice=0.0;
    510                         int lice=0;
    511                         for(int l=0;(l<m & d[l]<dPHC-Dtol);l++){
    512                                 depthsnow=depthsnow+dz[l];
    513                                 lice=l+1;
    514                         }
    515                         if (depthsnow<=0.1+Dtol & lice<m & d[lice]>=dPHC-Dtol){
    516                                 aice = ai_max + (as_min - ai_max)*(d[lice]-dIce)/(dPHC-dIce);
    517                                 a[0]= aice + max(a[0]-aice,0.0)*(depthsnow/0.1);
    518                         }
    519506                }
    520507                else if(aIdx==3){
     
    584571
    585572                //If we do not have fresh snow
    586                 if (aIdx<3 && aIdx>0){
     573                if (aIdx<3 && aIdx>0 && (adThresh - d[0])>=Dtol){
    587574                        // In a layer < 10cm, account for mix of ice and snow,
    588575                        // after P. Alexander et al., 2014
Note: See TracChangeset for help on using the changeset viewer.