Changeset 23144


Ignore:
Timestamp:
08/21/18 07:03:38 (7 years ago)
Author:
hakesson
Message:

CHG: working on PISM hydrology-friction law

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/HydrologyPismAnalysis.cpp

    r23093 r23144  
    115115        IssmDouble* drainagerate = xNew<IssmDouble>(numvertices);
    116116        IssmDouble* meltingrate  = xNew<IssmDouble>(numvertices);
     117//      IssmDouble* watercolumn_max  = xNew<IssmDouble>(numvertices);
    117118        element->GetInputListOnVertices(&watercolumn[0],WatercolumnEnum);
    118119        element->GetInputListOnVertices(&drainagerate[0],HydrologyDrainageRateEnum);
    119120        element->GetInputListOnVertices(&meltingrate[0],BasalforcingsGroundediceMeltingRateEnum);
     121//      element->GetInputListOnVertices(&watercolumn_max[0],FrictionWatercolumnMaxEnum);
    120122
    121123        /*Add water*/
    122         for(int i=0;i<numvertices;i++) watercolumn[i] += (meltingrate[i]/rho_ice*rho_water-drainagerate[i])*dt;
     124//    /*Check that water column height is within 0 and upper bound, correct if needed*/
     125        for(int i=0;i<numvertices;i++){
     126                watercolumn[i] += (meltingrate[i]/rho_ice*rho_water-drainagerate[i])*dt;
     127//              // if watercolumn height is higher than the maximum allowed height, set height to upper bound
     128//              if(watercolumn[i]>watercolumn_max[i]){
     129//                      watercolumn[i]=watercolumn_max[i];
     130//              }
     131//              // if watercolumn height is negative (shouldn't happen), set it to 0
     132//              if(watercolumn[i]<0){
     133//                      watercolumn[i]=0;
     134//              }
     135//              // if watercolumn height is within 0 and upper bound, nothing to be done
     136//              else{
     137//                      //do nothing
     138//              }
     139        }
    123140
    124141        /* Divide by connectivity, add degree of channelization as an input */
Note: See TracChangeset for help on using the changeset viewer.