Hi, I'm trying to run an OceanDrift model using my own land_binary_mask. I've checked to make sure it's all zeros and ones, it's the same x and y dimensions as my sea water velocity and wind variables and it appears to be successfully recognised by the model:
I also have the line "mod.set_config('general:use_auto_landmask', False)" to ensure it uses my landmask. Despite this, when I run reader.plot('land_binary_mask') I see a combination of my landmask (0 and 1) and what looks like NaNs from what I assume are the inbuilt landmask (see image). When I run the model I get the error:
INFO opendrift.models.basemodel:1363: Problems setting mask on missingindices!
ERROR opendrift.models.basemodel:1365: object of type 'numpy.bool' has no len()
Traceback (most recent call last):
File "C:\Users\r.mcintosh\opendrift\opendrift\models\basemodel.py", line 1358, in get_environment
if len(missing_indices) != len(combinedmask):
^^^^^^^^^^^^^^^^^^
TypeError: object of type 'numpy.bool' has no len()
Can anyone help me to understand why I'm getting this apparent combined landmask situation? I've attached the full log as well.
Hi, I'm trying to run an OceanDrift model using my own land_binary_mask. I've checked to make sure it's all zeros and ones, it's the same x and y dimensions as my sea water velocity and wind variables and it appears to be successfully recognised by the model:
=========================== Reader: calib_subset_OD.nc ... Variables: land_binary_mask x_sea_water_velocity y_sea_water_velocity eastward_wind northward_wind x_wind y_wind
I also have the line "mod.set_config('general:use_auto_landmask', False)" to ensure it uses my landmask. Despite this, when I run reader.plot('land_binary_mask') I see a combination of my landmask (0 and 1) and what looks like NaNs from what I assume are the inbuilt landmask (see image). When I run the model I get the error:
INFO opendrift.models.basemodel:1363: Problems setting mask on missingindices! ERROR opendrift.models.basemodel:1365: object of type 'numpy.bool' has no len() Traceback (most recent call last): File "C:\Users\r.mcintosh\opendrift\opendrift\models\basemodel.py", line 1358, in get_environment if len(missing_indices) != len(combinedmask): ^^^^^^^^^^^^^^^^^^ TypeError: object of type 'numpy.bool' has no len()
Can anyone help me to understand why I'm getting this apparent combined landmask situation? I've attached the full log as well.
OD_log.txt