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.

Sommaire

General information

RPNPy is a Python module which can read and write records of RPN files. It contains wrappers for librmn’s main fstd98 and convip C functions along with helper functions.

You can get the official description by clicking on the following link: RPNPy Reference

Note: The RPN functions read and write only one record at the time, not the whole file at once like the NetCDF functions. You need to loop over all the records you want to read or write.

To get access to this module in Python you have to acquire it before opening Python. For example for Python3 with

...

In your Python script you can then import the module with, for example:

Volet
import rpnpy.librmn.all as rmn             # Module to read RPN files

List information about module

Once the module is imported in Python one can get information about the different functions of the module with...

List general information with

     help (rmn)

List fst-functions

     help (rmn.fstd98)

List basic functions

     help (rmn.base)

Get information about a specific function

For example:

     help (rmn.fstlir)
     help (rmn.newdate)

List of main functions

Basic RPN functions

   newdate(imode, idate1, idate2=0)
       Convert date format between: printable, CMC date-time stamp, true date

   incdatr(idate, nhours)
       Increase idate by nhours

   difdatr(idate1, idate2)
       Compute the diffence between dates in hours (nhours = idate1 - idate2)

   convertIp(mode, v, k=0)
       Codage/Decodage level (P, kind <-> IP pour IP1, IP2, IP3)

Main fst-functions

   fstopt(optName, optValue, setOget=0) 
       Set or print FST option. Use to suppress excessive "talking" of the following fst-functions.

...

   fst_edit_dir(key, datev=-1, dateo=-1, deet=-1, npas=-1, ni=-1, nj=-1, nk=-1, ip1=-1, ip2=-1, ip3=-1, typvar=' ', nomvar=' ', etiket=' ', grtyp=' ', ig1=-1, ig2=-1, ig3=-1, ig4=-1, datyp=-1, keep_dateo=False)
   fst_version()
   fsteff(key)
   fstfrm(iunit)
   fstlnk(unitList)
   fstnbr(iunit)
   fstnbrv(iunit)
   fstouv(iunit, filemode='RND+R/W')
   fstsui(iunit)
   fstvoi(iunit, options=' ')