File indexing completed on 2018-03-02 18:41:06 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
8e4c181d69 Jean*0001 # include "GAD_OPTIONS.h"
0002
0003 SUBROUTINE GAD_PQM_HAT_Y(bi,bj,kk,ix,
0004 & method,mask,fbar,edge,
0005 & ohat,fhat,myThid)
0006
0007
0008
0009
0010 implicit none
0011
0012
0013 # include "SIZE.h"
0014 # include "GRID.h"
0015 # include "GAD.h"
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 integer bi,bj,kk,ix
0035 integer method
0036 _RL mask(1-OLy:sNy+OLy)
0037 _RL fbar(1-OLy:sNy+OLy)
0038 _RL edge(1:2,
0039 & 1-OLy:sNy+OLy)
0040 _RL ohat(1:2,
0041 & 1-OLy:sNy+OLy)
0042 _RL fhat(1:5,
0043 & 1-OLy:sNy+OLy)
0044 integer myThid
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 integer ii,iy
0060 _RL ff00
0061 _RL ffll,ffrr
0062 _RL yhat
0063 _RL fell,ferr
0064 _RL dell,derr
0065 _RL dfds(-1:+1)
0066 _RL uhat(+1:+5)
0067 _RL lhat(+1:+5)
0068 _RL scal(+1:+2)
0069 _RL fmag,fdel
0070 integer mono
0071
0072
0073 do iy = 1-OLy+3, sNy+OLy-3
0074
0075 if (mask(iy) .gt. 0. _d 0) then
0076
0077
0078 yhat = dyF(ix,iy,bi,bj) * 0.5 _d 0
0079
0080
0081 ff00 = fbar(iy+0)
0082 ffll = ff00
0083 & + mask(iy-1)*(fbar(iy-1)-ff00)
0084 ffrr = ff00
0085 & + mask(iy+1)*(fbar(iy+1)-ff00)
0086
0087 fell = edge(+1,iy-0)
0088 ferr = edge(+1,iy+1)
0089
0090 dell = edge(+2,iy-0)
0091 derr = edge(+2,iy+1)
0092
0093 dell = dell * yhat
0094 derr = derr * yhat
0095
0096
0097
0098 if ( method.eq.ENUM_PQM_NULL_LIMIT ) then
0099
0100 CALL GAD_PQM_FUN_NULL ( ff00,
0101 & fell,ferr,dell,derr,lhat,mono)
0102
0103
0104 elseif ( method.eq.ENUM_PQM_MONO_LIMIT ) then
0105
0106 CALL GAD_PLM_FUN_U(ffll,ff00,ffrr,dfds)
0107
0108 CALL GAD_PQM_FUN_MONO ( ff00,ffll,ffrr,
0109 & fell,ferr,dell,derr,dfds,lhat,
0110 & mono)
0111
0112
0113 elseif ( method.eq.ENUM_PQM_WENO_LIMIT ) then
0114
0115 CALL GAD_PLM_FUN_U(ffll,ff00,ffrr,dfds)
0116
0117 CALL GAD_PQM_FUN_NULL ( ff00,
0118 & fell,ferr,dell,derr,uhat,mono)
0119
0120 CALL GAD_PQM_FUN_MONO ( ff00,ffll,ffrr,
0121 & fell,ferr,dell,derr,dfds,lhat,
0122 & mono)
0123
0124 if ( mono .gt. 0) then
0125
0126
0127 fdel = abs(ffrr-ff00)+abs(ff00-ffll)
0128 fmag = abs(ffll)+abs(ff00)+abs(ffrr)
0129
0130 if (fdel .gt. 1. _d -6 * fmag) then
0131
0132
0133 CALL GAD_OSC_MUL_Y(iy,+2,mask,
0134 & ohat,scal)
0135
0136 do ii = +1, +5
0137
0138 lhat(ii) = scal(1) * uhat(ii)
0139 & + scal(2) * lhat(ii)
0140 end do
0141
0142 end if
0143
0144 end if
0145
0146
0147 endif
0148
0149 do ii = +1, +5
0150
0151 fhat(ii,iy) = lhat(ii)
0152 end do
0153
0154 else
0155
0156 do ii = +1, +5
0157 fhat(ii,iy) = 0.0 _d 0
0158 end do
0159
0160 end if
0161
0162 end do
0163
0164 return
0165
0166
0167 end