Troubles running pelagicEggDrift with one depth layer from CROCO data. #1335
-
Dear OpenDrift community: Recently, I've been trying to run the PelagicEggDrift model with CROCO information. The main problem is that my particles don´t move (see EggDrift.txt). I've noticed in previous discussions that others have encountered the same issue, but my file is too big to mersh the croco_grd.nc to my NC file. Is there any specific variables in croco_grd.nc that I have to add to my NC file? Also, it seems that my 2D file has some troubles with the ROMS readers from OpenDrift: 19:37:51 WARNING opendrift.readers.reader_ROMS_native:183: Vtransform not found, using 1 other warnings and errors during the run: 19:38:53 INFO opendrift.models.basemodel.environment:218: Adding a dynamical landmask with max. priority based on assumed maximum speed of 2.0 m/s. Adding a customised landmask may be faster... 19:38:53 ERROR opendrift.models.basemodel.environment:666: 'Reader' object has no attribute 'hc' 19:38:53 WARNING opendrift.models.basemodel.environment:673: Reader roms native is discarded after failing more times than allowed (1) Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, You do need these variables in your input file. OpenDrift has no problem efficiently reading large files What I do to read CROCO files is
octave:> nc=netcdf('archivo.nc','w'); and ncks -v Vstretching croco_clmP_TNZ.nc Vstretching.nc and then do ncks -A Vstretching.nc sml_part_mod.nc |
Beta Was this translation helpful? Give feedback.
-
I will try this. Thank you. |
Beta Was this translation helpful? Give feedback.
Hi,
You do need these variables in your input file. OpenDrift has no problem efficiently reading large files
What I do to read CROCO files is
Rename the time variable
ncrename -O -v scrum_time,ocean_time archivo.nc
Rewrite the units atttibute
octave:> nc=netcdf('archivo.nc','w');
octave:> nc{'time'}.units = 'seconds since 2000-01-01 00:00:00';
octave:> nc{'ocean_time'}.units = 'seconds since 2000-01-01 00:00:00';
octave:> tiempo = nc{'time'}(:);
octave:> tiempo = tiempo-tiempo(1);
octave:> nc{'time'}(:)=tiempo;
octave:> nc{'ocean_time'}(:)=tiempo;
octave:> close(nc)
and
3) Add Vstretching variable. I get it form a CLM file
with
ncks -v Vstretching croco_clmP_TNZ.nc Vstretching.nc
an…