pyspc.model.grp22.rt_runs.GRPRT_Runs

class pyspc.model.grp22.rt_runs.GRPRT_Runs(filename=None)[source]

Bases : list

Structure de données GRPRT_Run : liste de runs de GRP.

filename

Fichier LISTE_BASSINS.DAT de GRP Temps-Réel

Type:

str

Voir aussi

GRPRT_Run

__init__(filename=None)[source]

Initialise l’instance de la classe GRPRT_Runs.

Paramètres:

filename (str) – Fichier LISTE_BASSINS.DAT de GRP Temps Réel

Methods

__init__([filename])

Initialise l'instance de la classe GRPRT_Runs.

append(object, /)

Append object to the end of the list.

check_run(run)

Lister les valeurs correspondant aux paramètres de calage de GRP.

clear()

Remove all items from list.

copy()

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable, /)

Extend list by appending elements from the iterable.

index(value[, start, stop])

Return first index of value.

insert(index, object, /)

Insert object before index.

pop([index])

Remove and return item at index (default last).

read([encoding])

Lecture du fichier LISTE_BASSINS.DAT de GRP Temps Réel.

remove(value, /)

Remove first occurrence of value.

reverse()

Reverse IN PLACE.

sort(*[, key, reverse])

Sort the list in ascending order and return None.

write([encoding, newline])

Ecrire le fichier LISTE_BASSINS.DAT de GRP Temps Réel.

append(object, /)

Append object to the end of the list.

static check_run(run)[source]

Lister les valeurs correspondant aux paramètres de calage de GRP.

clear()

Remove all items from list.

copy()

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable, /)

Extend list by appending elements from the iterable.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

insert(index, object, /)

Insert object before index.

pop(index=-1, /)

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

read(encoding='iso-8859-15')[source]

Lecture du fichier LISTE_BASSINS.DAT de GRP Temps Réel.

Paramètres:

encoding (str) – Encodage du fichier, “iso-8859-15” par défaut

Exemples

>>> from pyspc.model.grp22 import GRPRT_Runs
>>> f = 'data/model/grp22/rt/LISTE_Bassins.DAT'
>>> runs = GRPRT_Runs(filename=f)
>>> runs
*************************************
*********** GRPRT 2022 - Runs *******
*************************************
*  NOM FICHIER      = data/model/grp22/rt/LISTE_Bassins.DAT
*  RUNS
*************************************
>>> runs.read
>>> runs
*************************************
*********** GRPRT 2022 - Runs *******
*************************************
*  NOM FICHIER      = data/model/grp22/rt/LISTE_Bassins.DAT
*  RUNS
   ==> !K0045510!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     28.0!     14.0!     48.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0114030!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!     93.0!     46.5!    140.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0134010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     24.0!     12.0!     40.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0214010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     43.0!     21.5!     86.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0243010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     19.0!      9.5!     37.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0253020!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!     50.0!     25.0!     80.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0258010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!      9.0!      4.5!     22.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0260010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!    285.0!    142.5!    585.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0274010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     17.0!      8.5!     28.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0333010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!     24.0!     12.0!     39.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0356310!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     15.0!      7.5!     26.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0403010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     82.0!     41.0!    138.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0454010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     36.0!     18.0!     63.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0543010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J18H00M!     52.0!     26.0!     80.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0550010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!    554.0!    277.0!    901.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0567520!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     23.0!     11.5!     39.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0614010!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!     68.0!     34.0!    101.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0624510!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     15.0!      7.5!     31.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0643110!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J03H00M!     14.0!      7.0!     24.0!0!05J00H00M!  0!-99! -9! 1!  0!
   ==> !K0673310!00J01H00M!TU!m3/s!1!0!99999!99999!99999!05J00H00M!01J00H00M!00J06H00M!     19.0!      9.5!     41.0!0!05J00H00M!  0!-99! -9! 1!  0!

>>> runs[0]
GRPRT_Run(CODE='K0045510', PDT='00J01H00M', FT='TU', FD='m3/s', C=1,
          N=0, PRE=99999, PBV=99999, SCE=99999, HORMAX='05J00H00M',
          HOR1='01J00H00M', HOR2='00J03H00M', VIG1=28.0, VIG2=14.0,
          VIG3=48.0, A=0, ECH='05J00H00M', CMN=0, CMX=-99, IX=-9, DI=1,
          INC=0)

Voir aussi

GRPRT_Run

remove(value, /)

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse()

Reverse IN PLACE.

sort(*, key=None, reverse=False)

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.

write(encoding='iso-8859-15', newline='\r\n')[source]

Ecrire le fichier LISTE_BASSINS.DAT de GRP Temps Réel.

Paramètres:
  • encoding (str) – Encodage du fichier, “iso-8859-15” par défaut

  • newline (str) – Charactère de nouvelle ligne, “\r\n” par défaut