File indexing completed on 2018-03-02 18:41:52 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
08e96a842a Jean*0001 #include "MDSIO_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
f1a06a1eb2 Jean*0012 SUBROUTINE MDS_PASS_R8toRL(
0013 U buffer, arrFld,
0014 I oLi, oLj, nNz, kLo, kSize,
9a33636256 Jean*0015 I biArg, bjArg, copyTo, myThid )
08e96a842a Jean*0016
0017
8decba0243 Jean*0018
9a33636256 Jean*0019
0020
08e96a842a Jean*0021
0022
0023 IMPLICIT NONE
0024
0025
0026 #include "EEPARAMS.h"
0027 #include "SIZE.h"
0028
0029
0030
8decba0243 Jean*0031
0032
f1a06a1eb2 Jean*0033
0034
8decba0243 Jean*0035
0036
0037
0038
0039
08e96a842a Jean*0040
0041
f1a06a1eb2 Jean*0042 INTEGER oLi, oLj
8decba0243 Jean*0043 INTEGER nNz, kSize
f1a06a1eb2 Jean*0044 Real*8 buffer(1-oLi:sNx+oLi,1-oLj:sNy+oLj,nNz,nSx,nSy)
8decba0243 Jean*0045 _RL arrFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,kSize,nSx,nSy)
0046 INTEGER kLo
9a33636256 Jean*0047 INTEGER biArg
0048 INTEGER bjArg
08e96a842a Jean*0049 LOGICAL copyTo
0050 INTEGER myThid
0051
0052
8decba0243 Jean*0053
08e96a842a Jean*0054
8decba0243 Jean*0055 INTEGER i,j,k,bi,bj
0056 INTEGER kLev
08e96a842a Jean*0057
f1a06a1eb2 Jean*0058 IF ( oLi.LT.0 .OR. oLi.GT.OLx .OR.
0059 & oLj.LT.0 .OR. oLj.GT.OLy ) THEN
0060 STOP 'ABNORMAL END: MDS_PASS_R8toRL invalid oLi,oLj Arg'
0061 ENDIF
08e96a842a Jean*0062
9a33636256 Jean*0063 IF ( biArg.EQ.0 .AND. bjArg.EQ.0 ) THEN
0064 IF ( copyTo ) THEN
0065 DO bj = myByLo(myThid), myByHi(myThid)
0066 DO bi = myBxLo(myThid), myBxHi(myThid)
8decba0243 Jean*0067 DO k=1,nNz
0068 kLev = kLo+k-1
f1a06a1eb2 Jean*0069 DO j=1-oLj,sNy+oLj
0070 DO i=1-oLi,sNx+oLi
8decba0243 Jean*0071 arrFld(i,j,kLev,bi,bj) = buffer(i,j,k,bi,bj)
08e96a842a Jean*0072 ENDDO
9a33636256 Jean*0073 ENDDO
8decba0243 Jean*0074 ENDDO
9a33636256 Jean*0075 ENDDO
08e96a842a Jean*0076 ENDDO
9a33636256 Jean*0077 ELSE
0078 DO bj = myByLo(myThid), myByHi(myThid)
0079 DO bi = myBxLo(myThid), myBxHi(myThid)
8decba0243 Jean*0080 DO k=1,nNz
0081 kLev = kLo+k-1
f1a06a1eb2 Jean*0082 DO j=1-oLj,sNy+oLj
0083 DO i=1-oLi,sNx+oLi
8decba0243 Jean*0084 buffer(i,j,k,bi,bj) = arrFld(i,j,kLev,bi,bj)
08e96a842a Jean*0085 ENDDO
9a33636256 Jean*0086 ENDDO
8decba0243 Jean*0087 ENDDO
9a33636256 Jean*0088 ENDDO
08e96a842a Jean*0089 ENDDO
9a33636256 Jean*0090 ENDIF
0091 ELSEIF ( biArg.GE.1 .AND. biArg.LE.nSx
0092 & .AND. bjArg.GE.1 .AND. bjArg.LE.nSy ) THEN
0093 bi = biArg
0094 bj = bjArg
0095 IF ( copyTo ) THEN
8decba0243 Jean*0096 DO k=1,nNz
0097 kLev = kLo+k-1
f1a06a1eb2 Jean*0098 DO j=1-oLj,sNy+oLj
0099 DO i=1-oLi,sNx+oLi
8decba0243 Jean*0100 arrFld(i,j,kLev,1,1) = buffer(i,j,k,bi,bj)
9a33636256 Jean*0101 ENDDO
0102 ENDDO
8decba0243 Jean*0103 ENDDO
9a33636256 Jean*0104 ELSE
8decba0243 Jean*0105 DO k=1,nNz
0106 kLev = kLo+k-1
f1a06a1eb2 Jean*0107 DO j=1-oLj,sNy+oLj
0108 DO i=1-oLi,sNx+oLi
8decba0243 Jean*0109 buffer(i,j,k,bi,bj) = arrFld(i,j,kLev,1,1)
9a33636256 Jean*0110 ENDDO
0111 ENDDO
8decba0243 Jean*0112 ENDDO
9a33636256 Jean*0113 ENDIF
0114 ELSE
0115 STOP 'ABNORMAL END: MDS_PASS_R8toRL invalid bi,bj Arg'
08e96a842a Jean*0116 ENDIF
0117
0118 RETURN
0119 END