Changeset 24982


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

CHG: bottom pressure modifications. Remove from geoid and add to RSL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/sealevelrise_core.cpp

    r24977 r24982  
    7373        /*variables:*/
    7474        Vector<IssmDouble> *RSLg    = NULL;
     75        Vector<IssmDouble> *BPg    = NULL;
    7576        Vector<IssmDouble> *RSLg_rate    = NULL;
    7677        Vector<IssmDouble> *RSLg_eustatic  = NULL;
     
    9596        int  horiz;
    9697        int  geodetic=0;
    97         IssmDouble          dt;
    98         IssmDouble          oceanarea;
     98        IssmDouble dt;
     99        IssmDouble oceanarea;
     100        int        bp_compute_fingerprints=0;
    99101
    100102        /*Should we even be here?:*/
     
    169171                /*recover N_esa  = U_esa + RSLg:*/
    170172                N_esa=U_esa->Duplicate(); U_esa->Copy(N_esa); N_esa->AXPY(RSLg,1);
     173
     174                /*if we had bottom pressure loading, remove dynamic sea level from geoid: */
     175                femmodel->parameters->FindParam(&bp_compute_fingerprints,DslComputeFingerprintsEnum);
     176                if(bp_compute_fingerprints){
     177                        GetVectorFromInputsx(&BPg,femmodel,DslSeaWaterPressureChangeAtSeaFloor,VertexSIdEnum);
     178                        N_esa->AXPY(BPg,-1);
     179                }
    171180
    172181                /*transform these values into rates (as we only run this once each frequency turn:*/
     
    218227        delete N_esa;
    219228        delete N_esa_rate;
     229        delete BPg;
    220230
    221231        if(horiz){
     
    343353        Vector<IssmDouble> *RSLg    = NULL;
    344354        Vector<IssmDouble> *RSLg_old    = NULL;
     355        Vector<IssmDouble> *BPg    = NULL;
    345356
    346357        Vector<IssmDouble> *RSLgo    = NULL; //ocean convolution of the perturbation to gravity potential.
     
    360371        IssmDouble           eustatic;
    361372        IssmDouble                      Ixz, Iyz, Izz;
     373        int bp_compute_fingerprints= 0;
    362374       
    363375        if(VerboseSolution()) _printf0_("         converging on ocean components\n");
     
    425437                /*convergence criterion:*/
    426438                slrconvergence(&converged,RSLg,RSLg_old,eps_rel,eps_abs);
     439               
     440                /*if we had bottom pressure loading, add dynamic sea level
     441                 * to RSL:*/
     442                femmodel->parameters->FindParam(&bp_compute_fingerprints,DslComputeFingerprintsEnum);
     443                if(bp_compute_fingerprints){
     444                        GetVectorFromInputsx(&BPg,femmodel,DslSeaWaterPressureChangeAtSeaFloor,VertexSIdEnum);
     445                        RSLg->AXPY(BPg,1);
     446                }
    427447
    428448                /*free ressources: */
     
    448468
    449469        delete RSLg_old;
     470        delete BPg;
    450471
    451472        return RSLg;
Note: See TracChangeset for help on using the changeset viewer.