Changeset 17015
- Timestamp:
- 12/09/13 12:41:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r17014 r17015 873 873 IssmDouble latentheat = element->GetMaterialParameter(MaterialsLatentheatEnum); 874 874 IssmDouble rho_ice = element->GetMaterialParameter(MaterialsRhoIceEnum); 875 //Input* watercolumn_input = inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input);876 875 Input* enthalpy_input = element->GetInput(EnthalpyEnum); _assert_(enthalpy_input); 877 // Input* pressure_input = inputs->GetInput(PressureEnum); _assert_(pressure_input);878 // Input* basalmeltingrate_input = inputs->GetInput(BasalforcingsMeltingRateEnum); _assert_(basalmeltingrate_input);879 876 Input* geothermalflux_input = element->GetInput(BasalforcingsGeothermalfluxEnum); _assert_(geothermalflux_input); 880 877 Input* vx_input = element->GetInput(VxEnum); _assert_(vx_input); … … 909 906 910 907 bool checkpositivethickness=true; 911 _assert_(watercolumn >=0.);908 _assert_(watercolumn[vertexdown]>=0.); 912 909 913 910 /*Calculate basal meltingrate after Fig.5 of A.Aschwanden 2012*/ … … 947 944 element->EnthalpyToThermal(&temperature,&waterfraction,enthalpy[vertexdown],pressure[vertexdown]); 948 945 geothermalflux_input->GetInputValue(&geothermalflux,gauss); 949 / / -Mb= Fb-(q-q_geo)/((1-w)*L), cf Aschwanden 2012, eq.66946 /* -Mb= Fb-(q-q_geo)/((1-w)*L), cf Aschwanden 2012, eq.66*/ 950 947 heating[is]=(heatflux+basalfriction+geothermalflux); 951 948 meltingrate_enthalpy[is]=heating[is]/((1-waterfraction)*latentheat*rho_ice); // m/s water equivalent //???? 952 949 } 953 950 } 954 / / enthalpy might have been changed, update951 /* enthalpy might have been changed, update */ 955 952 //element->AddInput(EnthalpyEnum,enthalpy,P1Enum); 956 953 957 954 /******** DRAINAGE *****************************************/ 958 IssmDouble* drainrate_column = xNew<IssmDouble>(numsegments); //TODO: xDelete?955 IssmDouble* drainrate_column = xNew<IssmDouble>(numsegments); //TODO: xDelete? 959 956 IssmDouble* drainrate_element = xNew<IssmDouble>(numsegments); 960 957 for(is=0;is<numsegments;is++) drainrate_column[is]=0.; … … 968 965 elementi=elementi->GetUpperElement(); 969 966 } 970 / / add drained water to melting rate967 /* add drained water to melting rate*/ 971 968 for(is=0;is<numsegments;is++) meltingrate_enthalpy[is]+=drainrate_column[is]; 972 969 … … 976 973 vertexdown = pairindices[is*2+0]; 977 974 vertexup = pairindices[is*2+1]; 978 if( reCast<bool,IssmDouble>(dt)){975 if(dt!=0.){ 979 976 if(watercolumn[vertexdown]+meltingrate_enthalpy[is]*dt<0.){ // prevent too much freeze on 980 977 melting_overshoot=watercolumn[vertexdown]+meltingrate_enthalpy[is]*dt; … … 982 979 basalmeltingrate[vertexdown]=(1.-lambda)*meltingrate_enthalpy[is]; 983 980 watercolumn[vertexdown]=0.; 984 yts=365 *24*60*60;981 yts=365.*24.*60.*60.; 985 982 enthalpy[vertexdown]+=dt/yts*lambda*heating[is]; 986 983 }
Note:
See TracChangeset
for help on using the changeset viewer.