Conversation
…atasets in assignVariables
…xtsim into wave-stress-quick-interp
Conflicts: model/finiteelement.cpp
…en the coupling time step
einola
left a comment
There was a problem hiding this comment.
Two comments and one strange commit where a multiplication is replaced with a division. Please double-check that last one.
| int const cpl_time_last = (cpl_time/cpl_dt)*cpl_dt; | ||
| M_dataset->itime_range[0] = cpl_time_last; | ||
| M_dataset->itime_range[1] = cpl_time_last + cpl_dt; | ||
| //TODO ftime_range not used? |
There was a problem hiding this comment.
| //TODO ftime_range not used? |
ftime_range is used quite a lot: in ExternalData::check_and_reload, ExternalData::value_type, and ExternalData::loadDataset.
There was a problem hiding this comment.
doesn't seem to be used by coupling code
There was a problem hiding this comment.
will add a clarification to comment and remove the barrier call
There was a problem hiding this comment.
Ah, yes. When the dataset is the coupling dataset we use itime_range, because the for the coupling code we need integers - it's all in integer time steps. But when the dataset is any other dataset we use ftime_range, because the code for reading in datasets uses floats - it's all in days, if I recall.
What we should do is to use integers for everything - time steps for the coupler and seconds for the datasets - but I think we'll leave that for now!
| if ( ( it->varID > 0 ) && ( it->cpl_id > 0 ) ) // Skip non-outputing variables | ||
| int ierror = OASIS3::put_2d(it->cpl_id, pcpt*time_step, &it->data_grid[0], M_cpl_out.M_ncols, M_cpl_out.M_nrows); | ||
| } | ||
| M_comm.barrier(); |
fix definition of `ftime_range` (doesn't seem to be used in coupling code though) Co-authored-by: Einar Örn Ólason <einar.olason@nersc.no>
…xtsim into wave-stress-quick-interp
|
hi @einola, your comments addressed and develop merged into this branch - hopefully OK now |
| M_dataset->interpolated = false; | ||
| M_dataset->itime_range[0] = cpl_time; | ||
| M_dataset->itime_range[1] = cpl_time + cpl_dt; | ||
| int const cpl_time_last = (cpl_time/cpl_dt)*cpl_dt; |
There was a problem hiding this comment.
I'm sorry, I don't understand why you do this. Both cpl_time and cpl_dt are already integers and cpl_time should always be an integer multiple of cpl_dt. Which means cpl_time_last == cpl_time. Right?
Can you change it back?
There was a problem hiding this comment.
that was the main bug - it didn't work when we didn't couple every time step - if a regrid happened in between coupling time steps then it messed up OASIS
Speed up wave coupling (variable exchange down from 20% of total time to 10%)
InterpolationType::FromMeshToMeshQuickforwave_cpl_nodesdatasetInterpolationType::ConservativeRemappingforwave_cpl_elementsdatasetAlso did some cleaning in
datasets.cppand removed unuseduse_timeroption fromcheckReload[Main]DatasetsCloses #570, PR #577 should be done first