! Copyright 2014 College of William and Mary ! ! Licensed under the Apache License, Version 2.0 (the "License"); ! you may not use this file except in compliance with the License. ! You may obtain a copy of the License at ! ! http://www.apache.org/licenses/LICENSE-2.0 ! ! Unless required by applicable law or agreed to in writing, software ! distributed under the License is distributed on an "AS IS" BASIS, ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ! See the License for the specific language governing permissions and ! limitations under the License. SUBROUTINE sed2d_check !-------------------------------------------------------------------- ! This subroutine displays values computed by sed2d routines only for ! the input parameters declared in this parameter list. It is only ! active if IPRE = 1 in sed2d.in. ! The main purpose of this routine is to check that there is ! no bug in the coded empirical formulae ! ! Author: guillaume dodet (gdodet01@univ-lr.fr, gdodet@lnec.pt); ! Date: 12/03/2013 ! ! History: !-------------------------------------------------------------------- USE schism_glbl, ONLY : grav,rkind USE schism_msgp, ONLY : myrank,parallel_abort USE sed2d_mod, ONLY : idsed2d USE sed2d_friction USE sed2d_transport IMPLICIT NONE !- Local variable --------------------------------------------------- REAL(rkind) :: beta,Cd,D_star,tau0,tau_cr,s,theta_cr,theta0,Ucr_c, & Ucr_w,udir,z0cr,z0sw,z0wr REAL(rkind), DIMENSION(2) :: qb,qs,qtot,slope CHARACTER(LEN=*),PARAMETER :: FMT1='(A16,E11.4)' !- User-defined parameters ------------------------------------------ REAL(rkind), PARAMETER :: rho0 = 1027.d0 !Water density (kg/m3) REAL(rkind), PARAMETER :: rhos = 2650.d0 !Sediment density (kg/m3) REAL(rkind), PARAMETER :: nu = 1.36e-6 !Water kine. visco.(m2/s) REAL(rkind), PARAMETER :: poro = 0.4d0 !Porosity (-) REAL(rkind), PARAMETER :: d50 = 0.0005d0 !d50 grain diameter (m) REAL(rkind) :: d90 = 0.000d0 !d90 grain diameter (m) REAL(rkind), PARAMETER :: h = 1.d0 !Water depth (m) REAL(rkind), PARAMETER :: u = 2.d0 !Current velocity X (m/s) REAL(rkind), PARAMETER :: v = 0.d0 !Current velocity Y (m/s) REAL(rkind) :: z0 = 0.001d0 !Roughness length (m) REAL(rkind), PARAMETER :: dpdx = 0.d0 !Bottom slope X (m/m) REAL(rkind), PARAMETER :: dpdy = 0.d0 !Bottom slope Y (m/m) REAL(rkind), PARAMETER :: urms = 1.d0 !Wave orbital vel. (m/s) REAL(rkind), PARAMETER :: hs = 1.d0 !Sign. wave height (m) REAL(rkind), PARAMETER :: tp = 10.d0 !Peak period (s) REAL(rkind), PARAMETER :: wl = 50.d0 !Wave length (m) !-------------------------------------------------------------------- ! The following values can be specified in order to compare results ! with values from given in Soulsby, 1997: ! ! - Threshold of motion (p97) ! with d50 = 0.2 mm, d90 = 0.3 mm, h = 5 m, rho0 = 1027 kg/m*, ! rhos = 2650 kg/m3, nu = 1.36e-6 m2/s: ! * Ucr_c = 0.39 m/s ! * Ucr_w = 0.18 m/s ! * D* = 4.06 ! * theta_cr = 0.0553 ! * tau_cr = 0.176 N/m2 ! ! ... ! !--------------------------------------------------------------------- IF(myrank>0) CALL parallel_abort('sed2d_check only works on 1 proc') !- Display user-defined parameters ---------------------------------- WRITE(idsed2d,*)'----------------- CHECKS ------------------------' WRITE(idsed2d,*)'*** User-defined parameters ***' WRITE(idsed2d,*)' rho0 = ',rho0 WRITE(idsed2d,*)' rhos = ',rhos WRITE(idsed2d,*)' nu = ',nu WRITE(idsed2d,*)' poro = ',poro WRITE(idsed2d,*)' d50 = ',d50 WRITE(idsed2d,*)' d90 = ',d90 WRITE(idsed2d,*)' depth = ',h WRITE(idsed2d,*)' u = ',u WRITE(idsed2d,*)' v = ',v WRITE(idsed2d,*)' dpdx = ',dpdx WRITE(idsed2d,*)' dpdy = ',dpdy WRITE(idsed2d,*)' urms = ',urms WRITE(idsed2d,*)' hs = ',hs WRITE(idsed2d,*)' tp = ',tp WRITE(idsed2d,*)' wl = ',wl WRITE(idsed2d,*)'' !- Display thresholds parameters ------------------------------------ IF(d90