Changeset 22959


Ignore:
Timestamp:
07/16/18 16:50:23 (7 years ago)
Author:
Eric.Larour
Message:

CHG: handle base update when there is no grounding line migration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp

    r22955 r22959  
    708708        IssmDouble rho_ice,rho_water,minthickness;
    709709        Element*   basalelement=NULL;
     710        int        isgroundingline=0;
    710711
    711712        element->FindParam(&domaintype,DomainTypeEnum);
     
    751752        basalelement->GetInputListOnNodes(&phi[0],MaskGroundediceLevelsetEnum);
    752753        basalelement->GetInputListOnNodes(&sealevel[0],SealevelEnum);
    753         basalelement->GetInputListOnNodes(&bed[0],BedEnum);
    754754        basalelement->GetInputListOnNodes(&cumdeltathickness[0],SealevelriseCumDeltathicknessEnum);
     755
     756        element->FindParam(&isgroundingline,TransientIsgroundinglineEnum);
     757        if(isgroundingline) basalelement->GetInputListOnNodes(&bed[0],BedEnum);
    755758
    756759        /*What is the delta thickness forcing the sea-level rise core: cumulated over time, hence the +=:*/
     
    768771                if (phi[i]>0.){ //this is an ice sheet: just add thickness to base.
    769772                        /*Update! actually, the bed has moved too!:*/
    770                         newsurface[i] = bed[i]+newthickness[i]; //surface = bed + newthickness
    771                         newbase[i]     = bed[i];                 //new base at new bed
     773                        if(isgroundingline){
     774                                newsurface[i] = bed[i]+newthickness[i]; //surface = bed + newthickness
     775                                newbase[i]     = bed[i];                 //new base at new bed
     776                        }
     777                        else{
     778                                 newsurface[i] = oldbase[i]+newthickness[i]; //surface = oldbase + newthickness
     779                                 newbase[i]     = oldbase[i];                 //same base: do nothing
     780                        }
    772781                }
    773782                else{ //this is an ice shelf: hydrostatic equilibrium*/
Note: See TracChangeset for help on using the changeset viewer.