XBeach
C:/repositories/XBeach/trunk/src/xbeachlibrary/wave_boundary_datastore.f90
Go to the documentation of this file.
00001 module wave_boundary_datastore
00002    ! The module stores essential information for wave boundary conditions in the following
00003    ! derived types:
00004    !  - waveBoundaryParameters
00005    !  - waveBoundaryAdministration
00006    !  - waveBoundaryTimeSeries
00007    !  - waveSpectrumAdministration
00008    !
00009    ! These derived types are accessed by wave_boundary_main, wave_boundary_init and
00010    ! wave_boundary_update
00011    implicit none
00012    save
00013    !
00014    !
00015    ! Define derived type to store wave parameter information
00016    type waveBoundaryParametersType
00017       character(1024)                  :: masterFileName
00018       integer                          :: np,ntheta
00019       real*8                           :: x0,y0
00020       real*8                           :: hboundary
00021       logical                          :: nonhspectrum
00022       real*8                           :: sprdthr,trepfac
00023       integer                          :: Tm01switch
00024       real*8,dimension(:),allocatable  :: xb,yb,theta     ! Note, can these be changed to pointers?
00025       integer                          :: randomseed
00026       integer                          :: nspr
00027       real*8                           :: rho
00028       real*8                           :: nmax
00029       real*8                           :: fcutoff
00030    end type waveBoundaryParametersType
00031    !
00032    !
00033    ! Define derived type to store information on boundary condition file (only required for
00034    ! spectral wave boundary conditions
00035    type filenames
00036       character(1024)                        :: fname  ! file name of boundary condition file
00037       integer                                :: listline ! read position in FILELIST files
00038       logical                                :: repeat = .false. ! indicate to repeat this file every rtbc cycle
00039    endtype filenames
00040    !
00041    !
00042    ! Define derived type to store wave boundary administration information
00043    type waveBoundaryAdministrationType
00044       logical                                 :: initialized = .false.   ! Initialisation status
00045       real*8                                  :: startComputeNewSeries   ! Time at which to compute a boundary condition time series (s)
00046       real*8                                  :: startCurrentSeries      ! Time at which current boundary conditions started (s)
00047    end type waveBoundaryAdministrationType
00048    !
00049    !
00050    ! Define derived type to store spectral boundary administration information
00051    type waveSpectrumAdministrationType
00052       integer                                  :: nspectra        ! number of input spectrs, set in init spectrum
00053       type(filenames),dimension(:),allocatable :: bcfiles         ! input wave spectrum files
00054       logical                                  :: repeatwbc       ! switch to repeat all of the wave boundary conditions
00055       integer                                  :: bccount         ! number of times boundary conditions have been generated, set in init spectrum
00056       real*8                                   :: spectrumendtime ! end time of boundary condition written to administration file
00057       real*8,dimension(:,:),allocatable        :: lastwaveelevation ! wave height at the end of the last spectrum
00058       real*8,dimension(:),allocatable          :: xspec,yspec     ! x,y coordinates of input wave spectra
00059       real*8                                   :: Hbc,Tbc,Dbc     ! computed representative wave height, period and wave direction
00060    end type waveSpectrumAdministrationType
00061    !
00062    !
00063    ! Define derived type to store wave boundary time series information
00064    type waveBoundaryTimeSeriesType
00065       real*8,dimension(:,:,:),allocatable  :: eebct
00066       real*8,dimension(:,:),allocatable    :: qxbct,qybct
00067       real*8,dimension(:,:),allocatable    :: zsbct,ubct,vbct,wbct
00068       real*8,dimension(:),allocatable      :: tbc
00069    end type waveBoundaryTimeSeriesType
00070    !
00071    !
00072    ! Declare variables of type above
00073    type(waveBoundaryParametersType)       :: waveBoundaryParameters
00074    type(waveBoundaryAdministrationType)   :: waveBoundaryAdministration
00075    type(waveBoundaryTimeSeriesType)       :: waveBoundaryTimeSeries
00076    type(waveSpectrumAdministrationType)   :: waveSpectrumAdministration
00077 
00078 end module wave_boundary_datastore
 All Classes Files Functions Variables Defines