Changeset 27289


Ignore:
Timestamp:
09/24/22 10:01:51 (3 years ago)
Author:
sehrenfe
Message:

partially floating and part no ice elements have zero sheet thickness and zero N

File:
1 edited

Legend:

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

    r27282 r27289  
    518518        IssmDouble  A,B,n,phi,phi_0;
    519519        IssmDouble  alpha,beta;
     520        IssmDouble  oceanLS,iceLS;
    520521
    521522        /*Fetch number vertices for this element*/
     
    548549        Input* n_input  = element->GetInput(MaterialsRheologyNEnum);         _assert_(n_input);
    549550        Input* phi_input = element->GetInput(HydraulicPotentialEnum);         _assert_(phi_input);
     551        Input* oceanLS_input = element->GetInput(MaskOceanLevelsetEnum); _assert_(oceanLS_input);
     552        Input* iceLS_input = element->GetInput(MaskIceLevelsetEnum); _assert_(iceLS_input);
     553
    550554
    551555        /* Start  looping on the number of gaussian points: */
     
    564568                b_input->GetInputValue(&b,gauss);
    565569                H_input->GetInputValue(&H,gauss);
     570                oceanLS_input->GetInputValue(&oceanLS,gauss);
     571                iceLS_input->GetInputValue(&iceLS,gauss);
     572
     573                /*Set sheet thickness to zero if floating or no ice*/
     574                if(oceanLS<0. || iceLS>0.){
     575                        h_new[iv] = 0.;
     576                }
     577                else{
    566578
    567579                /*Get values for a few potentials*/
     
    591603                if(h_new[iv]<AEPS) h_new[iv] = AEPS;
    592604        }
    593        
     605        }
     606
    594607        /*Force floating ice to have zero sheet thickness*/
    595         if(element->IsAllFloating() || !element->IsIceInElement()){
     608        /*if(!element->IsAllGrounded() || !element->IsIceInElement()){
    596609                for(int iv=0;iv<numvertices;iv++) h_new[iv] = 0.;
    597         }
     610        }*/
    598611
    599612        element->AddInput(HydrologySheetThicknessEnum,h_new,P1Enum);
     
    616629        IssmDouble phi_0, phi_m, p_i;
    617630        IssmDouble H,b,phi;
     631        IssmDouble oceanLS,iceLS;
    618632
    619633        int numnodes = element->GetNumberOfNodes();
     
    627641        Input* b_input   = element->GetInput(BedEnum); _assert_(b_input);
    628642        Input* phi_input = element->GetInput(HydraulicPotentialEnum); _assert_(phi_input);
     643        Input* oceanLS_input = element->GetInput(MaskOceanLevelsetEnum); _assert_(oceanLS_input);
     644        Input* iceLS_input = element->GetInput(MaskIceLevelsetEnum); _assert_(iceLS_input);
    629645
    630646        /*Set to 0 if inactive element*/
     
    645661                b_input->GetInputValue(&b,gauss);
    646662                phi_input->GetInputValue(&phi,gauss);
     663                oceanLS_input->GetInputValue(&oceanLS,gauss);
     664                iceLS_input->GetInputValue(&iceLS,gauss);
    647665
    648666                /*Elevation potential*/
     
    657675                /*Calculate effective pressure*/
    658676                N[iv] = phi_0 - phi;
     677
     678                /*Make sure that all floating ice and ice free areas have zero effective pressure*/
     679                if(oceanLS<0.0) N[iv] = 0.0;
     680                if(iceLS>0.0) N[iv] = 0.0;
    659681
    660682                if(xIsNan<IssmDouble>(N[iv])) _error_("NaN found in solution vector");
Note: See TracChangeset for help on using the changeset viewer.