Changeset 27537
- Timestamp:
- 01/23/23 14:25:41 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyGlaDSAnalysis.cpp
r27535 r27537 113 113 int hydrology_model; 114 114 iomodel->FindConstant(&hydrology_model,"md.hydrology.model"); 115 115 int meltflag; 116 iomodel->FindConstant(&meltflag,"md.hydrology.melt_flag"); 117 116 118 /*Now, do we really want GlaDS?*/ 117 119 if(hydrology_model!=HydrologyGlaDSEnum) return; … … 133 135 iomodel->FetchDataToInput(inputs,elements,"md.basalforcings.geothermalflux",BasalforcingsGeothermalfluxEnum); 134 136 iomodel->FetchDataToInput(inputs,elements,"md.basalforcings.groundedice_melting_rate",BasalforcingsGroundediceMeltingRateEnum); 135 iomodel->FetchDataToInput(inputs,elements,"md.smb.runoff",SmbRunoffEnum); 137 if(meltflag==2){ 138 iomodel->FetchDataToInput(inputs,elements,"md.smb.runoff",SmbRunoffEnum); 139 } 136 140 if(iomodel->domaintype!=Domain2DhorizontalEnum){ 137 141 iomodel->FetchDataToInput(inputs,elements,"md.mesh.vertexonbase",MeshVertexonbaseEnum); … … 344 348 Input* G_input = element->GetInput(BasalforcingsGeothermalfluxEnum);_assert_(G_input); 345 349 Input* melt_input = element->GetInput(BasalforcingsGroundediceMeltingRateEnum);_assert_(melt_input); 346 Input* RO_input = element->GetInput(SmbRunoffEnum);_assert_(RO_input);350 Input* RO_input = NULL; 347 351 Input* B_input = element->GetInput(MaterialsRheologyBEnum); _assert_(B_input); 348 352 Input* n_input = element->GetInput(MaterialsRheologyNEnum); _assert_(n_input); … … 370 374 H_input->GetInputValue(&H,gauss); 371 375 melt_input->GetInputValue(&melt,gauss); 372 RO_input->GetInputValue(&RO,gauss);373 376 374 377 /*Hard code B*/ … … 388 391 389 392 /*Compute melt (if necessary)*/ 390 if(meltflag = 0){393 if(meltflag == 0){ 391 394 m = (G + frictionheat)/(rho_ice*L); 392 395 } 393 if(meltflag= 1){396 else if(meltflag == 1){ 394 397 m = melt; 395 398 } 396 399 else{ 397 m = RO; 400 Input* RO_input = element->GetInput(SmbRunoffEnum);_assert_(RO_input); 401 RO_input->GetInputValue(&melt,gauss); 402 m = melt + RO; 398 403 } 399 404
Note:
See TracChangeset
for help on using the changeset viewer.