opendrift icon indicating copy to clipboard operation
opendrift copied to clipboard

Particles not moving with ROMS Native Reader

Open Xyx105 opened this issue 2 years ago • 4 comments

Hi,

I am having an issue with my particles moving throughout the simulation, currently, the animation just shows one particle not moving for 6 hours. I am unsure which part of debug log shows me the issue and how I can fix it, it seems like it is something simple I am overlooking. My Current code is as follows:

`from opendrift.models.oceandrift import OceanDrift from opendrift.readers import reader_ROMS_native from datetime import datetime, timedelta

o = OceanDrift(0) r = reader_ROMS_native.Reader('NEATL_2022*.nc') o.add_reader(r)

o.seed_elements(lon=-4.3, lat=50, radius=0, number=10, time=r.start_time)

print(r)

o.run(time_step=3600) o.animation(filename='animation.mp4')`

I will attach my log as it is rather long to post here: OceanDrift Log.txt

Any help would be greatly appreciated.

Kind Regards, Jack

Xyx105 avatar Aug 24 '23 15:08 Xyx105

Hi,

I am not sure what is happening here. OpenDrift claims that the particles are outside the domain of the ROMS-file, and is not able to calculate lon,lat from x,y. Can you share a small sample of such a ROMS file?

tor. 24. aug. 2023 kl. 17:58 skrev Xyx105 @.***>:

Hi,

I am having an issue with my particles moving throughout the simulation, currently, the animation just shows one particle not moving for 6 hours. I am unsure which part of debug log shows me the issue and how I can fix it, it seems like it is something simple I am overlooking. My Current code is as follows:

`from opendrift.models.oceandrift import OceanDrift from opendrift.readers import reader_ROMS_native from datetime import datetime, timedelta

o = OceanDrift(0) r = reader_ROMS_native.Reader('NEATL_2022*.nc') o.add_reader(r)

o.seed_elements(lon=-4.3, lat=50, radius=0, number=10, time=r.start_time)

print(r)

o.run(time_step=3600) o.animation(filename='animation.mp4')`

I will attach my log as it is rather long to post here: OceanDrift Log.txt https://github.com/OpenDrift/opendrift/files/12431248/OceanDrift.Log.txt

Any help would be greatly appreciated.

Kind Regards, Jack

— Reply to this email directly, view it on GitHub https://github.com/OpenDrift/opendrift/issues/1153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH25I22EIFK34TQPAS5I7DXW5223ANCNFSM6AAAAAA35H3BNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

knutfrode avatar Aug 24 '23 21:08 knutfrode

Hi @knutfrode

I have attached the outcome of the ncdisp of the first .nc file. I added Cs_r and hc to all .nc files after I had printed this.

disp.txt

Xyx105 avatar Aug 24 '23 21:08 Xyx105

I cannot see anything suspicious there. But I guess I would need a real sample file in order to debug this problem.

knutfrode avatar Aug 24 '23 22:08 knutfrode

Hi Knutfrode,

Please see the attached link to zip folder with the first .nc file in my time series. I was unable to upload it directly as it is too large.

https://drive.google.com/file/d/1QNQ06ycDU0BQVCaAuiLMJ4AqetqVHa_m/view?usp=sharing

Xyx105 avatar Aug 25 '23 06:08 Xyx105