Skip to content

Troubles running pelagicEggDrift with one depth layer from CROCO data. #1335

Answered by AndresSepulveda
N1coleR asked this question in Q&A
Discussion options

You must be logged in to vote

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

  1. Rename the time variable
    ncrename -O -v scrum_time,ocean_time archivo.nc

  2. 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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by N1coleR
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants