Back to home page

MITgcm

 
 

    


File indexing completed on 2023-02-04 06:09:48 UTC

view on githubraw file Latest commit 2e3e8c33 on 2023-02-03 17:26:01 UTC
6d54cf9ca1 Ed H*0001 #include "DIC_OPTIONS.h"
daab022f42 Step*0002 
08536d17ba Step*0003 CBOP
                0004 C !ROUTINE: ALK_SURFFORCING
                0005 
                0006 C !INTERFACE: ==========================================================
951926fb9b Jean*0007       SUBROUTINE ALK_SURFFORCING( PTR_ALK , GALK,
daab022f42 Step*0008      I           bi,bj,imin,imax,jmin,jmax,
2e3e8c330d Jona*0009      I           myTime, myIter, myThid )
daab022f42 Step*0010 
08536d17ba Step*0011 C !DESCRIPTION:
                0012 C Calculate the alkalinity change due to freshwater flux
                0013 C Update alkalinity tendency term
daab022f42 Step*0014 
08536d17ba Step*0015 C !USES: ===============================================================
                0016       IMPLICIT NONE
daab022f42 Step*0017 #include "SIZE.h"
                0018 #include "DYNVARS.h"
                0019 #include "EEPARAMS.h"
                0020 #include "PARAMS.h"
                0021 #include "GRID.h"
                0022 #include "FFIELDS.h"
2ef8966791 Davi*0023 #include "DIC_VARS.h"
daab022f42 Step*0024 
08536d17ba Step*0025 C !INPUT PARAMETERS: ===================================================
                0026 C  PTR_ALK              :: alkalinity field
2e3e8c330d Jona*0027 C  bi,bj                :: tile indices
                0028 C  myTime               :: current time
                0029 C  myIter               :: current timestep
                0030 C  myThid               :: thread number
daab022f42 Step*0031       _RL  PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
                0032       INTEGER iMin,iMax,jMin,jMax, bi, bj
2e3e8c330d Jona*0033       _RL myTime
                0034       INTEGER myIter, myThid
daab022f42 Step*0035 
08536d17ba Step*0036 C !OUTPUT PARAMETERS: ==================================================
                0037 C  GALK                 :: tendency term of alkalinity
                0038       _RL  GALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0039 
daab022f42 Step*0040 #ifdef ALLOW_PTRACERS
                0041 #ifdef DIC_BIOTIC
08536d17ba Step*0042 
c845fbfeae Jean*0043 #ifdef ALLOW_OLD_VIRTUALFLUX
08536d17ba Step*0044 C !LOCAL VARIABLES: ====================================================
                0045 C  i,j                  :: loop indices
                0046       INTEGER i,j
                0047 CEOP
daab022f42 Step*0048 
51c3bf0077 Step*0049         DO j=jmin,jmax
                0050           DO i=imin,imax
75e97f1e14 Davi*0051             IF (maskC(i,j,1,bi,bj).NE.0. _d 0) THEN
daab022f42 Step*0052 c calculate virtual flux
                0053 c EminusPforV = dS/dt*(1/Sglob)
                0054 C NOTE: Be very careful with signs here!
                0055 C Positive EminusPforV => loss of water to atmos and increase
                0056 C in salinity. Thus, also increase in other surface tracers
                0057 C (i.e. positive virtual flux into surface layer)
1e416fc4f8 Step*0058               GALK(i,j)=gsm_ALK*surfaceForcingS(i,j,bi,bj)*
                0059      &                  recip_drF(1)/gsm_S
daab022f42 Step*0060 c OR
                0061 c let virtual flux be zero
                0062 c             GALK(i,j)=0.d0
                0063 c
                0064             ELSE
                0065               GALK(i,j)=0. _d 0
                0066             ENDIF
                0067           ENDDO
                0068          ENDDO
04d6738595 Davi*0069 #endif /* ALLOW_OLD_VIRTUALFLUX */
daab022f42 Step*0070 
                0071 #endif
                0072 #endif
                0073         RETURN
                0074         END