Back to home page

MITgcm

 
 

    


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
bd6bef6276 Gael*0001 #include "SMOOTH_OPTIONS.h"
                0002 
9f5240b52a Jean*0003       SUBROUTINE SMOOTH2D(
                0004      &           fld_in, mask_in, smoothOpNb, myThid )
bd6bef6276 Gael*0005 
                0006 C     *==========================================================*
                0007 C     | SUBROUTINE smooth2D
                0008 C     | o Routine that applies 2D spatial smoothing
                0009 C     *==========================================================*
                0010 
                0011       IMPLICIT NONE
                0012 #include "SIZE.h"
                0013 #include "EEPARAMS.h"
                0014 #include "GRID.h"
                0015 #include "PARAMS.h"
                0016 #include "SMOOTH.h"
                0017 
9f5240b52a Jean*0018       _RL fld_in (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7b8b86ab99 Timo*0019       _RS mask_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
9f5240b52a Jean*0020       INTEGER smoothOpNb
                0021       INTEGER myThid
                0022 
                0023       INTEGER nbt_in
de57a2ec4b Mart*0024       CHARACTER*(MAX_LEN_FNAM) fnamegeneric
9f5240b52a Jean*0025 
f9d7cbfb72 Ou W*0026       INTEGER IL
                0027 
                0028 c     == functions ==
                0029       INTEGER  ILNBLNK
                0030       EXTERNAL ILNBLNK
                0031 
                0032       IL = ILNBLNK( smoothDir )
                0033 
9f5240b52a Jean*0034 C read smoothing [i.e diffusion] operator:
f9d7cbfb72 Ou W*0035       WRITE(fnamegeneric,'(2A,I3.3)')
                0036      &      smoothDir(1:IL),
                0037      &      'smooth2Doperator',smoothOpNb
9f5240b52a Jean*0038       CALL READ_REC_3D_RL( fnamegeneric, smoothprec,
                0039      &                     1, smooth2D_Kux, 1, 1, myThid )
                0040       CALL READ_REC_3D_RL( fnamegeneric, smoothprec,
                0041      &                     1, smooth2D_Kvy, 2, 1, myThid )
                0042       CALL EXCH_XY_RL( smooth2D_Kux, myThid )
                0043       CALL EXCH_XY_RL( smooth2D_Kvy, myThid )
                0044 
                0045 C do the smoothing:
                0046       nbt_in = smooth2Dnbt(smoothOpNb)
                0047       CALL SMOOTH_DIFF2D( fld_in, mask_in, nbt_in, myThid )
                0048 
                0049       RETURN
                0050       END