Skip to content

Commit

Permalink
Merge pull request #1236 from knutfrode/dev
Browse files Browse the repository at this point in the history
Silencing warning of no wind for parameterized Stokes drift, and addi…
  • Loading branch information
knutfrode authored Feb 26, 2024
2 parents 6689864 + deec5ed commit c27e2f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions opendrift/models/basemodel/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,14 +851,13 @@ def get_environment(self, variables, time, lon, lat, z, profiles):
env_profiles['sea_water_temperature'][:,t_kelvin] = \
env_profiles['sea_water_temperature'][:,t_kelvin] - 273.15

#######################################################
############################################################
# Parameterisation of unavailable variables
#######################################################
# TODO: use instead "environment mapping" mechanism for this
#############################################################
if 'drift:use_tabularised_stokes_drift' in self._config and self.get_config(
'drift:use_tabularised_stokes_drift') is True:
if 'x_wind' not in variables:
logger.debug('No wind available to calculate Stokes drift')
else:
if 'x_wind' in variables:
if 'sea_surface_wave_stokes_drift_x_velocity' not in variables or (
env['sea_surface_wave_stokes_drift_x_velocity'].max()
== 0 and
Expand Down

0 comments on commit c27e2f6

Please sign in to comment.