Changeset 24973


Ignore:
Timestamp:
06/05/20 17:34:18 (5 years ago)
Author:
Eric.Larour
Message:

CHG: fixed issue with masks in geodetic + better computation of bottom
pressure fingerprints.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r24972 r24973  
    57585758
    57595759        /*Compute eustatic ice contribution to sea level rise: */
    5760         this->SealevelriseEustaticIce(Sgi,peustatic,masks, oceanarea);
     5760        //this->SealevelriseEustaticIce(Sgi,peustatic,masks, oceanarea);
    57615761
    57625762}
     
    59315931        /*diverse:*/
    59325932        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)
    59345934        IssmDouble constant=0;
    59355935        IssmDouble rho_water;
     
    59635963        S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg_old[this->vertices[i]->Sid()]/NUMVERTICES;
    59645964
    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 
    59735965        /*convert to kg/m^2: */
    59745966        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;
    59805969
    59815970        return;
     
    59865975        /*diverse:*/
    59875976        int gsize;
    5988         IssmDouble I, S, BP, Stotal;            //change in relative ice thickness and sea level
     5977        IssmDouble I, S;                //change in relative ice thickness and sea level
    59895978        IssmDouble rho_ice,rho_water;
    59905979        int horiz;
     
    60025991        if(!masks->isiceonly[this->lid] && !masks->isoceanin[this->lid]) return;
    60035992
    6004         /*early return if we are fully floating: */
    6005         if(masks->isfullyfloating[this->lid])return;
    6006 
    60075993        /*recover parameters:*/
    60085994        this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum);
     
    60206006        this->inputs2->GetArrayPtr(SealevelriseGUEnum,this->lid,&GU,&gsize);
    60216007        if(horiz){
    6022                 this->inputs2->GetArrayPtr(SealevelriseGUEnum,this->lid,&GU,&gsize);
    6023                 this->inputs2->GetArrayPtr(SealevelriseGUEnum,this->lid,&GU,&gsize);
     6008                this->inputs2->GetArrayPtr(SealevelriseGEEnum,this->lid,&GE,&gsize);
     6009                this->inputs2->GetArrayPtr(SealevelriseGNEnum,this->lid,&GN,&gsize);
    60246010        }
    60256011
     
    60466032                S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg[this->vertices[i]->Sid()]/NUMVERTICES;
    60476033
    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 
    60556034                /*convert to kg/m^2:*/
    60566035                S=rho_water*S;
    6057                 BP=rho_water*BP;
    6058                 Stotal=S+BP;
    60596036
    60606037                for(int i=0;i<gsize;i++){
    6061                         Up[i]+=Stotal*GU[i];
     6038                        Up[i]+=S*GU[i];
    60626039                        if(horiz){
    6063                                 North[i]+=Stotal*GN[i];
    6064                                 East[i]+=Stotal*GE[i];
     6040                                North[i]+=S*GN[i];
     6041                                East[i]+=S*GE[i];
    60656042                        }
    60666043                }
Note: See TracChangeset for help on using the changeset viewer.