OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
247 stars 120 forks source link

Unable to read 'upward_sea_water_velocity' using reader_ROMS_native #919

Closed mevo-creator closed 2 years ago

mevo-creator commented 2 years ago

Hei, I've used Opendrift previously to track particles on the Norwegian Continental Shelf (NCS), I need to run some simulations again. Earlier I was reading ocean currents data using

SVIM = reader_ROMS_native.Reader('https://thredds.met.no/thredds/dodsC/nansen-legacy-ocean/svim_daily_agg') o.add_reader(SVIM, variables = ['x_sea_water_velocity', 'y_sea_water_velocity', 'upward_sea_water_velocity','sea_floor_depth_below_sea_level'])

But now using the above code gives an error as

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\mevo\opendrift\opendrift\models\basemodel.py", line 924, in add_reader raise ValueError( ValueError: Reader roms native does not provide variables: ['upward_sea_water_velocity']

It seems like things have changed in the latest version? I need to track particles in 3 dimensions so is there some other model/reader that needs to be used to read 'upward_sea_water_velocity'?

Thanks

mevo-creator commented 2 years ago

Hi @knutfrode , could you please help with the above error?

knutfrode commented 2 years ago

It seems that the later years of the model have been run without storing upward velocity (and vertical diffusivity), and thus the aggregate is then (automatically) missing these variables for the whole time series. The later years may be re-run, but I cannot tell when this will be available, this is outside of my control.

In the meantime, the only options seems to be to add each monthly file with daily data: https://thredds.met.no/thredds/catalog/nansen-legacy-ocean/SVIM/catalog.html

But there may also be other models around that cover the given area and time with needed variables.

mevo-creator commented 2 years ago

Ohh...that was unfortunate...because earlier it was possible to read 'upward_sea_water_velocity' so it seems like this variable is stored for most of the time series. The particles are assumed as polymers dissolved in water and the de-polymerization rate is dependent on solar irradiation, which will change with depth. Hence, vertical diffusivity and upward_sea_water_velocity become important.

I need to track particles for atleast 2 years, so if I understand correctly other option, would it be feasible to download the monthly files, combine them and read the ocean currents data from the local disk....given the size of the files or some other constraints...?

The particles release location is around Stavanger/Bergen, so need to track them in an area covering North/Norwegian/Barents sea (as was the case with SVIM data). There are some Threads available in this example and this example. Could it be possible to use one of these thredds for this purpose? It would be helpful to get some suggestion on this, thanks so much!

mevo-creator commented 2 years ago

Hi @knutfrode , if possible could you please make some suggestions for the above query? Thanks

knutfrode commented 2 years ago

It seems like neither HYCOM or MERCATOR provides vertical currents. Thus the only options seems to be to use the monthly files of SVIM that do actually include vertical current (before 2018 I believe). You can either download files locally (but could use subsetting to reduce amount of data), or use individual thredds URL directly. But if combining the thredds URLs, there might be an issue that the last time of one month is 12 UTC on the last day, whereas the next one start at 12 UTC of the first day of the month - thus an apparent "gap" of 1 day. Not sure how to fill that gap, so best might be to download files and merge them somehow to a (very large) physical file.

mevo-creator commented 2 years ago

ok..I'll try to create a physical file, thank you for the suggestion.

It would be helpful if the SVIM dataset can somehow be accessed with two different URLs, one before 2018 when vertical currents are available and the other after 2018 or if it is possible to re-run the model with vertical currents data for last few years. Not sure how feasible either of these options could be.