Welcome to the Ocean Data View User Forum
You must login to post a message to the conferences. Reading posts is possible without login.
User login
Enter your username and password here in order to log in on the website:
bathymetry
| Author | Message |
|---|---|
|
Written on: 2010-11-22, 13:11
|
|
|
bubic@izor.hr
nik bubic
Topic creator
registered since: 04.02.2009
Posts: 12
|
Hello! I have gridded bathymetry (lat, long, depth) and want to create .nc file that I can put in odv "include" folder to use it when I want to plot section. I have tried to build it, but I didn't manage. Please help! |
|
Written on: 2010-11-24, 09:22
|
|
|
hecinho@gmx.de
Stephan Heckendorff
registered since: 24.04.2008
Posts: 278
|
Hi Nic, What did you try and what didn't work ? I guess the instructions I wrote earlier didn't help ? odv.awi.de/en/odv_forum/?view=single_thread&cat_uid=6&conf_uid=9&thread_uid=203[/url] Cheers, Stephan |
|
Written on: 2010-11-30, 10:44
|
|
|
bubic@izor.hr
nik bubic
Topic creator
registered since: 04.02.2009
Posts: 12
|
Hi Stephan, I followed the intructions but wasn't able to get netcdf from cdl file. I guessed the file was to big, but couldn' do it with smaller file also. I will keep looking. Thanks! Nik |
|
Written on: 2010-11-30, 15:41
|
|
|
hecinho@gmx.de
Stephan Heckendorff
registered since: 24.04.2008
Posts: 278
|
Hi Nic, Just give my a sign if you want me to explain the single steps in more detail. I know my instructions can be quite confusing... If you are interested, please tell me how big your file is and let me see your cld-file's format. Cheers, Stephan |
|
Written on: 2010-12-10, 12:18
|
|
|
bubic@izor.hr
nik bubic
Topic creator
registered since: 04.02.2009
Posts: 12
|
Hi, Stephan! I managed to create nc for odv/include, same as GEBCO1.nc. It works fine. I created it in matlab. If somebody needs help, just ask. Best regards, Nikola |
|
Written on: 2011-04-14, 17:38
|
|
|
kkkivva@mail.ru
Kirill Kivva
registered since: 13.04.2011
Posts: 3
|
Hi Nicola! I have to create .nc file for the Caspian Sea using isobath data (coastline, 0, 5, 10... 1000 m). I'm not very good in programming, so I need to ask some help. Could you please share the way you created your .nc file? Kind regards, Kirill |
|
Written on: 2011-04-20, 14:34
|
|
|
bubic@izor.hr
nik bubic
Topic creator
registered since: 04.02.2009
Posts: 12
|
Hi, Kirill, I am sorry for late response. I will write down the code in matlab. You need to go step by step because lines are nor connected. Please write if you don't understand something: ncid = netcdf.create('name','NC_NOCLOBBER'); %create file name.nc dimid = netcdf.defDim(ncid,'lon',1904); % create dim1; 'name',lenght, 1904 is my value dimid1 = netcdf.defDim(ncid,'lat',1403); % create dim2; 'name',lenght, 1403 is my value varid = netcdf.defVar(ncid,'lon','float',0) % create var1; 'name', 'type',dim varid1 = netcdf.defVar(ncid,'lat','float',1); % create var2; 'name', 'type',dim varid2 = netcdf.defVar(ncid,'Height','short',[0,1]); % create var3; 'name', 'type',dim netcdf.endDef(ncid); % end define mode netcdf.putVar(ncid,0,lon); % put data; varid, data netcdf.putVar(ncid,1,lat); % put data; varid, data netcdf.putVar(ncid,2,Height); % put data; varid, data netcdf.reDef(ncid); %enter define mode to add attributes netcdf.putAtt(ncid,0,'long_name','Longitude'); netcdf.putAtt(ncid,0,'units','degrees_east'); netcdf.putAtt(ncid,0,'range','-180 - 180'); netcdf.putAtt(ncid,1,'long_name','Latitude'); netcdf.putAtt(ncid,1,'units','degrees_north'); netcdf.putAtt(ncid,1,'range','90 - -90'); netcdf.putAtt(ncid,2,'long_name','Elevation'); netcdf.putAtt(ncid,2,'units','m'); netcdf.endDef(ncid); netcdf.close(ncid) That is what I done. |

