File indexing completed on 2023-07-14 05:10:51 UTC
view on githubraw file Latest commit de57a2ec on 2023-07-13 16:55:13 UTC
0c3d35c9cd Gael*0001 #include "SMOOTH_OPTIONS.h"
0002
9f5240b52a Jean*0003 SUBROUTINE SMOOTH_INIT2D( smoothOpNb, myThid )
0c3d35c9cd Gael*0004
0005
0006
0007
0008
0009
0010
9f5240b52a Jean*0011
0c3d35c9cd Gael*0012
0013 IMPLICIT NONE
0014 #include "SIZE.h"
0015 #include "EEPARAMS.h"
0016 #include "PARAMS.h"
0017 #include "GRID.h"
0018 #include "SMOOTH.h"
0019
9f5240b52a Jean*0020 INTEGER smoothOpNb
0021 INTEGER myThid
0c3d35c9cd Gael*0022
9f5240b52a Jean*0023 INTEGER i, j, bi, bj
de57a2ec4b Mart*0024 CHARACTER*(MAX_LEN_FNAM) fnamegeneric
0c3d35c9cd Gael*0025
f9d7cbfb72 Ou W*0026 INTEGER IL
0027
0028
0029 INTEGER ILNBLNK
0030 EXTERNAL ILNBLNK
0031
0032 IL = ILNBLNK( smoothDir )
0033
9f5240b52a Jean*0034 smooth2DtotTime = smooth2Dnbt(smoothOpNb)*smooth2DdelTime
0c3d35c9cd Gael*0035
9f5240b52a Jean*0036 IF ( (smooth2Dtype(smoothOpNb).NE.0).AND.
0037 & (smooth2Dsize(smoothOpNb).EQ.2) ) THEN
f9d7cbfb72 Ou W*0038 WRITE(fnamegeneric,'(2A,I3.3)')
0039 & smoothDir(1:IL),
0040 & 'smooth2Dscales',smoothOpNb
9f5240b52a Jean*0041 CALL READ_REC_3D_RL( fnamegeneric, smoothprec,
0042 & 1, smooth2D_Lx, 1, 1, myThid )
0043 CALL READ_REC_3D_RL( fnamegeneric, smoothprec,
0044 & 1, smooth2D_Ly, 2, 1, myThid )
0045 CALL EXCH_XY_RL( smooth2D_Lx, myThid )
0046 CALL EXCH_XY_RL( smooth2D_Ly, myThid )
0047 ELSE
0048 DO bj=myByLo(myThid),myByHi(myThid)
0049 DO bi=myBxLo(myThid),myBxHi(myThid)
0050 DO j=1-OLy,sNy+OLy
0051 DO i=1-OLx,sNx+OLx
0052 smooth2D_Lx(i,j,bi,bj)=smooth2D_Lx0(smoothOpNb)
0053 smooth2D_Ly(i,j,bi,bj)=smooth2D_Ly0(smoothOpNb)
0054 ENDDO
0055 ENDDO
0c3d35c9cd Gael*0056 ENDDO
9f5240b52a Jean*0057 ENDDO
0058 ENDIF
0c3d35c9cd Gael*0059
0060 DO bj=myByLo(myThid),myByHi(myThid)
0061 DO bi=myBxLo(myThid),myBxHi(myThid)
0062 DO j=1-OLy,sNy+OLy
0063 DO i=1-OLx,sNx+OLx
9f5240b52a Jean*0064 smooth2D_Kux(i,j,bi,bj)=smooth2D_Lx(i,j,bi,bj)*
0065 & smooth2D_Lx(i,j,bi,bj)/smooth2DtotTime/2
0066 smooth2D_Kvy(i,j,bi,bj)=smooth2D_Ly(i,j,bi,bj)*
0067 & smooth2D_Ly(i,j,bi,bj)/smooth2DtotTime/2
0c3d35c9cd Gael*0068 ENDDO
0069 ENDDO
0070 ENDDO
0071 ENDDO
0072
9f5240b52a Jean*0073 CALL EXCH_XY_RL( smooth2D_Kux, myThid )
0074 CALL EXCH_XY_RL( smooth2D_Kvy, myThid )
0c3d35c9cd Gael*0075
9f5240b52a Jean*0076
f9d7cbfb72 Ou W*0077 WRITE(fnamegeneric,'(2A,I3.3)')
0078 & smoothDir(1:IL),
0079 & 'smooth2Doperator', smoothOpNb
9f5240b52a Jean*0080 CALL WRITE_REC_3D_RL( fnamegeneric, smoothprec,
0081 & 1, smooth2D_Kux, 1, 1, myThid )
0082 CALL WRITE_REC_3D_RL( fnamegeneric, smoothprec,
0083 & 1, smooth2D_Kvy, 2, 1, myThid )
0c3d35c9cd Gael*0084
9f5240b52a Jean*0085 RETURN
0086 END