Changeset 24973
- Timestamp:
- 06/05/20 17:34:18 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r24972 r24973 5758 5758 5759 5759 /*Compute eustatic ice contribution to sea level rise: */ 5760 this->SealevelriseEustaticIce(Sgi,peustatic,masks, oceanarea);5760 //this->SealevelriseEustaticIce(Sgi,peustatic,masks, oceanarea); 5761 5761 5762 5762 } … … 5931 5931 /*diverse:*/ 5932 5932 int gsize,dummy; 5933 IssmDouble S ,BP, Stotal; //change in water water level(Farrel and Clarke, Equ. 4)5933 IssmDouble S; //change in water water level(Farrel and Clarke, Equ. 4) 5934 5934 IssmDouble constant=0; 5935 5935 IssmDouble rho_water; … … 5963 5963 S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg_old[this->vertices[i]->Sid()]/NUMVERTICES; 5964 5964 5965 /*If we have bottom pressure fingerprinting requested, retrieve BP: */5966 if(bp_compute_fingerprints){5967 Input2* bottompressure_change_input=this->GetInput2(DslSeaWaterPressureChangeAtSeaFloor);5968 if (!bottompressure_change_input)_error_("bottom pressure input needed to compute sea level rise fingerprint!");5969 bottompressure_change_input->GetInputAverage(&BP);5970 5971 } else BP=0;5972 5973 5965 /*convert to kg/m^2: */ 5974 5966 S=S*rho_water; 5975 BP=BP*rho_water; 5976 5977 Stotal=S+BP; 5978 5979 for(int i=0;i<gsize;i++) Sgo[i]+=G[i]*Stotal; 5967 5968 for(int i=0;i<gsize;i++) Sgo[i]+=G[i]*S; 5980 5969 5981 5970 return; … … 5986 5975 /*diverse:*/ 5987 5976 int gsize; 5988 IssmDouble I, S , BP, Stotal; //change in relative ice thickness and sea level5977 IssmDouble I, S; //change in relative ice thickness and sea level 5989 5978 IssmDouble rho_ice,rho_water; 5990 5979 int horiz; … … 6002 5991 if(!masks->isiceonly[this->lid] && !masks->isoceanin[this->lid]) return; 6003 5992 6004 /*early return if we are fully floating: */6005 if(masks->isfullyfloating[this->lid])return;6006 6007 5993 /*recover parameters:*/ 6008 5994 this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum); … … 6020 6006 this->inputs2->GetArrayPtr(SealevelriseGUEnum,this->lid,&GU,&gsize); 6021 6007 if(horiz){ 6022 this->inputs2->GetArrayPtr(SealevelriseG UEnum,this->lid,&GU,&gsize);6023 this->inputs2->GetArrayPtr(SealevelriseG UEnum,this->lid,&GU,&gsize);6008 this->inputs2->GetArrayPtr(SealevelriseGEEnum,this->lid,&GE,&gsize); 6009 this->inputs2->GetArrayPtr(SealevelriseGNEnum,this->lid,&GN,&gsize); 6024 6010 } 6025 6011 … … 6046 6032 S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg[this->vertices[i]->Sid()]/NUMVERTICES; 6047 6033 6048 /*If we have bottom pressure fingerprinting requested, retrieve BP: */6049 if(bp_compute_fingerprints){6050 Input2* bottompressure_change_input=this->GetInput2(DslSeaWaterPressureChangeAtSeaFloor);6051 if (!bottompressure_change_input)_error_("bottom pressure input needed to compute sea level rise fingerprint!");6052 bottompressure_change_input->GetInputAverage(&BP);6053 } else BP=0;6054 6055 6034 /*convert to kg/m^2:*/ 6056 6035 S=rho_water*S; 6057 BP=rho_water*BP;6058 Stotal=S+BP;6059 6036 6060 6037 for(int i=0;i<gsize;i++){ 6061 Up[i]+=S total*GU[i];6038 Up[i]+=S*GU[i]; 6062 6039 if(horiz){ 6063 North[i]+=S total*GN[i];6064 East[i]+=S total*GE[i];6040 North[i]+=S*GN[i]; 6041 East[i]+=S*GE[i]; 6065 6042 } 6066 6043 }
Note:
See TracChangeset
for help on using the changeset viewer.