File indexing completed on 2018-03-02 18:41:02 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
0004
0005
0006
0007
0008
0009
0010 SUBROUTINE GAD_OSC_LOC_Y(iy,mask,fbar,ohat)
0011
0012 implicit none
0013
0014
0015 # include "SIZE.h"
0016
0017
0018 integer iy
0019 _RL mask(1-OLy:sNy+OLy)
0020 _RL fbar(1-OLy:sNy+OLy)
0021 _RL ohat(1:2,
0022 & 1-OLy:sNy+OLy)
0023
0024
0025 _RL floc(-2:+2)
0026
0027 if (iy.gt. +1-OLy .and.
0028 & iy.lt.sNy+OLy) then
0029
0030
0031
0032 floc(+0) = fbar(+0+iy)
0033
0034 floc(-1) = floc(+0) +
0035 & mask(iy-1)*(fbar(iy-1)-floc(+0))
0036 floc(+1) = floc(+0) +
0037 & mask(iy+1)*(fbar(iy+1)-floc(+0))
0038
0039
0040
0041 ohat(+1,iy) = floc(+1)*0.25 _d 0
0042 & - floc(-1)*0.25 _d 0
0043
0044 ohat(+2,iy) = floc(+1)*0.25 _d 0
0045 & - floc(+0)*0.50 _d 0
0046 & + floc(-1)*0.25 _d 0
0047
0048 else
0049
0050 if (iy.eq. +1-OLy) then
0051
0052
0053
0054 floc(+0) = fbar(+0+iy)
0055
0056 floc(+1) = floc(+0) +
0057 & mask(iy+1)*(fbar(iy+1)-floc(+0))
0058 floc(+2) = floc(+1) +
0059 & mask(iy+2)*(fbar(iy+2)-floc(+1))
0060
0061
0062
0063 ohat(+1,iy) = floc(+1)*0.50 _d 0
0064 & - floc(+0)*0.50 _d 0
0065
0066 ohat(+2,iy) = floc(+2)*0.25 _d 0
0067 & - floc(+1)*0.50 _d 0
0068 & + floc(+0)*0.25 _d 0
0069
0070 end if
0071
0072 if (iy.eq.sNy+OLy) then
0073
0074
0075
0076 floc(+0) = fbar(+0+iy)
0077
0078 floc(-1) = floc(+0) +
0079 & mask(iy-1)*(fbar(iy-1)-floc(+0))
0080 floc(-2) = floc(-1) +
0081 & mask(iy-2)*(fbar(iy-2)-floc(-1))
0082
0083
0084
0085 ohat(+1,iy) = floc(+0)*0.50 _d 0
0086 & - floc(-1)*0.50 _d 0
0087
0088 ohat(+2,iy) = floc(+0)*0.25 _d 0
0089 & - floc(-1)*0.50 _d 0
0090 & + floc(-2)*0.25 _d 0
0091
0092 end if
0093
0094 end if
0095
0096 return
0097
0098
0099 end
0100
0101
0102
0103 SUBROUTINE GAD_OSC_HAT_Y(bi,bj,kk,ix,
0104 & mask,fbar,ohat,myThid)
0105
0106
0107
0108
0109 implicit none
0110
0111
0112 # include "SIZE.h"
0113
0114
0115 integer bi,bj,kk,ix
0116 _RL mask(1-OLy:sNy+OLy)
0117 _RL fbar(1-OLy:sNy+OLy)
0118 _RL ohat(1:2,
0119 & 1-OLy:sNy+OLy)
0120 integer myThid
0121
0122
0123 integer iy
0124
0125
0126 do iy = 1-OLy+0, sNy+OLy-0
0127
0128 CALL GAD_OSC_LOC_Y(iy,mask,fbar,ohat)
0129
0130 end do
0131
0132 return
0133
0134
0135 end