Closed amandaivl closed 3 years ago
Hi, sorry for delayed feedback due to holidays.
One difference is that longitude and latitude of Oscar-files seem to have capitalised long_name
. I have now updated the reader to allow for this: https://github.com/OpenDrift/opendrift/commit/e9458de3ae61750c1cac925f34c17155390af89a
However, the variables of the Oscar-files do also not have standard_name
. This may be added with e.g. NCO like this:
ncatted -a standard_name,u,o,c,x_sea_water_velocity oscar_vel2019.nc
ncatted -a standard_name,v,o,c,y_sea_water_velocity oscar_vel2019.nc
Closing due to inactivity.
Hi, I am getting an attribute error when I'm trying to use OceanDrift to model the trajectory of a drifting buoy. I'm using data from the NASA's PO.DAAC Drive OSCAR files (https://podaac-tools.jpl.nasa.gov/drive/files/OceanCirculation/oscar/preview/L4/oscar_third_deg). I already checked that if follows CF conventions, and also tried changing variables names. The only difference I could find between this and the drifter example data is that this one uses longitude and latitude instead of a projection in meters.
This is the code I'm running:
from opendrift.models.oceandrift import OceanDrift o = OceanDrift() from opendrift.readers import reader_netCDF_CF_generic reader_oscar = reader_netCDF_CF_generic.Reader('file_path')
And I'm getting the following result: 15:14:03 INFO: Opening dataset: file_path 15:14:03 INFO: Opening file with Dataset 15:14:03 DEBUG: Finding coordinate variables. 15:14:03 DEBUG: Parsing variable: time 15:14:03 DEBUG: Parsing variable: year 15:14:03 DEBUG: Parsing variable: depth 15:14:03 DEBUG: Parsing variable: latitude 15:14:03 DEBUG: Parsing variable: longitude 15:14:03 DEBUG: Parsing variable: u 15:14:03 DEBUG: Parsing variable: v 15:14:03 DEBUG: Parsing variable: um 15:14:03 DEBUG: Parsing variable: vm
AttributeError Traceback (most recent call last)