Go to the documentation of this file.
89 LOGICAL,
PARAMETER ::
lsloc = .true.
90 INTEGER,
PARAMETER ::
imem = 1
94 REAL,
PARAMETER ::
zero = 0.0d0
96 real*8,
PARAMETER ::
thr8 = tiny(1.d0)
97 REAL,
PARAMETER ::
thr = tiny(1.0)
167 INTEGER,
SAVE :: IENT = 0
170 REAL(8),
intent(out) :: eTime
180 CALL strace (ient,
'WAV_MY_WTIME')
182 IF (mpimode .eq. 0)
THEN
257 INTEGER,
SAVE :: IENT = 0
262 character(*),
intent(in) :: string
265 CALL strace (ient,
'PRINT_MY_TIME')
268 WRITE(740+
iaproc,*)
'TIMING time=', etime,
' at step ', string
352 INTEGER,
SAVE :: IENT = 0
358 REAL,
intent(out) :: CAD(NSPEC)
359 INTEGER,
intent(in) :: ISEA
360 REAL,
intent(in) :: DTG
361 INTEGER :: ISP, IK, ITH, IX, IY
362 REAL :: FRK(NK), FRG(NK), DSDD(0:NK+1)
363 REAL :: FACTH, DCXY, DCYX, DCXXYY, DTTST
364 REAL :: eDCXDX, eDCXDY, eDCYDX, eDCYDY, eDDDX, eDDDY, eCTHG0
365 REAL :: VCFLT(NSPEC), DEPTH, FDG
368 CALL strace (ient,
'PROP_REFRACTION_PR1')
378 depth = max(
dmin , dw(isea) )
380 IF ( depth*wn(ik,isea) .LT. 5. )
THEN
381 dsdd(ik) = max( 0. , cg(ik,isea)*wn(ik,isea)-0.5*
sig(ik) ) / depth
388 fddmax = max( fddmax , abs(
esin(ith)*edddx -
ecos(ith)*edddy ) )
391 frk(ik) = facth * dsdd(ik) / wn(ik,isea)
393 frg(ik) = fdg * cg(ik,isea)
396 vcflt(isp) = frg(
mapwn(isp)) *
ecos(isp) + &
405 frk(ik) = facth * cg(ik,isea) * wn(ik,isea) /
sig(ik)
408 vcflt(isp) = frg(
mapwn(isp)) *
ecos(isp) &
419 dcyx = facth * edcydx
420 dcxxyy = facth * ( edcxdx - edcydy )
421 dcxy = facth * edcxdy
423 vcflt(isp) = vcflt(isp) +
es2(isp)*dcyx +
esc(isp)*dcxxyy -
ec2(isp)*dcxy
427 cad(isp)=dble(vcflt(isp))
513 INTEGER,
SAVE :: IENT = 0
515 REAL,
intent(out) :: CAD(NSPEC)
516 INTEGER,
intent(in) :: ISEA, IP
517 REAL,
intent(in) :: DTG
518 logical,
intent(in) :: DoLimiter
519 INTEGER :: ISP, IK, ITH, IX, IY
520 REAL :: FRK(NK), FRG(NK), DSDD(0:NK+1)
521 REAL :: FACTH, DCXY, DCYX, DCXXYY, DTTST
522 REAL :: eDCXDX, eDCXDY, eDCYDX, eDCYDY, eDDDX, eDDDY, eCTHG0
523 REAL :: VCFLT(NSPEC), DEPTH, FDG, CG1(0:NK+1), WN1(0:NK+1)
524 REAL :: FDDMAX, CFLTHMAX, VELNOFILT, CTMAX_eff
526 CALL strace (ient,
'PROP_REFRACTION_PR3')
537 depth = max(
dmin ,
dw(isea) )
539 IF ( depth*
wn(ik,isea) .LT. 5. )
THEN
540 dsdd(ik) = max( 0. ,
cg(ik,isea)*
wn(ik,isea)-0.5*
sig(ik) ) / depth
546 frk(ik) = facth * dsdd(ik) /
wn(ik,isea)
547 frg(ik) = fdg *
cg(ik,isea)
554 dcyx = facth * edcydx
555 dcxxyy = facth * ( edcxdx - edcydy )
556 dcxy = facth * edcxdy
558 vcflt(isp) =
es2(isp)*dcyx +
esc(isp)*dcxxyy -
ec2(isp)*dcxy
567 frk(ik) = facth *
cg(ik,isea) *
wn(ik,isea) /
sig(ik)
573 velnofilt = vcflt(isp) &
582 vcflt(isp)=sign(min(abs(velnofilt),ctmax_eff),velnofilt)
588 cad(isp)=dble(vcflt(isp))
660 USE w3adatmd,
ONLY:
cg,
wn,
dcxdx,
dcxdy,
dcydx,
dcydy,
cx,
cy,
dddx,
dddy,
dw
669 INTEGER,
SAVE :: IENT = 0
671 INTEGER,
intent(in) :: ISEA, IP
672 REAL,
intent(out) :: DMM(0:NK2)
673 REAL,
intent(in) :: DTG
674 REAL,
intent(out) :: CAS(NSPEC)
675 REAL :: DB(NK2), DSDD(0:NK+1)
676 REAL :: eDCXDX, eDCXDY, eDCYDX, eDCYDY, eCX, eCY, eDDDX, EDDDY
677 REAL :: DCXX, DCXYYX, DCYY, FKD, FACK
678 REAL :: VELNOFILT, VELFAC, DEPTH
679 REAL :: CFLK(NK2,NTH), FKC(NTH), FKD0
680 INTEGER :: IK, ITH, ISP, IY, IX
682 CALL strace (ient,
'PROP_FREQ_SHIFT')
705 dcxyyx = - ( edcxdy + edcydx )
707 fkd = ( ecx*edddx + ecy*edddy )
710 fkc(ith) =
ec2(ith)*dcxx +
esc(ith)*dcxyyx +
es2(ith)*dcyy
713 db(ik+1) =
dsip(ik) /
cg(ik,isea)
714 dmm(ik+1) = dble(
wn(ik+1,isea) -
wn(ik,isea))
716 db(nk+2) =
dsip(nk+1) /
cg(nk+1,isea)
720 depth = max(
dmin ,
dw(isea) )
722 IF ( depth*
wn(ik,isea) .LT. 5. )
THEN
723 dsdd(ik) = max( 0. ,
cg(ik,isea)*
wn(ik,isea)-0.5*
sig(ik) ) / depth
729 fkd0 = fkd /
cg(ik,isea) * dsdd(ik)
730 velfac = fack/db(ik+1)
732 velnofilt = ( fkd0 +
wn(ik,isea)*fkc(ith) ) * velfac
733 cflk(ik+1,ith) = velnofilt/velfac
739 cas(isp)=dble(cflk(ik,ith))
813 USE w3adatmd,
ONLY:
cg,
wn,
dcxdx,
dcxdy,
dcydx,
dcydy,
cx,
cy,
dddx,
dddy,
dw
822 INTEGER,
SAVE :: IENT = 0
825 INTEGER,
intent(in) :: ISEA, IP
826 REAL,
intent(out) :: CWNB_M2(1-NTH:NSPEC)
827 REAL,
intent(out) :: DWNI_M2(NK)
828 REAL,
intent(in) :: DTG
830 REAL :: eDCXDX, eDCXDY, eDCYDX, eDCYDY, eCX, eCY, eDDDX, EDDDY
831 REAL :: DCXX, DCXYYX, DCYY, FKD, FACK
833 REAL :: FKC(NTH), FKD0
834 REAL :: VCWN(1-NTH:NSPEC+NTH)
836 REAL :: sumDiff, sumDiff1, sumDiff2, sumDiff3
837 REAL :: sumDiff0, sumDiff4, sumDiff5
838 INTEGER :: IK, ITH, ISP, IY, IX
842 CALL strace (ient,
'PROP_FREQ_SHIFT_M2')
866 dcxx = - fack * edcxdx
867 dcxyyx = - fack * ( edcxdy + edcydx )
868 dcyy = - fack * edcydy
869 fkd = fack * ( ecx*edddx + ecy*edddy )
872 fkc(ith) =
ec2(ith)*dcxx +
esc(ith)*dcxyyx +
es2(ith)*dcyy
875 depth = max(
dmin ,
dw(isea) )
877 IF ( depth*
wn(ik,isea) .LT. 5. )
THEN
878 dsdd(ik) = max( 0. ,
cg(ik,isea)*
wn(ik,isea)-0.5*
sig(ik) ) / depth
885 fkd0 = fkd /
cg(ik,isea) * dsdd(ik)
888 vcwn(isp) = fkd0 +
wn(ik,isea)*fkc(ith)
894 cwnb_m2(isp) = dble(0.5 * ( vcwn(isp) + vcwn(isp+nth) ))
895 sumdiff = sumdiff + max(cwnb_m2(isp),
zero)
898 dwni_m2(ik) = dble(
cg(ik,isea) /
dsip(ik) )
979 INTEGER,
intent(in) :: IMOD
980 logical,
intent(in) :: IsMulti
982 INTEGER,
SAVE :: IENT = 0
986 INTEGER :: ISEA, IP_glob
987 INTEGER :: IPROC, IERR_MPI, istat
991 CALL strace (ient,
'SYNCHRONIZE_IPGL_ETC_ARRAY')
999 CALL mpi_send(iarr,1,mpi_int, iproc-1, 37,
mpi_comm_wave, ierr_mpi)
1014 WRITE(*,*)
' Before allocation of MDATAS % SEA_IPGL, SEA_IPGL_TO_PROC : IMOD=', imod,
' NSEA=',
nsea
1018 ip_glob =
mapsf(isea, 1)
1102 INTEGER,
intent(out) :: NSEALout, NSEALMout
1106 INTEGER,
SAVE :: IENT = 0
1112 CALL strace (ient,
'SET_UP_NSEAL_NSEALM')
1131 IF (gtype .eq. ungtype)
THEN
1227 INTEGER,
SAVE :: IENT = 0
1231 INTEGER,
intent(in) :: ISEA
1232 INTEGER,
intent(out) :: JSEA, ISPROC
1235 CALL strace (ient,
'INIT_GET_JSEA_ISPROC')
1241 jsea = 1 + (isea-1)/
naproc
1242 isproc = isea - (jsea-1)*
naproc
1245 ip_glob =
mapsf(isea,1)
1335 INTEGER,
SAVE :: IENT = 0
1340 INTEGER,
intent(in) :: ISEA
1341 INTEGER,
intent(out) :: JSEA, IBELONG
1342 INTEGER ISPROC, IX, JX
1344 CALL strace (ient,
'GET_JSEA_IBELONG')
1347 jsea = 1 + (isea-1)/
naproc
1348 isproc = isea - (jsea-1)*
naproc
1349 IF (isproc .eq.
iaproc)
THEN
1357 jsea = 1 + (isea-1)/
naproc
1358 isproc = isea - (jsea-1)*
naproc
1359 IF (isproc .eq.
iaproc)
THEN
1474 INTEGER,
SAVE :: IENT = 0
1476 INTEGER,
intent(in) :: JSEA
1477 INTEGER,
intent(out) :: ISEA
1479 CALL strace (ient,
'INIT_GET_ISEA')
1589 INTEGER,
SAVE :: IENT = 0
1597 INTEGER ISEA, JSEA, Status(NX), rStatus(NX)
1598 INTEGER IPROC, I, ierr, IP, IX, IP_glob
1600 REAL(rkind),
intent(inout) :: TheVar(NX)
1601 REAL(rkind) :: rVect(NX)
1603 DOUBLE PRECISION,
intent(inout) :: TheVar(NX)
1604 DOUBLE PRECISION :: rVect(NX)
1608 CALL strace (ient,
'SYNCHRONIZE_GLOBAL_ARRAY')
1617 CALL mpi_recv(rvect,nx,rtype, iproc-1, 19,
mpi_comm_wcmp, istatus, ierr)
1618 CALL mpi_recv(rstatus,nx,mpi_integer, iproc-1, 23,
mpi_comm_wcmp, istatus, ierr)
1620 IF (rstatus(i) .eq. 1)
THEN
1627 CALL mpi_send(thevar,nx,rtype, iproc-1, 29,
mpi_comm_wcmp, ierr)
1631 CALL mpi_send(status,nx,mpi_integer, 0, 23,
mpi_comm_wcmp, ierr)
1632 CALL mpi_recv(thevar,nx,rtype, 0, 29,
mpi_comm_wcmp, istatus, ierr)
real, dimension(:), pointer esc
subroutine prop_refraction_pr3(IP, ISEA, DTG, CAD, DoLimiter)
Compute refraction part in matrix alternative approach.
cmake src_list cmake include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) check_switches("$
integer, dimension(:), allocatable, public ipgl_tot
Define data structures to set up wave model auxiliary data for several models simultaneously.
type(t_rank), dimension(:), allocatable, public rank
Provides access to some information of all threads e.g.
real, dimension(:,:,:), pointer dcdx
integer, parameter ungtype
integer, dimension(:), allocatable, public ipgl_to_proc
integer, dimension(:), allocatable isea_to_jsea
subroutine set_up_nseal_nsealm(NSEALout, NSEALMout)
Setup NSEAL, NSEALM in context of PDLIB.
real, dimension(:,:), pointer cg
subroutine get_jsea_ibelong(ISEA, JSEA, IBELONG)
Set belongings of JSEA in context of PDLIB.
real, dimension(:), pointer dw
real, dimension(:), pointer sig
integer, dimension(:), allocatable listispprevdir
real, dimension(:), pointer ecos
integer, dimension(:), allocatable, public iplg
Node local to global mapping.
integer, public npa
number of ghost + resident nodes this partition holds
real, dimension(:), pointer dsip
integer, parameter rkind
double precision.
real, dimension(:,:), pointer dcydx
integer, public np_global
number of nodes, global
integer, dimension(:), allocatable, public ipgl_npa
real, dimension(:), pointer es2
real, dimension(:), pointer esin
integer, dimension(:), allocatable, public ipgl
Node global to local mapping np_global long.
real, dimension(:,:,:), pointer dcdy
type(mdata), dimension(:), allocatable, target mdatas
MDATAS.
Has data that belong to nodes.
logical lpdlib
LPDLIB Logical for using the PDLIB library.
real, dimension(:,:), pointer dcxdx
subroutine prop_freq_shift(IP, ISEA, CAS, DMM, DTG)
Compute frequency shift in matrix.
subroutine synchronize_global_array(TheVar)
Sync global array in context of PDLIB.
Provides access to some information of all threads e.g.
subroutine wav_my_wtime(eTime)
NA.
real, dimension(:,:), pointer dddy
subroutine prop_refraction_pr1(ISEA, DTG, CAD)
Compute refraction part in matrix.
real, dimension(:), pointer cy
integer, dimension(:,:), pointer mapsf
subroutine print_my_time(string)
Print timings.
integer, dimension(mpi_status_size) istatus
MPI Real Type Shpuld be MPI_REAL8.
real, dimension(:), pointer cthg0s
integer, dimension(:), allocatable jx_to_jsea
integer, dimension(:), allocatable listispprevfreq
real, dimension(:,:), pointer wn
real, dimension(:,:), pointer dcydy
subroutine prop_freq_shift_m2(IP, ISEA, CWNB_M2, DWNI_M2, DTG)
Compute frequency shift alternative approach.
subroutine strace(IENT, SNAME)
Define data structures to set up wave model input data for several models simultaneously.
integer, dimension(:), pointer mapwn
subroutine init_get_jsea_isproc(ISEA, JSEA, ISPROC)
Set JSEA for all schemes.
integer, pointer mpi_comm_wave
Define some much-used constants for global use (all defined as PARAMETER).
Define data structures to set up wave model dynamic data for several models simultaneously.
subroutine synchronize_ipgl_etc_array(IMOD, IsMulti)
Sync global local arrays.
real, dimension(:,:), pointer dcxdy
type(output), dimension(:), allocatable, target outpts
real, dimension(:,:), pointer dddx
real, dimension(:), pointer cx
integer, dimension(:), allocatable listispnextfreq
Parallel routines for implicit solver.
real, dimension(:), pointer ec2
integer, dimension(:), allocatable listispnextdir
subroutine init_get_isea(ISEA, JSEA)
Set ISEA for all schemes.
integer, pointer mpi_comm_wcmp