File indexing completed on 2018-03-02 18:42:28 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
ee1c912a22 Mart*0001 #include "OBCS_OPTIONS.h"
0002
3858f34d07 Jean*0003
0004
0005
e9741b789e Jean*0006 SUBROUTINE OBCS_APPLY_PTRACER(
3858f34d07 Jean*0007 I bi, bj, kArg, iTracer,
0008 U pFld,
0009 I myThid )
0010
0011
0012
0013
0014
0015
0016
0017
0018
ee1c912a22 Mart*0019 IMPLICIT NONE
0020
0021 #include "SIZE.h"
0022 #include "EEPARAMS.h"
0023 #include "PARAMS.h"
9b4f2a04e2 Jean*0024 #include "OBCS_GRID.h"
e9741b789e Jean*0025 #ifdef ALLOW_PTRACERS
ee1c912a22 Mart*0026 #include "PTRACERS_SIZE.h"
0027 #include "OBCS_PTRACERS.h"
0028 #endif /* ALLOW_PTRACERS */
0029
3858f34d07 Jean*0030
ee1c912a22 Mart*0031
3858f34d07 Jean*0032
0033
976eeda264 Jean*0034
3858f34d07 Jean*0035
0036
0037
0038 INTEGER bi, bj
0039 INTEGER kArg
0040 INTEGER iTracer
0041 _RL pFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,*)
ee1c912a22 Mart*0042 INTEGER myThid
3858f34d07 Jean*0043
ee1c912a22 Mart*0044
976eeda264 Jean*0045 #ifdef ALLOW_PTRACERS
ee1c912a22 Mart*0046
3858f34d07 Jean*0047
ee1c912a22 Mart*0048
3858f34d07 Jean*0049 INTEGER k, kLo, kHi
0050 INTEGER kl, kMx
0051 INTEGER i, j
0052 INTEGER Iobc, Jobc
ee1c912a22 Mart*0053
3858f34d07 Jean*0054 IF ( kArg.EQ.0 ) THEN
0055 kLo = 1
0056 kHi = Nr
0057 kMx = Nr
0058 ELSE
0059 kLo = kArg
0060 kHi = kArg
0061 kMx = 1
0062 ENDIF
0063
ee1c912a22 Mart*0064
0065 #ifdef ALLOW_OBCS_NORTH
3858f34d07 Jean*0066 IF ( tileHasOBN(bi,bj) ) THEN
0067
74019f026d Jean*0068 DO i=1-OLx,sNx+OLx
3858f34d07 Jean*0069 Jobc = OB_Jn(i,bi,bj)
74019f026d Jean*0070 IF ( Jobc.NE.OB_indexNone ) THEN
3858f34d07 Jean*0071 DO k = kLo,kHi
0072 kl = MIN(k,kMx)
976eeda264 Jean*0073 pFld(i,Jobc,kl) = OBNptr(i,k,bi,bj,iTracer)
3858f34d07 Jean*0074 ENDDO
0075 ENDIF
0076 ENDDO
0077 ENDIF
0078 #endif /* ALLOW_OBCS_NORTH */
0079
ee1c912a22 Mart*0080 #ifdef ALLOW_OBCS_SOUTH
3858f34d07 Jean*0081 IF ( tileHasOBS(bi,bj) ) THEN
0082
74019f026d Jean*0083 DO i=1-OLx,sNx+OLx
3858f34d07 Jean*0084 Jobc = OB_Js(i,bi,bj)
74019f026d Jean*0085 IF ( Jobc.NE.OB_indexNone ) THEN
3858f34d07 Jean*0086 DO k = kLo,kHi
0087 kl = MIN(k,kMx)
976eeda264 Jean*0088 pFld(i,Jobc,kl) = OBSptr(i,k,bi,bj,iTracer)
3858f34d07 Jean*0089 ENDDO
0090 ENDIF
0091 ENDDO
0092 ENDIF
0093 #endif /* ALLOW_OBCS_SOUTH */
ee1c912a22 Mart*0094
0095
0096 #ifdef ALLOW_OBCS_EAST
3858f34d07 Jean*0097 IF ( tileHasOBE(bi,bj) ) THEN
0098
74019f026d Jean*0099 DO j=1-OLy,sNy+OLy
3858f34d07 Jean*0100 Iobc = OB_Ie(j,bi,bj)
74019f026d Jean*0101 IF ( Iobc.NE.OB_indexNone ) THEN
3858f34d07 Jean*0102 DO k = kLo,kHi
0103 kl = MIN(k,kMx)
976eeda264 Jean*0104 pFld(Iobc,j,kl) = OBEptr(j,k,bi,bj,iTracer)
3858f34d07 Jean*0105 ENDDO
0106 ENDIF
0107 ENDDO
0108 ENDIF
0109 #endif /* ALLOW_OBCS_EAST */
0110
ee1c912a22 Mart*0111 #ifdef ALLOW_OBCS_WEST
3858f34d07 Jean*0112 IF ( tileHasOBW(bi,bj) ) THEN
0113
74019f026d Jean*0114 DO j=1-OLy,sNy+OLy
3858f34d07 Jean*0115 Iobc = OB_Iw(j,bi,bj)
74019f026d Jean*0116 IF ( Iobc.NE.OB_indexNone ) THEN
3858f34d07 Jean*0117 DO k = kLo,kHi
0118 kl = MIN(k,kMx)
976eeda264 Jean*0119 pFld(Iobc,j,kl) = OBWptr(j,k,bi,bj,iTracer)
3858f34d07 Jean*0120 ENDDO
0121 ENDIF
0122 ENDDO
0123 ENDIF
0124 #endif /* ALLOW_OBCS_WEST */
ee1c912a22 Mart*0125
976eeda264 Jean*0126 #endif /* ALLOW_PTRACERS */
0127
ee1c912a22 Mart*0128 RETURN
0129 END