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
RevLine 
[20498]1Index: ../trunk-jpl/test/Archives/Archive436.nc
2===================================================================
3Cannot display: file marked as a binary type.
4svn:mime-type = application/octet-stream
5Index: ../trunk-jpl/src/c/shared/Elements/LliboutryDuval.cpp
6===================================================================
7--- ../trunk-jpl/src/c/shared/Elements/LliboutryDuval.cpp (revision 20091)
8+++ ../trunk-jpl/src/c/shared/Elements/LliboutryDuval.cpp (revision 20092)
9@@ -8,7 +8,10 @@
10
11 /* get ice stiffness B from enthalpy, pressure and flow law exponent*/
12 IssmDouble LliboutryDuval(IssmDouble enthalpy, IssmDouble pressure, IssmDouble n, IssmDouble betaCC, IssmDouble referencetemperature, IssmDouble heatcapacity, IssmDouble latentheat){
13- /*Use parameterization for the rheology: Grewe/Blatter 2009, Aschwanden 2012
14+ /*Use Lliboutry & Duval's 1985 parameterization for the rheology:
15+ * see also: Grewe/Blatter 2009, Aschwanden et al. 2012
16+ *
17+ * ISSM uses enthalpy/temperature values that are not corrected for pressure.
18 *
19 * A(H,p) = A0 exp(-Q/RT(H,p)), if H < H_s(p)
20 * = A0 exp(-Q/RTpmp) (1+181.25w(H,p)), if H_s(p) \le H < H_l(p)
21@@ -33,45 +36,38 @@
22 * = 8.314
23 *
24 * Convert A to B : B = A^(-1/n) */
25-
26 /*check feasibility*/
27- _assert_(pressure>=0);
28- _assert_(n>0);
29- _assert_(betaCC>=0);
30- _assert_(referencetemperature>=0);
31- _assert_(heatcapacity>0);
32- _assert_(latentheat>0);
33+ _assert_(pressure+1.e-4>=0); // deal with pressure instability at ice surface
34+ _assert_(n>0);
35+ _assert_(betaCC>=0);
36+ _assert_(referencetemperature>=0);
37+ _assert_(heatcapacity>0);
38+ _assert_(latentheat>0);
39
40- /*Some physical constants*/
41- IssmDouble R=8.314;
42+ /*Some physical constants*/
43+ IssmDouble R=8.314;
44
45- /*Intermediaries*/
46- IssmDouble A,B,Tstar,Tpmp,H_sp,waterfraction;
47+ /*Intermediaries*/
48+ IssmDouble A,B,Tstar,Tpmp,H_sp,waterfraction;
49
50- Tpmp=273.15-betaCC*pressure;
51- H_sp=heatcapacity*(Tpmp - referencetemperature);
52- if (enthalpy < H_sp){
53- Tstar = referencetemperature + enthalpy/heatcapacity - betaCC*pressure;
54- waterfraction = 0.;
55- }
56- else{
57- Tstar=Tpmp;
58- waterfraction=(enthalpy - H_sp)/latentheat;
59- if (waterfraction > 0.01)
60- waterfraction = 0.01;
61- }
62+ Tpmp=273.15-betaCC*pressure; //pressure melting point temperature
63+ H_sp=heatcapacity*(Tpmp-referencetemperature); //pressure melting point enthalpy
64+ if (enthalpy<H_sp){ //compute homologous temperature and water fraction
65+ Tstar=referencetemperature+enthalpy/heatcapacity+betaCC*pressure;
66+ waterfraction=0.;
67+ }
68+ else{
69+ Tstar=273.15;
70+ waterfraction=(enthalpy-H_sp)/latentheat;
71+ if (waterfraction>0.01) waterfraction=0.01; // limit softness of ice
72+ }
73
74- /*Get A*/
75- if(Tstar<=263.15){
76- A=3.61e-13 * exp( -6.e+4/(R*Tstar));
77- }
78- else{
79- A=1.73e3 * exp(-13.9e+4/(R*Tstar));
80- }
81- A*=(1. + 181.25*waterfraction);
82+ /*Get A*/
83+ if(Tstar<=263.15){A=3.61e-13*exp(-6.e+4/(R*Tstar));}
84+ else{A=1.73e3*exp(-13.9e+4/(R*Tstar));}
85+ A*=(1.+181.25*waterfraction);
86
87- /*Convert to B*/
88- B=pow(A,-1./n);
89-
90- return B;
91+ /*Convert to B*/
92+ B=pow(A,-1./n);
93+ return B;
94 }
Note: See TracBrowser for help on using the repository browser.