From 4d4d2457587edbc939253a3d1eeaa78bf05000fb Mon Sep 17 00:00:00 2001 From: Jerry Tjiputra Date: Fri, 19 Mar 2021 16:40:25 +0100 Subject: [PATCH 1/4] Implement bromoform tracer and coupling --- cesm/mod_cesm.F90 | 11 ++++- cime_config/buildlib | 4 ++ cime_config/buildnml | 8 ++++ cime_config/config_component.xml | 12 ++++++ drivers/cpl_mct/export_mct.F | 18 ++++++++ drivers/cpl_mct/import_mct.F | 39 ++++++++++++++++- drivers/cpl_mct/sumsbuff_mct.F | 14 ++++++- drivers/cpl_share/blom_cpl_indices.F90 | 4 ++ hamocc/accfields.F90 | 15 ++++++- hamocc/aufr_bgc.F90 | 28 ++++++++++++- hamocc/aufw_bgc.F90 | 8 ++++ hamocc/beleg_parm.F90 | 19 +++++++++ hamocc/beleg_vars.F90 | 4 ++ hamocc/carchm.F90 | 48 ++++++++++++++++++--- hamocc/hamocc4bcm.F90 | 36 +++++++++++++++- hamocc/hamocc_step.F | 7 +++- hamocc/mo_bgcmean.F90 | 34 ++++++++++++++- hamocc/mo_biomod.F90 | 4 ++ hamocc/mo_carbch.F90 | 3 ++ hamocc/mo_param1_bgc.F90 | 20 ++++++++- hamocc/ncout_hamocc.F | 58 ++++++++++++++++++++++++++ hamocc/ocprod.F90 | 26 +++++++++++- phy/mod_forcing.F90 | 12 +++++- phy/restart_rd.F | 12 +++++- phy/restart_wt.F | 12 +++++- trc/mod_tracers.F90 | 7 +++- 26 files changed, 438 insertions(+), 25 deletions(-) diff --git a/cesm/mod_cesm.F90 b/cesm/mod_cesm.F90 index 2fbdc4a4..95cc71f0 100644 --- a/cesm/mod_cesm.F90 +++ b/cesm/mod_cesm.F90 @@ -28,7 +28,8 @@ module mod_cesm use mod_time, only: nstep use mod_xc use mod_forcing, only: trxday, srxday, swa, nsf, lip, sop, eva, rnf, rfi, & - fmltfz, sfl, ztx, mty, ustarw, slp, abswnd, atmco2 + fmltfz, sfl, ztx, mty, ustarw, slp, abswnd, atmco2,& + atmbromo use mod_ben02, only: initai, rdcsic, rdctsf, fnlzai use mod_seaice, only: ficem use mod_checksum, only: csdiag, chksummsk @@ -70,6 +71,7 @@ module mod_cesm slp_da, & ! Sea-level pressure [kg m-1 s-2]. abswnd_da, & ! Wind speed at measurement height (zu) [m s-1]. atmco2_da, & ! Atmospheric CO2 concentration [ppm]. + atmvsls_da, & ! Atmospheric bromoform concentration [ppt]. ficem_da ! Ice concentration []. logical :: & @@ -81,7 +83,7 @@ module mod_cesm public :: runid_cesm, runtyp_cesm, ocn_cpl_dt_cesm, nstep_in_cpl, hmlt, & frzpot, mltpot, swa_da, nsf_da, hmlt_da, lip_da, sop_da, eva_da, & rnf_da, rfi_da, fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, & - slp_da, abswnd_da, atmco2_da, ficem_da, smtfrc, l1ci, l2ci, & + slp_da, abswnd_da, atmco2_da, atmvsls_da, ficem_da, smtfrc, l1ci, l2ci, & inicon_cesm, inifrc_cesm, getfrc_cesm contains @@ -176,6 +178,7 @@ subroutine getfrc_cesm ficem(i, j) = w1*ficem_da(i, j, l1ci) + w2*ficem_da(i, j, l2ci) abswnd(i, j) = w1*abswnd_da(i, j, l1ci) + w2*abswnd_da(i, j, l2ci) atmco2(i, j) = w1*atmco2_da(i, j, l1ci) + w2*atmco2_da(i, j, l2ci) + atmbromo(i,j)= w1*atmvsls_da(i, j, l1ci)+ w2*atmvsls_da(i, j, l2ci) enddo enddo do l = 1, isu(j) @@ -210,6 +213,7 @@ subroutine getfrc_cesm call ncdefvar('ficem_da', 'x y', ndouble, 8) call ncdefvar('abswnd_da', 'x y', ndouble, 8) call ncdefvar('atmco2_da', 'x y', ndouble, 8) + call ncdefvar('atmvsls_da','x y',ndouble,8) call ncdefvar('ztx_da', 'x y', ndouble, 8) call ncdefvar('mty_da', 'x y', ndouble, 8) call ncedef @@ -244,6 +248,8 @@ subroutine getfrc_cesm ip, 1, 1._r8, 0._r8, 8) call ncwrtr('atmco2_da', 'x y', atmco2_da(1 - nbdy, 1 - nbdy, l2ci), & ip, 1, 1._r8, 0._r8, 8) + call ncwrtr('atmvsls_da','x y', atmvsls_da(1 - nbdy, 1 - nbdy, l2ci), & + . ip, 1, 1._r8, 0._r8, 8) call ncwrtr('ztx_da', 'x y', ztx_da(1 - nbdy, 1 - nbdy, l2ci), & iu, 1, 1._r8, 0._r8, 8) call ncwrtr('mty_da', 'x y', mty_da(1 - nbdy, 1 - nbdy, l2ci), & @@ -274,6 +280,7 @@ subroutine getfrc_cesm call chksummsk(ficem, ip, 1, 'ficem') call chksummsk(abswnd, ip, 1, 'abswnd') call chksummsk(atmco2, ip, 1, 'atmco2') + call chksummsk(atmbromo, ip, 1, 'atmbromo') endif end subroutine getfrc_cesm diff --git a/cime_config/buildlib b/cime_config/buildlib index 1abb22cc..90a80a79 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -21,6 +21,7 @@ set HAMOCC_CFC = `./xmlquery HAMOCC_CFC --value` set HAMOCC_NATTRC = `./xmlquery HAMOCC_NATTRC --value` set HAMOCC_SEDBYPASS = `./xmlquery HAMOCC_SEDBYPASS --value` set HAMOCC_CISO = `./xmlquery HAMOCC_CISO --value` +set HAMOCC_VSLS = `./xmlquery HAMOCC_VSLS --value` set GMAKE = `./xmlquery GMAKE --value` set GMAKE_J = `./xmlquery GMAKE_J --value` set OCN_CO2_TYPE = `./xmlquery OCN_CO2_TYPE --value` @@ -109,6 +110,9 @@ if ($#tracers != 0) then endif set cpp_ocn = "$cpp_ocn -Dcisonew" endif + if ($HAMOCC_VSLS == TRUE) then + set cpp_ocn = "$cpp_ocn -DBROMO" + endif if ($co2type == prognostic) then set cpp_ocn = "$cpp_ocn -DPROGCO2" else if ($co2type == diagnostic) then diff --git a/cime_config/buildnml b/cime_config/buildnml index 4249a715..90d23d26 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -408,6 +408,8 @@ set SRF_CO214FXU = '0, 2, 2' set SRF_CFC11 = '0, 2, 2' set SRF_CFC12 = '0, 2, 2' set SRF_SF6 = '0, 2, 2' +set SRF_BROMO = '0, 2, 2' +set SRF_BROMOFX = '0, 2, 2' set INT_PHOSY = '4, 2, 2' set INT_NFIX = '0, 2, 2' set INT_DNIT = '0, 2, 2' @@ -479,6 +481,7 @@ set LYR_WPHY = '0, 0, 2' set LYR_WNOS = '0, 0, 2' set LYR_EPS = '0, 0, 0' set LYR_ASIZE = '0, 0, 0' +set LYR_BROMO = '0, 0, 2' set BGC_DP = '0, 2, 2' set LVL_PHYTO = '0, 2, 2' set LVL_GRAZER = '0, 2, 2' @@ -528,6 +531,7 @@ set LVL_WPHY = '0, 2, 2' set LVL_WNOS = '0, 2, 2' set LVL_EPS = '0, 0, 0' set LVL_ASIZE = '0, 0, 0' +set LVL_BROMO = '0, 2, 2' set SDM_POWAIC = '0, 0, 2' set SDM_POWAAL = '0, 0, 2' set SDM_POWAPH = '0, 0, 2' @@ -1502,6 +1506,8 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF SRF_CFC11 = $SRF_CFC11 SRF_CFC12 = $SRF_CFC12 SRF_SF6 = $SRF_SF6 + SRF_BROMO = $SRF_BROMO + SRF_BROMOFX = $SRF_BROMOFX INT_PHOSY = $INT_PHOSY INT_NFIX = $INT_NFIX INT_DNIT = $INT_DNIT @@ -1574,6 +1580,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF LYR_EPS = $LYR_EPS LYR_ASIZE = $LYR_ASIZE LYR_DP = $BGC_DP + LYR_BROMO = $LYR_BROMO LVL_PHYTO = $LVL_PHYTO LVL_GRAZER = $LVL_GRAZER LVL_DOC = $LVL_DOC @@ -1622,6 +1629,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF LVL_WNOS = $LVL_WNOS LVL_EPS = $LVL_EPS LVL_ASIZE = $LVL_ASIZE + LVL_BROMO = $LVL_BROMO SDM_POWAIC = $SDM_POWAIC SDM_POWAAL = $SDM_POWAAL SDM_POWAPH = $SDM_POWAPH diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index cdb07ff8..8d5fe34a 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -147,6 +147,18 @@ env_build.xml Set preprocessor option to activate the carbon isotope code. Requires module ecosys + + + logical + TRUE,FALSE + FALSE + + TRUE + + build_component_blom + env_build.xml + Set preprocessor option to activate the VSLS-Bromoform tracer code. Requires module ecosys + char diff --git a/drivers/cpl_mct/export_mct.F b/drivers/cpl_mct/export_mct.F index 0bca8ba0..bdf15d82 100644 --- a/drivers/cpl_mct/export_mct.F +++ b/drivers/cpl_mct/export_mct.F @@ -148,6 +148,24 @@ subroutine export_mct(o2x_o, lsize, perm, jjcpl, nsend, sbuff, . write (lp,*) 'export_mct: co2 flux not sent to coupler' endif + ! ---------------------------------------------------------------- + ! Pack bromoform flux (kg CHBr3/m^2/s), if requested + ! ---------------------------------------------------------------- + + if (index_o2x_Faoo_fvsls_ocn > 0) then + n = 0 + do j = 1, jjcpl + do i = 1, ii + n = n + 1 + o2x_o%rAttr(index_o2x_Faoo_fvsls_ocn,n) = + . sbuff(i,j,index_o2x_Faoo_fvsls_ocn)*tfac + enddo + enddo + else + if (mnproc.eq.1) + . write (lp,*) 'export_mct: bromoform flux not sent to coupler' + endif + tlast_coupled = 0._r8 !----------------------------------------------------------------- diff --git a/drivers/cpl_mct/import_mct.F b/drivers/cpl_mct/import_mct.F index 18c18bca..c4358c67 100644 --- a/drivers/cpl_mct/import_mct.F +++ b/drivers/cpl_mct/import_mct.F @@ -29,7 +29,7 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) use mod_cesm, only: swa_da, nsf_da, hmlt_da, lip_da, sop_da, . eva_da, rnf_da, rfi_da, fmltfz_da, sfl_da, . ztx_da, mty_da, ustarw_da, slp_da, abswnd_da, - . atmco2_da, ficem_da, l1ci, l2ci + . atmco2_da, atmvsls_da, ficem_da, l1ci, l2ci use mod_utility, only: util1, util2 use mod_checksum, only: csdiag, chksummsk use blom_cpl_indices @@ -309,6 +309,40 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) . write (lp,*) 'import_mct: atmospheric co2 not read' #endif + if (index_x2o_Sa_vslsprog > 0) then + n = 0 + do j = 1, jjcpl + do i = 1, ii + n = n + 1 + if (ip(i,j) == 0) then + atmvsls_da(i,j,l2ci) = mval + elseif (cplmsk(i,j) == 0) then + atmvsls_da(i,j,l2ci) = fval + else + ! Atmospheric bromoform concentration [ppt] + atmvsls_da(i,j,l2ci) = + . x2o_o%rAttr(index_x2o_Sa_vslsprog,n) + endif + enddo + enddo + call fill_global(mval, fval, halo_ps, + . atmvsls_da(1-nbdy,1-nbdy,l2ci)) + if (mnproc.eq.1) + . write (lp,*) 'import_mct: prog. atmospheric bromoform read' + else + do j = 1, jj + do i = 1, ii + if (ip(i,j) == 0) then + atmvsls_da(i,j,l2ci) = mval + else + atmvsls_da(i,j,l2ci) = -1 + endif + enddo + enddo + if (mnproc.eq.1) + . write (lp,*) 'import_mct: prog. atmospheric bromoform not read' + endif + if (csdiag) then if (mnproc.eq.1) then write (lp,*) 'import_mct:' @@ -329,7 +363,8 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) call chksummsk(slp_da(1-nbdy,1-nbdy,l2ci),ip,1,'slp') call chksummsk(ficem_da(1-nbdy,1-nbdy,l2ci),ip,1,'ficem') call chksummsk(abswnd_da(1-nbdy,1-nbdy,l2ci),ip,1,'abswnd') - call chksummsk(atmco2_da(1-nbdy,1-nbdy,l2ci),ip,1,'abswnd') + call chksummsk(atmco2_da(1-nbdy,1-nbdy,l2ci),ip,1,'atmco2') + call chksummsk(atmvsls_da(1-nbdy,1-nbdy,l2ci),ip,1,'atmvsls') endif end subroutine import_mct diff --git a/drivers/cpl_mct/sumsbuff_mct.F b/drivers/cpl_mct/sumsbuff_mct.F index 4722fc24..70d4b142 100644 --- a/drivers/cpl_mct/sumsbuff_mct.F +++ b/drivers/cpl_mct/sumsbuff_mct.F @@ -27,7 +27,7 @@ subroutine sumsbuff_mct(nsend, sbuff, tlast_coupled) use mod_grid, only: scuy, scvx, scuxi, scvyi use mod_state, only: u, v, temp, saln, pbu, pbv, ubflxs, vbflxs, . sealv - use mod_forcing, only: flxco2, flxdms + use mod_forcing, only: flxco2, flxdms, flxbromo use mod_cesm, only: frzpot use blom_cpl_indices @@ -141,6 +141,18 @@ subroutine sumsbuff_mct(nsend, sbuff, tlast_coupled) enddo endif + if (index_o2x_Faoo_fvsls_ocn > 0) then + do j = 1, jj + do l = 1, isp(j) + do i = max(1,ifp(j,l)), min(ii,ilp(j,l)) + sbuff(i,j,index_o2x_Faoo_fvsls_ocn) = + . sbuff(i,j,index_o2x_Faoo_fvsls_ocn) + . + flxbromo(i,j)*baclin + enddo + enddo + enddo + endif + !----------------------------------------------------------------- ! Increment time since last coupling diff --git a/drivers/cpl_share/blom_cpl_indices.F90 b/drivers/cpl_share/blom_cpl_indices.F90 index b7dae102..03fe2615 100644 --- a/drivers/cpl_share/blom_cpl_indices.F90 +++ b/drivers/cpl_share/blom_cpl_indices.F90 @@ -43,6 +43,7 @@ module blom_cpl_indices integer :: index_o2x_Fioo_q integer :: index_o2x_Faoo_fco2_ocn integer :: index_o2x_Faoo_fdms_ocn + integer :: index_o2x_Faoo_fvsls_ocn ! drv -> ocn @@ -53,6 +54,7 @@ module blom_cpl_indices integer :: index_x2o_Sa_co2diag ! bottom atm level diagnostic CO2 integer :: index_x2o_Faxa_nhx ! nitrogen deposition (nhx) flux from atm (kgNm2/sec) integer :: index_x2o_Faxa_noy ! nitrogen deposition (noy) flux from atm (kgNm2/sec) + integer :: index_x2o_Sa_vslsprog ! bottom atm level prognostic bromoform (ppt) ! QL, 150526, from wav integer :: index_x2o_Sw_lamult ! wave model langmuir multiplier @@ -126,6 +128,7 @@ subroutine blom_cpl_indices_set( ) index_o2x_Fioo_q = mct_avect_indexra(o2x,'Fioo_q') index_o2x_Faoo_fco2_ocn = mct_avect_indexra(o2x,'Faoo_fco2_ocn',perrWith='quiet') index_o2x_Faoo_fdms_ocn = mct_avect_indexra(o2x,'Faoo_fdms_ocn',perrWith='quiet') + index_o2x_Faoo_fvsls_ocn= mct_avect_indexra(o2x,'Faoo_fvsls_ocn',perrWith='quiet') index_x2o_Si_ifrac = mct_avect_indexra(x2o,'Si_ifrac') index_x2o_Sa_pslv = mct_avect_indexra(x2o,'Sa_pslv') index_x2o_So_duu10n = mct_avect_indexra(x2o,'So_duu10n') @@ -171,6 +174,7 @@ subroutine blom_cpl_indices_set( ) index_x2o_Sa_co2diag = mct_avect_indexra(x2o,'Sa_co2diag',perrWith='quiet') index_x2o_Faxa_nhx = mct_avect_indexra(x2o,'Faxa_nhx',perrWith='quiet') index_x2o_Faxa_noy = mct_avect_indexra(x2o,'Faxa_noy',perrWith='quiet') + index_x2o_Sa_vslsprog = mct_avect_indexra(x2o,'Sa_vslsprog',perrWith='quiet') ! optional per thickness category fields diff --git a/hamocc/accfields.F90 b/hamocc/accfields.F90 index 74684606..28c84a46 100644 --- a/hamocc/accfields.F90 +++ b/hamocc/accfields.F90 @@ -127,6 +127,10 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) #ifdef natDIC call accsrf(jnatco2fx,atmflx(1,1,iatmnco2),omask,0) #endif +#ifdef BROMO + call accsrf(jatmbromo,atm(1,1,iatmbromo),omask,0) + call accsrf(jbromofx,atmflx(1,1,iatmbromo),omask,0) +#endif #ifdef cisonew call accsrf(jatmc13,atm(1,1,iatmc13),omask,0) call accsrf(jatmc14,atm(1,1,iatmc14),omask,0) @@ -168,6 +172,9 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call accsrf(jsrfnatalk,ocetra(1,1,1,inatalkali),omask,0) call accsrf(jnatpco2,natpco2d,omask,0) #endif +#ifdef BROMO + call accsrf(jsrfbromo,ocetra(1,1,1,ibromo),omask,0) +#endif ! Accumulate the diagnostic mass sinking field IF( domassfluxes ) THEN @@ -251,6 +258,9 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call acclyr(jcfc12,ocetra(1,1,1,icfc12),pddpo,1) call acclyr(jsf6,ocetra(1,1,1,isf6),pddpo,1) #endif +#ifdef BROMO + call acclyr(jbromo,ocetra(1,1,1,ibromo),pddpo,1) +#endif ! Accumulate level diagnostics @@ -262,7 +272,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) & jlvlnatomegaa+jlvlnatomegac+jlvldic13+jlvldic14+jlvld13c+ & & jlvld14c+jlvlbigd14c+jlvlpoc13+jlvldoc13+jlvlcalc13+jlvlphyto13+& & jlvlgrazer13+jlvlnos+jlvlwphy+jlvlwnos+jlvleps+jlvlasize+ & - & jlvlcfc11+jlvlcfc12+jlvlsf6).NE.0) THEN + & jlvlcfc11+jlvlcfc12+jlvlsf6+jlvlbromo).NE.0) THEN DO k=1,kpke call bgczlv(pddpo,k,ind1,ind2,wghts) call acclvl(jlvlphyto,ocetra(1,1,1,iphy),k,ind1,ind2,wghts) @@ -322,6 +332,9 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call acclvl(jlvlcfc11,ocetra(1,1,1,icfc11),k,ind1,ind2,wghts) call acclvl(jlvlcfc12,ocetra(1,1,1,icfc12),k,ind1,ind2,wghts) call acclvl(jlvlsf6,ocetra(1,1,1,isf6),k,ind1,ind2,wghts) +#endif +#ifdef BROMO + call acclvl(jlvlbromo,ocetra(1,1,1,ibromo),k,ind1,ind2,wghts) #endif ENDDO ENDIF diff --git a/hamocc/aufr_bgc.F90 b/hamocc/aufr_bgc.F90 index c7b0cc78..f78311d3 100644 --- a/hamocc/aufr_bgc.F90 +++ b/hamocc/aufr_bgc.F90 @@ -129,7 +129,7 @@ SUBROUTINE AUFR_BGC(kpie,kpje,kpke,ntr,ntrbgc,itrbgc,trc, & INTEGER :: restdtoce ! time step number from bgc ocean file INTEGER :: idate(5),i,j,k character :: rstfnm*256 - logical :: lread_cfc,lread_nat,lread_iso,lread_atm + logical :: lread_cfc,lread_nat,lread_iso,lread_atm,lread_bro #ifdef cisonew REAL :: rco213,rco214,alpha14,beta13,beta14,d13C_atm,d14cat #endif @@ -349,6 +349,26 @@ SUBROUTINE AUFR_BGC(kpie,kpje,kpke,ntr,ntrbgc,itrbgc,trc, & ENDIF #endif +! Find out whether to restart Bromoform +#ifdef BROMO + lread_bro=.true. + IF(IOTYPE==0) THEN + if(mnproc==1) ncstat=nf90_inq_varid(ncid,'bromo',ncvarid) + call xcbcst(ncstat) + if(ncstat.ne.nf90_noerr) lread_bro=.false. + ELSE IF(IOTYPE==1) THEN +#ifdef PNETCDF + ncstat=nfmpi_inq_varid(ncid,'bromo',ncvarid) + if(ncstat.ne.nf_noerr) lread_bro=.false. +#endif + ENDIF + IF(mnproc==1 .and. .not. lread_bro) THEN + WRITE(io_stdo_bgc,*) ' ' + WRITE(io_stdo_bgc,*) 'AUFR_BGC info: Bromoform tracer not in restart file, ' + WRITE(io_stdo_bgc,*) 'Initialised to 0.01 pmol L-1 (Stemmler et al., 2015).' + ENDIF +#endif + ! Find out whether to restart atmosphere #if defined(BOXATM) lread_atm=.true. @@ -435,6 +455,12 @@ SUBROUTINE AUFR_BGC(kpie,kpje,kpke,ntr,ntrbgc,itrbgc,trc, & CALL read_netcdf_var(ncid,'hi',nathi(1,1,1),kpke,0,iotype) ENDIF #endif +#ifdef BROMO + IF(lread_bro) THEN + CALL read_netcdf_var(ncid,'bromo',locetra(1,1,1,ibromo),2*kpke,0,iotype) + ENDIF +#endif + ! ! Read restart data : diagnostic ocean fields (needed for bit to bit reproducability) ! diff --git a/hamocc/aufw_bgc.F90 b/hamocc/aufw_bgc.F90 index 52cd828d..a2647f1d 100644 --- a/hamocc/aufw_bgc.F90 +++ b/hamocc/aufw_bgc.F90 @@ -579,6 +579,10 @@ SUBROUTINE AUFW_BGC(kpie,kpje,kpke,ntr,ntrbgc,itrbgc,trc, & & 6,'mol/kg',25,'Natural calcium carbonate', & & rmissing,52,io_stdo_bgc) #endif +#ifdef BROMO + CALL NETCDF_DEF_VARDB(ncid,5,'bromo',3,ncdimst,ncvarid, & + & 6,'mol/kg',9,'Bromoform',rmissing,47,io_stdo_bgc) +#endif ! ! Define variables : diagnostic ocean fields @@ -859,6 +863,10 @@ SUBROUTINE AUFW_BGC(kpie,kpje,kpke,ntr,ntrbgc,itrbgc,trc, & CALL write_netcdf_var(ncid,'natalkali',locetra(1,1,1,inatalkali),2*kpke,0) CALL write_netcdf_var(ncid,'natcalciu',locetra(1,1,1,inatcalc),2*kpke,0) #endif +#ifdef BROMO + CALL write_netcdf_var(ncid,'bromo',locetra(1,1,1,ibromo),2*kpke,0) +#endif + ! ! Write restart data : diagtnostic ocean fields ! diff --git a/hamocc/beleg_parm.F90 b/hamocc/beleg_parm.F90 index 433eba35..e2ea2e43 100644 --- a/hamocc/beleg_parm.F90 +++ b/hamocc/beleg_parm.F90 @@ -45,7 +45,11 @@ SUBROUTINE BELEG_PARM(kpie,kpje) USE mo_biomod USE mo_sedmnt, only: claydens,o2ut,rno3 USE mo_control_bgc, only: dtb,io_stdo_bgc +#ifdef BROMO + use mo_param1_bgc, only: iatmco2,iatmnco2,iatmo2,iatmn2,iatmbromo +#else use mo_param1_bgc, only: iatmco2,iatmnco2,iatmo2,iatmn2 +#endif USE mod_xc, only: mnproc implicit none @@ -72,6 +76,11 @@ SUBROUTINE BELEG_PARM(kpie,kpje) #ifdef natDIC atm_co2_nat = 284.32 ! CMIP6 pre-industrial reference #endif +#ifdef BROMO +!For now use 3.4ppt from Hense and Quack (2009; Biogeosciences) NEED TO +!BE UPDATED WITH Ziska et al. (2013) climatology database + atm_bromo = 3.4 +#endif #ifdef cisonew ! set standard carbon isotope ratios @@ -92,6 +101,7 @@ SUBROUTINE BELEG_PARM(kpie,kpje) c14fac = atm_c14/atm_co2 #endif + ! Initialise atmosphere fields. We use a 2D representation of atmospheric ! fields for simplicity, even for cases where actually only a scalar value ! is used. The overhead of this is small. If an atm-field is present in @@ -107,6 +117,9 @@ SUBROUTINE BELEG_PARM(kpie,kpje) #ifdef cisonew atm(i,j,iatmc13) = atm_c13 atm(i,j,iatmc14) = atm_c14/c14fac +#endif +#ifdef BROMO + atm(i,j,iatmbromo)= atm_bromo #endif ENDDO ENDDO @@ -205,6 +218,12 @@ SUBROUTINE BELEG_PARM(kpie,kpje) rdn2o1=2*ro2ut-2.5*rnit ! moles N2O used for remineralisation of 1 mole P rdn2o2=2*ro2ut-2*rnit ! moles N2 released for remineralisation of 1 mole P +#ifdef BROMO +!Bromoform to phosphate ratio (Hense and Quack, 2009) + rbro=6.72e-7*rnit + fbro1=1.0 + fbro2=1.0 +#endif #ifdef AGG rcalc = 14. ! calcium carbonate to organic phosphorous production ratio diff --git a/hamocc/beleg_vars.F90 b/hamocc/beleg_vars.F90 index 0b76499b..b210e69a 100644 --- a/hamocc/beleg_vars.F90 +++ b/hamocc/beleg_vars.F90 @@ -157,6 +157,10 @@ SUBROUTINE BELEG_VARS(kpaufr,kpie,kpje,kpke,kbnd,pddpo,prho,omask, & ocetra(i,j,k,idet14) =ocetra(i,j,k,idet)*rco214*bifr14 ocetra(i,j,k,icalc13)=ocetra(i,j,k,icalc)*rco213 ocetra(i,j,k,icalc14)=ocetra(i,j,k,icalc)*rco214 +#endif +#ifdef BROMO +! Initialise to 0,01 pmol L-1 (Stemmler et al., 2015) => mol/kg + ocetra(i,j,k,ibromo)= 1.e-14/prho(i,j,k) #endif ENDIF ! omask > 0.5 ENDDO diff --git a/hamocc/carchm.F90 b/hamocc/carchm.F90 index 79efb27b..a118f650 100644 --- a/hamocc/carchm.F90 +++ b/hamocc/carchm.F90 @@ -150,7 +150,9 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & REAL :: atco213,atco214,pco213,pco214 REAL :: frac_k,frac_aqg,frac_dicg #endif - +#ifdef BROMO + REAL :: flx_bromo,sch_bromo,kw_bromo,a_bromo,atm_brom,Kb1,lsub +#endif ! set variables for diagnostic output to zero atmflx (:,:,:)=0. @@ -193,6 +195,9 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & !$OMP ,atco213,atco214,rco213,rco214,pco213,pco214,frac_aqg & !$OMP ,frac_dicg,flux13d,flux13u,flux14d,flux14u,dissol13,dissol14 & #endif +#ifdef BROMO +!$OMP+ ,flx_bromo,sch_bromo,kw_bromo,a_bromo,atm_brom,Kb1,lsub & +#endif !$OMP ) DO k=1,kpke DO j=1,kpje @@ -282,6 +287,11 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & sch_12= 3828.1 - 249.86*t + 8.7603*t2 - 0.1716 *t3 + 0.001408 *t4 sch_sf= 3177.5 - 200.57*t + 6.8865*t2 - 0.13335 *t3 + 0.0010877 *t4 #endif +#ifdef BROMO +! Stemmler et al. (2015; Biogeosciences) Eq. (9); Quack and Wallace +! (2003; GBC) + sch_bromo= 4662.8 - 319.45*t + 9.9012*t2 - 0.1159*t3 +#endif ! solubility of N2 (Weiss, R.F. 1970, Deep-Sea Res., 17, 721-735) for moist air ! at 1 atm; multiplication with oxyco converts to kmol/m^3/atm @@ -310,6 +320,12 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & a_12 = 1e-12 * a_12 a_sf = 1e-12 * a_sf #endif +#ifdef BROMO +!Henry's law constant for Bromoform from Quack and Wallace (2003; GBC) + a_bromo = exp(13.16 - 4973*(1/tk)) +! conversion from mol/(l * atm) to kmol/(m3 * pptv) + a_bromo = 1e-12 * a_bromo +#endif ! Transfer (piston) velocity kw according to Wanninkhof (2014), in units of ms-1 Xconvxa = 6.97e-07 ! Wanninkhof's a=0.251 converted to ms-1/(ms-1)^2 @@ -323,7 +339,11 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & kw_12 = (1.-psicomo(i,j)) * Xconvxa * pfu10(i,j)**2*(660./sch_12)**0.5 kw_sf = (1.-psicomo(i,j)) * Xconvxa * pfu10(i,j)**2*(660./sch_sf)**0.5 #endif - +#ifdef BROMO +! Stemmler et al. (2015; Biogeosciences) Eq. (8) + kw_bromo=(1.-psicomo(i,j)) * Xconvxa * & + & (0.222*pfu10(i,j)**2+0.33*pfu10(i,j))*(660./sch_bromo)**0.5 +#endif atco2 = atm(i,j,iatmco2) ato2 = atm(i,j,iatmo2) @@ -332,6 +352,9 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & atco213 = atm(i,j,iatmc13) atco214 = atm(i,j,iatmc14) #endif +#ifdef BROMO + atm_brom = atm(i,j,iatmbromo) +#endif ! Ratio P/P_0, where P is the local SLP and P_0 is standard pressure (1 atm). This is ! used in all surface flux calculations where atmospheric concentration is given as a @@ -348,7 +371,6 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & natfluxu=min(natfluxu,natfluxd-(1e-5 - ocetra(i,j,k,inatsco212))*pddpo(i,j,1)) #endif - ! Calculate saturation DIC concentration in mixed layer ta = ocetra(i,j,k,ialkali) / rrho CALL carchm_solve_DICsat(s,atco2*rpp0,ta,sit,pt,Kh,K1,K2,Kb,Kw,Ks1,Kf, & @@ -434,6 +456,11 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & ! Surface flux of dms dmsflux = kwdms*dtbgc*ocetra(i,j,1,idms) ocetra(i,j,1,idms)=ocetra(i,j,1,idms)-dmsflux/pddpo(i,j,1) +#ifdef BROMO + flx_bromo=kw_bromo*dtbgc* & + & (a_bromo*atm_brom*ppao(i,j)*9.86923*1e-6-ocetra(i,j,1,ibromo)) + ocetra(i,j,1,ibromo)=ocetra(i,j,1,ibromo)+flx_bromo/pddpo(i,j,1) +#endif ! Save surface fluxes @@ -441,7 +468,7 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & atmflx(i,j,iatmo2)=oxflux atmflx(i,j,iatmn2)=niflux atmflx(i,j,iatmn2o)=n2oflux - atmflx(i,j,iatmdms)=dmsflux ! [kmol dms m-2 timestep-1] + atmflx(i,j,iatmdms)=dmsflux ! positive to atmosphere [kmol dms m-2 timestep-1] #ifdef cisonew atmflx(i,j,iatmc13)=flux13u-flux13d atmflx(i,j,iatmc14)=flux14u-flux14d @@ -454,6 +481,9 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & #ifdef natDIC atmflx(i,j,iatmnco2)=natfluxu-natfluxd #endif +#ifdef BROMO + atmflx(i,j,iatmbromo)=-flx_bromo +#endif ! Save up- and downward components of carbon fluxes for output co2fxd(i,j) = fluxd @@ -476,7 +506,15 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & endif ! k==1 - +#ifdef BROMO +! Degradation to hydrolysis (Eq. 2-4 of Stemmler et al., 2015) +! A1=1.23e17 mol min-1 => 2.05e12 kmol sec-1 + Kb1=2.05e12*exp(-1.073e5/(8.314*tk))*dtbgc + ocetra(i,j,k,ibromo)=ocetra(i,j,k,ibromo)*(1.-(Kb1*Kw/ah1)) +! Degradation to halogen substitution (Eq. 5-6 of Stemmler et al., 2015) + lsub=7.33e-10*exp(1.250713e4*(1/298.-1/tk))*dtbgc + ocetra(i,j,k,ibromo)=ocetra(i,j,k,ibromo)*(1.-lsub) +#endif ! ----------------------------------------------------------------- ! Deep ocean processes diff --git a/hamocc/hamocc4bcm.F90 b/hamocc/hamocc4bcm.F90 index 4e64f618..79b6c1cb 100644 --- a/hamocc/hamocc4bcm.F90 +++ b/hamocc/hamocc4bcm.F90 @@ -21,7 +21,11 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& pdlxp,pdlyp,pddpo,prho,pglat,omask, & dust,rivin,ndep, & pfswr,psicomo,ppao,pfu10,ptho,psao, & +#ifdef BROMO + patmco2,pflxco2,pflxdms,patmbromo,pflxbromo) +#else patmco2,pflxco2,pflxdms) +#endif !****************************************************************************** ! ! HAMOCC4BGC - main routine of iHAMOCC. @@ -76,6 +80,9 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& ! fully coupled mode (prognostic/diagnostic CO2). ! *REAL* *pflxco2* - CO2 flux [kg/m^2/s]. ! *REAL* *pflxdms* - DMS flux [kg/m^2/s]. +! *REAL* *patmbromo* - atmospheric bromoform concentration [ppt] used in +! fully coupled mode. +! *REAL* *pflxbromo* - Bromoform flux [kg/m^2/s]. ! !****************************************************************************** use mod_xc @@ -115,7 +122,10 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& REAL, intent(in) :: patmco2(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) REAL, intent(out) :: pflxco2(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) REAL, intent(out) :: pflxdms(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) - +#ifdef BROMO + REAL, intent(in) :: patmbromo(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) + REAL, intent(out) :: pflxbromo(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) +#endif INTEGER :: i,j,k,l IF (mnproc.eq.1) THEN @@ -167,6 +177,18 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& !if (mnproc.eq.1) write (io_stdo_bgc,*) 'iHAMOCC: getting co2 from atm' #endif +#ifdef BROMO +!$OMP PARALLEL DO + DO j=1,kpje + DO i=1,kpie + IF (patmbromo(i,j).gt.0.) THEN + atm(i,j,iatmbromo)=patmbromo(i,j) + ENDIF + ENDDO + ENDDO +!$OMP END PARALLEL DO + if (mnproc.eq.1) write (io_stdo_bgc,*) 'iHAMOCC: getting bromoform from atm' +#endif !-------------------------------------------------------------------- ! Read atmospheric cfc concentrations @@ -332,6 +354,18 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& ENDDO !$OMP END PARALLEL DO +#ifdef BROMO +!-------------------------------------------------------------------- +! Pass bromoform flux. Convert unit from kmol CHBr3/m^2 to kg/m^2/s. +! Negative values to the atmosphere +!$OMP PARALLEL DO + 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 + ENDDO + ENDDO +!$OMP END PARALLEL DO +#endif !-------------------------------------------------------------------- RETURN END diff --git a/hamocc/hamocc_step.F b/hamocc/hamocc_step.F index 0775d7d5..5e4edc6d 100644 --- a/hamocc/hamocc_step.F +++ b/hamocc/hamocc_step.F @@ -26,7 +26,7 @@ subroutine hamocc_step(m,n,mm,nn,k1m,k1n) use mod_xc use mod_grid, only: plat use mod_state, only: temp,saln - use mod_forcing, only: swa,slp,abswnd,atmco2,flxco2,flxdms + use mod_forcing, only: swa,slp,abswnd,atmco2,flxco2,flxdms,atmbromo,flxbromo use mod_seaice, only: ficem use mo_bgcmean use mo_intfcblom, only: bgc_dx,bgc_dy,bgc_dp,bgc_rho,omask @@ -66,7 +66,12 @@ subroutine hamocc_step(m,n,mm,nn,k1m,k1n) . dust,rivflx,ndep, . swa,ficem,slp,abswnd, . temp(1-nbdy,1-nbdy,1+nn),saln(1-nbdy,1-nbdy,1+nn), +#ifdef BROMO + . atmco2,flxco2,flxdms,atmbromo,flxbromo) +#else . atmco2,flxco2,flxdms) +#endif + c c --- accumulate fields and write output c diff --git a/hamocc/mo_bgcmean.F90 b/hamocc/mo_bgcmean.F90 index c112486d..678d292a 100644 --- a/hamocc/mo_bgcmean.F90 +++ b/hamocc/mo_bgcmean.F90 @@ -88,6 +88,7 @@ MODULE mo_bgcmean & SRF_SILICA =0 ,SRF_DIC =0 ,SRF_PHYTO =0 , & & SRF_NATDIC =0 ,SRF_NATALKALI =0 ,SRF_NATPCO2 =0 , & & SRF_NATCO2FX =0 , & + & SRF_ATMBROMO =0 ,SRF_BROMO =0 ,SRF_BROMOFX =0 , & & INT_PHOSY =0 ,INT_NFIX =0 ,INT_DNIT =0 , & & FLX_CAR0100 =0 ,FLX_CAR0500 =0 ,FLX_CAR1000 =0 , & & FLX_CAR2000 =0 ,FLX_CAR4000 =0 ,FLX_CAR_BOT =0 , & @@ -110,6 +111,7 @@ MODULE mo_bgcmean & LYR_NATDIC =0 ,LYR_NATALKALI =0 ,LYR_NATCALC =0 , & & LYR_NATPH =0 ,LYR_NATOMEGAA =0 ,LYR_NATOMEGAC =0 , & & LYR_NATCO3 =0 , & + & LYR_BROMO =0 , & & LYR_D13C =0 ,LYR_D14C =0 ,LYR_BIGD14C =0 , & & LYR_POC13 =0 ,LYR_DOC13 =0 ,LYR_CALC13 =0 , & & LYR_PHYTO13 =0 ,LYR_GRAZER13 =0 , & @@ -128,6 +130,7 @@ MODULE mo_bgcmean & LVL_NATDIC =0 ,LVL_NATALKALI =0 ,LVL_NATCALC =0 , & & LVL_NATPH =0 ,LVL_NATOMEGAA =0 ,LVL_NATOMEGAC =0 , & & LVL_NATCO3 =0 , & + & LVL_BROMO =0 , & & LVL_D13C =0 ,LVL_D14C =0 ,LVL_BIGD14C =0 , & & LVL_POC13 =0 ,LVL_DOC13 =0 ,LVL_CALC13 =0 , & & LVL_PHYTO13 =0 ,LVL_GRAZER13 =0 , & @@ -155,6 +158,7 @@ MODULE mo_bgcmean & SRF_SILICA ,SRF_DIC ,SRF_PHYTO , & & SRF_NATDIC ,SRF_NATALKALI ,SRF_NATPCO2 , & & SRF_NATCO2FX , & + & SRF_ATMBROMO ,SRF_BROMO ,SRF_BROMOFX , & & INT_PHOSY ,INT_NFIX ,INT_DNIT , & & FLX_CAR0100 ,FLX_CAR0500 ,FLX_CAR1000 , & & FLX_CAR2000 ,FLX_CAR4000 ,FLX_CAR_BOT , & @@ -177,6 +181,7 @@ MODULE mo_bgcmean & LYR_NATDIC ,LYR_NATALKALI ,LYR_NATCALC , & & LYR_NATPH ,LYR_NATOMEGAA ,LYR_NATOMEGAC , & & LYR_NATCO3 , & + & LYR_BROMO , & & LYR_D13C ,LYR_D14C ,LYR_BIGD14C , & & LYR_PHYTO13 ,LYR_GRAZER13 ,LYR_POC13 , & & LYR_DOC13 ,LYR_CALC13 , & @@ -195,6 +200,7 @@ MODULE mo_bgcmean & LVL_NATDIC ,LVL_NATALKALI ,LVL_NATCALC , & & LVL_NATPH ,LVL_NATOMEGAA ,LVL_NATOMEGAC , & & LVL_NATCO3 , & + & LVL_BROMO , & & LVL_D13C ,LVL_D14C ,LVL_BIGD14C , & & LVL_PHYTO13 ,LVL_GRAZER13 ,LVL_POC13 , & & LVL_DOC13 ,LVL_CALC13 , & @@ -282,6 +288,9 @@ MODULE mo_bgcmean & jnatpco2 = 0 , & & jnatco2fx = 0 + INTEGER, DIMENSION(nbgcmax), SAVE :: & + & jbromofx = 0 , & + & jsrfbromo = 0 INTEGER, SAVE :: i_atm_m2d INTEGER, DIMENSION(nbgcmax), SAVE :: & @@ -289,7 +298,8 @@ MODULE mo_bgcmean & jatmo2 = 0 , & & jatmn2 = 0 , & & jatmc13 = 0 , & - & jatmc14 = 0 + & jatmc14 = 0 , & + & jatmbromo= 0 INTEGER, SAVE :: nbgcm2d @@ -406,6 +416,10 @@ MODULE mo_bgcmean & jlvlnatomegaa = 0 , & & jlvlnatomegac = 0 + INTEGER, DIMENSION(nbgcmax), SAVE :: & + & jbromo = 0 , & + & jlvlbromo = 0 + INTEGER, SAVE :: nbgcm3d,nbgcm3dlvl !---------------------------------------------------------------- @@ -640,6 +654,12 @@ SUBROUTINE ALLOC_MEM_BGCMEAN(kpie,kpje,kpke) jnatpco2(n)=i_bsc_m2d*min(1,SRF_NATPCO2(n)) IF (SRF_NATCO2FX(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 jnatco2fx(n)=i_bsc_m2d*min(1,SRF_NATCO2FX(n)) +#endif +#ifdef BROMO + IF (SRF_BROMO(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 + jsrfbromo(n)=i_bsc_m2d*min(1,SRF_BROMO(n)) + IF (SRF_BROMOFX(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 + jbromofx(n)=i_bsc_m2d*min(1,SRF_BROMOFX(n)) #endif ENDDO @@ -666,6 +686,10 @@ SUBROUTINE ALLOC_MEM_BGCMEAN(kpie,kpje,kpke) jatmc13(n)=i_atm_m2d*min(1,SRF_ATMC13(n)) IF (SRF_ATMC14(n).GT.0) i_atm_m2d=i_atm_m2d+1 jatmc14(n)=i_atm_m2d*min(1,SRF_ATMC14(n)) +#endif +#if defined(BROMO) + IF (SRF_ATMBROMO(n).GT.0) i_atm_m2d=i_atm_m2d+1 + jatmbromo(n)=i_atm_m2d*min(1,SRF_ATMBROMO(n)) #endif ENDDO i_atm_m2d=i_atm_m2d-i_bsc_m2d @@ -785,6 +809,10 @@ SUBROUTINE ALLOC_MEM_BGCMEAN(kpie,kpje,kpke) IF (LYR_NATOMEGAC(n).GT.0) i_bsc_m3d=i_bsc_m3d+1 jnatomegac(n)=i_bsc_m3d*min(1,LYR_NATOMEGAC(n)) #endif +#ifdef BROMO + IF (LYR_BROMO(n).GT.0) i_bsc_m3d=i_bsc_m3d+1 + jbromo(n)=i_bsc_m3d*min(1,LYR_BROMO(n)) +#endif IF (LVL_PHYTO(n).GT.0) ilvl_bsc_m3d=ilvl_bsc_m3d+1 jlvlphyto(n)=ilvl_bsc_m3d*min(1,LVL_PHYTO(n)) @@ -894,6 +922,10 @@ SUBROUTINE ALLOC_MEM_BGCMEAN(kpie,kpje,kpke) IF (LVL_NATOMEGAC(n).GT.0) ilvl_bsc_m3d=ilvl_bsc_m3d+1 jlvlnatomegac(n)=ilvl_bsc_m3d*min(1,LVL_NATOMEGAC(n)) #endif +#ifdef BROMO + IF (LVL_BROMO(n).GT.0) ilvl_bsc_m3d=ilvl_bsc_m3d+1 + jlvlbromo(n)=ilvl_bsc_m3d*min(1,LVL_BROMO(n)) +#endif IF (i_bsc_m3d.NE.0) checkdp(n)=1 ENDDO diff --git a/hamocc/mo_biomod.F90 b/hamocc/mo_biomod.F90 index ee21e6d4..dbd4f6e0 100644 --- a/hamocc/mo_biomod.F90 +++ b/hamocc/mo_biomod.F90 @@ -103,6 +103,10 @@ MODULE mo_biomod #elif defined(WLIN) REAL :: wmin,wmax,wlin #endif +#ifdef BROMO + REAL :: rbro +#endif + CONTAINS diff --git a/hamocc/mo_carbch.F90 b/hamocc/mo_carbch.F90 index bed0b920..ef6838d6 100644 --- a/hamocc/mo_carbch.F90 +++ b/hamocc/mo_carbch.F90 @@ -94,6 +94,9 @@ MODULE mo_carbch REAL :: atm_cfc12_nh,atm_cfc12_sh REAL :: atm_sf6_nh,atm_sf6_sh #endif +#ifdef BROMO + REAL :: atm_bromo, fbro1, fbro2 +#endif CONTAINS diff --git a/hamocc/mo_param1_bgc.F90 b/hamocc/mo_param1_bgc.F90 index 653782f1..42a2cc95 100644 --- a/hamocc/mo_param1_bgc.F90 +++ b/hamocc/mo_param1_bgc.F90 @@ -128,9 +128,17 @@ MODULE mo_param1_bgc & inatalkali = -1, & & inatcalc = -1 #endif +#ifdef BROMO + INTEGER, PARAMETER :: i_bromo=1, & + & ibromo=i_base+i_iso+i_cfc+i_agg+i_nat_dic+1 +#else + INTEGER, PARAMETER :: i_bromo=0, & + & ibromo=-1 +#endif ! total number of advected tracers - INTEGER, PARAMETER :: nocetra=i_base+i_iso+i_cfc+i_agg+i_nat_dic + INTEGER, PARAMETER :: nocetra=i_base+i_iso+i_cfc+i_agg+i_nat_dic & + +i_bromo ! ATMOSPHERE @@ -170,9 +178,17 @@ MODULE mo_param1_bgc INTEGER, PARAMETER :: i_ndic_atm = 0, & & iatmnco2 = -1 #endif +#ifdef BROMO + INTEGER, PARAMETER :: i_bromo_atm=1, & + & iatmbromo=i_base_atm+i_iso_atm+i_cfc_atm+ & + & i_ndic_atm+1 +#else + INTEGER, PARAMETER :: i_bromo_atm=0, & + & iatmbromo=-1 +#endif ! total number of atmosphere tracers - INTEGER, PARAMETER :: natm=i_base_atm+i_iso_atm+i_cfc_atm+i_ndic_atm + INTEGER, PARAMETER :: natm=i_base_atm+i_iso_atm+i_cfc_atm+i_ndic_atm+i_bromo_atm ! sediment diff --git a/hamocc/ncout_hamocc.F b/hamocc/ncout_hamocc.F index f96715ab..5b06256c 100644 --- a/hamocc/ncout_hamocc.F +++ b/hamocc/ncout_hamocc.F @@ -172,6 +172,10 @@ subroutine ncwrt_bgc(iogrp) call finlyr(jnatomegaa(iogrp),jdp(iogrp)) call finlyr(jnatomegac(iogrp),jdp(iogrp)) #endif +#ifdef BROMO + call finlyr(jbromo(iogrp),jdp(iogrp)) +#endif + c c --- Mask sea floor in mass fluxes call msksrf(jcarflx0100(iogrp),k0100) @@ -249,6 +253,10 @@ subroutine ncwrt_bgc(iogrp) call msklvl(jlvlnatomegaa(iogrp),depths) call msklvl(jlvlnatomegac(iogrp),depths) #endif +#ifdef BROMO + call msklvl(jlvlbromo(iogrp),depths) +#endif + c c --- Compute log10 of pH if (LYR_PH(iogrp).ne.0) call loglyr(jph(iogrp),1.,0.) @@ -413,6 +421,15 @@ subroutine ncwrt_bgc(iogrp) . rnacc*12./dtbgc,0.,cmpflg,'natco2fx', . 'Natural CO2 flux',' ','kg C m-2 s-1') #endif +#ifdef BROMO + call wrtsrf(jbromofx(iogrp),SRF_BROMOFX(iogrp),rnacc*1e3/dtbgc,0., + . cmpflg,'srfbromofx','Bromoform flux',' ','mol CHBr3 m-2 s-1') + call wrtsrf(jsrfbromo(iogrp),SRF_BROMO(iogrp),rnacc*1e3,0., + . cmpflg,'srfbromo','Syrface bromoform',' ','mol CHBr3 m-3') + call wrtsrf(jatmbromo(iogrp),SRF_ATMBROMO(iogrp),rnacc,0.,cmpflg, + . 'atmbromo','Atmospheric bromoform',' ','ppt') +#endif + call wrtsrf(jatmco2(iogrp),SRF_ATMCO2(iogrp),rnacc,0.,cmpflg, . 'atmco2','Atmospheric CO2',' ','ppm') @@ -541,6 +558,11 @@ subroutine ncwrt_bgc(iogrp) call wrtlyr(jnatomegac(iogrp),LYR_NATOMEGAC(iogrp),1.,0.,cmpflg, . 'natomegac','Natural OmegaC',' ','-') #endif +#ifdef BROMO + call wrtlyr(jbromo(iogrp),LYR_BROMO(iogrp),1e3,0.,cmpflg, + . 'bromo','Bromoform',' ','mol CHBr3 m-3') +#endif + c c --- Store 3d level fields call wrtlvl(jlvldic(iogrp),LVL_DIC(iogrp),rnacc*1e3,0.,cmpflg, @@ -663,6 +685,11 @@ subroutine ncwrt_bgc(iogrp) . rnacc,0.,cmpflg,'natomegaclvl', . 'Natural OmegaC',' ','-') #endif +#ifdef BROMO + call wrtlvl(jlvlbromo(iogrp),LVL_BROMO(iogrp),rnacc*1e3,0.,cmpflg, + . 'bromolvl','Bromoform',' ','mol CHBr3 m-3') +#endif + c c --- Store sediment fields #ifndef sedbypass @@ -765,6 +792,12 @@ subroutine ncwrt_bgc(iogrp) call inisrf(jnatpco2(iogrp),0.) call inisrf(jnatco2fx(iogrp),0.) #endif +#ifdef BROMO + call inisrf(jsrfbromo(iogrp),0.) + call inisrf(jbromofx(iogrp),0.) + call inisrf(jatmbromo(iogrp),0.) +#endif + call inisrf(jatmco2(iogrp),0.) #if defined(BOXATM) @@ -835,6 +868,10 @@ subroutine ncwrt_bgc(iogrp) call inilyr(jnatomegaa(iogrp),0.) call inilyr(jnatomegac(iogrp),0.) #endif +#ifdef BROMO + call inilyr(jbromo(iogrp),0.) +#endif + c call inilvl(jlvldic(iogrp),0.) call inilvl(jlvlalkali(iogrp),0.) @@ -894,6 +931,10 @@ subroutine ncwrt_bgc(iogrp) call inilvl(jlvlnatomegaa(iogrp),0.) call inilvl(jlvlnatomegac(iogrp),0.) #endif +#ifdef BROMO + call inilvl(jlvlbromo(iogrp),0.) +#endif + c #ifndef sedbypass call inisdm(jpowaic(iogrp),0.) @@ -1055,6 +1096,14 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(SRF_NATCO2FX(iogrp), . cmpflg,'p','natco2fx','Natural CO2 flux',' ','kg C m-2 s-1',0) #endif +#ifdef BROMO + call ncdefvar3d(SRF_BROMO(iogrp),cmpflg,'p','srfbromo', + . 'Surface bromoform',' ','mol CHBr3 m-3',0) + call ncdefvar3d(SRF_BROMOfx(iogrp),cmpflg,'p','srfbromofx', + . 'Surface bromoform flux',' ','mol CHBr3 m-2 s-1',0) + call ncdefvar3d(SRF_ATMBROMO(iogrp),cmpflg,'p', + . 'atmbromo','Atmospheric bromoform',' ','ppt',0) +#endif call ncdefvar3d(SRF_ATMCO2(iogrp),cmpflg,'p', . 'atmco2','Atmospheric CO2',' ','ppm',0) @@ -1182,6 +1231,11 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LYR_NATOMEGAC(iogrp),cmpflg,'p','natomegac', . 'Natural OmegaC',' ','1',1) #endif +#ifdef BROMO + call ncdefvar3d(LYR_BROMO(iogrp),cmpflg,'p', + . 'bromo','Bromoform',' ','mol CHBr3 m-3',1) +#endif + c c --- define 3d level fields call ncdefvar3d(LVL_DIC(iogrp),cmpflg,'p', @@ -1292,6 +1346,10 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LVL_NATOMEGAC(iogrp),cmpflg,'p', . 'natomegaclvl','Natural OmegaC',' ','1',2) #endif +#ifdef BROMO + call ncdefvar3d(LVL_BROMO(iogrp),cmpflg,'p', + . 'bromolvl','Bromoform',' ','mol CHBr3 m-3',2) +#endif c c --- define sediment fields #ifndef sedbypass diff --git a/hamocc/ocprod.F90 b/hamocc/ocprod.F90 index 2b384265..c68a789b 100644 --- a/hamocc/ocprod.F90 +++ b/hamocc/ocprod.F90 @@ -156,6 +156,11 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) real :: sett_agg,shear_agg,effsti,dfirst,dshagg,dsett real :: wnos,wnosd #endif +#ifdef BROMO + real :: bro_beta,bro_uv + real :: abs_uv(kpie,kpje,kpke) +#endif + ! set variables for diagnostic output to zero @@ -210,6 +215,9 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) ! Calculate swr absorption by water and phytoplankton abs_bgc(:,:,:) = 0. +#ifdef BROMO + abs_uv(:,:,:) = 0. +#endif #ifdef FB_BGC_OCE abs_oce(:,:,:) = 0. abs_oce(:,:,1) = 1. @@ -242,7 +250,9 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) ! Radiation intensity I_0 at the top of next layer absorption = absorption * exp(-atten*dz) - +#ifdef BROMO + abs_uv(i,j,k) = exp(-0.33*dz/2) +#endif endif enddo vloop @@ -280,6 +290,9 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) !$OMP ,zoomor14,excdoc13,excdoc14,exud13,exud14,export13,export14 & !$OMP ,delcar13,delcar14,dtr13,dtr14,bifr13,bifr14 & # endif +# ifdef BROMO +!$OMP ,bro_beta,bro_uv & +# endif !$OMP ) loop1: do j = 1,kpje @@ -442,7 +455,16 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) ocetra(i,j,k,iopal) = ocetra(i,j,k,iopal)+delsil-dremopal*ocetra(i,j,k,iopal) ocetra(i,j,k,iiron) = ocetra(i,j,k,iiron)+dtr*riron & & - relaxfe*MAX(ocetra(i,j,k,iiron)-fesoly,0.) - +#ifdef BROMO +!Bromo source from phytoplankton production and sink to photolysis +!Hense and Quack (200) Pg537 Decay time scale is 30days =0.0333/day + bro_beta = rbro*(fbro1*avsil/(avsil+bkopal)+fbro2*bkopal/(avsil+bkopal)) + bro_uv = 0.0333*dtb*strahl(i,j)/75.0*abs_uv(i,j,k)*ocetra(i,j,k,ibromo) + ocetra(i,j,k,ibromo) = ocetra(i,j,k,ibromo)+bro_beta*phosy-bro_uv +!sinks owing to degradation by nitrifiers (Pg 538 of Hense and Quack, +!2009) is omitted because the magnitude is more than 2 order smaller +!than sink through halide substitution & hydrolysis (Fig. 3) +#endif #ifdef AGG !*********************************************************************** diff --git a/phy/mod_forcing.F90 b/phy/mod_forcing.F90 index 3d2d5b60..d179fcbc 100644 --- a/phy/mod_forcing.F90 +++ b/phy/mod_forcing.F90 @@ -108,7 +108,10 @@ module mod_forcing abswnd, & ! Wind speed at measurement height (zu) [m s-1]. atmco2, & ! Atmospheric CO2 concentration [ppm]. flxco2, & ! Air-sea CO2 flux [kg m-2 s-1]. - flxdms ! Sea-air DMS flux [kg m-2 s-1]. + flxdms, & ! Sea-air DMS flux [kg m-2 s-1]. + flxbromo, & ! sea-air bromoform flux + atmbromo ! atmospheric bromoform concentration + real(r8), dimension(1 - nbdy:idm + nbdy,1 - nbdy:jdm + nbdy) :: & surflx, & ! Surface thermal energy flux [W cm-2]. @@ -129,7 +132,7 @@ module mod_forcing sref, tflxap, sflxap, tflxdi, sflxdi, nflxdi, & sstclm, ricclm, sssclm, prfac, eiacc, pracc, & swa, nsf, hmltfz, lip, sop, eva, rnf, rfi, fmltfz, sfl, ztx, mty, & - ustarw, slp, abswnd, atmco2, flxco2, flxdms, & + ustarw, slp, abswnd, atmco2, flxco2, flxdms, flxbromo, atmbromo, & surflx, surrlx, sswflx, salflx, brnflx, salrlx, taux, tauy, & ustar, ustarb, ustar3, buoyfl, & inivar_forcing, fwbbal @@ -166,6 +169,8 @@ subroutine inivar_forcing atmco2(i, j) = spval flxco2(i, j) = spval flxdms(i, j) = spval + atmbromo(i, j) = spval + flxbromo(i, j) = spval surflx(i, j) = spval surrlx(i, j) = spval sswflx(i, j) = spval @@ -191,6 +196,9 @@ subroutine inivar_forcing ustar (i, j) = 0._r8 ustarb(i, j) = 0._r8 buoyfl(i, j) = 0._r8 +#ifdef BROMO + flxbromo(i, j) = 0._r8 +#endif enddo enddo enddo diff --git a/phy/restart_rd.F b/phy/restart_rd.F index 4c7935f9..f7abcaf0 100644 --- a/phy/restart_rd.F +++ b/phy/restart_rd.F @@ -43,7 +43,7 @@ subroutine restart_rd use mod_forcing, only: ditflx, disflx, sprfac, . tflxdi, sflxdi, nflxdi, . prfac, eiacc, pracc, - . flxco2, flxdms, ustarb, buoyfl + . flxco2, flxdms, flxbromo, ustarb, buoyfl use mod_niw, only: uml, vml, umlres, vmlres use mod_cesm, only: frzpot, mltpot, swa_da, nsf_da, hmlt_da, . lip_da, sop_da, eva_da, rnf_da, rfi_da, @@ -541,6 +541,16 @@ subroutine restart_rd write (lp,*) . 'Warning: DMS flux is not read from restart file and' write (lp,*) + . 'will be initialized to zero.' + endif + vexist=ncinqv('flxbromo') +! call xcbcst(vexist) + if (vexist) then + call ncread('flxbromo',flxbromo,ip,1,0.) + elseif (mnproc.eq.1) then + write (lp,*) + . 'Warning: bromoform flux is not read from restart file and' + write (lp,*) . 'will be initialized to zero.' endif endif diff --git a/phy/restart_wt.F b/phy/restart_wt.F index 3da92873..467b3504 100644 --- a/phy/restart_wt.F +++ b/phy/restart_wt.F @@ -41,12 +41,12 @@ subroutine restart_wt use mod_forcing, only: ditflx, disflx, sprfac, . tflxdi, sflxdi, nflxdi, . prfac, eiacc, pracc, - . flxco2, flxdms, ustarb, buoyfl + . flxco2, flxdms, ustarb, buoyfl,flxbromo use mod_niw, only: uml, vml, umlres, vmlres use mod_cesm, only: frzpot, mltpot, swa_da, nsf_da, hmlt_da, . lip_da, sop_da, eva_da, rnf_da, rfi_da, . fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, - . slp_da, abswnd_da, atmco2_da, ficem_da, + . slp_da, abswnd_da, atmco2_da, atmvsls_da, ficem_da, . l2ci use mod_ben02, only: cd_d, ch_d, ce_d, wg2_d, cd_m, ch_m, ce_m, . wg2_m, rhoa, tsi_tda, tml_tda, sml_tda, @@ -330,10 +330,14 @@ subroutine restart_wt call wrtrst('ficem_da',trim(c5p)//' k2 time',ficem_da,ip) call wrtrst('abswnd_da',trim(c5p)//' k2 time',abswnd_da,ip) call wrtrst('atmco2_da',trim(c5p)//' k2 time',atmco2_da,ip) + call wrtrst('atmvsls_da',trim(c5p)//' k2 time',atmvsls_da,ip) call wrtrst('frzpot',trim(c5p)//' time',frzpot,ip) call wrtrst('mltpot',trim(c5p)//' time',mltpot,ip) call wrtrst('flxco2',trim(c5p)//' time',flxco2,ip) call wrtrst('flxdms',trim(c5p)//' time',flxdms,ip) +#ifdef BROMO + call wrtrst('flxbromo',trim(c5p)//' time',flxbromo,ip) +#endif endif c #ifdef TRC @@ -924,10 +928,14 @@ subroutine defvar_restart(c5p,c5u,c5v,c5q) call defvarrst('ficem_da',trim(c5p)//' k2 time') call defvarrst('abswnd_da',trim(c5p)//' k2 time') call defvarrst('atmco2_da',trim(c5p)//' k2 time') + call defvarrst('atmvsls_da',trim(c5p)//' k2 time') call defvarrst('frzpot',trim(c5p)//' time') call defvarrst('mltpot',trim(c5p)//' time') call defvarrst('flxco2',trim(c5p)//' time') call defvarrst('flxdms',trim(c5p)//' time') +#ifdef BROMO + call defvarrst('flxbromo',trim(c5p)//' time') +#endif endif c #ifdef TRC diff --git a/trc/mod_tracers.F90 b/trc/mod_tracers.F90 index 5ba7cfcb..9008adea 100644 --- a/trc/mod_tracers.F90 +++ b/trc/mod_tracers.F90 @@ -72,7 +72,12 @@ module mod_tracers # else integer, parameter :: i_nat_dic = 0 # endif - integer, parameter :: ntrbgc = i_base + i_iso + i_cfc + i_agg + i_nat_dic +# ifdef BROMO + integer, parameter :: i_bromo = 1 +# else + integer, parameter :: i_bromo = 0 +# endif + integer, parameter :: ntrbgc = i_base + i_iso + i_cfc + i_agg + i_nat_dic + i_bromo #else integer, parameter :: ntrbgc = 0 #endif From f5127e87094a2ee47f2c919264b8da03982371e3 Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Mon, 22 Mar 2021 10:02:24 +0100 Subject: [PATCH 2/4] Corrected uv-light absorption, improved naming consistency and some code style issues --- cesm/mod_cesm.F90 | 14 +++++++------- drivers/cpl_mct/import_mct.F | 16 ++++++++-------- drivers/cpl_mct/sumsbuff_mct.F | 4 ++-- hamocc/beleg_parm.F90 | 5 +---- hamocc/carchm.F90 | 8 ++++---- hamocc/hamocc4bcm.F90 | 7 +------ hamocc/hamocc_step.F | 8 ++------ hamocc/mo_biomod.F90 | 2 +- hamocc/ncout_hamocc.F | 4 ++-- hamocc/ocprod.F90 | 30 ++++++++++++++++-------------- phy/mod_forcing.F90 | 12 ++++++------ phy/restart_rd.F | 8 ++++---- phy/restart_wt.F | 12 ++++++------ 13 files changed, 60 insertions(+), 70 deletions(-) diff --git a/cesm/mod_cesm.F90 b/cesm/mod_cesm.F90 index 95cc71f0..3fb75563 100644 --- a/cesm/mod_cesm.F90 +++ b/cesm/mod_cesm.F90 @@ -29,7 +29,7 @@ module mod_cesm use mod_xc use mod_forcing, only: trxday, srxday, swa, nsf, lip, sop, eva, rnf, rfi, & fmltfz, sfl, ztx, mty, ustarw, slp, abswnd, atmco2,& - atmbromo + atmbrf use mod_ben02, only: initai, rdcsic, rdctsf, fnlzai use mod_seaice, only: ficem use mod_checksum, only: csdiag, chksummsk @@ -71,7 +71,7 @@ module mod_cesm slp_da, & ! Sea-level pressure [kg m-1 s-2]. abswnd_da, & ! Wind speed at measurement height (zu) [m s-1]. atmco2_da, & ! Atmospheric CO2 concentration [ppm]. - atmvsls_da, & ! Atmospheric bromoform concentration [ppt]. + atmbrf_da, & ! Atmospheric bromoform concentration [ppt]. ficem_da ! Ice concentration []. logical :: & @@ -83,7 +83,7 @@ module mod_cesm public :: runid_cesm, runtyp_cesm, ocn_cpl_dt_cesm, nstep_in_cpl, hmlt, & frzpot, mltpot, swa_da, nsf_da, hmlt_da, lip_da, sop_da, eva_da, & rnf_da, rfi_da, fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, & - slp_da, abswnd_da, atmco2_da, atmvsls_da, ficem_da, smtfrc, l1ci, l2ci, & + slp_da, abswnd_da, atmco2_da, atmbrf_da, ficem_da, smtfrc, l1ci, l2ci, & inicon_cesm, inifrc_cesm, getfrc_cesm contains @@ -178,7 +178,7 @@ subroutine getfrc_cesm ficem(i, j) = w1*ficem_da(i, j, l1ci) + w2*ficem_da(i, j, l2ci) abswnd(i, j) = w1*abswnd_da(i, j, l1ci) + w2*abswnd_da(i, j, l2ci) atmco2(i, j) = w1*atmco2_da(i, j, l1ci) + w2*atmco2_da(i, j, l2ci) - atmbromo(i,j)= w1*atmvsls_da(i, j, l1ci)+ w2*atmvsls_da(i, j, l2ci) + atmbrf(i, j) = w1*atmbrf_da(i, j, l1ci) + w2*atmbrf_da(i, j, l2ci) enddo enddo do l = 1, isu(j) @@ -213,7 +213,7 @@ subroutine getfrc_cesm call ncdefvar('ficem_da', 'x y', ndouble, 8) call ncdefvar('abswnd_da', 'x y', ndouble, 8) call ncdefvar('atmco2_da', 'x y', ndouble, 8) - call ncdefvar('atmvsls_da','x y',ndouble,8) + call ncdefvar('atmbrf_da', 'x y', ndouble, 8) call ncdefvar('ztx_da', 'x y', ndouble, 8) call ncdefvar('mty_da', 'x y', ndouble, 8) call ncedef @@ -248,7 +248,7 @@ subroutine getfrc_cesm ip, 1, 1._r8, 0._r8, 8) call ncwrtr('atmco2_da', 'x y', atmco2_da(1 - nbdy, 1 - nbdy, l2ci), & ip, 1, 1._r8, 0._r8, 8) - call ncwrtr('atmvsls_da','x y', atmvsls_da(1 - nbdy, 1 - nbdy, l2ci), & + call ncwrtr('atmbrf_da', 'x y', atmbrf_da(1 - nbdy, 1 - nbdy, l2ci), & . ip, 1, 1._r8, 0._r8, 8) call ncwrtr('ztx_da', 'x y', ztx_da(1 - nbdy, 1 - nbdy, l2ci), & iu, 1, 1._r8, 0._r8, 8) @@ -280,7 +280,7 @@ subroutine getfrc_cesm call chksummsk(ficem, ip, 1, 'ficem') call chksummsk(abswnd, ip, 1, 'abswnd') call chksummsk(atmco2, ip, 1, 'atmco2') - call chksummsk(atmbromo, ip, 1, 'atmbromo') + call chksummsk(atmbrf, ip, 1, 'atmbrf') endif end subroutine getfrc_cesm diff --git a/drivers/cpl_mct/import_mct.F b/drivers/cpl_mct/import_mct.F index c4358c67..187d1a49 100644 --- a/drivers/cpl_mct/import_mct.F +++ b/drivers/cpl_mct/import_mct.F @@ -29,7 +29,7 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) use mod_cesm, only: swa_da, nsf_da, hmlt_da, lip_da, sop_da, . eva_da, rnf_da, rfi_da, fmltfz_da, sfl_da, . ztx_da, mty_da, ustarw_da, slp_da, abswnd_da, - . atmco2_da, atmvsls_da, ficem_da, l1ci, l2ci + . atmco2_da, atmbrf_da, ficem_da, l1ci, l2ci use mod_utility, only: util1, util2 use mod_checksum, only: csdiag, chksummsk use blom_cpl_indices @@ -315,27 +315,27 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) do i = 1, ii n = n + 1 if (ip(i,j) == 0) then - atmvsls_da(i,j,l2ci) = mval + atmbrf_da(i,j,l2ci) = mval elseif (cplmsk(i,j) == 0) then - atmvsls_da(i,j,l2ci) = fval + atmbrf_da(i,j,l2ci) = fval else ! Atmospheric bromoform concentration [ppt] - atmvsls_da(i,j,l2ci) = + atmbrf_da(i,j,l2ci) = . x2o_o%rAttr(index_x2o_Sa_vslsprog,n) endif enddo enddo call fill_global(mval, fval, halo_ps, - . atmvsls_da(1-nbdy,1-nbdy,l2ci)) + . atmbrf_da(1-nbdy,1-nbdy,l2ci)) if (mnproc.eq.1) . write (lp,*) 'import_mct: prog. atmospheric bromoform read' else do j = 1, jj do i = 1, ii if (ip(i,j) == 0) then - atmvsls_da(i,j,l2ci) = mval + atmbrf_da(i,j,l2ci) = mval else - atmvsls_da(i,j,l2ci) = -1 + atmbrf_da(i,j,l2ci) = -1 endif enddo enddo @@ -364,7 +364,7 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) call chksummsk(ficem_da(1-nbdy,1-nbdy,l2ci),ip,1,'ficem') call chksummsk(abswnd_da(1-nbdy,1-nbdy,l2ci),ip,1,'abswnd') call chksummsk(atmco2_da(1-nbdy,1-nbdy,l2ci),ip,1,'atmco2') - call chksummsk(atmvsls_da(1-nbdy,1-nbdy,l2ci),ip,1,'atmvsls') + call chksummsk(atmbrf_da(1-nbdy,1-nbdy,l2ci),ip,1,'atmbrf') endif end subroutine import_mct diff --git a/drivers/cpl_mct/sumsbuff_mct.F b/drivers/cpl_mct/sumsbuff_mct.F index 70d4b142..50c0f9b4 100644 --- a/drivers/cpl_mct/sumsbuff_mct.F +++ b/drivers/cpl_mct/sumsbuff_mct.F @@ -27,7 +27,7 @@ subroutine sumsbuff_mct(nsend, sbuff, tlast_coupled) use mod_grid, only: scuy, scvx, scuxi, scvyi use mod_state, only: u, v, temp, saln, pbu, pbv, ubflxs, vbflxs, . sealv - use mod_forcing, only: flxco2, flxdms, flxbromo + use mod_forcing, only: flxco2, flxdms, flxbrf use mod_cesm, only: frzpot use blom_cpl_indices @@ -147,7 +147,7 @@ subroutine sumsbuff_mct(nsend, sbuff, tlast_coupled) do i = max(1,ifp(j,l)), min(ii,ilp(j,l)) sbuff(i,j,index_o2x_Faoo_fvsls_ocn) = . sbuff(i,j,index_o2x_Faoo_fvsls_ocn) - . + flxbromo(i,j)*baclin + . + flxbrf(i,j)*baclin enddo enddo enddo diff --git a/hamocc/beleg_parm.F90 b/hamocc/beleg_parm.F90 index e2ea2e43..e65d3503 100644 --- a/hamocc/beleg_parm.F90 +++ b/hamocc/beleg_parm.F90 @@ -45,11 +45,7 @@ SUBROUTINE BELEG_PARM(kpie,kpje) USE mo_biomod USE mo_sedmnt, only: claydens,o2ut,rno3 USE mo_control_bgc, only: dtb,io_stdo_bgc -#ifdef BROMO use mo_param1_bgc, only: iatmco2,iatmnco2,iatmo2,iatmn2,iatmbromo -#else - use mo_param1_bgc, only: iatmco2,iatmnco2,iatmo2,iatmn2 -#endif USE mod_xc, only: mnproc implicit none @@ -244,6 +240,7 @@ SUBROUTINE BELEG_PARM(kpie,kpje) ctochl = 60. ! C to Chlorophyl ratio atten_w = 0.04 ! yellow substances attenuation in 1/m atten_c = 0.03*rcar*(12./ctochl)*1.e6 ! phytoplankton attenuation in 1/m + atten_uv= 0.33 ! atten_f = 0.4 ! fraction of sw-radiation directly absorbed in surface layer ! (only if FB_BGC_OCE) [feedback bgc-ocean] diff --git a/hamocc/carchm.F90 b/hamocc/carchm.F90 index a118f650..e61c6a32 100644 --- a/hamocc/carchm.F90 +++ b/hamocc/carchm.F90 @@ -151,7 +151,7 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & REAL :: frac_k,frac_aqg,frac_dicg #endif #ifdef BROMO - REAL :: flx_bromo,sch_bromo,kw_bromo,a_bromo,atm_brom,Kb1,lsub + REAL :: flx_bromo,sch_bromo,kw_bromo,a_bromo,atbrf,Kb1,lsub #endif ! set variables for diagnostic output to zero @@ -196,7 +196,7 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & !$OMP ,frac_dicg,flux13d,flux13u,flux14d,flux14u,dissol13,dissol14 & #endif #ifdef BROMO -!$OMP+ ,flx_bromo,sch_bromo,kw_bromo,a_bromo,atm_brom,Kb1,lsub & +!$OMP+ ,flx_bromo,sch_bromo,kw_bromo,a_bromo,atbrf,Kb1,lsub & #endif !$OMP ) DO k=1,kpke @@ -353,7 +353,7 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & atco214 = atm(i,j,iatmc14) #endif #ifdef BROMO - atm_brom = atm(i,j,iatmbromo) + atbrf = atm(i,j,iatmbromo) #endif ! Ratio P/P_0, where P is the local SLP and P_0 is standard pressure (1 atm). This is @@ -458,7 +458,7 @@ SUBROUTINE CARCHM(kpie,kpje,kpke,kbnd, & ocetra(i,j,1,idms)=ocetra(i,j,1,idms)-dmsflux/pddpo(i,j,1) #ifdef BROMO flx_bromo=kw_bromo*dtbgc* & - & (a_bromo*atm_brom*ppao(i,j)*9.86923*1e-6-ocetra(i,j,1,ibromo)) + & (a_bromo*atbrf*ppao(i,j)*9.86923*1e-6-ocetra(i,j,1,ibromo)) ocetra(i,j,1,ibromo)=ocetra(i,j,1,ibromo)+flx_bromo/pddpo(i,j,1) #endif diff --git a/hamocc/hamocc4bcm.F90 b/hamocc/hamocc4bcm.F90 index 79b6c1cb..00d97f1c 100644 --- a/hamocc/hamocc4bcm.F90 +++ b/hamocc/hamocc4bcm.F90 @@ -21,11 +21,7 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& pdlxp,pdlyp,pddpo,prho,pglat,omask, & dust,rivin,ndep, & pfswr,psicomo,ppao,pfu10,ptho,psao, & -#ifdef BROMO patmco2,pflxco2,pflxdms,patmbromo,pflxbromo) -#else - patmco2,pflxco2,pflxdms) -#endif !****************************************************************************** ! ! HAMOCC4BGC - main routine of iHAMOCC. @@ -122,10 +118,9 @@ SUBROUTINE HAMOCC4BCM(kpie,kpje,kpke,kbnd,kplyear,kplmon,kplday,kldtday,& REAL, intent(in) :: patmco2(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) REAL, intent(out) :: pflxco2(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) REAL, intent(out) :: pflxdms(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) -#ifdef BROMO REAL, intent(in) :: patmbromo(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) REAL, intent(out) :: pflxbromo(1-kbnd:kpie+kbnd,1-kbnd:kpje+kbnd) -#endif + INTEGER :: i,j,k,l IF (mnproc.eq.1) THEN diff --git a/hamocc/hamocc_step.F b/hamocc/hamocc_step.F index 5e4edc6d..9a52222a 100644 --- a/hamocc/hamocc_step.F +++ b/hamocc/hamocc_step.F @@ -26,7 +26,7 @@ subroutine hamocc_step(m,n,mm,nn,k1m,k1n) use mod_xc use mod_grid, only: plat use mod_state, only: temp,saln - use mod_forcing, only: swa,slp,abswnd,atmco2,flxco2,flxdms,atmbromo,flxbromo + use mod_forcing, only: swa,slp,abswnd,atmco2,flxco2,flxdms,atmbrf,flxbrf use mod_seaice, only: ficem use mo_bgcmean use mo_intfcblom, only: bgc_dx,bgc_dy,bgc_dp,bgc_rho,omask @@ -66,11 +66,7 @@ subroutine hamocc_step(m,n,mm,nn,k1m,k1n) . dust,rivflx,ndep, . swa,ficem,slp,abswnd, . temp(1-nbdy,1-nbdy,1+nn),saln(1-nbdy,1-nbdy,1+nn), -#ifdef BROMO - . atmco2,flxco2,flxdms,atmbromo,flxbromo) -#else - . atmco2,flxco2,flxdms) -#endif + . atmco2,flxco2,flxdms,atmbrf,flxbrf) c c --- accumulate fields and write output diff --git a/hamocc/mo_biomod.F90 b/hamocc/mo_biomod.F90 index dbd4f6e0..3839d305 100644 --- a/hamocc/mo_biomod.F90 +++ b/hamocc/mo_biomod.F90 @@ -89,7 +89,7 @@ MODULE mo_biomod REAL :: wpoc,wcal,wopal REAL :: drempoc,dremopal,dremn2o,dremsul REAL :: perc_diron, riron, fesoly, relaxfe, fetune, wdust - REAL :: ctochl, atten_w, atten_c, atten_f + REAL :: ctochl, atten_w, atten_c, atten_uv, atten_f #ifdef cisonew REAL :: c14fac REAL :: re1312,re14to,prei13,prei14 diff --git a/hamocc/ncout_hamocc.F b/hamocc/ncout_hamocc.F index 5b06256c..c73b10db 100644 --- a/hamocc/ncout_hamocc.F +++ b/hamocc/ncout_hamocc.F @@ -423,9 +423,9 @@ subroutine ncwrt_bgc(iogrp) #endif #ifdef BROMO call wrtsrf(jbromofx(iogrp),SRF_BROMOFX(iogrp),rnacc*1e3/dtbgc,0., - . cmpflg,'srfbromofx','Bromoform flux',' ','mol CHBr3 m-2 s-1') + . cmpflg,'bromofx','Bromoform flux',' ','mol CHBr3 m-2 s-1') call wrtsrf(jsrfbromo(iogrp),SRF_BROMO(iogrp),rnacc*1e3,0., - . cmpflg,'srfbromo','Syrface bromoform',' ','mol CHBr3 m-3') + . cmpflg,'srfbromo','Surface bromoform',' ','mol CHBr3 m-3') call wrtsrf(jatmbromo(iogrp),SRF_ATMBROMO(iogrp),rnacc,0.,cmpflg, . 'atmbromo','Atmospheric bromoform',' ','ppt') #endif diff --git a/hamocc/ocprod.F90 b/hamocc/ocprod.F90 index c68a789b..4ca11394 100644 --- a/hamocc/ocprod.F90 +++ b/hamocc/ocprod.F90 @@ -113,7 +113,7 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) real :: zoothresh,phythresh real :: temp,temfa,phofa ! temperature and irradiation factor for photosynthesis real :: dustinp - real :: absorption + real :: absorption,absorption_uv real :: dmsprod,dms_bac,dms_uv real :: dtr,dz real :: wpocd,wcald,wopald,dagg @@ -223,13 +223,14 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) abs_oce(:,:,1) = 1. #endif -!$OMP PARALLEL DO PRIVATE(absorption,atten,dz) +!$OMP PARALLEL DO PRIVATE(absorption,absorption_uv,atten,dz) do j = 1,kpje do i = 1,kpie if(omask(i,j) > 0.5) then - absorption = 1. + absorption = 1. + absorption_uv = 1. vloop: do k = 1,kwrbioz(i,j) @@ -239,8 +240,10 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) ! Average light intensity in layer k atten = atten_w + atten_c * max(0.,ocetra(i,j,k,iphy)) - abs_bgc(i,j,k) = ((absorption/atten) * (1.-exp(-atten*dz)))/dz - + abs_bgc(i,j,k) = ((absorption/atten)* (1.-exp(-atten*dz)))/dz +#ifdef BROMO + abs_uv(i,j,k) = ((absorption_uv/atten_uv)*(1.-exp(-atten_uv*dz)))/dz +#endif #ifdef FB_BGC_OCE abs_oce(i,j,k) = abs_oce(i,j,k) * absorption if (k == 2) then @@ -249,10 +252,9 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) #endif ! Radiation intensity I_0 at the top of next layer - absorption = absorption * exp(-atten*dz) -#ifdef BROMO - abs_uv(i,j,k) = exp(-0.33*dz/2) -#endif + absorption = absorption * exp(-atten*dz) + absorption_uv = absorption_uv * exp(-atten_uv*dz) + endif enddo vloop @@ -456,14 +458,14 @@ subroutine ocprod(kpie,kpje,kpke,kbnd,pdlxp,pdlyp,pddpo,omask,dust,ptho) ocetra(i,j,k,iiron) = ocetra(i,j,k,iiron)+dtr*riron & & - relaxfe*MAX(ocetra(i,j,k,iiron)-fesoly,0.) #ifdef BROMO -!Bromo source from phytoplankton production and sink to photolysis -!Hense and Quack (200) Pg537 Decay time scale is 30days =0.0333/day +! Bromo source from phytoplankton production and sink to photolysis +! Hense and Quack (200) Pg537 Decay time scale is 30days =0.0333/day +! sinks owing to degradation by nitrifiers (Pg 538 of Hense and Quack, +! 2009) is omitted because the magnitude is more than 2 order smaller +! than sink through halide substitution & hydrolysis (Fig. 3) bro_beta = rbro*(fbro1*avsil/(avsil+bkopal)+fbro2*bkopal/(avsil+bkopal)) bro_uv = 0.0333*dtb*strahl(i,j)/75.0*abs_uv(i,j,k)*ocetra(i,j,k,ibromo) ocetra(i,j,k,ibromo) = ocetra(i,j,k,ibromo)+bro_beta*phosy-bro_uv -!sinks owing to degradation by nitrifiers (Pg 538 of Hense and Quack, -!2009) is omitted because the magnitude is more than 2 order smaller -!than sink through halide substitution & hydrolysis (Fig. 3) #endif #ifdef AGG diff --git a/phy/mod_forcing.F90 b/phy/mod_forcing.F90 index d179fcbc..2fa9e47d 100644 --- a/phy/mod_forcing.F90 +++ b/phy/mod_forcing.F90 @@ -109,8 +109,8 @@ module mod_forcing atmco2, & ! Atmospheric CO2 concentration [ppm]. flxco2, & ! Air-sea CO2 flux [kg m-2 s-1]. flxdms, & ! Sea-air DMS flux [kg m-2 s-1]. - flxbromo, & ! sea-air bromoform flux - atmbromo ! atmospheric bromoform concentration + flxbrf, & ! sea-air bromoform flux + atmbrf ! atmospheric bromoform concentration real(r8), dimension(1 - nbdy:idm + nbdy,1 - nbdy:jdm + nbdy) :: & @@ -132,7 +132,7 @@ module mod_forcing sref, tflxap, sflxap, tflxdi, sflxdi, nflxdi, & sstclm, ricclm, sssclm, prfac, eiacc, pracc, & swa, nsf, hmltfz, lip, sop, eva, rnf, rfi, fmltfz, sfl, ztx, mty, & - ustarw, slp, abswnd, atmco2, flxco2, flxdms, flxbromo, atmbromo, & + ustarw, slp, abswnd, atmco2, flxco2, flxdms, flxbrf, atmbrf, & surflx, surrlx, sswflx, salflx, brnflx, salrlx, taux, tauy, & ustar, ustarb, ustar3, buoyfl, & inivar_forcing, fwbbal @@ -169,8 +169,8 @@ subroutine inivar_forcing atmco2(i, j) = spval flxco2(i, j) = spval flxdms(i, j) = spval - atmbromo(i, j) = spval - flxbromo(i, j) = spval + atmbrf(i, j) = spval + flxbrf(i, j) = spval surflx(i, j) = spval surrlx(i, j) = spval sswflx(i, j) = spval @@ -197,7 +197,7 @@ subroutine inivar_forcing ustarb(i, j) = 0._r8 buoyfl(i, j) = 0._r8 #ifdef BROMO - flxbromo(i, j) = 0._r8 + flxbrf(i, j) = 0._r8 #endif enddo enddo diff --git a/phy/restart_rd.F b/phy/restart_rd.F index f7abcaf0..60bed0df 100644 --- a/phy/restart_rd.F +++ b/phy/restart_rd.F @@ -43,12 +43,12 @@ subroutine restart_rd use mod_forcing, only: ditflx, disflx, sprfac, . tflxdi, sflxdi, nflxdi, . prfac, eiacc, pracc, - . flxco2, flxdms, flxbromo, ustarb, buoyfl + . flxco2, flxdms, flxbrf, ustarb, buoyfl use mod_niw, only: uml, vml, umlres, vmlres use mod_cesm, only: frzpot, mltpot, swa_da, nsf_da, hmlt_da, . lip_da, sop_da, eva_da, rnf_da, rfi_da, . fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, - . slp_da, abswnd_da, atmco2_da, ficem_da, + . slp_da, abswnd_da, atmco2_da, atmbrf_da, ficem_da, . l1ci, l2ci use mod_ben02, only: cd_d, ch_d, ce_d, wg2_d, cd_m, ch_m, ce_m, . wg2_m, rhoa, tsi_tda, tml_tda, sml_tda, @@ -543,10 +543,10 @@ subroutine restart_rd write (lp,*) . 'will be initialized to zero.' endif - vexist=ncinqv('flxbromo') + vexist=ncinqv('flxbrf') ! call xcbcst(vexist) if (vexist) then - call ncread('flxbromo',flxbromo,ip,1,0.) + call ncread('flxbrf',flxbrf,ip,1,0.) elseif (mnproc.eq.1) then write (lp,*) . 'Warning: bromoform flux is not read from restart file and' diff --git a/phy/restart_wt.F b/phy/restart_wt.F index 467b3504..5c7bcb6f 100644 --- a/phy/restart_wt.F +++ b/phy/restart_wt.F @@ -41,12 +41,12 @@ subroutine restart_wt use mod_forcing, only: ditflx, disflx, sprfac, . tflxdi, sflxdi, nflxdi, . prfac, eiacc, pracc, - . flxco2, flxdms, ustarb, buoyfl,flxbromo + . flxco2, flxdms, ustarb, buoyfl,flxbrf use mod_niw, only: uml, vml, umlres, vmlres use mod_cesm, only: frzpot, mltpot, swa_da, nsf_da, hmlt_da, . lip_da, sop_da, eva_da, rnf_da, rfi_da, . fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, - . slp_da, abswnd_da, atmco2_da, atmvsls_da, ficem_da, + . slp_da, abswnd_da, atmco2_da, atmbrf_da, ficem_da, . l2ci use mod_ben02, only: cd_d, ch_d, ce_d, wg2_d, cd_m, ch_m, ce_m, . wg2_m, rhoa, tsi_tda, tml_tda, sml_tda, @@ -330,13 +330,13 @@ subroutine restart_wt call wrtrst('ficem_da',trim(c5p)//' k2 time',ficem_da,ip) call wrtrst('abswnd_da',trim(c5p)//' k2 time',abswnd_da,ip) call wrtrst('atmco2_da',trim(c5p)//' k2 time',atmco2_da,ip) - call wrtrst('atmvsls_da',trim(c5p)//' k2 time',atmvsls_da,ip) + call wrtrst('atmbrf_da',trim(c5p)//' k2 time',atmbrf_da,ip) ! not read in restart_rd, necesarry? call wrtrst('frzpot',trim(c5p)//' time',frzpot,ip) call wrtrst('mltpot',trim(c5p)//' time',mltpot,ip) call wrtrst('flxco2',trim(c5p)//' time',flxco2,ip) call wrtrst('flxdms',trim(c5p)//' time',flxdms,ip) #ifdef BROMO - call wrtrst('flxbromo',trim(c5p)//' time',flxbromo,ip) + call wrtrst('flxbrf',trim(c5p)//' time',flxbrf,ip) #endif endif c @@ -928,13 +928,13 @@ subroutine defvar_restart(c5p,c5u,c5v,c5q) call defvarrst('ficem_da',trim(c5p)//' k2 time') call defvarrst('abswnd_da',trim(c5p)//' k2 time') call defvarrst('atmco2_da',trim(c5p)//' k2 time') - call defvarrst('atmvsls_da',trim(c5p)//' k2 time') + call defvarrst('atmbrf_da',trim(c5p)//' k2 time') call defvarrst('frzpot',trim(c5p)//' time') call defvarrst('mltpot',trim(c5p)//' time') call defvarrst('flxco2',trim(c5p)//' time') call defvarrst('flxdms',trim(c5p)//' time') #ifdef BROMO - call defvarrst('flxbromo',trim(c5p)//' time') + call defvarrst('flxbrf',trim(c5p)//' time') #endif endif c From 26638e00efcd3b25716c314d8b29abbd994eea9d Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Mon, 22 Mar 2021 12:27:48 +0100 Subject: [PATCH 3/4] Changed naming of coupling indices for bromoform fluxes and surface concentration --- drivers/cpl_mct/export_mct.F | 6 +++--- drivers/cpl_mct/import_mct.F | 4 ++-- drivers/cpl_mct/sumsbuff_mct.F | 6 +++--- drivers/cpl_share/blom_cpl_indices.F90 | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/cpl_mct/export_mct.F b/drivers/cpl_mct/export_mct.F index bdf15d82..a379633f 100644 --- a/drivers/cpl_mct/export_mct.F +++ b/drivers/cpl_mct/export_mct.F @@ -152,13 +152,13 @@ subroutine export_mct(o2x_o, lsize, perm, jjcpl, nsend, sbuff, ! Pack bromoform flux (kg CHBr3/m^2/s), if requested ! ---------------------------------------------------------------- - if (index_o2x_Faoo_fvsls_ocn > 0) then + if (index_o2x_Faoo_fbrf_ocn > 0) then n = 0 do j = 1, jjcpl do i = 1, ii n = n + 1 - o2x_o%rAttr(index_o2x_Faoo_fvsls_ocn,n) = - . sbuff(i,j,index_o2x_Faoo_fvsls_ocn)*tfac + o2x_o%rAttr(index_o2x_Faoo_fbrf_ocn,n) = + . sbuff(i,j,index_o2x_Faoo_fbrf_ocn)*tfac enddo enddo else diff --git a/drivers/cpl_mct/import_mct.F b/drivers/cpl_mct/import_mct.F index 187d1a49..26f83590 100644 --- a/drivers/cpl_mct/import_mct.F +++ b/drivers/cpl_mct/import_mct.F @@ -309,7 +309,7 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) . write (lp,*) 'import_mct: atmospheric co2 not read' #endif - if (index_x2o_Sa_vslsprog > 0) then + if (index_x2o_Sa_brfprog > 0) then n = 0 do j = 1, jjcpl do i = 1, ii @@ -321,7 +321,7 @@ subroutine import_mct(x2o_o, lsize, perm, jjcpl) else ! Atmospheric bromoform concentration [ppt] atmbrf_da(i,j,l2ci) = - . x2o_o%rAttr(index_x2o_Sa_vslsprog,n) + . x2o_o%rAttr(index_x2o_Sa_brfprog,n) endif enddo enddo diff --git a/drivers/cpl_mct/sumsbuff_mct.F b/drivers/cpl_mct/sumsbuff_mct.F index 50c0f9b4..2b143b27 100644 --- a/drivers/cpl_mct/sumsbuff_mct.F +++ b/drivers/cpl_mct/sumsbuff_mct.F @@ -141,12 +141,12 @@ subroutine sumsbuff_mct(nsend, sbuff, tlast_coupled) enddo endif - if (index_o2x_Faoo_fvsls_ocn > 0) then + if (index_o2x_Faoo_fbrf_ocn > 0) then do j = 1, jj do l = 1, isp(j) do i = max(1,ifp(j,l)), min(ii,ilp(j,l)) - sbuff(i,j,index_o2x_Faoo_fvsls_ocn) = - . sbuff(i,j,index_o2x_Faoo_fvsls_ocn) + sbuff(i,j,index_o2x_Faoo_fbrf_ocn) = + . sbuff(i,j,index_o2x_Faoo_fbrf_ocn) . + flxbrf(i,j)*baclin enddo enddo diff --git a/drivers/cpl_share/blom_cpl_indices.F90 b/drivers/cpl_share/blom_cpl_indices.F90 index 03fe2615..bccd64c0 100644 --- a/drivers/cpl_share/blom_cpl_indices.F90 +++ b/drivers/cpl_share/blom_cpl_indices.F90 @@ -43,7 +43,7 @@ module blom_cpl_indices integer :: index_o2x_Fioo_q integer :: index_o2x_Faoo_fco2_ocn integer :: index_o2x_Faoo_fdms_ocn - integer :: index_o2x_Faoo_fvsls_ocn + integer :: index_o2x_Faoo_fbrf_ocn ! drv -> ocn @@ -52,9 +52,9 @@ module blom_cpl_indices integer :: index_x2o_Sa_pslv ! sea-level pressure (Pa) integer :: index_x2o_Sa_co2prog ! bottom atm level prognostic CO2 integer :: index_x2o_Sa_co2diag ! bottom atm level diagnostic CO2 + integer :: index_x2o_Sa_brfprog ! bottom atm level prognostic bromoform (ppt) integer :: index_x2o_Faxa_nhx ! nitrogen deposition (nhx) flux from atm (kgNm2/sec) integer :: index_x2o_Faxa_noy ! nitrogen deposition (noy) flux from atm (kgNm2/sec) - integer :: index_x2o_Sa_vslsprog ! bottom atm level prognostic bromoform (ppt) ! QL, 150526, from wav integer :: index_x2o_Sw_lamult ! wave model langmuir multiplier @@ -128,7 +128,7 @@ subroutine blom_cpl_indices_set( ) index_o2x_Fioo_q = mct_avect_indexra(o2x,'Fioo_q') index_o2x_Faoo_fco2_ocn = mct_avect_indexra(o2x,'Faoo_fco2_ocn',perrWith='quiet') index_o2x_Faoo_fdms_ocn = mct_avect_indexra(o2x,'Faoo_fdms_ocn',perrWith='quiet') - index_o2x_Faoo_fvsls_ocn= mct_avect_indexra(o2x,'Faoo_fvsls_ocn',perrWith='quiet') + index_o2x_Faoo_fbrf_ocn = mct_avect_indexra(o2x,'Faoo_fbrf_ocn',perrWith='quiet') index_x2o_Si_ifrac = mct_avect_indexra(x2o,'Si_ifrac') index_x2o_Sa_pslv = mct_avect_indexra(x2o,'Sa_pslv') index_x2o_So_duu10n = mct_avect_indexra(x2o,'So_duu10n') @@ -172,9 +172,9 @@ subroutine blom_cpl_indices_set( ) index_x2o_Faxa_dstwet4 = mct_avect_indexra(x2o,'Faxa_dstwet4') index_x2o_Sa_co2prog = mct_avect_indexra(x2o,'Sa_co2prog',perrWith='quiet') index_x2o_Sa_co2diag = mct_avect_indexra(x2o,'Sa_co2diag',perrWith='quiet') + index_x2o_Sa_brfprog = mct_avect_indexra(x2o,'Sa_brfprog',perrWith='quiet') index_x2o_Faxa_nhx = mct_avect_indexra(x2o,'Faxa_nhx',perrWith='quiet') index_x2o_Faxa_noy = mct_avect_indexra(x2o,'Faxa_noy',perrWith='quiet') - index_x2o_Sa_vslsprog = mct_avect_indexra(x2o,'Sa_vslsprog',perrWith='quiet') ! optional per thickness category fields From 1ad7c8e2fb05e8b3c75a6518cfde0ef1e70f3d37 Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Mon, 22 Mar 2021 14:36:07 +0100 Subject: [PATCH 4/4] Deleted ifdef BROMO in mod_forcing --- phy/mod_forcing.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/phy/mod_forcing.F90 b/phy/mod_forcing.F90 index 2fa9e47d..1799f51c 100644 --- a/phy/mod_forcing.F90 +++ b/phy/mod_forcing.F90 @@ -196,9 +196,7 @@ subroutine inivar_forcing ustar (i, j) = 0._r8 ustarb(i, j) = 0._r8 buoyfl(i, j) = 0._r8 -#ifdef BROMO flxbrf(i, j) = 0._r8 -#endif enddo enddo enddo