6 Standalone programs

6.1 Program assim

The standalone program assim can be used to test the assimilation. The program can be called from the command line:

assim <initfile> <time index>

The first argument is the initialisation file and the second argument is the time index of the observation to assimilate. All keys described in 4.2 have the same meaning for the program assim. But the forecast has to be specified by the following keys.




Key

Type

Description







ForecastXXX.value

vector of strings

the forecast

ForecastXXX.path

string

The path is prepended to all filenames specified in ForecastXXX.value. The current path is used by default.




If the program is called with three arguments:

assim <initfile> <start time index>  <end time index>

All assimilation cycles be between the two time indexes are performed in chronological order.

6.2 Program genobsoper

The standalone program genobsoper generate the observation matrix.

genobsoper <initfile> <time index>

The first argument is the initialisation file and the second argument is the time index of the observation for witch the observation operator has to be created. All keys described in 4.2 have the same meaning for the program genobsoper. But the only diagnostic key used is DiagXXX.H.

If the program is called with three arguments:

genobsoper <initfile> <start time index>  <end time index>

The action is repeated for all time indexes between the start and the end time index.

6.3 Program applyobsoper

The standalone program applyobsoper extracts from a state vector the observations.

applyobsoper <initfile> <time index>

The first argument is the initialisation file and the second argument is the time index of the observation for witch the observation operator has to be created. All keys described in 4.2 have the same meaning for the program applyobsoper. But the only diagnostic key used are DiagXXX.Hxf and DiagXXX.invsqrtR. If a scalar observation point has been eliminated (out of the model grid for example) its weight in DiagXXX.invsqrtR is zero. The state vector is specified as it is described in 6.1.

If the program is called with three arguments:

applyobsoper <initfile> <start time index>  <end time index>

The action is repeated for all time indexes between the start and end time index.

6.4 Program filteroper

The standalone program filteroper generates a sparse matrix witch acts as a spatial filter in the model space.

filteroper <initfile>

For each variable the filter is a Gaussian function:

f(x,y,z,x',y',z') = N{e}^{−{{(x−x')}^{2}\over {L}_{x}^{2}} −{{(y−y')}^{2}\over {L}_{y}^{2}} −{{(z−z')}^{2}\over {L}_{z}^{2}} }
(39)

N is a normalisation factor taking in to account the land-sea mask. The parameters {L}_{x}, {L}_{y} and {L}_{z} may be space dependent and have thus the same dimension as the state vector. The required keys are:




Key

Type

Description







Model.mask

vector of strings

sea-land mask of each variable

Model.gridX

vector of strings

longitude of each variable (degenerated file)

Model.gridY

vector of strings

latitude of each variable (degenerated file)

Model.gridZ

vector of strings

depth

Model.path

string

The path is prepended to all filenames specified in Model.*. The current path is used by default.

Correlation.lenx

vector of strings

parameter {L}_{x} in equation 39

Correlation.leny

vector of strings

parameter {L}_{y} in equation 39

Correlation.lenz

vector of strings

parameter {L}_{z} in equation 39

Correlation.path

string

The path is prepended to all filenames specified in Correlation.*. The current path is used by default.

Filter

string

file name of the filter




6.5 Program opermul

opermul is a general purpose program witch multiply two sparse operators. It can be used for example for multiplying a filter operator and a observation operator.

{O}_{3} = {O}_{2}{O}_{1}
(40)

{O}_{1} is a operator mapping from space {S}_{1} to {S}_{2}, {O}_{2} from {S}_{2} to {S}_{3} and thus the product from {S}_{1} to {S}_{3}.

opermul <initfile>

The required keys are:




Key

Type

Description







Space1.mask

vector of strings

sea-land mask of space {S}_{1}

Space1.path

string

The path is prepended to all filenames specified in Space1.mask. The current path is used by default.

Space2.mask

vector of strings

sea-land mask of space {S}_{1}

Space2.path

string

The path is prepended to all filenames specified in Space2.mask. The current path is used by default.

Space3.mask

vector of strings

sea-land mask of space {S}_{1}

Space3.path

string

The path is prepended to all filenames specified in Space2.mask. The current path is used by default.

Term1

string

file name of operator {O}_{1}

Term2

string

file name of operator {O}_{2}

Product

string

file name of the product {O}_{3}




6.6 Matlab utility GenObsFile

The utility ”GenObsFile” provides an easy way to save all the observations, coming from various sources, in a few files with the NetCDF format, and creates the .INIT file required by the assimilation routines.

Options for GenObsFile must be specified in the header of the Matlab routine, as described below:

Example listfile:

config TEM ./Lion.X ./Lion.Y ./Lion.Z 1998-01-01  
/home/johndoe/observations/Lion00000480.TEM.gz(:,:,end)  
config SAL ./Lion.X ./Lion.Y ./Lion.Z 1998-01-01  
/home/johndoe/observations/Lion00000480.SAL.gz(:,:,end)  
config TEM file file file file  
/home/johndoe/observations/ctd02.1_03_aug_2241.TEM  
/home/johndoe/observations/ctd03.1_03_aug_1840.TEM  
/home/johndoe/observations/ctd04.1_04_aug_0747.TEM  
config TEM ./ligur.SST.X ./ligur.SST.Y ./ligur.SST.Z 32-41  
/scratch/johndoe/observtn/ligur1999-07-02.SST.gz  
/scratch/johndoe/observtn/ligur1999-07-03.SST.gz  
/scratch/johndoe/observtn/ligur1999-07-04.SST.gz  
/scratch/johndoe/observtn/ligur1999-07-10.SST.gz  
/scratch/johndoe/observtn/ligur1999-07-11.SST.gz