read_config.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\read_config.f
00002 !
00042                      SUBROUTINE READ_CONFIG
00043 !                    **********************
00044 !
00045      &(LNG,LU,CHAINE,NCAR)
00046 !
00047 !***********************************************************************
00048 ! BIEF   V6P1                                   21/08/2010
00049 !***********************************************************************
00050 !
00051 !         BY PERL OR PYTHON LAUNCHING SCRIPTS
00052 !
00053 !
00054 !
00055 !
00056 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00057 !| CHAINE         |-->| FULL ADDRESS OF TEMPORARY DIRECTORY
00058 !| LNG            |<--| LANGUAGE (1: FRENCH, 2: ENGLISH)
00059 !| LU             |<--| LOGICAL UNIT OF OUTPUTS
00060 !| NCAR           |-->| LENGTH OF STRING CHAINE
00061 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00062 !
00063       IMPLICIT NONE
00064 !
00065 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00066 !
00067       INTEGER      , INTENT(INOUT) :: LNG,LU
00068       CHARACTER*250, INTENT(IN)    :: CHAINE
00069       INTEGER      , INTENT(IN)    :: NCAR
00070 !
00071 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00072 !
00073       LOGICAL YACONFIG
00074       INTEGER NC
00075       CHARACTER*257 CONFIG
00076 !
00077 !-----------------------------------------------------------------------
00078 !
00079       IF(NCAR.GT.0) THEN
00080         CONFIG(1:NCAR+6)=CHAINE(1:NCAR) // 'CONFIG'
00081         NC=NCAR+6
00082       ELSE
00083         CONFIG(1:6)='CONFIG'
00084         NC=6
00085       ENDIF
00086 !
00087       YACONFIG=.FALSE.
00088       INQUIRE(FILE=CONFIG(1:NC),EXIST=YACONFIG)
00089       IF(YACONFIG) THEN
00090 !
00091         OPEN(40,FILE=CONFIG(1:NC), FORM='FORMATTED')
00092         READ(40,*) LNG
00093 !
00094 !       DO NOT OVERLOAD LU IN PARALLEL MODE (WINNT)
00095 !       (KEEP THE REDIRECTION ON CHANNEL 95 MADE BY P_INIT)
00096         IF(LU.NE.95) READ(40,*) LU
00097         CLOSE(40)
00098 !
00099       ELSE
00100 !
00101         WRITE(LU,*) 'READ_CONFIG : FICHIER CONFIG NON TROUVE : ',CONFIG
00102         WRITE(LU,*) 'VALEURS PAR DEFAUT DE LU ET LNG : ',LU,' ET ',LNG
00103         WRITE(LU,*) ' '
00104         WRITE(LU,*) 'READ_CONFIG: FILE CONFIG NOT FOUND: ',CONFIG
00105         WRITE(LU,*) 'DEFAULTS VALUES OF LU AND LNG: ',LU,' AND ',LNG
00106 !
00107       ENDIF
00108 !
00109 !-----------------------------------------------------------------------
00110 !
00111       RETURN
00112       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0