/[MITgcm]/MITgcm_contrib/bling/pkg/bling_remineralization.F
ViewVC logotype

Diff of /MITgcm_contrib/bling/pkg/bling_remineralization.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

--- MITgcm_contrib/bling/pkg/bling_remineralization.F	2016/02/28 21:49:24	1.2
+++ MITgcm_contrib/bling/pkg/bling_remineralization.F	2016/05/15 00:30:35	1.3
@@ -1,4 +1,4 @@
-C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/bling/pkg/bling_remineralization.F,v 1.2 2016/02/28 21:49:24 mmazloff Exp $
+C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/bling/pkg/bling_remineralization.F,v 1.3 2016/05/15 00:30:35 mmazloff Exp $
 C $Name:  $
 
 #include "BLING_OPTIONS.h"
@@ -126,7 +126,7 @@
       _RL lig_stability
       _RL FreeFe
       _RL Fe_ads_inorg(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
-      _RL Fe_ads_org(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
+      _RL Fe_ads_org
       _RL log_btm_flx
       _RL Fe_reminp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
       _RL o2_upper
@@ -155,10 +155,10 @@
   
 c ---------------------------------------------------------------------
 c  Initialize output and diagnostics
+
        DO k=1,Nr
         DO j=jmin,jmax
           DO i=imin,imax
-              Fe_ads_org(i,j,k)   = 0. _d 0
               Fe_ads_inorg(i,j,k) = 0. _d 0
               N_reminp(i,j,k)     = 0. _d 0
               P_reminp(i,j,k)     = 0. _d 0
@@ -184,14 +184,10 @@
 c ---------------------------------------------------------------------
 c  Remineralization
         
-CADJ STORE Fe_ads_org = comlev1, key = ikey_dynamics
-cxx needed?
-
 C$TAF LOOP = parallel
-      DO j=jmin,jmax
+       DO j=jmin,jmax
 C$TAF LOOP = parallel
-       DO i=imin,imax
-cmm C$TAF init upper_flux = static, Nr
+        DO i=imin,imax
 
 C  Initialize upper flux
         PONflux_u            = 0. _d 0
@@ -199,17 +195,11 @@
         PFEflux_u            = 0. _d 0
         CaCO3flux_u          = 0. _d 0
 
+c C$TAF init remin_stuff = static, Nr
+
         DO k=1,Nr
-c C$TAF STORE PONflux_u = upper_flux
-c C$TAF STORE POPflux_u = upper_flux
-c C$TAF STORE PFEflux_u = upper_flux
-c C$TAF STORE CaCO3flux_u = upper_flux
-CADJ STORE PONflux_u, POPflux_u, PFEflux_u, CaCO3flux_u =
-CADJ &     comlev1, key = ikey_dynamics, kind = isbyte
-CADJ STORE Fe_ads_org =
-CADJ &     comlev1, key = ikey_dynamics, kind = isbyte
-CMM) 
 
+         Fe_ads_org   = 0. _d 0
          IF ( hFacC(i,j,k,bi,bj).gt.0. _d 0 ) THEN
 
 C  Sinking speed is evaluated at the bottom of the cell
@@ -412,11 +402,11 @@
 c     &           *CtoP/NUTfac*12.01/wsink)**(0.58)*FreeFe
 
 #ifndef BLING_ADJOINT_SAFE
-            Fe_ads_org(i,j,k) = 
+            Fe_ads_org = 
      &           kFE_org*(PONflux_l/(epsln + wsink) 
      &             * MasstoN)**(0.58)*FreeFe
 #else
-            Fe_ads_org(i,j,k) = 
+            Fe_ads_org = 
      &           kFE_org*(PONflux_l/(epsln + wsink0) 
      &             * MasstoN)**(0.58)*FreeFe
 #endif
@@ -429,7 +419,7 @@
 C  in oxidizing environments).
 
            PFEflux_l = (PFEflux_u+(Fe_spm(i,j,k)+Fe_ads_inorg(i,j,k)
-     &            +Fe_ads_org(i,j,k))*drF(k)
+     &            +Fe_ads_org)*drF(k)
      &            *hFacC(i,j,k,bi,bj))/(1+zremin*drF(k)
      &            *hFacC(i,j,k,bi,bj))
 
@@ -449,7 +439,7 @@
 
            Fe_reminp(i,j,k) = (pfeflux_u+(Fe_spm(i,j,k)
      &            +Fe_ads_inorg(i,j,k)
-     &            +Fe_ads_org(i,j,k))*drF(k)
+     &            +Fe_ads_org)*drF(k)
      &            *hFacC(i,j,k,bi,bj)-pfeflux_l)*recip_drF(k)
      &            *recip_hFacC(i,j,k,bi,bj)
 C!! there's an intercept_frac here... need to add
@@ -463,19 +453,17 @@
 
 c
           Fe_reminsum(i,j,k) = Fe_reminp(i,j,k) + Fe_sed(i,j,k)
-     &                       - Fe_ads_org(i,j,k) - Fe_ads_inorg(i,j,k)
+     &                       - Fe_ads_org - Fe_ads_inorg(i,j,k)
 cc             Fe_reminsum(i,j,k) = 0. _d 0
 
          ENDIF
 
+         Fe_ads_org   = 0. _d 0
+
         ENDDO
        ENDDO
       ENDDO
 
-CADJ STORE Fe_ads_org = comlev1, key = ikey_dynamics
-cxx needed?
-
-
 c ---------------------------------------------------------------------
 
 #ifdef ALLOW_DIAGNOSTICS

 

  ViewVC Help
Powered by ViewVC 1.1.22