source: issm/oecreview/Archive/19101-20495/ISSM-20091-20092.diff@ 20498

Last change on this file since 20498 was 20498, checked in by Mathieu Morlighem, 9 years ago

CHG: done with Archive/19101-20495

File size: 3.1 KB
  • ../trunk-jpl/src/c/shared/Elements/LliboutryDuval.cpp

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
     
    88
    99/* get ice stiffness B from enthalpy, pressure and flow law exponent*/
    1010IssmDouble LliboutryDuval(IssmDouble enthalpy, IssmDouble pressure, IssmDouble n, IssmDouble betaCC, IssmDouble referencetemperature, IssmDouble heatcapacity, IssmDouble latentheat){
    11   /*Use parameterization for the rheology: Grewe/Blatter 2009, Aschwanden 2012
     11  /*Use Lliboutry & Duval's 1985 parameterization for the rheology:
     12        * see also: Grewe/Blatter 2009, Aschwanden et al. 2012
     13        *
     14        * ISSM uses enthalpy/temperature values that are not corrected for pressure.
    1215   *
    1316   *  A(H,p) = A0 exp(-Q/RT(H,p)), if H < H_s(p)
    1417   *         = A0 exp(-Q/RTpmp) (1+181.25w(H,p)), if H_s(p) \le H < H_l(p)
     
    3336   *     = 8.314
    3437   * 
    3538   *  Convert A to B :  B = A^(-1/n) */
    36 
    3739        /*check feasibility*/
    38   _assert_(pressure>=0);
    39   _assert_(n>0);
    40   _assert_(betaCC>=0);
    41   _assert_(referencetemperature>=0);
    42   _assert_(heatcapacity>0);
    43   _assert_(latentheat>0);
     40        _assert_(pressure+1.e-4>=0); // deal with pressure instability at ice surface
     41        _assert_(n>0);
     42        _assert_(betaCC>=0);
     43        _assert_(referencetemperature>=0);
     44        _assert_(heatcapacity>0);
     45        _assert_(latentheat>0);
    4446
    45   /*Some physical constants*/
    46   IssmDouble R=8.314;
     47        /*Some physical constants*/
     48        IssmDouble R=8.314;
    4749
    48   /*Intermediaries*/
    49   IssmDouble A,B,Tstar,Tpmp,H_sp,waterfraction;
     50        /*Intermediaries*/
     51        IssmDouble A,B,Tstar,Tpmp,H_sp,waterfraction;
    5052
    51   Tpmp=273.15-betaCC*pressure;
    52   H_sp=heatcapacity*(Tpmp - referencetemperature);
    53   if (enthalpy < H_sp){
    54     Tstar = referencetemperature + enthalpy/heatcapacity - betaCC*pressure;     
    55     waterfraction = 0.;
    56   }
    57   else{
    58     Tstar=Tpmp;
    59     waterfraction=(enthalpy - H_sp)/latentheat;
    60                 if (waterfraction > 0.01)
    61                         waterfraction = 0.01;
    62   }
     53        Tpmp=273.15-betaCC*pressure; //pressure melting point temperature
     54        H_sp=heatcapacity*(Tpmp-referencetemperature); //pressure melting point enthalpy
     55        if (enthalpy<H_sp){ //compute homologous temperature and water fraction
     56                Tstar=referencetemperature+enthalpy/heatcapacity+betaCC*pressure;
     57                waterfraction=0.;
     58        }
     59        else{
     60                Tstar=273.15;
     61                waterfraction=(enthalpy-H_sp)/latentheat;
     62                if (waterfraction>0.01) waterfraction=0.01; // limit softness of ice
     63        }
    6364
    64   /*Get A*/
    65   if(Tstar<=263.15){
    66     A=3.61e-13 * exp(  -6.e+4/(R*Tstar));
    67   }
    68   else{
    69     A=1.73e3   * exp(-13.9e+4/(R*Tstar));
    70   }
    71   A*=(1. + 181.25*waterfraction);
     65        /*Get A*/
     66        if(Tstar<=263.15){A=3.61e-13*exp(-6.e+4/(R*Tstar));}
     67        else{A=1.73e3*exp(-13.9e+4/(R*Tstar));}
     68        A*=(1.+181.25*waterfraction);
    7269
    73   /*Convert to B*/
    74   B=pow(A,-1./n);
    75 
    76   return B;
     70        /*Convert to B*/
     71        B=pow(A,-1./n);
     72        return B;
    7773}
Note: See TracBrowser for help on using the repository browser.