Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

Volet

Convert from NetCDF to RPN format:

    cdf2rpn   -rpn RPN_standard_file    -cdf NetCDF_file    -attr attribut_list 

Convert from RPN to NetCDF format - one needs to add the key '-dir' (for 'direction'):

    cdf2rpn   -rpn RPN_standard_file    -cdf NetCDF_file    -attr attribut_list    -dir

Notes:

  • If you do not add a path to the output file name the file will end up in $TMPDIR!!!
  • All fields in a file must have the same "type" of levellevels.  
    You cannot have i.e. sigma, hybrid, arbitrary and pressure levels in the same file!!! Nor can there be, for example, a field on 20 pressure levels and another on only 1 pressure level. If your RPN input file contains fields with different types or numbers of fields levels you can select the fields your want to convert with 'r.diag' and/or 'editfst' - see above.
  • If converting RPN to NetCDF make sure your RPN file contains all necessary grid descriptors ('^^', '>>', '^>', 'HY','!!')
  • All variables you want to convert need to be in the attribute list
    You can find an example file on the servers under:   ~winger/Scripts/NetCDF_converter/attribut_netcdf.dat

    Make sure that the factors are correct!!!For each variable that is to be converted needs to be an entry starting with 'def_attribut' at the end of the file. Higher up in the file you find the documentation - see also below.
    Make sure that the factors are correct!!!  If one or more of your variables are not in this file, just take a copy and add the missing variables.


Volet

 def_attribut[ name; ccname; mult; add;
               nom_attribut = valeur_attribut;
               nom_attribut = valeur_attribut; N;
               nom_attribut = valeur_attribut; valeur_attribut; N; ]

 name: noms netCDF OBLIGATOIRE
 cccname: noms CCCma en format 4H  OBLIGATOIRE
 mult: facteur multiplicatif pour la conversion des unites netCDF->CCCma (type real) DEFAUT 1.0
 add: facteur additif pour la conversion des unites netCDF->CCCma (type real) DEFAUT 0.0
 nom_attribut: nom de l'attribut
 valeur_attribut: valeur associee a "nom_attribut"
 N: entier definissant le type de "valeur_attribut" (2=character, 3=integer*2, 5=real*4)
 
Note: 

    Unit conversion from RPN → netCDF:
         unite(RPN) = mult*unite(netCDF)+add 

    Unit conversion from netCDF → RPN :
         unite(netCDF)= (unite(RPN)-add)/mult 

    'nom_attribut' and 'valeur_attribut' are only used for conversions to nsfCDF format.

 Notes: 
       -
Never put a space before the ";"!
       - "[", "]", "=" et ";" are reserved characters. So do not use them otherwise.