How to use extractdia ?

The extractdia tool allows to extract fields from a diachronic file, on the whole domain or on a part of it, to interpole them (horizontal grid and/or vertical grid) and to write them in some other given formats :

The input file is a FM diachronic file, either a `true' diachronic one (its name is ended by .000 and it contains time series of informations obtained during the run of the model), or a `pseudo'-diachronic one (it is the result of the conversion of a synchronous file), compressed (with lfiz) or not.

The main program is an interactive one: the name of input diachronic file, the output format, the coordinates of the part of the domain, the name of fields to be read and written are required. All that is typed on keyboard is saved in dirextr.fmt file, it can be appended and used as input (after renaming it) for the next call of the tool
(e.g. mv dirextr.DIAC dirDIAC1 ; extractdia < dirDIAC1).

For the format of the output file, you have the following choice :

DIAC diachronic
LLHV lon- lat- alt- val
llhv lat- lon- alt- val
LLZV lon- lat- Z level- val
llzv lat- lon- Z level- val
LLPV lon - lat - Pressure level - val
llpv lat - lon - Pressure level - val
KCDL netcdf with the model's levels
ZCDL netcdf with Z level
PCDL netcdf with Pressure level
FREE free format defined by the user (FORTRAN)

EXAMPLE of extractdia use to extract one field (WM) in a file lat-lon-Z level-value

 - Name of the diachro file (without .lfi) ?
MAP_IOP3d.Z
- type of the output file (DIAC/llhv/llzv/llpv/LLHV/LLZV/LLPV/FREE/KCDL/ZCDL/PCDL)
llzv
 - Prints : 0=mini 1=debug mode in extractdia
                   3=debug mode in routines diachro
 ?
0
 - zoom on the 2 first directions: 
               lonmin,lonmax,latmin,latmax
 0.,0.,0.,0. for the whole physical domain
 -1.,-1.,-1.,-1. for the whole domain
 ?
 0.,0.,0.,0.
 - zoom on the 3 last dimensions : 
    itinf,itsup,itrajinf,itrajsup,iprocinf,iprocsup
 0,0,0,0,0,0 for the whole last dimensions
 ?
 0,0,0,0,0,0
35
 - List of these levels (in meters or in hPa): exemple 500 1500 ?
1.3731000E+02
1.9688000E+02
2.6241000E+02
3.3450000E+02
4.1379001E+02
5.0101001E+02
5.9696002E+02
7.0250000E+02
8.1859003E+02
9.4628998E+02
1.0867600E+03
1.2412800E+03
1.4112500E+03
1.5982200E+03
1.8038900E+03
2.0301200E+03
2.2789700E+03
2.5527100E+03
2.8538301E+03
3.1850500E+03
3.5394600E+03
3.9186799E+03
4.3244502E+03
4.7586201E+03
5.2231802E+03
5.7202598E+03
6.2521401E+03
6.8212402E+03
7.4169800E+03
8.0127202E+03
8.6084600E+03
9.2042002E+03
9.7999297E+03
1.0395670E+04
1.0991410E+04
 - Fields in regular LAt/LOn grid
   or    in regular grid on CONFormal plan (native MesoNH grid) ?
 LALO/CONF ?
CONF
 
 - Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
WM
- Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
END
 - Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
END

Be careful, the ASCII file begin with an header of 3 lines.

EXAMPLE of extractdia use to extract one field (WM) in a netcdf file (KCDF)

 - Name of the diachro file (without .lfi) ?
MAP_IOP3d.Z
- type of the output file (DIAC/llhv/llzv/llpv/LLHV/LLZV/LLPV/FREE/KCDL/ZCDL/PCDL)
llzv
 - Prints : 0=mini 1=debug mode in extractdia
                   3=debug mode in routines diachro
 ?
0
 - zoom on the 3 first dimensions: 
               ideb,ifin,jdeb,jfin,kdeb,kfin
 0,0,0,0,0,0 for the whole physical domain
 -1,-1,-1,-1,-1,-1 for the whole domain
 ?
0,0,0,0,0,0
 - zoom on the 3 last dimensions : 
    itinf,itsup,itrajinf,itrajsup,iprocinf,iprocsup
 0,0,0,0,0,0 for the whole last dimensions
 ?
 0,0,0,0,0,0
 - Fields in regular LAt/LOn grid
   or    in regular grid on CONFormal plan (native MesoNH grid) ?
 LALO/CONF ?
LALO
 - Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
UM
 - Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
VM
- Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
T2M
- Name of the group in upper case (13 characters max.)
  (ex: THM or DD or FF or DD10 or FF10 or LAT or LON or VLEV)
 (GROUP for the list of groups, END to stop)?
END

WARNING
For the CDL type, the dimensions are initialised with those of the first field : the values of the 6 dimensions must be the maximum that will be treated (So 3D fields before 2D fields). For the CDL type, the coordinates must be the same for all fields (stored in the output file with LAT/LON/VLEV groups)

TANGUY Gaelle 2009-09-23