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

Always fail to find "sea_water_velocity" when using "add_readers_from_list" #1516

Open
dayeno opened this issue Feb 17, 2025 · 4 comments
Open

Comments

@dayeno
Copy link

dayeno commented Feb 17, 2025

Hi all,

I downloaded the TOPAZ4 data (https://doi.org/10.48670/moi-00007) to local and try to read it with "add_readers_from_list", but the error "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']" always occurs. The complete code and DEBUG info are as follows.

Looking forward to your advice.

Best wishes,
Daye

Code:

#!/usr/bin/env python
"""
Icebergs (openberg)
====================
"""
import matplotlib.pyplot as plt
import numpy as np
import cf_xarray
import xarray as xr
import os
from opendrift.models.openberg import OpenBerg
from opendrift.readers.reader_netCDF_CF_generic import Reader
from datetime import datetime,timedelta

o = OpenBerg(loglevel = 0)
o.add_readers_from_list(['/yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc', '/yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc', '/yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc'], lazy = False)#Ocean and Ice
iceBerg_L = 100.0
iceBerg_W = 40.0
iceBerg_H = 100.0
iceBerg_sail = 10.0
iceBerg_draft = 9.0*iceBerg_sail
o.seed_elements(lon = -7.29897833333333, lat = 77.517365, time=datetime(2013, 9, 1, 2, 12), number = 1, radius = 1, sail = iceBerg_sail, draft = iceBerg_draft, length = iceBerg_L, width = iceBerg_W, wind_drag_coeff = 1.5, water_drag_coeff = 1.5)
o.run(duration = timedelta(hours=10.0), time_step=timedelta(hours=1.0))

DEBUG info:

20:27:57 DEBUG   opendrift.config:168: Adding 18 config items from __init__
20:27:57 DEBUG   opendrift.config:178:   Overwriting config item readers:max_number_of_fails
20:27:57 DEBUG   opendrift.config:168: Adding 14 config items from __init__
20:27:58 INFO    opendrift.models.basemodel:506: OpenDriftSimulation initialised (version 1.13.0 / v1.13.0-5-g74025f1)
20:27:58 DEBUG   opendrift.config:168: Adding 15 config items from oceandrift
20:27:58 DEBUG   opendrift.config:178:   Overwriting config item seed:z
20:27:58 DEBUG   opendrift.config:168: Adding 11 config items from openberg
20:27:58 DEBUG   opendrift.config:178:   Overwriting config item drift:stokes_drift
20:27:58 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
20:27:58 INFO    opendrift.readers:58: Opening file with xr.open_dataset
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:128: Finding coordinate variables.
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:143: Parsing CF grid mapping dictionary: {'grid_mapping_name': 'polar_stereographic', 'latitude_of_projection_origin': 90.0, 'longitude_of_projection_origin': -45.0, 'scale_factor_at_projection_origin': 1.0, 'straight_vertical_longitude_from_pole': -45.0, 'earth_radius': 6378273.0, 'proj4': '+proj=stere +lon_0=-45 +lat_0=90 +k=1 +R=6378273 +no_defs', 'false_easting': 0.0, 'false_northing': 0.0}
20:27:58 INFO    opendrift.readers.reader_netCDF_CF_generic:338: Detected dimensions: {'time': 'time', 'z': 'depth', 'x': 'x', 'y': 'y'}
20:27:58 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 4 for reader /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 5 m/s and time span of 1:00:00
20:27:58 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['sea_ice_x_velocity', 'sea_ice_y_velocity'] -> sea_ice_speed
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['x_sea_water_velocity', 'y_sea_water_velocity'] -> sea_water_speed
20:27:58 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
20:27:58 INFO    opendrift.readers:58: Opening file with xr.open_dataset
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:128: Finding coordinate variables.
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:143: Parsing CF grid mapping dictionary: {'grid_mapping_name': 'polar_stereographic', 'latitude_of_projection_origin': 90.0, 'longitude_of_projection_origin': -45.0, 'scale_factor_at_projection_origin': 1.0, 'straight_vertical_longitude_from_pole': -45.0, 'earth_radius': 6378273.0, 'proj4': '+proj=stere +lon_0=-45 +lat_0=90 +k=1 +R=6378273 +no_defs', 'false_easting': 0.0, 'false_northing': 0.0}
20:27:58 INFO    opendrift.readers.reader_netCDF_CF_generic:338: Detected dimensions: {'time': 'time', 'z': 'depth', 'x': 'x', 'y': 'y'}
20:27:58 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 4 for reader /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 5 m/s and time span of 1:00:00
20:27:58 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['sea_ice_x_velocity', 'sea_ice_y_velocity'] -> sea_ice_speed
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['x_sea_water_velocity', 'y_sea_water_velocity'] -> sea_water_speed
20:27:58 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
20:27:58 INFO    opendrift.readers:58: Opening file with xr.open_dataset
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:128: Finding coordinate variables.
20:27:58 DEBUG   opendrift.readers.reader_netCDF_CF_generic:143: Parsing CF grid mapping dictionary: {'grid_mapping_name': 'polar_stereographic', 'latitude_of_projection_origin': 90.0, 'longitude_of_projection_origin': -45.0, 'scale_factor_at_projection_origin': 1.0, 'straight_vertical_longitude_from_pole': -45.0, 'earth_radius': 6378273.0, 'proj4': '+proj=stere +lon_0=-45 +lat_0=90 +k=1 +R=6378273 +no_defs', 'false_easting': 0.0, 'false_northing': 0.0}
20:27:58 INFO    opendrift.readers.reader_netCDF_CF_generic:338: Detected dimensions: {'time': 'time', 'z': 'depth', 'x': 'x', 'y': 'y'}
20:27:58 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 4 for reader /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 5 m/s and time span of 1:00:00
20:27:58 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['sea_ice_x_velocity', 'sea_ice_y_velocity'] -> sea_ice_speed
20:27:58 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['x_sea_water_velocity', 'y_sea_water_velocity'] -> sea_water_speed
20:27:58 DEBUG   opendrift.models.basemodel.environment:316: Added reader /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 DEBUG   opendrift.models.basemodel.environment:316: Added reader /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 DEBUG   opendrift.models.basemodel.environment:316: Added reader /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
20:27:58 INFO    opendrift.models.basemodel.environment:206: Adding a dynamical landmask with max. priority based on assumed maximum speed of 2.0 m/s. Adding a customised landmask may be faster...
20:27:58 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
20:28:00 DEBUG   opendrift.models.basemodel.environment:316: Added reader global_landmask
20:28:00 INFO    opendrift.models.basemodel.environment:233: Fallback values will be used for the following variables which have no readers: 
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_x_slope: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_y_slope: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	x_wind: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	y_wind: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_wave_significant_height: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_wave_from_direction: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_wave_stokes_drift_x_velocity: 0.000000
20:28:00 INFO    opendrift.models.basemodel.environment:236: 	sea_surface_wave_stokes_drift_y_velocity: 0.000000
20:28:00 DEBUG   opendrift.models.basemodel:97: Changed mode from Mode.Config to Mode.Ready
20:28:00 DEBUG   opendrift.models.basemodel:97: Changed mode from Mode.Ready to Mode.Run
19:28:00 DEBUG   numcodecs:73: Registering codec 'zlib'
19:28:00 DEBUG   numcodecs:73: Registering codec 'gzip'
19:28:00 DEBUG   numcodecs:73: Registering codec 'bz2'
19:28:00 DEBUG   numcodecs:73: Registering codec 'lzma'
19:28:00 DEBUG   numcodecs:73: Registering codec 'blosc'
19:28:00 DEBUG   numcodecs:73: Registering codec 'zstd'
19:28:00 DEBUG   numcodecs:73: Registering codec 'lz4'
19:28:00 DEBUG   numcodecs:73: Registering codec 'astype'
19:28:00 DEBUG   numcodecs:73: Registering codec 'delta'
19:28:00 DEBUG   numcodecs:73: Registering codec 'quantize'
19:28:00 DEBUG   numcodecs:73: Registering codec 'fixedscaleoffset'
19:28:00 DEBUG   numcodecs:73: Registering codec 'packbits'
19:28:00 DEBUG   numcodecs:73: Registering codec 'categorize'
19:28:00 DEBUG   numcodecs:73: Registering codec 'pickle'
19:28:00 DEBUG   numcodecs:73: Registering codec 'base64'
19:28:00 DEBUG   numcodecs:73: Registering codec 'shuffle'
19:28:00 DEBUG   numcodecs:73: Registering codec 'bitround'
19:28:00 DEBUG   numcodecs:73: Registering codec 'crc32'
19:28:00 DEBUG   numcodecs:73: Registering codec 'adler32'
19:28:00 DEBUG   numcodecs:73: Registering codec 'jenkins_lookup3'
19:28:00 DEBUG   numcodecs:73: Registering codec 'json2'
19:28:00 DEBUG   numcodecs:73: Registering codec 'vlen-utf8'
19:28:00 DEBUG   numcodecs:73: Registering codec 'vlen-bytes'
19:28:00 DEBUG   numcodecs:73: Registering codec 'vlen-array'
19:28:00 DEBUG   numcodecs:73: Registering codec 'fletcher32'
19:28:00 DEBUG   numcodecs:73: Registering codec 'msgpack2'
19:28:00 DEBUG   numcodecs:73: Registering codec 'n5_wrapper'
19:28:00 DEBUG   opendrift.models.basemodel:1760: 
------------------------------------------------------
Software and hardware:
  OpenDrift version 1.13.0
  Platform: Linux, 5.15.0-131-generic
  15.341224670410156 GB memory
  12 processors (x86_64)
  NumPy version 1.26.4
  SciPy version 1.15.1
  Matplotlib version 3.9.1
  NetCDF4 version 1.6.1
  Xarray version 2025.1.2
  ADIOS (adios_db) version 1.2.5
  Copernicusmarine version 2.0.1
  Python version 3.11.6 | packaged by conda-forge | (main, Oct  3 2023, 10:40:35) [GCC 12.3.0]
------------------------------------------------------

19:28:00 DEBUG   opendrift.models.basemodel:1774: No output file is specified, neglecting export_buffer_length
19:28:00 DEBUG   opendrift.models.basemodel:1892: Finalizing environment and preparing readers for simulation coverage ([-10.299913976319912, 76.86872348269901, -4.297896768919346, 78.1660207799963]) and time (2013-09-01 02:12:00 to 2013-09-01 12:12:00)
19:28:00 DEBUG   opendrift.models.basemodel.environment:168: 	Preparing /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc for extent [-10.299913976319912, 76.86872348269901, -4.297896768919346, 78.1660207799963]
19:28:00 DEBUG   opendrift.readers.basereader.structured:153: Clearing cache for reader /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc before starting new simulation
19:28:00 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 3 for reader /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 2 m/s and time span of 1:00:00
19:28:00 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:168: 	Preparing /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc for extent [-10.299913976319912, 76.86872348269901, -4.297896768919346, 78.1660207799963]
19:28:00 DEBUG   opendrift.readers.basereader.structured:153: Clearing cache for reader /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc before starting new simulation
19:28:00 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 3 for reader /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 2 m/s and time span of 1:00:00
19:28:00 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:168: 	Preparing /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc for extent [-10.299913976319912, 76.86872348269901, -4.297896768919346, 78.1660207799963]
19:28:00 DEBUG   opendrift.readers.basereader.structured:153: Clearing cache for reader /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc before starting new simulation
19:28:00 WARNING opendrift.readers.basereader.variables:601: Assuming time step of 1 hour for /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 3 for reader /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc, assuming a maximum average speed of 2 m/s and time span of 1:00:00
19:28:00 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:168: 	Preparing global_landmask for extent [-10.299913976319912, 76.86872348269901, -4.297896768919346, 78.1660207799963]
19:28:00 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for global_landmask
19:28:00 DEBUG   opendrift.models.basemodel:1979: Initial self.result, size Frozen({'trajectory': 1, 'time': 11})
19:28:00 INFO    opendrift.models.basemodel:916: Using existing reader for land_binary_mask
19:28:00 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['land_binary_mask']
19:28:00 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:601: Calling reader global_landmask
19:28:00 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
19:28:00 DEBUG   opendrift.readers.basereader.variables:752: Fetching variables from global_landmask covering 1 elements
19:28:00 DEBUG   opendrift.readers.basereader.continuous:37: Fetched env-before
19:28:00 DEBUG   opendrift.readers.basereader.variables:633: Checking land_binary_mask for invalid values
19:28:00 DEBUG   opendrift.readers.basereader.variables:788: Reader projection is latlon - rotation of vectors is not needed.
19:28:00 DEBUG   opendrift.models.basemodel.environment:752: Obtained data for all elements.
19:28:00 DEBUG   opendrift.models.basemodel.environment:765: ---------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:766: Finished processing all variable groups
19:28:00 DEBUG   opendrift.models.basemodel.environment:891: ------------ SUMMARY -------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     land_binary_mask: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:895: ---------------------------------
19:28:00 INFO    opendrift.models.basemodel:927: All points are in ocean
19:28:00 DEBUG   opendrift.models.basemodel:871: to be seeded: 1, already seeded 0
19:28:00 DEBUG   opendrift.models.basemodel:889: Released 1 new elements.
19:28:00 WARNING opendrift.models.basemodel:710: Seafloor check not being run because environment is missing. This will happen the first time the function is run but if it happens subsequently there is probably a problem.
19:28:00 DEBUG   opendrift.models.basemodel:2052: ======================================================================
19:28:00 INFO    opendrift.models.basemodel:2053: 2013-09-01 02:12:00 - step 1 of 10 - 1 active elements (0 deactivated)
19:28:00 DEBUG   opendrift.models.basemodel:2059: 0 elements scheduled.
19:28:00 DEBUG   opendrift.models.basemodel:2061: ======================================================================
19:28:00 DEBUG   opendrift.models.basemodel:2070: 		latitude =  77.51737
19:28:00 DEBUG   opendrift.models.basemodel:2075: 		longitude = -7.2989054
19:28:00 DEBUG   opendrift.models.basemodel:2080: 		z = 0.0
19:28:00 DEBUG   opendrift.models.basemodel:2083: ---------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:486: Discarding reader (ends before simuation is finished): /yby/B78_TEST/20130901_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:486: Discarding reader (ends before simuation is finished): /yby/B78_TEST/20130831_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['sea_floor_depth_below_sea_level', 'sea_ice_area_fraction', 'sea_ice_thickness', 'sea_water_salinity', 'sea_water_temperature', 'x_sea_water_velocity', 'sea_ice_x_velocity', 'y_sea_water_velocity', 'sea_ice_y_velocity']
19:28:00 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:601: Calling reader /yby/B78_TEST/20130902_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc
19:28:00 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:607: 	Outside time coverage of reader.
19:28:00 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['land_binary_mask']
19:28:00 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:601: Calling reader global_landmask
19:28:00 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
19:28:00 DEBUG   opendrift.readers.basereader.variables:752: Fetching variables from global_landmask covering 1 elements
19:28:00 DEBUG   opendrift.readers.basereader.continuous:37: Fetched env-before
19:28:00 DEBUG   opendrift.readers.basereader.variables:633: Checking land_binary_mask for invalid values
19:28:00 DEBUG   opendrift.readers.basereader.variables:788: Reader projection is latlon - rotation of vectors is not needed.
19:28:00 DEBUG   opendrift.models.basemodel.environment:752: Obtained data for all elements.
19:28:00 DEBUG   opendrift.models.basemodel.environment:765: ---------------------------------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:766: Finished processing all variable groups
19:28:00 DEBUG   opendrift.models.basemodel.environment:786: Creating empty dictionary for profiles not profided by any reader: ['x_sea_water_velocity', 'y_sea_water_velocity', 'sea_water_temperature', 'sea_water_salinity']
19:28:00 DEBUG   opendrift.models.basemodel.environment:791:       Using fallback value 2 for sea_water_temperature for all profiles
19:28:00 DEBUG   opendrift.models.basemodel.environment:791:       Using fallback value 35 for sea_water_salinity for all profiles
19:28:00 DEBUG   opendrift.models.basemodel.environment:891: ------------ SUMMARY -------------
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     x_sea_water_velocity: nan (min) nan (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     y_sea_water_velocity: nan (min) nan (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_floor_depth_below_sea_level: 10000 (min) 10000 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_x_slope: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_y_slope: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     x_wind: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     y_wind: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_significant_height: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_from_direction: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_stokes_drift_x_velocity: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_stokes_drift_y_velocity: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_water_temperature: 2 (min) 2 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_water_salinity: 35 (min) 35 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_area_fraction: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_thickness: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_x_velocity: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_y_velocity: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:893:     land_binary_mask: 0 (min) 0 (max)
19:28:00 DEBUG   opendrift.models.basemodel.environment:895: ---------------------------------
19:28:00 DEBUG   opendrift.models.physics_methods:995: Calculating Hs from wind, min: 0.000000, mean: 0.000000, max: 0.000000
19:28:00 WARNING opendrift.models.basemodel:2354: Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']
19:28:00 DEBUG   opendrift.models.basemodel:640: No elements hit coastline.
19:28:00 WARNING opendrift.models.basemodel:716: Seafloor check not being run because sea_surface_height is missing. 
19:28:00 DEBUG   opendrift.models.basemodel:1665: Added status missing_data
19:28:00 DEBUG   opendrift.models.basemodel:1676: 1 elements scheduled for deactivation (missing_data)
19:28:00 DEBUG   opendrift.models.basemodel:1678: 	(z: 0.000000 to 0.000000)
19:28:00 DEBUG   opendrift.models.basemodel:1696: Removed 1 elements.
19:28:00 DEBUG   opendrift.models.basemodel:1699: Removed 1 values from environment.
19:28:00 DEBUG   opendrift.models.basemodel:1704: remove items from profile for z
19:28:00 DEBUG   opendrift.models.basemodel:1704: remove items from profile for sea_water_temperature
19:28:00 DEBUG   opendrift.models.basemodel:1704: remove items from profile for sea_water_salinity
19:28:00 DEBUG   opendrift.models.basemodel:1708: Removed 1 values from environment_profiles.
19:28:00 WARNING opendrift.models.basemodel:2151: The simulation stopped before requested end time was reached.
19:28:00 INFO    opendrift.models.basemodel:2153: ========================
19:28:00 INFO    opendrift.models.basemodel:2154: End of simulation:
19:28:00 INFO    opendrift.models.basemodel:2155: No more active or scheduled elements, quitting.
19:28:00 INFO    opendrift.models.basemodel:2156: Traceback (most recent call last):
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2118, in run
    raise ValueError(
ValueError: No more active or scheduled elements, quitting.

19:28:00 INFO    opendrift.models.basemodel:2157: "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']", 'The simulation stopped before requested end time was reached.'

19:28:00 INFO    opendrift.models.basemodel:2160: ========================
Traceback (most recent call last):
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2118, in run
    raise ValueError(
ValueError: No more active or scheduled elements, quitting.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/yby/Code/Samcot/IB#78/Topaz4/TEST.py", line 44, in <module>
    o.run(duration = timedelta(hours=10.0), time_step=timedelta(hours=1.0))
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 113, in inner
    r = func(self, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2164, in run
    raise ValueError('Simulation stopped within '
ValueError: Simulation stopped within first timestep. "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']", 'The simulation stopped before requested end time was reached.'
@knutfrode
Copy link
Collaborator

Hi,
As you can see from the log, your simulation time is outside the time coverage of the reader (i.e. of the files you downloaded)

19:28:00 DEBUG   opendrift.models.basemodel.environment:607: 	Outside time coverage of reader.

@dayeno
Copy link
Author

dayeno commented Feb 18, 2025

Hi, As you can see from the log, your simulation time is outside the time coverage of the reader (i.e. of the files you downloaded)

19:28:00 DEBUG   opendrift.models.basemodel.environment:607: 	Outside time coverage of reader.

Hi again,

My simulation start time is 2013_9_1, and I downloaded the data at 2013_09_01. To prevent the time difference issue, I even downloaded and read the data for 2013_08_31 and 2013_09_02. I believe the forcing data should cover my simulation duration. However, I still encountered the error "outside the time coverage" .

Thanks for your reply.

Best,
Daye

@knutfrode
Copy link
Collaborator

You are adding the files as individual files/readers, and if these are daily files, they will only be valid exactly at their given time, e.g. only at midnight or noon of that particular day.
To get continuous time coverage, you must create an aggregate, either with Xarray open_mfdataset and provide this to the generic CF reader, og by using wildcard in filename:
/yby/B78_TEST/*_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc

@dayeno
Copy link
Author

dayeno commented Feb 19, 2025

You are adding the files as individual files/readers, and if these are daily files, they will only be valid exactly at their given time, e.g. only at midnight or noon of that particular day. To get continuous time coverage, you must create an aggregate, either with Xarray open_mfdataset and provide this to the generic CF reader, og by using wildcard in filename: /yby/B78_TEST/*_dm-12km-NERSC-MODEL-TOPAZ4B-ARC-RAN.fv2.0.nc

Hi,
Thanks for your reply. It works well when I input the TOPAZ4 data. But when I try to input Barents-2.5 data(https://thredds.met.no/thredds/catalog/romshindcast/barents2500_2010/hourly/catalog.html). The same error occurs. Part of the code and DEBUG info are listed as following. The error showed that All 1 particles (-16.38--16.38E, 73.78-73.78N) are outside domain of /yby/B4_Ice_TOPAZ5/iceh_01h-2012-11-05.nc (-17.96-79.56E, 62.13-87.57N). I believe the data time and position domain should cover this point.
Do you have any suggestions on that?
Best,
Daye

CODE (if you need more, plz let me know):


o.add_readers_from_list('/yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc')#Ocean
o.add_readers_from_list('/yby/B4_Ice_TOPAZ5/iceh_01h*.nc')#Ice
o.add_readers_from_list('/yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc')#Wave

DEBUG Info: (if you need more, plz let me know):

14:58:36 DEBUG   opendrift.models.basemodel:2052: ======================================================================
14:58:36 INFO    opendrift.models.basemodel:2053: 2012-11-05 16:56:24 - step 1 of 12 - 1 active elements (0 deactivated)
14:58:36 DEBUG   opendrift.models.basemodel:2059: 0 elements scheduled.
14:58:36 DEBUG   opendrift.models.basemodel:2061: ======================================================================
14:58:36 DEBUG   opendrift.models.basemodel:2070: 		latitude =  73.77528
14:58:36 DEBUG   opendrift.models.basemodel:2075: 		longitude = -16.378687
14:58:36 DEBUG   opendrift.models.basemodel:2080: 		z = 0.0
14:58:36 DEBUG   opendrift.models.basemodel:2083: ---------------------------------
14:58:36 DEBUG   opendrift.models.basemodel.environment:569: Variables not covered by any reader: ['sea_ice_thickness', 'sea_floor_depth_below_sea_level', 'sea_surface_wave_stokes_drift_x_velocity', 'sea_ice_area_fraction', 'sea_surface_wave_from_direction', 'sea_water_salinity', 'sea_surface_y_slope', 'sea_surface_wave_stokes_drift_y_velocity', 'y_sea_water_velocity', 'sea_surface_x_slope', 'sea_surface_wave_significant_height', 'sea_water_temperature', 'x_sea_water_velocity']
14:58:36 DEBUG   opendrift.readers.reader_lazy:57: Initialising: LazyReader: /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc
14:58:36 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
14:58:36 INFO    opendrift.readers:54: Opening files with xarray.open_mfdataset
14:58:36 DEBUG   opendrift.readers.reader_netCDF_CF_generic:128: Finding coordinate variables.
14:58:36 DEBUG   opendrift.readers.reader_netCDF_CF_generic:143: Parsing CF grid mapping dictionary: {'grid_mapping_name': 'lambert_conformal_conic', 'standard_parallel': array([77.5, 77.5]), 'longitude_of_central_meridian': -25.0, 'latitude_of_projection_origin': 77.5, 'earth_radius': 6371000.0}
14:58:36 INFO    opendrift.readers.reader_netCDF_CF_generic:338: Detected dimensions: {'time': 'time', 'x': 'X', 'y': 'Y'}
14:58:36 DEBUG   opendrift.readers.reader_netCDF_CF_generic:374: Skipped variables without standard_name: ['angle']
14:58:36 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 10 for reader /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc, assuming a maximum average speed of 5 m/s and time span of 1:00:00
14:58:36 INFO    opendrift.readers.basereader:176: Variable x_sea_water_velocity will be rotated from eastward_sea_water_velocity
14:58:36 INFO    opendrift.readers.basereader:176: Variable y_sea_water_velocity will be rotated from northward_sea_water_velocity
14:58:36 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
14:58:36 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['x_sea_water_velocity', 'y_sea_water_velocity'] -> sea_water_speed
14:58:36 DEBUG   opendrift.readers.basereader.structured:153: Clearing cache for reader /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc before starting new simulation
14:58:36 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 5 for reader /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc, assuming a maximum average speed of 2 m/s and time span of 1:00:00
14:58:36 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc
14:58:36 DEBUG   opendrift.readers.reader_lazy:72: Reader initialised: /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc
14:58:36 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 5 for reader /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc, assuming a maximum average speed of 2 m/s and time span of 1:00:00
14:58:36 DEBUG   opendrift.readers.reader_lazy:57: Initialising: LazyReader: /yby/B4_Ice_TOPAZ5/iceh_01h*.nc
14:58:36 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
14:58:36 INFO    opendrift.readers:54: Opening files with xarray.open_mfdataset
14:58:37 DEBUG   opendrift.readers.reader_netCDF_CF_generic:128: Finding coordinate variables.
14:58:37 DEBUG   opendrift.readers.reader_netCDF_CF_generic:143: Parsing CF grid mapping dictionary: {'grid_mapping_name': 'lambert_conformal_conic', 'standard_parallel': array([77.5, 77.5]), 'longitude_of_central_meridian': -25.0, 'latitude_of_projection_origin': 77.5, 'earth_radius': 6371000.0}
14:58:37 INFO    opendrift.readers.reader_netCDF_CF_generic:338: Detected dimensions: {'x': 'X', 'y': 'Y', 'time': 'time'}
14:58:37 DEBUG   opendrift.readers.reader_netCDF_CF_generic:374: Skipped variables without standard_name: ['time_bounds']
14:58:37 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 10 for reader /yby/B4_Ice_TOPAZ5/iceh_01h*.nc, assuming a maximum average speed of 5 m/s and time span of 0:59:56.484375
14:58:37 INFO    opendrift.readers.basereader:176: Variable sea_ice_x_velocity will be rotated from eastward_sea_ice_velocity
14:58:37 INFO    opendrift.readers.basereader:176: Variable sea_ice_y_velocity will be rotated from northward_sea_ice_velocity
14:58:37 DEBUG   opendrift.readers.basereader:186: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated
14:58:37 DEBUG   opendrift.readers.basereader.variables:563: Adding variable mapping: ['sea_ice_x_velocity', 'sea_ice_y_velocity'] -> sea_ice_speed
14:58:37 DEBUG   opendrift.readers.basereader.structured:153: Clearing cache for reader /yby/B4_Ice_TOPAZ5/iceh_01h*.nc before starting new simulation
14:58:37 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 5 for reader /yby/B4_Ice_TOPAZ5/iceh_01h*.nc, assuming a maximum average speed of 2 m/s and time span of 0:59:56.484375
14:58:37 DEBUG   opendrift.readers.basereader.variables:549: Nothing more to prepare for /yby/B4_Ice_TOPAZ5/iceh_01h*.nc
14:58:37 DEBUG   opendrift.readers.reader_lazy:72: Reader initialised: /yby/B4_Ice_TOPAZ5/iceh_01h*.nc
14:58:37 DEBUG   opendrift.readers.basereader.variables:608: Setting buffer size 5 for reader /yby/B4_Ice_TOPAZ5/iceh_01h*.nc, assuming a maximum average speed of 2 m/s and time span of 0:59:56.484375
14:58:37 DEBUG   opendrift.readers.reader_lazy:57: Initialising: LazyReader: /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc
14:58:37 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
14:58:37 INFO    opendrift.readers:54: Opening files with xarray.open_mfdataset
14:58:38 DEBUG   opendrift.readers:140: Could not open /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc with <module 'opendrift.readers.reader_netCDF_CF_generic' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_generic.py'>
14:58:38 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_ROMS_native' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_ROMS_native.py'>
14:58:38 INFO    opendrift.readers:54: Opening files with xarray.open_mfdataset
14:58:39 DEBUG   opendrift.readers:140: Could not open /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc with <module 'opendrift.readers.reader_ROMS_native' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_ROMS_native.py'>
14:58:39 DEBUG   opendrift.readers:136: Testing reader <module 'opendrift.readers.reader_netCDF_CF_unstructured' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_unstructured.py'>
14:58:39 INFO    opendrift.readers.reader_netCDF_CF_unstructured:98: Opening dataset: /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc
14:58:39 INFO    opendrift.readers.reader_netCDF_CF_unstructured:100: Opening files with MFDataset
14:58:39 DEBUG   opendrift.readers:140: Could not open /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc with <module 'opendrift.readers.reader_netCDF_CF_unstructured' from '/home/daye/Code/OpenDrift/opendrift/opendrift/readers/reader_netCDF_CF_unstructured.py'>
14:58:39 DEBUG   opendrift.models.basemodel.environment:401: Reader could not be initialised
14:58:39 WARNING opendrift.models.basemodel.environment:402: Reader could not be initialised, and is discarded: LazyReader: /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc
14:58:39 DEBUG   opendrift.models.basemodel.environment:486: Discarding reader (could not be initialized): LazyReader: /yby/B4_Wave_WAM/*_MyWam3km_hindcast-cmems.nc
14:58:39 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['x_wind', 'y_wind']
14:58:39 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:601: Calling reader CARRA wind
14:58:39 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
14:58:39 DEBUG   opendrift.readers.basereader.structured:470: Calculating lonlat2xy sequentially
14:58:39 DEBUG   opendrift.readers.basereader.variables:752: Fetching variables from CARRA wind covering 1 elements
14:58:39 DEBUG   opendrift.readers.basereader.structured:222: Reader time:
		2012-11-05 15:00:00 (before)
		2012-11-05 18:00:00 (after)
14:58:39 DEBUG   opendrift.readers.reader_netCDF_CF_generic:471: Swapping order of x-y dimensions for x_wind
14:58:39 DEBUG   opendrift.readers.reader_netCDF_CF_generic:471: Swapping order of x-y dimensions for y_wind
14:58:39 DEBUG   opendrift.readers.basereader.variables:633: Checking x_wind for invalid values
14:58:39 DEBUG   opendrift.readers.basereader.variables:633: Checking y_wind for invalid values
14:58:39 DEBUG   opendrift.readers.basereader.structured:292: Fetched env-block (size 23x22x1) for time before (2012-11-05 15:00:00)
14:58:39 DEBUG   opendrift.readers.reader_netCDF_CF_generic:471: Swapping order of x-y dimensions for x_wind
14:58:39 DEBUG   opendrift.readers.reader_netCDF_CF_generic:471: Swapping order of x-y dimensions for y_wind
14:58:39 DEBUG   opendrift.readers.basereader.variables:633: Checking x_wind for invalid values
14:58:39 DEBUG   opendrift.readers.basereader.variables:633: Checking y_wind for invalid values
14:58:39 DEBUG   opendrift.readers.basereader.structured:315: Fetched env-block (size 23x22x1) for time after (2012-11-05 18:00:00)
14:58:39 DEBUG   opendrift.readers.basereader.structured:336: Interpolating before (2012-11-05 15:00:00) in space  (linearNDFast)
14:58:39 DEBUG   opendrift.readers.interpolation.structured:97: Initialising interpolator.
14:58:39 DEBUG   opendrift.readers.basereader.structured:342: Interpolating after (2012-11-05 18:00:00) in space  (linearNDFast)
14:58:39 DEBUG   opendrift.readers.interpolation.structured:97: Initialising interpolator.
14:58:39 DEBUG   opendrift.readers.basereader.structured:357: Interpolating before (2012-11-05 15:00:00, weight 0.35) and
		      after (2012-11-05 18:00:00, weight 0.65) in time
14:58:39 DEBUG   opendrift.readers.basereader.variables:96: Rotating vectors between 0.0 and 0.0 degrees.
14:58:39 DEBUG   opendrift.models.basemodel.environment:752: Obtained data for all elements.
14:58:39 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['land_binary_mask']
14:58:39 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:601: Calling reader global_landmask
14:58:39 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
14:58:39 DEBUG   opendrift.readers.basereader.variables:752: Fetching variables from global_landmask covering 1 elements
14:58:39 DEBUG   opendrift.readers.basereader.continuous:37: Fetched env-before
14:58:39 DEBUG   opendrift.readers.basereader.variables:633: Checking land_binary_mask for invalid values
14:58:39 DEBUG   opendrift.readers.basereader.variables:788: Reader projection is latlon - rotation of vectors is not needed.
14:58:39 DEBUG   opendrift.models.basemodel.environment:752: Obtained data for all elements.
14:58:39 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['sea_floor_depth_below_sea_level', 'sea_water_salinity', 'sea_water_temperature', 'x_sea_water_velocity', 'y_sea_water_velocity']
14:58:39 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:601: Calling reader /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc
14:58:39 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
14:58:39 INFO    opendrift.models.basemodel.environment:636: All 1 particles (-16.38--16.38E, 73.78-73.78N) are outside domain of /yby/B4_Ocean_TOPAZ5/ocean_hourly_m00_*.nc (-17.96-79.56E, 62.13-87.57N)
14:58:39 DEBUG   opendrift.models.basemodel.environment:595: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:596: Variable group ['sea_ice_area_fraction', 'sea_ice_thickness', 'sea_ice_x_velocity', 'sea_ice_y_velocity']
14:58:39 DEBUG   opendrift.models.basemodel.environment:597: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:601: Calling reader /yby/B4_Ice_TOPAZ5/iceh_01h*.nc
14:58:39 DEBUG   opendrift.models.basemodel.environment:602: ----------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:618: Data needed for 1 elements
14:58:39 INFO    opendrift.models.basemodel.environment:636: All 1 particles (-16.38--16.38E, 73.78-73.78N) are outside domain of /yby/B4_Ice_TOPAZ5/iceh_01h*.nc (-17.96-79.56E, 62.13-87.57N)
14:58:39 DEBUG   opendrift.models.basemodel.environment:765: ---------------------------------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:766: Finished processing all variable groups
14:58:39 DEBUG   opendrift.models.basemodel.environment:786: Creating empty dictionary for profiles not profided by any reader: ['x_sea_water_velocity', 'y_sea_water_velocity', 'sea_water_temperature', 'sea_water_salinity']
14:58:39 DEBUG   opendrift.models.basemodel.environment:791:       Using fallback value 2 for sea_water_temperature for all profiles
14:58:39 DEBUG   opendrift.models.basemodel.environment:791:       Using fallback value 35 for sea_water_salinity for all profiles
14:58:39 DEBUG   opendrift.models.basemodel.environment:891: ------------ SUMMARY -------------
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     x_sea_water_velocity: nan (min) nan (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     y_sea_water_velocity: nan (min) nan (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_floor_depth_below_sea_level: 10000 (min) 10000 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_x_slope: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_y_slope: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     x_wind: 3.90645 (min) 3.90645 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     y_wind: -9.38053 (min) -9.38053 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_significant_height: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_from_direction: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_stokes_drift_x_velocity: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_surface_wave_stokes_drift_y_velocity: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_water_temperature: 2 (min) 2 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_water_salinity: 35 (min) 35 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_area_fraction: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_thickness: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_x_velocity: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     sea_ice_y_velocity: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:893:     land_binary_mask: 0 (min) 0 (max)
14:58:39 DEBUG   opendrift.models.basemodel.environment:895: ---------------------------------
14:58:39 DEBUG   opendrift.models.physics_methods:995: Calculating Hs from wind, min: 2.540062, mean: 2.540062, max: 2.540062
14:58:39 WARNING opendrift.models.basemodel:2354: Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']
14:58:39 DEBUG   opendrift.models.basemodel:640: No elements hit coastline.
14:58:39 WARNING opendrift.models.basemodel:716: Seafloor check not being run because sea_surface_height is missing. 
14:58:39 DEBUG   opendrift.models.basemodel:1665: Added status missing_data
14:58:39 DEBUG   opendrift.models.basemodel:1676: 1 elements scheduled for deactivation (missing_data)
14:58:39 DEBUG   opendrift.models.basemodel:1678: 	(z: 0.000000 to 0.000000)
14:58:39 DEBUG   opendrift.models.basemodel:1696: Removed 1 elements.
14:58:39 DEBUG   opendrift.models.basemodel:1699: Removed 1 values from environment.
14:58:39 DEBUG   opendrift.models.basemodel:1704: remove items from profile for z
14:58:39 DEBUG   opendrift.models.basemodel:1704: remove items from profile for sea_water_temperature
14:58:39 DEBUG   opendrift.models.basemodel:1704: remove items from profile for sea_water_salinity
14:58:39 DEBUG   opendrift.models.basemodel:1708: Removed 1 values from environment_profiles.
14:58:39 WARNING opendrift.models.basemodel:2151: The simulation stopped before requested end time was reached.
14:58:39 INFO    opendrift.models.basemodel:2153: ========================
14:58:39 INFO    opendrift.models.basemodel:2154: End of simulation:
14:58:39 INFO    opendrift.models.basemodel:2155: No more active or scheduled elements, quitting.
14:58:39 INFO    opendrift.models.basemodel:2156: Traceback (most recent call last):
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2118, in run
    raise ValueError(
ValueError: No more active or scheduled elements, quitting.

14:58:39 INFO    opendrift.models.basemodel:2157: "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']", 'The simulation stopped before requested end time was reached.'

14:58:39 INFO    opendrift.models.basemodel:2160: ========================
Traceback (most recent call last):
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2118, in run
    raise ValueError(
ValueError: No more active or scheduled elements, quitting.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/yby/Code/Samcot/IB#4/Split_24hour/TOPAZ5/Continue/TOPAZ5.py", line 72, in <module>
    o.run(duration = timedelta(days=1), time_step=timedelta(hours=2.0))
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 113, in inner
    r = func(self, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daye/Code/OpenDrift/opendrift/opendrift/models/basemodel/__init__.py", line 2164, in run
    raise ValueError('Simulation stopped within '
ValueError: Simulation stopped within first timestep. "Missing variables: ['x_sea_water_velocity', 'y_sea_water_velocity']", 'The simulation stopped before requested end time was reached.'

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

2 participants