Home > coriolis > bigone > PROJETS > UVMAT.new > read_ncdata.m

# read_ncdata

## PURPOSE

'read_ncdata': reads variables from netcdf files, recognizing civx data.

## SYNOPSIS

function [Field,VelTypeOut]=read_ncdata(filename,FieldNames,VelType);

## DESCRIPTION

    'read_ncdata': reads variables from netcdf files, recognizing civx data.
    ------------------------------------------------------------------
     COMBINE ET REMPLACE read_ncfield, read_vel et read_scalar_new
    ------------------------------------------------------------------
     OUTPUT:
     nb_coord,nb_dim,
     Civ: =0 or 1, indicates whether the data is civ (A SUPPRIMER ?)
     CivStage: =0, ??? A UTILISER POUR REMPLACER civ
               =1, civ1 has been performed only
               =2, fix1 has been performed
               =3, pacth1 has been performed
               =4, civ2 has been performed
               =5, fix2 has been performed
               =6, pacth2 has been performed
     time: absolute time
     Field
                .Txt: (char string) error message if any
                .NbDim: number of dimensions (=0 by default)
                .NbCoord: number of vector components
                .CoordType: expresses the type of coordinate ('px' for image, 'sig' for instruments, or 'phys')
                .dt: time interval for the corresponding image pair
                .X, .Y, .Z: set of vector coordinates
                .U,.V,.W: corresponding set of vector components
                .F: warning flags
                .FF: false flag, =0 for good vectors
                .C: scalar associated with velocity (used for vector colors)
                .CoordType
                .DijU; matrix of spatial derivatives (DijU(1,1,:)=DUDX,
                DijU(1,2,:)=DUDY, Dij(2,1,:)=DVDX, DijU(2,2,:)=DVDY
                .A, .AX, .AY: additional scalar
     dt:time interval of the image pair red from a single file, or vector with

## CROSS-REFERENCE INFORMATION

This function calls:

- nc2struct 'nc2struct': transform a netcdf file in a corresponding matlab structure
- read_ncvar 'read_ncvar': reads a list of fields and constants in a netcdf file
- varcivx_generator 'varname_generator': defines the names of variabless to read in civx type netcdf files

This function is called by:

- series 'series': master function associated to the GUI series.m for analysis field series