Changeset 21550
- Timestamp:
- 02/10/17 11:50:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r21529 r21550 1993 1993 desfac, s0t[iv], s0p[iv],rlaps,rlapslgm,TdiffTime,sealevTime, 1994 1994 rho_water,rho_ice); 1995 /*Get yearlytemperatures */1995 /*Get yearlytemperatures */ 1996 1996 for(int month=0;month<12;month++) { 1997 1997 yearlytemperatures[iv]=yearlytemperatures[iv]+(monthlytemperatures[iv*12+month]+273.15)*mavg; // Has to be in Kelvin 1998 1998 } 1999 1999 } … … 2016 2016 switch(this->ObjectEnum()){ 2017 2017 case TriaEnum: 2018 2019 2018 // this->inputs->AddInput(new TriaInput(TemperatureEnum,&yearlytemperatures[0],P1Enum)); 2019 this->inputs->AddInput(new TriaInput(TemperaturePDDEnum,&yearlytemperatures[0],P1Enum)); 2020 2020 this->inputs->AddInput(new TriaInput(SmbMassBalanceEnum,&agd[0],P1Enum)); 2021 2021 this->inputs->AddInput(new TriaInput(SmbAccumulationEnum,&accu[0],P1Enum)); … … 2023 2023 break; 2024 2024 case PentaEnum: 2025 if(IsOnSurface()){ 2026 GetInputListOnVertices(&s[0],TemperatureEnum); 2027 yearlytemperatures[0] = s[0]; 2028 yearlytemperatures[1] = s[1]; 2029 yearlytemperatures[2] = s[2]; 2030 this->inputs->AddInput(new PentaInput(TemperatureEnum,&yearlytemperatures[0],P1Enum)); 2031 } 2032 this->inputs->AddInput(new PentaInput(SmbMassBalanceEnum,&agd[0],P1Enum)); 2033 this->inputs->AddInput(new PentaInput(TemperaturePDDEnum,&yearlytemperatures[0],P1Enum)); 2034 this->InputExtrude(TemperaturePDDEnum,-1); 2035 this->InputExtrude(SmbMassBalanceEnum,-1); 2036 break; 2025 if(IsOnSurface()){ 2026 /*Here, we want to change the BC of the thermal model, keep 2027 * the temperatures as they are for the base of the penta and 2028 * yse yearlytemperatures for the top*/ 2029 GetInputListOnVertices(&s[0],TemperatureEnum); 2030 yearlytemperatures[0] = s[0]; 2031 yearlytemperatures[1] = s[1]; 2032 yearlytemperatures[2] = s[2]; 2033 this->inputs->AddInput(new PentaInput(TemperatureEnum,&yearlytemperatures[0],P1Enum)); 2034 2035 /*Convert that to enthalpy for the enthalpy model*/ 2036 IssmDouble enthalpy[6]; 2037 GetInputListOnVertices(&enthalpy[0],EnthalpyEnum); 2038 ThermalToEnthalpy(&enthalpy[3],yearlytemperatures[3],0.,0.); 2039 ThermalToEnthalpy(&enthalpy[4],yearlytemperatures[3],0.,0.); 2040 ThermalToEnthalpy(&enthalpy[5],yearlytemperatures[3],0.,0.); 2041 this->inputs->AddInput(new PentaInput(EnthalpyEnum,&enthalpy[0],P1Enum)); 2042 } 2043 this->inputs->AddInput(new PentaInput(SmbMassBalanceEnum,&agd[0],P1Enum)); 2044 this->inputs->AddInput(new PentaInput(TemperaturePDDEnum,&yearlytemperatures[0],P1Enum)); 2045 this->InputExtrude(TemperaturePDDEnum,-1); 2046 this->InputExtrude(SmbMassBalanceEnum,-1); 2047 break; 2037 2048 case TetraEnum: 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2049 if(IsOnSurface()){ 2050 GetInputListOnVertices(&s[0],TemperatureEnum); 2051 yearlytemperatures[0] = s[0]; 2052 yearlytemperatures[1] = s[1]; 2053 yearlytemperatures[2] = s[2]; 2054 this->inputs->AddInput(new TetraInput(TemperatureEnum,&yearlytemperatures[0],P1Enum)); 2055 } 2056 this->inputs->AddInput(new TetraInput(SmbMassBalanceEnum,&agd[0],P1Enum)); 2057 this->inputs->AddInput(new TetraInput(TemperaturePDDEnum,&yearlytemperatures[0],P1Enum)); 2058 this->InputExtrude(TemperaturePDDEnum,-1); 2059 this->InputExtrude(SmbMassBalanceEnum,-1); 2060 break; 2050 2061 default: _error_("Not implemented yet"); 2051 2062 }
Note:
See TracChangeset
for help on using the changeset viewer.