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

# read_ncfield

## PURPOSE

'read_ncfield': reads one or two velocity fields and associated parameters from a file .

## SYNOPSIS

function [nb_coord,nb_dim,Civ,CivStage,time,Field,VelTypeOut,Calib]=read_ncfield(filename,VelType,ScalDisplay,ScalName);

## DESCRIPTION

    'read_ncfield': reads one or two velocity fields and associated parameters from a file .
    ------------------------------------------------------------------
     COMBINE ET REMPLACE 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
- varname_generator 'varname_generator': defines the names of constants and variable fields to read in the netcdf files
- warndlg_uvmat 'warndlg_uvmat': display warning message (error, warning, confirmation) in a given figure

This function is called by:

- RUN_FIX 'RUN_FIX': function for fixing velocity fields:
- uvmat 'uvmat': function associated with the interface 'uvmat.fig' for images and field visualization