Ignore:
Timestamp:
10/31/14 10:58:45 (10 years ago)
Author:
lemorzad
Message:

NEW: modified lapse rate to PDD scheme

File:
1 edited

Legend:

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

    r18699 r18717  
    19161916   IssmDouble agd[NUMVERTICES];             // surface mass balance
    19171917   IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12];
    1918    IssmDouble h[NUMVERTICES],s[NUMVERTICES]; // ,b
    1919    IssmDouble rho_water,rho_ice,desfac,s0p;
     1918   IssmDouble TemperaturesPresentday[NUMVERTICES][12],TemperaturesLgm[NUMVERTICES][12];
     1919   IssmDouble h[NUMVERTICES],s[NUMVERTICES];
     1920   IssmDouble rho_water,rho_ice,desfac,s0p,s0t,rlaps,rlapslgm;
     1921   IssmDouble PfacTime,TdiffTime,sealevTime;
    19201922
    19211923   /*Recover monthly temperatures and precipitation*/
    19221924   Input*     input=inputs->GetInput(SurfaceforcingsMonthlytemperaturesEnum); _assert_(input);
    19231925   Input*     input2=inputs->GetInput(SurfaceforcingsPrecipitationEnum); _assert_(input2);
     1926   Input*     input3=inputs->GetInput(SurfaceforcingsTemperaturesPresentdayEnum);  _assert_(input3);
     1927   Input*     input4=inputs->GetInput(SurfaceforcingsTemperaturesLgmEnum);   _assert_(input4);
    19241928   GaussPenta* gauss=new GaussPenta();
    19251929   IssmDouble time,yts;
     
    19331937       input2->GetInputValue(&monthlyprec[iv][month],gauss,time+month/12.*yts);
    19341938       monthlyprec[iv][month]=monthlyprec[iv][month]*yts; // convertion to m/yr
     1939       input3->GetInputValue(&TemperaturesPresentday[iv][month],gauss,month/12.*yts);
     1940       TemperaturesPresentday[iv][month]=TemperaturesPresentday[iv][month]-273.15; // conversion from Kelvin to celcius
     1941       input4->GetInputValue(&TemperaturesLgm[iv][month],gauss,month/12.*yts);
     1942       TemperaturesLgm[iv][month]=TemperaturesLgm[iv][month]-273.15; // conversion from Kelvin to celcius
    19351943     }
    19361944   }
     1945
     1946  /*Recover Pfac, Tdiff and sealev at time t:*/
     1947  this->parameters->FindParam(&PfacTime,SurfaceforcingsPfacEnum,time);
     1948  this->parameters->FindParam(&TdiffTime,SurfaceforcingsTdiffEnum,time);
     1949  this->parameters->FindParam(&sealevTime,SurfaceforcingsSealevEnum,time);
    19371950
    19381951  /*Recover info at the vertices: */
     
    19441957  rho_water=matpar->GetRhoFreshwater();
    19451958
    1946   /*Get desertification effect parameters*/
     1959  /*Get other pdd parameters*/
    19471960  desfac=matpar->GetDesFac();
    19481961  s0p=matpar->GetS0p();
     1962  s0t=matpar->GetS0t();
     1963  rlaps=matpar->GetRlaps();
     1964  rlapslgm=matpar->GetRlapslgm();
    19491965
    19501966   /*measure the surface mass balance*/
    19511967   for (int iv = 0; iv < NUMVERTICES; iv++){
    1952      agd[iv]=PddSurfaceMassBlance(&monthlytemperatures[iv][0], &monthlyprec[iv][0], pdds, pds,
    1953                                   signorm, yts, h[iv], s[iv], rho_ice, rho_water, desfac, s0p);
     1968     agd[iv]=PddSurfaceMassBlance(&monthlytemperatures[iv][0], &monthlyprec[iv][0], 
     1969                                  &TemperaturesLgm[iv][0], &TemperaturesPresentday[iv][0],
     1970                                  pdds,pds, signorm, yts, h[iv], s[iv], rho_ice, rho_water,
     1971                                  desfac, s0t, s0p,rlaps,rlapslgm,PfacTime,TdiffTime,sealevTime);
    19541972   }
    19551973
Note: See TracChangeset for help on using the changeset viewer.