Skip to content

Commit

Permalink
Recover historical indentation style in cyano.F90.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasTorsvik committed Aug 26, 2022
1 parent 5c60b24 commit 189b866
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions hamocc/cyano.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SUBROUTINE CYANO(kpie,kpje,kpke,kbnd,pddpo,omask,ptho)
use mo_param1_bgc, only: ialkali,iano3,igasnit,iphosph,ioxygen
use mo_vgrid, only: kmle
#ifdef natDIC
use mo_param1_bgc, only: inatalkali
use mo_param1_bgc, only: inatalkali
#endif

implicit none
Expand All @@ -88,42 +88,42 @@ SUBROUTINE CYANO(kpie,kpje,kpke,kbnd,pddpo,omask,ptho)
! it is assumed here that this process is limited to the mixed layer
!
DO j=1,kpje
DO i=1,kpie
IF(omask(i,j).gt.0.5) THEN
DO k=1,kmle(i,j)
IF(ocetra(i,j,k,iano3).LT.(rnit*ocetra(i,j,k,iphosph))) THEN
DO i=1,kpie
IF(omask(i,j).gt.0.5) THEN
DO k=1,kmle(i,j)
IF(ocetra(i,j,k,iano3).LT.(rnit*ocetra(i,j,k,iphosph))) THEN

oldocetra = ocetra(i,j,k,iano3)
ttemp = min(40.,max(-3.,ptho(i,j,k)))
oldocetra = ocetra(i,j,k,iano3)
ttemp = min(40.,max(-3.,ptho(i,j,k)))

! Temperature dependence of nitrogen fixation, Kriest and Oschlies 2015.
nfixtfac = MAX(0.0,tf2*ttemp*ttemp + tf1*ttemp + tf0)/tff
nfixtfac = MAX(0.0,tf2*ttemp*ttemp + tf1*ttemp + tf0)/tff

ocetra(i,j,k,iano3)=ocetra(i,j,k,iano3)*(1-bluefix*nfixtfac) &
& + bluefix*nfixtfac*rnit*ocetra(i,j,k,iphosph)
ocetra(i,j,k,iano3)=ocetra(i,j,k,iano3)*(1-bluefix*nfixtfac) &
& + bluefix*nfixtfac*rnit*ocetra(i,j,k,iphosph)

dano3=ocetra(i,j,k,iano3)-oldocetra
dano3=ocetra(i,j,k,iano3)-oldocetra

ocetra(i,j,k,igasnit)=ocetra(i,j,k,igasnit)-dano3*(1./2.)
ocetra(i,j,k,igasnit)=ocetra(i,j,k,igasnit)-dano3*(1./2.)

! Note: to fix one mole N2 requires: N2+H2O+y*O2 = 2* HNO3 <-> y=2.5 mole O2.
! I.e., to release one mole HNO3 = H+ + NO3- requires 1.25 mole O2
ocetra(i,j,k,ioxygen)=ocetra(i,j,k,ioxygen)-dano3*1.25
ocetra(i,j,k,ioxygen)=ocetra(i,j,k,ioxygen)-dano3*1.25

! Nitrogen fixation followed by remineralisation and nitrification decreases
! alkalinity by 1 mole per mole nitrogen fixed (Wolf-Gladrow et al. 2007)
ocetra(i,j,k,ialkali)=ocetra(i,j,k,ialkali)-dano3
ocetra(i,j,k,ialkali)=ocetra(i,j,k,ialkali)-dano3
#ifdef natDIC
ocetra(i,j,k,inatalkali)=ocetra(i,j,k,inatalkali)-dano3
ocetra(i,j,k,inatalkali)=ocetra(i,j,k,inatalkali)-dano3
#endif

intnfix(i,j) = intnfix(i,j) + &
& (ocetra(i,j,k,iano3)-oldocetra)*pddpo(i,j,k)
intnfix(i,j) = intnfix(i,j) + &
& (ocetra(i,j,k,iano3)-oldocetra)*pddpo(i,j,k)

ENDIF
ENDDO
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
ENDDO

END SUBROUTINE CYANO

0 comments on commit 189b866

Please sign in to comment.