Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log items appear to be using different timezones #1416

Open
nordam opened this issue Oct 1, 2024 · 7 comments
Open

Log items appear to be using different timezones #1416

nordam opened this issue Oct 1, 2024 · 7 comments

Comments

@nordam
Copy link

nordam commented Oct 1, 2024

Here is an extract from a log:

17:09:30 INFO    opendrift.models.basemodel.environment:248: 	turbulent_kinetic_energy: 0.000000
17:09:30 INFO    opendrift.models.basemodel.environment:248: 	turbulent_generic_length_scale: 0.000000
17:09:30 INFO    opendrift.models.basemodel.environment:248: 	upward_sea_water_velocity: 0.000000
15:09:32 INFO    opendrift.models.basemodel:936: Using existing reader for land_binary_mask
15:09:32 INFO    opendrift.models.basemodel:947: All points are in ocean

Local time as I was running this was 17:09, so it appears to switch to UTC or something?

@knutfrode
Copy link
Collaborator

Yes, this is very strange.

I have not seen this before, and am not able to reproduce.
But if you can provide a reproducible example, I can try to fix this.
I assume we want local system time in the logs, and not necessarily UTC.

@gauteh
Copy link
Member

gauteh commented Oct 2, 2024

@knutfrode
Copy link
Collaborator

Yes but I cannot see why it should suddenly change in the middle of a simulation?
It should be the same logger, although within the OpenDrift codemass the logger is sometimes inconsistently retrieved as either
logger = logging.getLogger(__name__) or
logger = logging.getLogger('opendrift')

@gauteh
Copy link
Member

gauteh commented Oct 2, 2024

True. It could be that the netcdf-library or some C library is changing the locale, libnetcdf does a lot of weird things.

@knutfrode
Copy link
Collaborator

Yes, I agree to blame this one on others :-)

@gauteh
Copy link
Member

gauteh commented Oct 2, 2024

Great!

@knutfrode
Copy link
Collaborator

GitHub need a resolve button for issues with "Close as blamed on others".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants