opendrift icon indicating copy to clipboard operation
opendrift copied to clipboard

All particles outside domain

Open frong0824 opened this issue 2 years ago • 2 comments

00:46:12 INFO opendrift.models.basemodel: OpenDriftSimulation initialised (version 1.7.1) 00:46:12 DEBUG opendrift.models.basemodel: Adding 13 config items from oceandrift 00:46:12 DEBUG opendrift.models.basemodel: Overwriting config item seed:z 00:46:12 INFO opendrift.readers.reader_netCDF_CF_generic: Opening dataset: /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc 00:46:12 DEBUG opendrift.readers.reader_netCDF_CF_generic: Finding coordinate variables. 00:46:12 DEBUG opendrift.readers.basereader.variables: Setting buffer size 49 for reader /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc, assuming a maximum average speed of 5 m/s. 00:46:12 DEBUG opendrift.readers.basereader: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated 00:46:12 DEBUG opendrift.readers.basereader.variables: Setting buffer size 12 for reader /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc, assuming a maximum average speed of 1 m/s. 00:46:12 DEBUG opendrift.models.basemodel: Added reader /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc 00:46:12 DEBUG opendrift.models.basemodel:

Software and hardware: OpenDrift version 1.7.1 Platform: Linux, 4.15.0-142-generic 3.8298568725585938 GB memory 4 processors (x86_64) NumPy version 1.21.2 SciPy version 1.7.1 Matplotlib version 3.4.3 NetCDF4 version 1.5.6 Xarray version 0.19.0 OilLibrary version 1.1.3 Python version 3.9.7 | packaged by conda-forge | (default, Sep 14 2021, 01:17:55) [GCC 9.4.0]

00:46:12 DEBUG opendrift.models.basemodel: No output file is specified, neglecting export_buffer_length 00:46:12 INFO opendrift.models.basemodel: Fallback values will be used for the following variables which have no readers: 00:46:12 INFO opendrift.models.basemodel: x_wind: 0.000000 00:46:12 INFO opendrift.models.basemodel: y_wind: 0.000000 00:46:12 INFO opendrift.models.basemodel: upward_sea_water_velocity: 0.000000 00:46:12 INFO opendrift.models.basemodel: ocean_vertical_diffusivity: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_surface_wave_significant_height: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_surface_wave_stokes_drift_x_velocity: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_surface_wave_stokes_drift_y_velocity: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_surface_wave_period_at_variance_spectral_density_maximum: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_surface_wave_mean_period_from_variance_spectral_density_second_frequency_moment: 0.000000 00:46:12 INFO opendrift.models.basemodel: surface_downward_x_stress: 0.000000 00:46:12 INFO opendrift.models.basemodel: surface_downward_y_stress: 0.000000 00:46:12 INFO opendrift.models.basemodel: turbulent_kinetic_energy: 0.000000 00:46:12 INFO opendrift.models.basemodel: turbulent_generic_length_scale: 0.000000 00:46:12 INFO opendrift.models.basemodel: sea_floor_depth_below_sea_level: 10000.000000 00:46:12 DEBUG opendrift.models.basemodel: Preparing readers for simulation coverage ([-179.7925218684745, -26.43529404305123, -138.7061811344552, 30.156443487631307]) and time (2010-12-31 12:00:00 to 2011-01-01 12:00:00) 00:46:12 DEBUG opendrift.models.basemodel: Preparing /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc 00:46:12 DEBUG opendrift.readers.basereader: Nothing to prepare for /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc 00:46:12 INFO opendrift.models.basemodel: Adding a dynamical landmask with max. priority based on assumed maximum speed of 1 m/s. Adding a customised landmask may be faster... 00:46:12 DEBUG opendrift.readers.basereader: Variable mapping: ['sea_floor_depth_below_sea_level'] -> ['land_binary_mask'] is not activated 00:46:12 DEBUG opendrift_landmask_data.mask: memmapping mask.. 00:46:14 DEBUG opendrift.models.basemodel: Added reader global_landmask 00:46:14 INFO opendrift.models.basemodel: Using existing reader for land_binary_mask 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Variable group ['land_binary_mask'] 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Calling reader global_landmask 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Data needed for 2 elements 00:46:14 DEBUG opendrift.readers.basereader.variables: Fetching variables from global_landmask 00:46:14 DEBUG opendrift.readers.basereader.continuous: Fetched env-before 00:46:14 DEBUG opendrift.readers.basereader.variables: Checking land_binary_mask for invalid values 00:46:14 DEBUG opendrift.readers.basereader.variables: Reader projection is latlon - rotation of vectors is not needed. 00:46:14 DEBUG opendrift.models.basemodel: Obtained data for all elements. 00:46:14 DEBUG opendrift.models.basemodel: --------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Finished processing all variable groups 00:46:14 DEBUG opendrift.models.basemodel: ------------ SUMMARY ------------- 00:46:14 DEBUG opendrift.models.basemodel: land_binary_mask: 0 (min) 0 (max) 00:46:14 DEBUG opendrift.models.basemodel: --------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: 0 active elements 00:46:14 INFO opendrift.models.basemodel: All points are in ocean 00:46:14 DEBUG opendrift.models.basemodel: to be seeded: 2, already seeded 0 00:46:14 DEBUG opendrift.models.basemodel: Released 2 new elements. 00:46:14 DEBUG opendrift.models.basemodel: ====================================================================== 00:46:14 INFO opendrift.models.basemodel: 2010-12-31 12:00:00 - step 1 of 1 - 2 active elements (0 deactivated) 00:46:14 DEBUG opendrift.models.basemodel: 0 elements scheduled. 00:46:14 DEBUG opendrift.models.basemodel: ====================================================================== 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Variable group ['y_sea_water_velocity', 'x_sea_water_velocity'] 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Calling reader /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc 00:46:14 DEBUG opendrift.models.basemodel: ---------------------------------------- 00:46:14 DEBUG opendrift.models.basemodel: Data needed for 2 elements 00:46:14 ERROR opendrift.readers.basereader.variables: All particles outside domain! 00:46:14 INFO opendrift.models.basemodel: ======================== 00:46:14 INFO opendrift.models.basemodel: Exception: 00:46:14 INFO opendrift.models.basemodel: All 2 particles (-179.01--139.48E, -25.66-29.38N) are outside domain of /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc (170.00-290.00E, -80.00-90.00N) 00:46:14 DEBUG opendrift.models.basemodel: Traceback (most recent call last): File "/Code/opendrift/opendrift/models/basemodel.py", line 1021, in get_environment reader.get_variables_interpolated( File "/Code/opendrift/opendrift/readers/basereader/variables.py", line 799, in get_variables_interpolated env, env_profiles = self.get_variables_interpolated_xy( File "/Code/opendrift/opendrift/readers/basereader/variables.py", line 635, in get_variables_interpolated_xy raise ValueError(('All %s particles (%.2f-%.2fE, %.2f-%.2fN) ' + ValueError: All 2 particles (-179.01--139.48E, -25.66-29.38N) are outside domain of /Code/opendrift/examples/data/CMEMS/Data/2011-2020/GLOBAL_MULTIYEAR_PHY_001_030_daily_20110101_20110211_region_0_0083.nc (170.00-290.00E, -80.00-90.00N)

frong0824 avatar Apr 21 '22 07:04 frong0824

Thank you for your attention to this issue first!

The longitude of the netCDF file is between 0 and 360. In the DEBUG output, there is: "00:46:14 INFO opendrift.models.basemodel: All 2 particles (-179.01--139.48E, -25.66-29.38N) are outside domain of xxx.nc (170.00-290.00E, -80.00-90.00N)" In fact, "-179.01--139.48E" is just included in "170.00-290.00E".

And I have set the proj4 in reader_netCDF_CF_generic.Reader as '+proj=longlat +ellps=WGS84 +pm=-360 +datum=WGS84 +no_defs'.

The experiment is important to me. Thank you in advance.

frong0824 avatar Apr 21 '22 07:04 frong0824

Hi,

Yes, the dateline-problem is not solved completely in OpenDrift, so issues like this sometimes occur. Does it help if you add or subtract 360 to longitudes when seeding your particles?

Knut-Frode

knutfrode avatar Apr 21 '22 12:04 knutfrode