Open kthyng opened 4 months ago
Yes, this is a bit messy. As a temporary solution, I disabled that log message: https://github.com/OpenDrift/opendrift/pull/1236
and added a comment that that hardcoded calculation of stokesdrift from wind should instead be made using the newer feature of environment_mapping
https://github.com/OpenDrift/opendrift/blob/master/opendrift/readers/basereader/variables.py#L492
We can keep this issue open until this migration has been implemented.
Ok thank you.
Hi again. This is a small issue but I think I have investigated it multiple times unnecessarily so it would be nice to avoid in the future.
My understanding is that the code here: https://github.com/OpenDrift/opendrift/blob/668986480358eb55b211f80f1c27f2e4c17785f8/opendrift/models/basemodel/environment.py#L859-L860
checks the current set of variables for the presence of
x_wind
and if it isn't present, the log message is written. But, the first two times this code is called, the variables were:and then
which caused the message to be written, but subsequently when the code was called that line wasn't written because
x_wind
was present invariables
. Could the logic of that section be improved to know that while the wind isn't present invariables
at the moment, it also shouldn't be? I am not sure what to suggest, not being very familiar with this section of code yet.