The TELEMAC-MASCARET system  trunk
get_data_ntimestep.f
Go to the documentation of this file.
1 ! *****************************
2  SUBROUTINE get_data_ntimestep
3 ! *****************************
4 !
5  &(fformat,fid,ntimestep,ierr)
6 !
7 !***********************************************************************
8 ! HERMES V7P0 01/05/2014
9 !***********************************************************************
10 !
11 !brief Returns the number of time step in the mesh file
12 !
13 !history Y AUDOUIN (LNHE)
14 !+ 24/03/2014
15 !+ V7P0
16 !+
17 !
18 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 !| FFORMAT |-->| FORMAT OF THE FILE
20 !| FID |-->| FILE DESCRIPTOR
21 !| NTIMESTEP |<->| THE NUMBER OF TIME STEPS
22 !| IERR |<--| 0 IF NO ERROR DURING THE EXECUTION
23 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 !
25  USE utils_serafin
26  USE utils_med
27  USE utils_cgns
29  IMPLICIT NONE
30 !
31 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32 !
33  CHARACTER(LEN=8), INTENT(IN) :: FFORMAT
34  INTEGER, INTENT(IN) :: FID
35  INTEGER, INTENT(OUT) :: NTIMESTEP
36  INTEGER, INTENT(OUT) :: IERR
37 !
38 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
39 !
40 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41 !
42  ntimestep = 0
43  SELECT CASE (fformat(1:7))
44  CASE ('SERAFIN')
45  CALL get_data_ntimestep_srf(fid, ntimestep, ierr)
46  CASE ('MED ')
47  CALL get_data_ntimestep_med(fid, ntimestep, ierr)
48  CASE ('CGNS ')
49  CALL get_data_ntimestep_cgns(fid, ntimestep, ierr)
50  CASE DEFAULT
52  WRITE(error_message,*)
53  & 'GET_DATA_NTIMESTEP: BAD FILE FORMAT: ',fformat
54  RETURN
55  END SELECT
56 !
57 !-----------------------------------------------------------------------
58 !
59  RETURN
60  END
subroutine get_data_ntimestep_cgns(FILE_ID, NTIMESTEP, IERR)
Definition: utils_cgns.F:1744
character(len=200) error_message
subroutine get_data_ntimestep_srf(FILE_ID, NTIMESTEP, IERR)
integer, parameter hermes_unknown_file_format_err
subroutine get_data_ntimestep(FFORMAT, FID, NTIMESTEP, IERR)
subroutine get_data_ntimestep_med(FILE_ID, NTIMESTEP, IERR)
Definition: utils_med.F:2899