Ignore:
Timestamp:
04/24/13 09:47:46 (12 years ago)
Author:
lemorzad
Message:

CHG: improved PDD adding a couple input parameter for the desertification effect

File:
1 edited

Legend:

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

    r14663 r14735  
    24972497   IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12];
    24982498   IssmDouble h[NUMVERTICES],s[NUMVERTICES]; // ,b
    2499    IssmDouble rho_water,rho_ice;
     2499   IssmDouble rho_water,rho_ice,desfac,s0p;
    25002500
    25012501   /*Recover monthly temperatures and precipitation*/
     
    25242524  rho_water=matpar->GetRhoFreshwater();
    25252525
     2526  /*Get desertification effect parameters*/
     2527  desfac=matpar->GetDesFac();
     2528  s0p=matpar->GetS0p();
     2529
    25262530   /*measure the surface mass balance*/
    25272531   for (int iv = 0; iv < NUMVERTICES; iv++){
    2528      agd[iv]=PddSurfaceMassBlance(&monthlytemperatures[iv][0], &monthlyprec[iv][0], pdds, pds, signorm, yts, h[iv], s[iv], rho_ice, rho_water);
     2532     agd[iv]=PddSurfaceMassBlance(&monthlytemperatures[iv][0], &monthlyprec[iv][0], pdds, pds,
     2533                                  signorm, yts, h[iv], s[iv], rho_ice, rho_water, desfac, s0p);
     2534     //printf("mass balance %f \n",agd[iv]);
    25292535   }
    25302536
     
    26562662/*FUNCTION Penta::RequestedOutput{{{*/
    26572663void Penta::RequestedOutput(int output_enum,int step,IssmDouble time){
    2658 
    26592664        if(IsInput(output_enum)){
    26602665                /*just transfer this input to results, and we are done: */
     
    34733478        /*Now get the average SMB over the element*/
    34743479        Input* smb_input = inputs->GetInput(SurfaceforcingsMassBalanceEnum); _assert_(smb_input);
     3480
    34753481        smb_input->GetInputAverage(&smb);
    34763482        Total_Smb=rho_ice*base*smb;// smb on element in kg s-1
Note: See TracChangeset for help on using the changeset viewer.