Forum

RE: Extract substance fields from SDS file with waquaio

Sjoerd de Groot, modified 6 Years ago.

Extract substance fields from SDS file with waquaio

Youngling Posts: 2 Join Date: 2/26/18 Recent Posts

Dear reader,

 

I have a Simona SDS file, from which I want to read data for postprocessing. Using the waquaio.m script, I can extract all fields succesfully, except the substances (salinity in this case). When I run: 

[subst units] = waquaio(FileData,'NG03_02-16nov_2007','substances');

I get two 1x1 cells, containing 'Salinity' and 'ppt', indicating that the salinity field is present in the file. However, when I run:

[field times] = waquaio(FileData,'NG03_02-16nov_2007','subst:<Salinity>');

I get the following error:

 

Error using waquaio>waqua_get_spatial (line 1902)
Invalid substance name: <salinity>

Error in waquaio (line 295)
    [varargout{1:nargout}] = waqua_get_spatial(sds,exper,field,dim,refdate,varargin);

Error in test_waqua (line 12)
[field time] = waquaio(FileData,'NG03_02-16nov_2007','subst:<Salinity>');

 

Am I typing the format wrong? Can someone help me? I writing the substance field as just 'Salinity' or '<Salinity>' and a couple of other formats, but I can't get it to work.

Kind regards,

 

Sjoerd

Sjoerd de Groot, modified 6 Years ago.

RE: Extract substance fields from SDS file with waquaio

Youngling Posts: 2 Join Date: 2/26/18 Recent Posts

I'm sorry, I was too quick with my question. Entering the field as 'subst:salinity' works fine. Problem is resolved.