Ignore:
Timestamp:
09/11/19 09:30:58 (6 years ago)
Author:
rueckamp
Message:

CHG: add drainiceolumn and watercolumn_upperlimit as user input; improve drainage for steadystate case

File:
1 edited

Legend:

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

    r24136 r24140  
    275275        parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isenthalpy",ThermalIsenthalpyEnum));
    276276        parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isdynamicbasalspc",ThermalIsdynamicbasalspcEnum));
     277        parameters->AddObject(iomodel->CopyConstantObject("md.thermal.isdrainicecolumn",ThermalIsdrainicecolumnEnum));
     278        parameters->AddObject(iomodel->CopyConstantObject("md.thermal.watercolumn_upperlimit",ThermalWatercolumnUpperlimitEnum));
    277279        parameters->AddObject(iomodel->CopyConstantObject("md.friction.law",FrictionLawEnum));
    278280
     
    424426        element->GetInputListOnNodes(basalmeltingrates,BasalforcingsGroundediceMeltingRateEnum);
    425427
     428        IssmDouble watercolumnupperlimit = element->FindParam(ThermalWatercolumnUpperlimitEnum);
     429       
    426430        Gauss* gauss=element->NewGauss();
    427431        for(is=0;is<numsegments;is++){
     
    484488                                watercolumns[nodedown]+=dt*meltingrate_enthalpy[is];
    485489                        }
     490                        if(watercolumns[nodedown]>watercolumnupperlimit) watercolumns[nodedown]=watercolumnupperlimit;
    486491                }
    487492                else{
     
    11681173
    11691174                for(k=0;k<numnodes;k++){
    1170                         waterfractions[k]-=dt*drainage[k];
     1175                        if(dt==0.)
     1176                                waterfractions[k]-=drainage[k];
     1177                        else
     1178                                waterfractions[k]-=dt*drainage[k];
     1179                       
    11711180                        element->ThermalToEnthalpy(&enthalpies[k], temperatures[k], waterfractions[k], pressures[k]);
    11721181                }
     
    11871196        IssmDouble thermalconductivity      = element->FindParam(MaterialsThermalconductivityEnum);
    11881197
    1189         if(enthalpy < PureIceEnthalpy(element,pressure)){
     1198        if(enthalpy < PureIceEnthalpy(element,pressure))
    11901199                return thermalconductivity/heatcapacity;
    1191         }
    1192         else{
     1200        else
    11931201                return temperateiceconductivity/heatcapacity;
    1194         }
    11951202}/*}}}*/
    11961203IssmDouble     EnthalpyAnalysis::EnthalpyDiffusionParameterVolume(Element* element,int enthalpy_enum){/*{{{*/
     
    16781685        /*Intermediaries*/
    16791686        bool computebasalmeltingrates=true;
    1680         bool drainicecolumn=true;
     1687        bool isdrainicecolumn;
    16811688        IssmDouble dt;
    16821689
    16831690        femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
    1684 
    1685         if(drainicecolumn && (dt>0.))   DrainWaterfraction(femmodel);
     1691        femmodel->parameters->FindParam(&isdrainicecolumn,ThermalIsdrainicecolumnEnum);
     1692
     1693        if(isdrainicecolumn)    DrainWaterfraction(femmodel);
    16861694        if(computebasalmeltingrates)    ComputeBasalMeltingrate(femmodel);
    16871695
Note: See TracChangeset for help on using the changeset viewer.