Changeset 27829 for issm/trunk-jpl/src/c/classes/Elements/Element.cpp
- Timestamp:
- 07/16/23 18:22:25 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r27789 r27829 4318 4318 _printf0_("smb core: dt : " << dt <<"\n"); 4319 4319 } 4320 /* loop over vertices and days */ //FIXME account for leap years (365 -> 366)4320 /* loop over vertices and days */ 4321 4321 Gauss* gauss=this->NewGauss(); 4322 4322 /* Retrieve inputs: */ … … 4347 4347 enum_qmr =SmbSemicQmrInitEnum; 4348 4348 } 4349 if(isverbose && this->Sid()==0)_printf0_("smb core: assign temp.\n");4349 //if(isverbose && this->Sid()==0)_printf0_("smb core: assign temp.\n"); 4350 4350 Input* tsurf_input = this->GetInput(enum_temp); _assert_(tsurf_in); 4351 if(isverbose && this->Sid()==0)_printf0_("smb core: assign mask.\n");4351 //if(isverbose && this->Sid()==0)_printf0_("smb core: assign mask.\n"); 4352 4352 Input* mask_input = this->GetInput(SmbMaskEnum); _assert_(mask_input); 4353 if(isverbose && this->Sid()==0)_printf0_("smb core: assign Tamp.\n");4353 //if(isverbose && this->Sid()==0)_printf0_("smb core: assign Tamp.\n"); 4354 4354 Input* Tamp_input = this->GetInput(SmbTampEnum); _assert_(Tamp_input); 4355 if(isverbose && this->Sid()==0)_printf0_("smb core: assign albedo.\n");4355 //if(isverbose && this->Sid()==0)_printf0_("smb core: assign albedo.\n"); 4356 4356 Input* albedo_input = this->GetInput(enum_albedo); _assert_(albedo_input); 4357 4357 Input* albedo_snow_input = this->GetInput(enum_albedo_snow); _assert_(albedo_snow_input); 4358 4358 Input* hice_input = this->GetInput(enum_hice); _assert_(hice_input); 4359 4359 Input* hsnow_input = this->GetInput(enum_hsnow); _assert_(hsnow_input); 4360 if(isverbose && this->Sid()==0)_printf0_("smb core: assign qmr.\n");4361 4360 Input* qmr_input = this->GetInput(enum_qmr); _assert_(qmr_input); 4362 4361 … … 4438 4437 */ 4439 4438 smb_out[iv] = smb_out[iv]*yts; // w.e. m/sec -> m/yr 4440 smbi_out[iv] = smbi_out[iv]*rho_water/rho_ice; 4439 smbi_out[iv] = smbi_out[iv]*rho_water/rho_ice; // w.e. m/sec -> ice m/yr 4441 4440 smbs_out[iv] = smbs_out[iv]*yts; // w.e. m/sec -> m/yr 4442 4441 saccu_out[iv] = saccu_out[iv]*yts; // w.e. m/sec -> m/yr 4443 } 4444 /* 4445 * unit conversion is not required for smelt and refr_out. 4446 */ 4442 smelt_out[iv] = smelt_out[iv]*rho_water/rho_ice; // w.e. m/sec -> ice m/yr 4443 refr_out[iv] = refr_out[iv]*rho_water/rho_ice; // w.e. m/sec -> ice m/yr 4444 } 4447 4445 4448 4446 if(isverbose && this->Sid()==0){ … … 5406 5404 } 5407 5405 /*}}}*/ 5406 IssmDouble Element::TotalSmbMelt(IssmDouble* mask, bool scaled){/*{{{*/ 5407 5408 /*Retrieve values of the mask defining the element: */ 5409 for(int i=0;i<this->GetNumberOfVertices();i++){ 5410 if(mask[this->vertices[i]->Sid()]<=0.){ 5411 return 0.; 5412 } 5413 } 5414 5415 /*Return: */ 5416 return this->TotalSmbMelt(scaled); 5417 } 5418 /*}}}*/ 5419 IssmDouble Element::TotalSmbRefreeze(IssmDouble* mask, bool scaled){/*{{{*/ 5420 5421 /*Retrieve values of the mask defining the element: */ 5422 for(int i=0;i<this->GetNumberOfVertices();i++){ 5423 if(mask[this->vertices[i]->Sid()]<=0.){ 5424 return 0.; 5425 } 5426 } 5427 5428 /*Return: */ 5429 return this->TotalSmbRefreeze(scaled); 5430 } 5431 /*}}}*/ 5408 5432 void Element::TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum){/*{{{*/ 5409 5433
Note:
See TracChangeset
for help on using the changeset viewer.