Back to home page

MITgcm

 
 

    


File indexing completed on 2024-05-23 05:10:53 UTC

view on githubraw file Latest commit 82e538d8 on 2024-05-22 17:46:03 UTC
785a077159 Alis*0001 #include "PTRACERS_OPTIONS.h"
d12f0d0164 Jean*0002 #ifdef ALLOW_AUTODIFF
                0003 # include "AUTODIFF_OPTIONS.h"
                0004 #endif
785a077159 Alis*0005 
                0006 CBOP
                0007 C !ROUTINE: PTRACERS_CONVECT
                0008 
                0009 C !INTERFACE: ==========================================================
                0010       SUBROUTINE PTRACERS_CONVECT( bi,bj,k,weightA,weightB,myThid )
                0011 
                0012 C !DESCRIPTION:
169b87f41a Jean*0013 C     do passive tracers convection
785a077159 Alis*0014 
                0015 C !USES: ===============================================================
                0016       IMPLICIT NONE
                0017 #include "SIZE.h"
                0018 #include "EEPARAMS.h"
636477d15b Jean*0019 #include "PTRACERS_SIZE.h"
0a278985fd Jean*0020 #include "PTRACERS_PARAMS.h"
d3a355ef62 Jean*0021 #include "PTRACERS_START.h"
0a278985fd Jean*0022 #include "PTRACERS_FIELDS.h"
29b3620598 Patr*0023 #ifdef ALLOW_AUTODIFF_TAMC
                0024 # include "tamc.h"
                0025 #endif
785a077159 Alis*0026 
                0027 C !INPUT PARAMETERS: ===================================================
                0028 C  bi,bj,k :: tile indices
                0029 C  weightA :: weight for level K-1
                0030 C  weightB :: weight for level K
                0031 C  myThid  :: thread number
                0032       INTEGER bi,bj,k
                0033       _RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0034       _RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0035       INTEGER myThid
                0036 
                0037 C !OUTPUT PARAMETERS: ==================================================
                0038 C  none
                0039 
                0040 #ifdef ALLOW_PTRACERS
                0041 
                0042 C !LOCAL VARIABLES: ====================================================
                0043 C  iTracer :: tracer index
                0044       INTEGER iTracer
82e538d851 aver*0045 #if ( defined NONLIN_FRSURF && defined ALLOW_AUTODIFF_TAMC )
edb6656069 Mart*0046 C     kkey :: tape key (depends on levels, tracer, and tiles)
                0047       INTEGER kkey
7c50f07931 Mart*0048 #endif
785a077159 Alis*0049 CEOP
                0050 
                0051 C Loop over tracers
                0052       DO iTracer=1,PTRACERS_numInUse
d3a355ef62 Jean*0053        IF ( PTRACERS_StepFwd(iTracer) ) THEN
785a077159 Alis*0054 
82e538d851 aver*0055 #if ( defined NONLIN_FRSURF && defined ALLOW_AUTODIFF_TAMC )
edb6656069 Mart*0056         kkey = bi + (bj-1)*nSx + (ikey_dynamics-1)*nSx*nSy
                0057         kkey = iTracer + (kkey-1)*PTRACERS_num
                0058         kkey = (kkey-1)*Nr + k
29b3620598 Patr*0059 CADJ STORE pTracer(:,:,k,bi,bj,iTracer)
                0060 CADJ &      = comlev1_bibj_k_ptracers, key=kkey, byte=isbyte
82e538d851 aver*0061 #endif
29b3620598 Patr*0062 
7c50f07931 Mart*0063         CALL CONVECTIVELY_MIXTRACER(
d3a355ef62 Jean*0064      I           bi,bj,k,weightA,weightB,
                0065      U           pTracer(1-OLx,1-OLy,1,1,1,iTracer),
                0066      I           myThid )
785a077159 Alis*0067 
                0068 C End of tracer loop
d3a355ef62 Jean*0069        ENDIF
785a077159 Alis*0070       ENDDO
                0071 
                0072 #endif /* ALLOW_PTRACERS */
                0073 
                0074       RETURN
                0075       END