cvsp_output_init.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\sisyphe\cvsp_output_init.f
00002 !
00078                        SUBROUTINE CVSP_OUTPUT_INIT
00079 !                      ***************************
00080 !
00081 !
00082 !***********************************************************************
00083 ! SISYPHE   V6P3                                   14/03/2013
00084 !***********************************************************************
00085 !
00086 !
00087 !
00088 !
00089 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00090 !|                |<->|
00091 !|                |-->|
00092 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00093 !
00094       USE BIEF
00095       USE DECLARATIONS_SISYPHE
00096       USE CVSP_OUTPUTFILES
00097 
00098       IMPLICIT NONE
00099 
00100       CHARACTER*32 VLABEL
00101       CHARACTER(LEN=11) :: EXTENS
00102       INTEGER I, K
00103 !
00104 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00105 !
00106       INTEGER CFG(2)            ! FOR 3D MESH
00107       CFG(1) = OPTASS
00108       CFG(2) = PRODUC           ! PRODUC=1 HARD IN LECDON
00109 !
00110 !-----------------------------------------------------------------------
00111 ! CHECKPOINTFILE
00112 !-----------------------------------------------------------------------
00113 !
00114       CP_FILES(3)%FMT = 'SERAFIN ' !'SERAFIN ' OR 'SERAFIND'
00115       CP_FILES(3)%LU = 10004    !INTEGER, INDIVIDUAL
00116       CP_FILES(3)%NAME = 'SORTINGPROFILE.RES' !UP TO 144 CHARACTERS
00117       CP_FILES(3)%TELNAME = 'VSPRES' !ONLY 6 CHARACTERS
00118       CP_FILES(3)%ACTION = 'WRITE'
00119       USRMSH_NPLAN = PRO_MAX_MAX
00120 
00121       CP_FILES(4)%FMT = 'SERAFIN ' !'SERAFIN ' OR 'SERAFIND'
00122       CP_FILES(4)%LU = 10005    !INTEGER, INDIVIDUAL
00123       CP_FILES(4)%NAME = '2DHYDROAS3D.RES' !UP TO 144 CHARACTERS
00124       CP_FILES(4)%TELNAME = 'VSPHYD' !ONLY 6 CHARACTERS
00125       CP_FILES(4)%ACTION = 'WRITE'
00126       USRMSH_2DHYD_NPLAN = 2
00127 !
00128 !-----------------------------------------------------------------------
00129 ! ALLOCATES A 3D MESH FOR USEROUTPU: HERE VSPRES
00130 !-----------------------------------------------------------------------
00131 !
00132       CALL ALMESH(USRMSH,'USRMSH',41,SPHERI,CFG,SIS_FILES(SISGEO)%LU,
00133      &     EQUA,NPLAN=USRMSH_NPLAN,
00134      &     FILE_FORMAT=SIS_FILES(SISGEO)%FMT)
00135 
00136       DO I =1,USRMSH%NPTFR
00137         USRMSH%NBOR%I(I) = I
00138       END DO
00139 !
00140 !-----------------------------------------------------------------------
00141 ! ALLOCATES A 3D MESH FOR USEROUTPU: HERE VSPHYD
00142 !-----------------------------------------------------------------------
00143 !
00144       CALL ALMESH(USRMSH_2DHYD,'USRHYD',41,SPHERI,CFG,
00145      &     SIS_FILES(SISGEO)%LU,
00146      &     EQUA,NPLAN=USRMSH_2DHYD_NPLAN,
00147      &     FILE_FORMAT=SIS_FILES(SISGEO)%FMT)
00148 
00149       DO I =1,USRMSH_2DHYD%NPTFR
00150         USRMSH_2DHYD%NBOR%I(I) = I
00151       END DO
00152 !
00153 !-----------------------------------------------------------------------
00154 ! SET HERE THE NAMES OF THE PRINTOUT VARIABLES FOR THE USER FILE VSPRES
00155 !-----------------------------------------------------------------------
00156 !
00157       DO I = 1,NUMVARUR3D2RES
00158         IF (I.LE.3+NSICLA) THEN
00159           UR3D_FILES_OUTVAR(I) = .TRUE.
00160         ELSE
00161           UR3D_FILES_OUTVAR(I) = .FALSE.
00162         ENDIF
00163         WRITE(UNIT=VLABEL, FMT='(A5,I2,A25)') 'FRACTION_CLASS_',I-3
00164         UR3D_FILES_LABELS(I) = VLABEL
00165       ENDDO
00166 ! EXAMPLE FOR MANUALLY OVERWRITTING LEN=32
00167       UR3D_FILES_LABELS(1)= 'Z [M]                           ' !'PROFILE_ELEVATION               '
00168       UR3D_FILES_LABELS(2)= 'PROFILE_D50 [M]                 '
00169       UR3D_FILES_LABELS(3)= 'PROFILE_ERROR [-]               '
00170 !
00171 !-----------------------------------------------------------------------
00172 ! SET HERE THE NAMES OF THE PRINTOUT VARIABLES FOR THE USER FILE VSPHYD
00173 !-----------------------------------------------------------------------
00174 !
00175       DO I = 1,NUMVAR2DHYD
00176         UR2DHYD_FILES_OUTVAR(I) = .TRUE.
00177       ENDDO
00178 
00179       UR2DHYD_FILES_LABELS(1)= 'Z [M]                           ' !'Z [M] AND ZF [M]                '
00180       UR2DHYD_FILES_LABELS(2)= 'U [M/S]                         '
00181       UR2DHYD_FILES_LABELS(3)= 'V [M/S]                         '
00182       UR2DHYD_FILES_LABELS(4)= 'W [M/S]                         '
00183       UR2DHYD_FILES_LABELS(5)= 'SCALAR VELOCITY [M/S]           '
00184       UR2DHYD_FILES_LABELS(6)= 'TAU [N/M**2]                    '
00185 !
00186 !-----------------------------------------------------------------------
00187 ! ALLOCATES THE BLOCK CONNECTING A VARIABLE NAME TO ITS ARRAY
00188 !-----------------------------------------------------------------------
00189 !
00190       CALL ALLBLO(URBLOC3D, 'URBL3D')
00191       CALL ALLBLO(URBLOC2DHYD, 'URB2DH')
00192 !
00193 !-----------------------------------------------------------------------
00194 ! OPENS THE FILES FOR WRITING
00195 !-----------------------------------------------------------------------
00196 !
00197       DO I = 3, 4
00198         IF(NCSIZE.LE.1) THEN
00199 ! SCALAR
00200           OPEN(CP_FILES(I)%LU,FILE=CP_FILES(I)%TELNAME,
00201      &         ACTION=CP_FILES(I)%ACTION,FORM='UNFORMATTED')
00202         ELSE
00203 ! PARALLEL, FILE TYPE: SCAL
00204           IF(CP_FILES(I)%TYPE(1:4).EQ.'SCAL') THEN
00205             OPEN(CP_FILES(I)%LU,
00206      &           FILE=TRIM(CP_FILES(I)%TELNAME),
00207      &           ACTION=CP_FILES(I)%ACTION,FORM='UNFORMATTED')
00208 ! PARALLEL, OTHER FILE TYPE
00209           ELSE
00210             OPEN(CP_FILES(I)%LU,
00211      &           FILE=TRIM(CP_FILES(I)%TELNAME)
00212      &           //EXTENS(NCSIZE-1,IPID),
00213      &           ACTION=CP_FILES(I)%ACTION,FORM='UNFORMATTED')
00214           ENDIF
00215         ENDIF
00216       ENDDO                     !CP_FILES
00217 !
00218 !-----------------------------------------------------------------------
00219 ! WRITES THE HEADER OF THE RESFILES
00220 !-----------------------------------------------------------------------
00221 !
00222       CALL CREATE_DATASET_SERAFIN(CP_FILES(4)%LU,
00223      &     '2D HYDRAULIC PARAMETERS IN 3D  '//
00224      &     '                                         ',
00225      &     NUMVAR2DHYD,
00226      &     UR2DHYD_FILES_LABELS,
00227      &     UR2DHYD_FILES_OUTVAR,
00228      &     CP_FILES(4)%FMT)
00229 
00230       CALL CREATE_DATASET_SERAFIN(CP_FILES(3)%LU,
00231      &     'USEROUTPUT3D                   '//
00232      &     '                                         ',
00233      &     NUMVARUR3D2RES,
00234      &     UR3D_FILES_LABELS,
00235      &     UR3D_FILES_OUTVAR,
00236      &     CP_FILES(3)%FMT)
00237 !
00238 !-----------------------------------------------------------------------
00239 ! WRITES THE MESH INFORMATION IN THE OUTPUT FILE :
00240 !-----------------------------------------------------------------------
00241 !
00242       DO I = 3, 3               !UBOUND(CP_FILES)
00243         CALL WRITE_MESH(CP_FILES(I)%FMT, ! RESULTS FILE FORMAT
00244      &       CP_FILES(I)%LU,   ! LU FOR RESULTS FILE
00245      &       USRMSH,           ! CHARACTERISES MESH
00246      &       USRMSH_NPLAN,     ! NUMBER OF PLANES /NA/
00247      &       MARDAT,           ! START DATE
00248      &       MARTIM,           ! START TIME
00249      &       I_ORIG,J_ORIG)    ! COORDINATES OF THE ORIGIN.
00250       ENDDO
00251 
00252       DO I = 4, 4               !UBOUND(CP_FILES)
00253         CALL WRITE_MESH(CP_FILES(I)%FMT, ! RESULTS FILE FORMAT
00254      &       CP_FILES(I)%LU,   ! LU FOR RESULTS FILE
00255      &       USRMSH_2DHYD,     ! CHARACTERISES MESH
00256      &       USRMSH_2DHYD_NPLAN, ! NUMBER OF PLANES /NA/
00257      &       MARDAT,           ! START DATE
00258      &       MARTIM,           ! START TIME
00259      &       I_ORIG,J_ORIG)    ! COORDINATES OF THE ORIGIN.
00260       ENDDO
00261 !
00262 !-----------------------------------------------------------------------
00263 ! INITS OUTPUT VECTORS
00264 !-----------------------------------------------------------------------
00265 !
00266 ! VSPRES
00267       DO K = 1, NSICLA
00268         CALL BIEF_ALLVEC(1,VSP_FRA(K),'VSPFRA',41,1,1,USRMSH)
00269       ENDDO
00270 
00271       CALL BIEF_ALLVEC(1,VSP_D,     'VSP__D',41,1,1,USRMSH)
00272       CALL BIEF_ALLVEC(1,VSP_D50,   'VSPD50',41,1,1,USRMSH)
00273       CALL BIEF_ALLVEC(1,VSP_ERROR, 'VSP_ER',41,1,1,USRMSH)
00274 
00275 ! VSPHYD
00276       DO K = 1, NUMVAR2DHYD
00277         CALL BIEF_ALLVEC(1,UR2DHYD(K),'VSPHYD',41,1,1,USRMSH_2DHYD)
00278       ENDDO
00279 !
00280 !-----------------------------------------------------------------------
00281 !
00282       RETURN
00283       END

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