-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature hamocc sediment spinup #162
Changes from 1 commit
f3fe468
e160331
b160abd
3d9e2cd
241328a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,8 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& | |
REAL, intent(out) :: pflxbromo(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) | ||
|
||
INTEGER :: i,j,k,l | ||
INTEGER :: nspin,it | ||
LOGICAL :: lspin | ||
|
||
IF (mnproc.eq.1) THEN | ||
write(io_stdo_bgc,*) 'iHAMOCC',KLDTDAY,LDTRUNBGC,NDTDAYBGC | ||
|
@@ -173,7 +175,7 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& | |
#endif | ||
|
||
#ifdef BROMO | ||
!$OMP PARALLEL DO | ||
!$OMP PARALLEL DO PRIVATE(i) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate openMP bugfix? |
||
DO j=1,kpje | ||
DO i=1,kpie | ||
IF (patmbromo(i,j).gt.0.) THEN | ||
|
@@ -293,8 +295,30 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& | |
#ifndef sedbypass | ||
! jump over sediment if sedbypass is defined | ||
|
||
CALL POWACH(kpie,kpje,kpke,kbnd,prho,omask,psao) | ||
if(do_sedspinup .and. kplyear>=sedspin_yr_s & | ||
.and. kplyear<=sedspin_yr_e) then | ||
nspin = sedspin_ncyc | ||
if(mnproc == 1) then | ||
write(io_stdo_bgc,*) | ||
write(io_stdo_bgc,*) 'iHAMOCC: sediment spinup activated with ', & | ||
nspin, ' subcycles' | ||
endif | ||
else | ||
nspin = 1 | ||
endif | ||
|
||
! Loop for sediment spinup. If deactivated then nspin=1 and lspin=.false. | ||
do it=1,nspin | ||
|
||
if( it<nspin ) then | ||
lspin=.true. | ||
else | ||
lspin=.false. | ||
endif | ||
|
||
call POWACH(kpie,kpje,kpke,kbnd,prho,omask,psao,lspin) | ||
|
||
enddo | ||
|
||
#ifdef PBGC_CK_TIMESTEP | ||
IF (mnproc.eq.1) THEN | ||
|
@@ -353,7 +377,7 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& | |
!-------------------------------------------------------------------- | ||
! Pass bromoform flux. Convert unit from kmol CHBr3/m^2 to kg/m^2/s. | ||
! Negative values to the atmosphere | ||
!$OMP PARALLEL DO | ||
!$OMP PARALLEL DO PRIVATE(i) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate openMP bugfix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I should have done this in a separate commit, but now I don't have the time to disentangle this so I'll leave it as it is. |
||
DO j=1,kpje | ||
DO i=1,kpie | ||
if(omask(i,j) .gt. 0.5) pflxbromo(i,j)=-252.7*atmflx(i,j,iatmbromo)/dtbgc | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be without accumulation in
sedfluxo
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is correct as it is: In
powach
sedfluxo
is set to zero when entering the sediment. Then it is receiving a value for silicate and oxygen (but not the others) inpowach
. After thatdipowa
is called, where sedfluxo is updated in a loop. In order to avoid overwriting the values for oxygen and silicate, it is written as above.