Changeset 25826
- Timestamp:
- 12/04/20 13:24:46 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/main/esmfbinders.cpp
r25814 r25826 65 65 int forcing_type=GCMForcingTerms[f]; 66 66 67 for (Object* & object : femmodel->elements->objects){68 Element* element=dynamic_cast<Element*>( object);67 for (int i=0;i<femmodel->elements->Size();i++){ 68 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 69 69 70 70 switch(forcing_type){ … … 79 79 80 80 /*Recover smb forcing from the gcm forcings: */ 81 _error_("not implemented yet, line below may not work"); 82 IssmDouble smbforcing=gcmforcings[f*numberofelements+element->Sid()]; 81 IssmDouble smbforcing=*(gcmforcings+f*numberofelements+i); 83 82 84 83 /*Convert to SI. The smbforcing from GEOS-5 in kg/s, and we transform it into m/s: */ … … 104 103 int output_type=ISSMOutputTerms[f]; 105 104 106 for (Object* & object : femmodel->elements->objects){107 Element* element=dynamic_cast<Element*>( object);105 for (int i=0;i<femmodel->elements->Size();i++){ 106 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 108 107 109 108 switch(output_type){ … … 117 116 Input* surface_input = element->GetInput(SurfaceEnum); _assert_(surface_input); 118 117 surface_input->GetInputAverage(&surface); 119 issmoutputs[f*numberofelements+element->Sid()] = surface; 118 119 *(issmoutputs+f*numberofelements+i) = surface; 120 120 121 121 } … … 140 140 141 141 /*For the next time around, save the final time as start time */ 142 femmodel->parameters->SetParam(final_time,Time Enum);142 femmodel->parameters->SetParam(final_time,TimesteppingStartTimeEnum); 143 143 } /*}}}*/ 144 144 void FinalizeISSM(){ /*{{{*/
Note:
See TracChangeset
for help on using the changeset viewer.