Changeset 18717 for issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
- Timestamp:
- 10/31/14 10:58:45 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r18699 r18717 1916 1916 IssmDouble agd[NUMVERTICES]; // surface mass balance 1917 1917 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; 1920 1922 1921 1923 /*Recover monthly temperatures and precipitation*/ 1922 1924 Input* input=inputs->GetInput(SurfaceforcingsMonthlytemperaturesEnum); _assert_(input); 1923 1925 Input* input2=inputs->GetInput(SurfaceforcingsPrecipitationEnum); _assert_(input2); 1926 Input* input3=inputs->GetInput(SurfaceforcingsTemperaturesPresentdayEnum); _assert_(input3); 1927 Input* input4=inputs->GetInput(SurfaceforcingsTemperaturesLgmEnum); _assert_(input4); 1924 1928 GaussPenta* gauss=new GaussPenta(); 1925 1929 IssmDouble time,yts; … … 1933 1937 input2->GetInputValue(&monthlyprec[iv][month],gauss,time+month/12.*yts); 1934 1938 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 1935 1943 } 1936 1944 } 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); 1937 1950 1938 1951 /*Recover info at the vertices: */ … … 1944 1957 rho_water=matpar->GetRhoFreshwater(); 1945 1958 1946 /*Get desertification effectparameters*/1959 /*Get other pdd parameters*/ 1947 1960 desfac=matpar->GetDesFac(); 1948 1961 s0p=matpar->GetS0p(); 1962 s0t=matpar->GetS0t(); 1963 rlaps=matpar->GetRlaps(); 1964 rlapslgm=matpar->GetRlapslgm(); 1949 1965 1950 1966 /*measure the surface mass balance*/ 1951 1967 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); 1954 1972 } 1955 1973
Note:
See TracChangeset
for help on using the changeset viewer.