From cf697513d29ed6c65bc5be8d88397d83433353ec Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Fri, 6 Jan 2023 16:00:10 +0100 Subject: [PATCH 1/4] Add option for output of surface pH --- cime_config/buildnml | 8 ++++++-- hamocc/accfields.F90 | 11 ++++++----- hamocc/mo_bgcmean.F90 | 14 +++++++++++--- hamocc/ncout_hamocc.F90 | 40 +++++++++++++++++++++++++++------------- 4 files changed, 50 insertions(+), 23 deletions(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 2507d13d..57cc45eb 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -422,6 +422,7 @@ set SRF_ALKALI = '4, 2, 2' set SRF_SILICA = '0, 2, 2' set SRF_DIC = '4, 2, 2' set SRF_PHYTO = '4, 2, 2' +set SRF_PH = '0, 2, 2' set SRF_EXPORT = '0, 2, 2' set SRF_EXPOSI = '0, 2, 2' set SRF_EXPOCA = '0, 2, 2' @@ -446,6 +447,7 @@ set SRF_ATMO2 = '0, 2, 2' set SRF_ATMN2 = '0, 2, 2' set SRF_NATDIC = '0, 2, 2' set SRF_NATALKALI = '0, 2, 2' +set SRF_NATPH = '0, 2, 2' set SRF_NATPCO2 = '0, 2, 2' set SRF_NATCO2FX = '0, 2, 2' set SRF_CO213FXD = '0, 2, 2' @@ -1535,8 +1537,10 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF ! IRON - Dissolved iron (dfe) [mol Fe m-3] ! SILICA - Silicate (si) [mol Si m-3] ! PHYTO - Phytoplankton (phyc) [mol C m-3] +! PH - pH (ph) [-log10([h+])] ! NATDIC - Natural dissolved carbon (natdissic) [mol C m-3] ! NATALKALI - Natural alkalinity (nattalk) [eq m-3] +! NATPH - Natural pH (natph) [-log10([h+])] ! ! Other 3d tracer or diagnostic variables (LYR or LVL) ! DP - Layer thickness (pddpo) [m] @@ -1554,14 +1558,12 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF ! PHOSY - Primary production (pp) [mol C m-3 s-1] ! CO3 - Carbonate ions (co3) [mol C m-3] ! N2O - Nitrous oxide concentration [mol N2O m-3] -! PH - pH (ph) [-log10([h+])] ! OMEGAA - Aragonite saturation state (omegaa) [1] ! OMEGAC - Calcite saturation state (omegac) [1] ! NATDIC - Natural dissolved carbon (natdissic) [mol C m-3] ! NATALKALI - Natural alkalinity (nattalk) [eq m-3] ! NATCO3 - Natural carbonate ion concentration (natco3) [mol C m-3] ! NATCALC - Natural CaCO3 shells (natcalc) [mol C m-3] -! NATPH - Natural pH (natph) [-log10([h+])] ! NATOMEGAA - Natural aragonite saturation state (natomegaa) [1] ! NATOMEGAC - Natural calcite saturation state (natomegac) [1] ! DIC13 - Dissolved C13 (dissic13) [mol C m-3] @@ -1668,6 +1670,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF SRF_SILICA = $SRF_SILICA SRF_DIC = $SRF_DIC SRF_PHYTO = $SRF_PHYTO + SRF_PH = $SRF_PH SRF_EXPORT = $SRF_EXPORT SRF_EXPOSI = $SRF_EXPOSI SRF_EXPOCA = $SRF_EXPOCA @@ -1692,6 +1695,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF SRF_ATMN2 = $SRF_ATMN2 SRF_NATDIC = $SRF_NATDIC SRF_NATALKALI = $SRF_NATALKALI + SRF_NATPH = $SRF_NATPH SRF_NATPCO2 = $SRF_NATPCO2 SRF_NATCO2FX = $SRF_NATCO2FX SRF_CO213FXD = $SRF_CO213FXD diff --git a/hamocc/accfields.F90 b/hamocc/accfields.F90 index a83fe953..d91fb71a 100644 --- a/hamocc/accfields.F90 +++ b/hamocc/accfields.F90 @@ -65,10 +65,9 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) & jlvlprefo2,jlvlprefpo4,jlvlsf6,jlvlsilica,jlvlwnos,jlvlwphy,jn2flux,jn2o,jn2oflux,jn2ofx, & & jprorca,jprcaca,jsilpro,jpodiic,jpodial,jpodiph,jpodiox,jpodin2,jpodino3,jpodisi,jndep, & & jniflux,jnos,jo2flux,jo2sat,jomegaa,jomegac,jopal,joxflux,joxygen,jpco2,jpco2m,jkwco2khm,jco2khm, & - & jco2kh,jph,jphosph,jphosy,jphyto, & - & jpoc,jprefalk,jprefdic,jprefo2,jprefpo4,jsilica,jsrfalkali,jsrfano3,jsrfdic,jsrfiron,jsrfoxygen, & - & jsrfphosph,jsrfphyto,jsrfsilica,jwnos,jwphy,nbgc,nacc_bgc,bgcwrt,glb_inventory,bgct2d,acclvl, & - & acclyr,accsrf,bgczlv + & jco2kh,jph,jphosph,jphosy,jphyto,jpoc,jprefalk,jprefdic,jprefo2,jprefpo4,jsilica,jsrfalkali, & + & jsrfano3,jsrfdic,jsrfiron,jsrfoxygen,jsrfphosph,jsrfphyto,jsrfsilica,jsrfph,jwnos,jwphy, & + & nbgc,nacc_bgc,bgcwrt,glb_inventory,bgct2d,acclvl,acclyr,accsrf,bgczlv use mo_control_bgc, only: io_stdo_bgc use mo_param1_bgc, only: ialkali,ian2o,iano3,iatmco2,iatmdms,iatmn2,iatmn2o,iatmo2,icalc,idet,idms,idicsat,idoc,iiron,iopal,& & ioxygen,iphosph,iphy,iprefalk,iprefdic,iprefpo4,iprefo2,isco212,isilica,izoo, & @@ -100,7 +99,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) use mo_param1_bgc, only: iatmnco2,inatalkali,inatcalc,inatsco212 use mo_carbch, only: natco3,nathi,natomegaa,natomegac,natpco2d use mo_bgcmean, only: jlvlnatph,jnatalkali,jnatcalc,jnatco2fx,jnatco3,jnatdic,jnatomegaa,jnatomegac,jnatpco2,jnatph, & - & jsrfnatalk,jsrfnatdic + & jsrfnatalk,jsrfnatdic,jsrfnatph #endif #ifndef sedbypass use mo_param1_bgc, only: ipowaal,ipowaic,ipowaox,ipowaph,ipowasi,ipown2,ipowno3,isssc12,issso12,issssil,issster @@ -242,6 +241,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call accsrf(jsrfsilica,ocetra(1,1,1,isilica),omask,0) call accsrf(jsrfdic,ocetra(1,1,1,isco212),omask,0) call accsrf(jsrfphyto,ocetra(1,1,1,iphy),omask,0) + call accsrf(jsrfph,hi(1,1,1),omask,0) call accsrf(jdms,ocetra(1,1,1,idms),omask,0) call accsrf(jexport,expoor,omask,0) call accsrf(jexpoca,expoca,omask,0) @@ -256,6 +256,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call accsrf(jsrfnatdic,ocetra(1,1,1,inatsco212),omask,0) call accsrf(jsrfnatalk,ocetra(1,1,1,inatalkali),omask,0) call accsrf(jnatpco2,natpco2d,omask,0) + call accsrf(jsrfnatph,hi(1,1,1),omask,0) #endif #ifdef BROMO call accsrf(jsrfbromo,ocetra(1,1,1,ibromo),omask,0) diff --git a/hamocc/mo_bgcmean.F90 b/hamocc/mo_bgcmean.F90 index 9bb44653..bbabd104 100644 --- a/hamocc/mo_bgcmean.F90 +++ b/hamocc/mo_bgcmean.F90 @@ -89,8 +89,9 @@ MODULE mo_bgcmean & SRF_SF6 =0 ,SRF_PHOSPH =0 ,SRF_OXYGEN =0 , & & SRF_IRON =0 ,SRF_ANO3 =0 ,SRF_ALKALI =0 , & & SRF_SILICA =0 ,SRF_DIC =0 ,SRF_PHYTO =0 , & + & SRF_PH =0 , & & SRF_NATDIC =0 ,SRF_NATALKALI =0 ,SRF_NATPCO2 =0 , & - & SRF_NATCO2FX =0 , & + & SRF_NATCO2FX =0 ,SRF_NATPH =0 , & & SRF_ATMBROMO =0 ,SRF_BROMO =0 ,SRF_BROMOFX =0 , & & INT_BROMOPRO =0 ,INT_BROMOUV =0 , & & INT_PHOSY =0 ,INT_NFIX =0 ,INT_DNIT =0 , & @@ -165,8 +166,9 @@ MODULE mo_bgcmean & SRF_SF6 ,SRF_PHOSPH ,SRF_OXYGEN , & & SRF_IRON ,SRF_ANO3 ,SRF_ALKALI , & & SRF_SILICA ,SRF_DIC ,SRF_PHYTO , & + & SRF_PH , & & SRF_NATDIC ,SRF_NATALKALI ,SRF_NATPCO2 , & - & SRF_NATCO2FX , & + & SRF_NATCO2FX ,SRF_NATPH , & & SRF_ATMBROMO ,SRF_BROMO ,SRF_BROMOFX , & & INT_BROMOPRO ,INT_BROMOUV , & & INT_PHOSY ,INT_NFIX ,INT_DNIT , & @@ -292,6 +294,7 @@ MODULE mo_bgcmean & jsrfsilica = 0 , & & jsrfdic = 0 , & & jsrfphyto = 0 , & + & jsrfph = 0 , & & jintphosy = 0 , & & jintnfix = 0 , & & jintdnit = 0 , & @@ -327,7 +330,8 @@ MODULE mo_bgcmean & jsrfnatdic = 0 , & & jsrfnatalk = 0 , & & jnatpco2 = 0 , & - & jnatco2fx = 0 + & jnatco2fx = 0 , & + & jsrfnatph = 0 INTEGER, DIMENSION(nbgcmax), SAVE :: & & jbromofx = 0 , & @@ -620,6 +624,8 @@ SUBROUTINE ALLOC_MEM_BGCMEAN(kpie,kpje,kpke) jsrfdic(n)=i_bsc_m2d*min(1,SRF_DIC(n)) IF (SRF_PHYTO(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 jsrfphyto(n)=i_bsc_m2d*min(1,SRF_PHYTO(n)) + IF (SRF_PH(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 + jsrfph(n)=i_bsc_m2d*min(1,SRF_PH(n)) IF (INT_PHOSY(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 jintphosy(n)=i_bsc_m2d*min(1,INT_PHOSY(n)) IF (INT_NFIX(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 @@ -705,6 +711,8 @@ 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)) + IF (SRF_NATPH(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 + jsrfnatph(n)=i_bsc_m2d*min(1,SRF_NATPH(n)) #endif #ifdef BROMO IF (SRF_BROMO(n).GT.0) i_bsc_m2d=i_bsc_m2d+1 diff --git a/hamocc/ncout_hamocc.F90 b/hamocc/ncout_hamocc.F90 index 6293f96b..182595e9 100644 --- a/hamocc/ncout_hamocc.F90 +++ b/hamocc/ncout_hamocc.F90 @@ -79,7 +79,7 @@ subroutine ncwrt_bgc(iogrp) & jph,jphosph,jphosy,jphyto,jpoc,jprefalk, & & jprefdic,jprefo2,jprefpo4,jsilica, & & jsrfalkali,jsrfano3,jsrfdic,jsrfiron, & - & jsrfoxygen,jsrfphosph,jsrfphyto,jsrfsilica, & + & jsrfoxygen,jsrfphosph,jsrfphyto,jsrfsilica,jsrfph, & & jwnos,jwphy, & & lyr_dp,lyr_dic,lyr_alkali,lyr_phosph, & & lyr_oxygen,lyr_ano3,lyr_silica,lyr_doc, & @@ -102,14 +102,14 @@ subroutine ncwrt_bgc(iogrp) & srf_dmsprod,srf_dms_bac,srf_dms_uv, & & srf_export,srf_exposi,srf_expoca,srf_dic, & & srf_alkali,srf_phosph,srf_oxygen,srf_ano3, & - & srf_silica,srf_iron,srf_phyto, & + & srf_silica,srf_iron,srf_phyto,srf_ph, & & int_phosy,int_nfix,int_dnit, & & nbgc,nacc_bgc,bgcwrt,glb_inventory,bgct2d, & & nbgcmax,glb_ncformat,glb_compflag, & & glb_fnametag,filefq_bgc,diagfq_bgc, & - & filemon_bgc,fileann_bgc,ip,wrtlyr,wrtlvl, & - & loglyr,inilvl,inilyr,inisrf,loglvl, & - & msklvl,wrtsrf,msksrf,finlyr + & filemon_bgc,fileann_bgc,ip,wrtlyr,wrtlvl,wrtsrf, & + & loglyr,loglvl,logsrf,inilvl,inilyr,inisrf, & + & msklvl,msksrf,finlyr #ifdef AGG use mo_bgcmean, only: lyr_nos,lyr_wphy, lyr_wnos,lyr_eps, & & lyr_asize,lvl_nos,lvl_wphy,lvl_wnos,lvl_eps, & @@ -143,14 +143,14 @@ subroutine ncwrt_bgc(iogrp) #endif #ifdef natDIC use mo_bgcmean, only: jnatalkali,jnatdic,jnatcalc,jnatco3,jnatph, & - & jnatomegaa,jnatomegac,lyr_natph,jlvlnatph, & - & lvl_natph,jsrfnatdic, & - & jsrfnatalk,jnatpco2,jnatco2fx,lyr_natco3, & - & lyr_natalkali,lyr_natdic,lyr_natcalc, & + & jnatomegaa,jnatomegac,jlvlnatph, & + & jsrfnatdic,jsrfnatalk,jsrfnatph, & + & jnatpco2,jnatco2fx,lyr_natco3, & + & lyr_natalkali,lyr_natdic,lyr_natph,lyr_natcalc, & & lyr_natomegaa,lyr_natomegac,lvl_natco3, & - & lvl_natalkali,lvl_natdic,lvl_natcalc, & + & lvl_natalkali,lvl_natdic,lvl_natph,lvl_natcalc, & & lvl_natomegaa,lvl_natomegac,srf_natdic, & - & srf_natalkali,srf_natpco2,srf_natco2fx + & srf_natalkali,srf_natpco2,srf_natco2fx,srf_natph #endif #ifndef sedbypass use mo_bgcmean, only: jpowaic,jpowaal,jpowaph,jpowaox,jpown2, & @@ -385,9 +385,11 @@ subroutine ncwrt_bgc(iogrp) #endif ! --- Compute log10 of pH + if (SRF_PH(iogrp).ne.0) call logsrf(jsrfph(iogrp),rnacc,0.) if (LYR_PH(iogrp).ne.0) call loglyr(jph(iogrp),1.,0.) if (LVL_PH(iogrp).ne.0) call loglvl(jlvlph(iogrp),rnacc,0.) #ifdef natDIC + if (SRF_NATPH(iogrp).ne.0) call logsrf(jsrfnatph(iogrp),rnacc,0.) if (LYR_NATPH(iogrp).ne.0) call loglyr(jnatph(iogrp),1.,0.) if (LVL_NATPH(iogrp).ne.0) call loglvl(jlvlnatph(iogrp),rnacc,0.) #endif @@ -456,6 +458,8 @@ subroutine ncwrt_bgc(iogrp) call wrtsrf(jsrfphyto(iogrp),SRF_PHYTO(iogrp), & & rnacc*1e3,0.,cmpflg,'srfphyc', & & 'Surface phytoplankton',' ','mol P m-3') + call wrtsrf(jsrfph(iogrp),SRF_PH(iogrp),-1.,0., & + & cmpflg,'srfph','Surface pH',' ','-log10([h+])') call wrtsrf(jintphosy(iogrp),INT_PHOSY(iogrp), & & rnacc*1e3/dtbgc,0.,cmpflg,'ppint', & & 'Integrated primary production',' ','mol C m-2 s-1') @@ -571,6 +575,8 @@ subroutine ncwrt_bgc(iogrp) call wrtsrf(jnatco2fx(iogrp),SRF_NATCO2FX(iogrp), & & rnacc*12./dtbgc,0.,cmpflg,'natco2fx', & & 'Natural CO2 flux',' ','kg C m-2 s-1') + call wrtsrf(jsrfnatph(iogrp),SRF_NATPH(iogrp),-1.,0., & + & cmpflg,'srfnatph','Surface natural pH',' ','-log10([h+])') #endif #ifdef BROMO call wrtsrf(jbromofx(iogrp),SRF_BROMOFX(iogrp),rnacc*1e3/dtbgc, & @@ -914,6 +920,7 @@ subroutine ncwrt_bgc(iogrp) call inisrf(jsrfsilica(iogrp),0.) call inisrf(jsrfiron(iogrp),0.) call inisrf(jsrfphyto(iogrp),0.) + call inisrf(jsrfph(iogrp),0.) call inisrf(jintphosy(iogrp),0.) call inisrf(jintnfix(iogrp),0.) call inisrf(jintdnit(iogrp),0.) @@ -960,6 +967,7 @@ subroutine ncwrt_bgc(iogrp) call inisrf(jsrfnatalk(iogrp),0.) call inisrf(jnatpco2(iogrp),0.) call inisrf(jnatco2fx(iogrp),0.) + call inisrf(jsrfnatph(iogrp),0.) #endif #ifdef BROMO call inisrf(jsrfbromo(iogrp),0.) @@ -1138,7 +1146,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) & srf_co2fxu,srf_oxflux,srf_niflux,srf_dms,srf_dmsprod, & & srf_dms_bac,srf_dms_uv,srf_export,srf_exposi,srf_expoca, & & srf_dic,srf_alkali,srf_phosph,srf_oxygen,srf_ano3,srf_silica, & - & srf_iron,srf_phyto,int_phosy,int_nfix,int_dnit,flx_car0100, & + & srf_iron,srf_phyto,srf_ph,int_phosy,int_nfix,int_dnit,flx_car0100, & & flx_car0500,flx_car1000,flx_car2000,flx_car4000,flx_car_bot, & & flx_bsi0100,flx_bsi0500,flx_bsi1000,flx_bsi2000,flx_bsi4000, & & flx_bsi_bot,flx_cal0100,flx_cal0500,flx_cal1000,flx_cal2000, & @@ -1180,7 +1188,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) #endif #ifdef natDIC use mo_bgcmean, only: srf_natdic,srf_natalkali,srf_natpco2, & - & srf_natco2fx,lyr_natco3,lyr_natalkali,lyr_natdic, & + & srf_natco2fx,srf_natph,lyr_natco3,lyr_natalkali,lyr_natdic, & & lyr_natcalc,lyr_natph,lyr_natomegaa,lyr_natomegac, & & lvl_natalkali,lvl_natdic,lvl_natcalc,lvl_natph, & & lvl_natomegaa,lvl_natomegac,lvl_natco3 @@ -1264,6 +1272,10 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) & 'Surface dissolved iron',' ','mol Fe m-3',0) call ncdefvar3d(SRF_PHYTO(iogrp),cmpflg,'p','srfphyc', & & 'Surface phytoplankton',' ','mol P m-3',0) + + call ncdefvar3d(SRF_PH(iogrp),cmpflg,'p','srfph', & + & 'Surface pH',' ','-log10([h+])',0) + call ncdefvar3d(INT_PHOSY(iogrp),cmpflg,'p','ppint', & & 'Integrated primary production',' ','mol C m-2 s-1',0) call ncdefvar3d(INT_NFIX(iogrp),cmpflg,'p','nfixint', & @@ -1358,6 +1370,8 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) & 'natpco2','Surface natural PCO2',' ','uatm',0) call ncdefvar3d(SRF_NATCO2FX(iogrp), & & cmpflg,'p','natco2fx','Natural CO2 flux',' ','kg C m-2 s-1',0) + call ncdefvar3d(SRF_NATPH(iogrp),cmpflg,'p','srfnatph', & + & 'Surface natural pH',' ','-log10([h+])',0) #endif #ifdef BROMO call ncdefvar3d(SRF_BROMO(iogrp),cmpflg,'p','srfbromo', & From 0e24385aec5425c402ad38d45041663c2ac1ca9d Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Fri, 6 Jan 2023 16:11:23 +0100 Subject: [PATCH 2/4] Correct accumulation of natural hi --- hamocc/accfields.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hamocc/accfields.F90 b/hamocc/accfields.F90 index d91fb71a..d27dba68 100644 --- a/hamocc/accfields.F90 +++ b/hamocc/accfields.F90 @@ -256,7 +256,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask) call accsrf(jsrfnatdic,ocetra(1,1,1,inatsco212),omask,0) call accsrf(jsrfnatalk,ocetra(1,1,1,inatalkali),omask,0) call accsrf(jnatpco2,natpco2d,omask,0) - call accsrf(jsrfnatph,hi(1,1,1),omask,0) + call accsrf(jsrfnatph,nathi(1,1,1),omask,0) #endif #ifdef BROMO call accsrf(jsrfbromo,ocetra(1,1,1,ibromo),omask,0) From 12ee4f79661f4c0846035a55ec3edeee23d05d54 Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Fri, 6 Jan 2023 16:20:31 +0100 Subject: [PATCH 3/4] Correct white spaces --- hamocc/ncout_hamocc.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/hamocc/ncout_hamocc.F90 b/hamocc/ncout_hamocc.F90 index 182595e9..57ed8f98 100644 --- a/hamocc/ncout_hamocc.F90 +++ b/hamocc/ncout_hamocc.F90 @@ -1272,10 +1272,8 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) & 'Surface dissolved iron',' ','mol Fe m-3',0) call ncdefvar3d(SRF_PHYTO(iogrp),cmpflg,'p','srfphyc', & & 'Surface phytoplankton',' ','mol P m-3',0) - call ncdefvar3d(SRF_PH(iogrp),cmpflg,'p','srfph', & & 'Surface pH',' ','-log10([h+])',0) - call ncdefvar3d(INT_PHOSY(iogrp),cmpflg,'p','ppint', & & 'Integrated primary production',' ','mol C m-2 s-1',0) call ncdefvar3d(INT_NFIX(iogrp),cmpflg,'p','nfixint', & From 8be199c5ef7eae3595cebf12846d8e92403babc8 Mon Sep 17 00:00:00 2001 From: JorgSchwinger Date: Fri, 6 Jan 2023 18:45:23 +0100 Subject: [PATCH 4/4] Changed h+ to H+ in netCDF output of pH units --- hamocc/ncout_hamocc.F90 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hamocc/ncout_hamocc.F90 b/hamocc/ncout_hamocc.F90 index 57ed8f98..8f0f5778 100644 --- a/hamocc/ncout_hamocc.F90 +++ b/hamocc/ncout_hamocc.F90 @@ -459,7 +459,7 @@ subroutine ncwrt_bgc(iogrp) & rnacc*1e3,0.,cmpflg,'srfphyc', & & 'Surface phytoplankton',' ','mol P m-3') call wrtsrf(jsrfph(iogrp),SRF_PH(iogrp),-1.,0., & - & cmpflg,'srfph','Surface pH',' ','-log10([h+])') + & cmpflg,'srfph','Surface pH',' ','-log10([H+])') call wrtsrf(jintphosy(iogrp),INT_PHOSY(iogrp), & & rnacc*1e3/dtbgc,0.,cmpflg,'ppint', & & 'Integrated primary production',' ','mol C m-2 s-1') @@ -576,7 +576,7 @@ subroutine ncwrt_bgc(iogrp) & rnacc*12./dtbgc,0.,cmpflg,'natco2fx', & & 'Natural CO2 flux',' ','kg C m-2 s-1') call wrtsrf(jsrfnatph(iogrp),SRF_NATPH(iogrp),-1.,0., & - & cmpflg,'srfnatph','Surface natural pH',' ','-log10([h+])') + & cmpflg,'srfnatph','Surface natural pH',' ','-log10([H+])') #endif #ifdef BROMO call wrtsrf(jbromofx(iogrp),SRF_BROMOFX(iogrp),rnacc*1e3/dtbgc, & @@ -644,7 +644,7 @@ subroutine ncwrt_bgc(iogrp) call wrtlyr(jco3(iogrp),LYR_CO3(iogrp),1e3,0.,cmpflg, & & 'co3','Carbonate ions',' ','mol C m-3') call wrtlyr(jph(iogrp),LYR_PH(iogrp),-1.,0.,cmpflg, & - & 'ph','pH',' ','-log10([h+])') + & 'ph','pH',' ','-log10([H+])') call wrtlyr(jomegaa(iogrp),LYR_OMEGAA(iogrp),1.,0.,cmpflg, & & 'omegaa','OmegaA',' ','-') call wrtlyr(jomegac(iogrp),LYR_OMEGAC(iogrp),1.,0.,cmpflg, & @@ -716,7 +716,7 @@ subroutine ncwrt_bgc(iogrp) call wrtlyr(jnatcalc(iogrp),LYR_NATCALC(iogrp),1e3,0.,cmpflg, & & 'natcalc','Natural CaCO3 shells',' ','mol C m-3') call wrtlyr(jnatph(iogrp),LYR_NATPH(iogrp),-1.,0.,cmpflg, & - & 'natph','Natural pH',' ','-log10([h+])') + & 'natph','Natural pH',' ','-log10([H+])') call wrtlyr(jnatomegaa(iogrp),LYR_NATOMEGAA(iogrp),1.,0.,cmpflg, & & 'natomegaa','Natural OmegaA',' ','-') call wrtlyr(jnatomegac(iogrp),LYR_NATOMEGAC(iogrp),1.,0.,cmpflg, & @@ -759,7 +759,7 @@ subroutine ncwrt_bgc(iogrp) call wrtlvl(jlvlco3(iogrp),LVL_CO3(iogrp),rnacc*1e3,0.,cmpflg, & & 'co3lvl','Carbonate ions',' ','mol C m-3') call wrtlvl(jlvlph(iogrp),LVL_PH(iogrp),-1.,0.,cmpflg, & - & 'phlvl','pH',' ','-log10([h+])') + & 'phlvl','pH',' ','-log10([H+])') call wrtlvl(jlvlomegaa(iogrp),LVL_OMEGAA(iogrp),rnacc,0.,cmpflg, & & 'omegaalvl','OmegaA',' ','-') call wrtlvl(jlvlomegac(iogrp),LVL_OMEGAC(iogrp),rnacc,0.,cmpflg, & @@ -840,7 +840,7 @@ subroutine ncwrt_bgc(iogrp) & rnacc*1e3,0.,cmpflg,'natcalclvl', & & 'Natural CaCO3 shells',' ','mol C m-3') call wrtlvl(jlvlnatph(iogrp),LVL_NATPH(iogrp),-1.,0.,cmpflg, & - & 'natphlvl','Natural pH',' ','-log10([h+])') + & 'natphlvl','Natural pH',' ','-log10([H+])') call wrtlvl(jlvlnatomegaa(iogrp),LVL_NATOMEGAA(iogrp), & & rnacc,0.,cmpflg,'natomegaalvl', & & 'Natural OmegaA',' ','-') @@ -1273,7 +1273,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(SRF_PHYTO(iogrp),cmpflg,'p','srfphyc', & & 'Surface phytoplankton',' ','mol P m-3',0) call ncdefvar3d(SRF_PH(iogrp),cmpflg,'p','srfph', & - & 'Surface pH',' ','-log10([h+])',0) + & 'Surface pH',' ','-log10([H+])',0) call ncdefvar3d(INT_PHOSY(iogrp),cmpflg,'p','ppint', & & 'Integrated primary production',' ','mol C m-2 s-1',0) call ncdefvar3d(INT_NFIX(iogrp),cmpflg,'p','nfixint', & @@ -1369,7 +1369,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(SRF_NATCO2FX(iogrp), & & cmpflg,'p','natco2fx','Natural CO2 flux',' ','kg C m-2 s-1',0) call ncdefvar3d(SRF_NATPH(iogrp),cmpflg,'p','srfnatph', & - & 'Surface natural pH',' ','-log10([h+])',0) + & 'Surface natural pH',' ','-log10([H+])',0) #endif #ifdef BROMO call ncdefvar3d(SRF_BROMO(iogrp),cmpflg,'p','srfbromo', & @@ -1434,7 +1434,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LYR_CO3(iogrp),cmpflg,'p', & & 'co3','Carbonate ions',' ','mol C m-3',1) call ncdefvar3d(LYR_PH(iogrp),cmpflg,'p', & - & 'ph','pH',' ','-log10([h+])',1) + & 'ph','pH',' ','-log10([H+])',1) call ncdefvar3d(LYR_OMEGAA(iogrp),cmpflg,'p', & & 'omegaa','OmegaA',' ','1',1) call ncdefvar3d(LYR_OMEGAC(iogrp),cmpflg,'p', & @@ -1505,7 +1505,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LYR_NATCALC(iogrp),cmpflg,'p','natcalc', & & 'Natural CaCO3',' ','mol C m-3',1) call ncdefvar3d(LYR_NATPH(iogrp),cmpflg,'p', & - & 'natph','Natural pH',' ','-log10([h+])',1) + & 'natph','Natural pH',' ','-log10([H+])',1) call ncdefvar3d(LYR_NATOMEGAA(iogrp),cmpflg,'p','natomegaa', & & 'Natural OmegaA',' ','1',1) call ncdefvar3d(LYR_NATOMEGAC(iogrp),cmpflg,'p','natomegac', & @@ -1548,7 +1548,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LVL_CO3(iogrp),cmpflg,'p', & & 'co3lvl','Carbonate ions',' ','mol C m-3',2) call ncdefvar3d(LVL_PH(iogrp),cmpflg,'p', & - & 'phlvl','pH',' ','-log10([h+])',2) + & 'phlvl','pH',' ','-log10([H+])',2) call ncdefvar3d(LVL_OMEGAA(iogrp),cmpflg,'p', & & 'omegaalvl','OmegaA',' ','1',2) call ncdefvar3d(LVL_OMEGAC(iogrp),cmpflg,'p', & @@ -1619,7 +1619,7 @@ subroutine hamoccvardef(iogrp,timeunits,calendar,cmpflg) call ncdefvar3d(LVL_NATCALC(iogrp),cmpflg,'p', & & 'natcalclvl','Natural CaCO3 shells',' ','mol C m-3',2) call ncdefvar3d(LVL_NATPH(iogrp),cmpflg,'p', & - & 'natphlvl','Natural pH',' ','-log10([h+])',2) + & 'natphlvl','Natural pH',' ','-log10([H+])',2) call ncdefvar3d(LVL_NATOMEGAA(iogrp),cmpflg,'p', & & 'natomegaalvl','Natural OmegaA',' ','1',2) call ncdefvar3d(LVL_NATOMEGAC(iogrp),cmpflg,'p', &