module m_ECOSM_cocco contains ! Subroutine that take as input an array of the local variables of the ! ecosystem models and returns an array for the change of the ecosystem variables ! resulting from the growth of coccolithophores and formation of CACO3. ! Time integration occurs outside the routine. ! What must be done outside this file: ! Initialization ! Sinking ! Advections ! Light attenuation with self-shading ! Time stepping for local changes. ! Depending on how the grazing formularion is donw in the model, the grazing pressure may have to be modified also for the other variables. subroutine cocco(bio_local,bio_change,PAR_loc,TT_loc, & om_cal_loc,ix,jx) ! use mod_necessary_ecovars ! Where we have defined all the ecovariables. use mod_dimensions use mod_xc use m_ECOSM_bioini implicit none include 'biovar.h' ! additional variables and parameters include 'ECOSMparam1.h' ! model parameters !input real, intent(in) :: bio_local(nbio) real, intent(in) :: PAR_loc !light at loaction real, intent(in) :: TT_loc !temperature real, intent(in) :: om_cal_loc !saturation state for CaCO3 !output real, intent(out) :: bio_change(nbio) !loacl valibles real :: chltoc_c_max, alpha_c, coc_off real :: R_star, Pcaco3, L_star real :: up_nh4_co ! uptake of ammonia real :: up_no3_co ! uptake of nitrate real :: up_n_co ! uptake of nitrogen real :: up_p_co ! uptake of phosphorous real :: blight_co ! light limitation real :: prodc ! total light and nutrient limitation real :: Fs_co, ZsonCO ! grazing by microzoopl. real :: Fl_co, ZlonCO ! grazing by microzoopl. real :: CHLtoC_C ! chl. to carbon ratio real :: Ts_co ! chl. to carbon ratio integer ix, jx call ECOSM_bioini Ts_co=1. UP_NH4_co= bio_local(inh4)/(BioC(48)+bio_local(inh4)) UP_NO3_co=(bio_local(init)/(BioC(49)+bio_local(init))) & *exp(-BioC(8)*bio_local(inh4)) UP_N_co=UP_NH4_co+UP_NO3_co UP_P_co = bio_local(ipho)/(BioC(50)+bio_local(ipho)) Blight_co=max(tanh(BioC(47)*PAR_loc),0.) prodc=Ts_co*min(Blight_co,UP_N_co,UP_P_co) !Cocco ! if ((ix==25).and.(jx==25)) then ! print*, 'Proc', mnproc ! print*, 'Prodc', prodc,Ts_co,Blight_co,UP_N_co,UP_P_co ! print*, 'PAR', par_loc, BioC(47) ! end if ! ingestion of coccolithophores by microzooplankton. Fs_co=GI(1,1)*bio_local(ifla)+GI(1,2)*bio_local(idia) & +GI(1,5)*bio_local(idet)+GI(1,6)*bio_local(ibg) & +GI(1,7)*bio_local(icocc) ZsonCO=GI(1,7)*BioC(12)*bio_local(icocc)/(BioC(14)+Fs_co) ! ingestion of coccolithophores by mesoozooplankton. Fl_co=GI(2,1)*bio_local(ifla)+GI(2,2)*bio_local(idia) & +GI(2,3)*bio_local(imicro)+GI(2,5)*bio_local(idet) & +GI(2,6)*bio_local(ibg)+GI(2,7)*bio_local(icocc) ZlonCO=GI(2,7)*BioC(11)*bio_local(icocc)/(BioC(14)+Fl_co) ZsonCO = ZsonCO*max(sign(-1.,bio_local(icocc)-0.1),0.) ZlonCO = ZlonCO*max(sign(-1.,bio_local(icocc)-0.1),0.) CHLtoC_C_max = 3.83 ! These will be moved to ECOSMparameters.h, alpha_C = 0.0393 ! when tests are complete and fine ! chlorophyll ratio CHLtoC_C = CHLtoC_C_max * max(0.1,prodc) * BioC(46) *sedy0*! needs to be 1/day & bio_local(icocc) * REDF(11) * REDF(16) / & (alpha_C * REDF(1) * REDF(6) * & PAR_loc * bio_local(ichlc)) CHLtoC_C = max(0.5* REDF(11) * REDF(16),CHLtoC_C) CHLtoC_C = min(3.83* REDF(11) * REDF(16),CHLtoC_C) coc_off = max(sign(-1.,bio_local(icocc)-0.1),0.) !*Co (small phytoplankton, coccolithophores)! bio_change(icocc)=(BioC(46)*prodc) & * bio_local(icocc)*BioC(53) ! & - BioC(51)*coc_off*bio_local(icocc) & - ZsonCo*bio_local(imicro) ! & - ZlonCo*bio_local(imeso) !*Co (chlorophyll small phytoplankton, coccolithophores) bio_change(ichlc) = & BioC(46) * prodc * CHLtoC_C * bio_local(icocc) - & ( BioC(51) * coc_off * bio_local(icocc) + & ZsonCo*bio_local(imicro) + & ZlonCo*bio_local(imeso) ) * & bio_local(ichlc) / bio_local(icocc) !small zooplankton bio_change(imicro) = BioC(20)*ZsonCO*bio_local(imicro) !large zooplankton bio_change(imeso) = BioC(19)*ZlonCO*bio_local(imeso) !detritus bio_change(idet) = (1.-BioC(20))*ZsonCo*bio_local(imicro) & + (1.-BioC(19))*ZlonCo*bio_local(imeso) & + BioC(51)*coc_off*bio_local(icocc) !ammonia bio_change(inh4) = -UP_NH4_co/UP_N_co*BioC(46) & * prodc*bio_local(icocc) !nitrate bio_change(init) = -UP_NO3_co/UP_N_co*BioC(46) & * prodc*bio_local(icocc) !phospahte bio_change(ipho) = -BioC(46) & * prodc*bio_local(icocc) !oxygen bio_change(ioxy)=((6.625*UP_NH4_co+8.125*UP_NO3_co) & /UP_N_co*BioC(46) & * prodc*bio_local(icocc)) & * REDF(11)*REDF(16) !*Ca (calciumcarbonate)! ! R_star=BioC(54)*BioC(46)*prodc ! & *max(0.0001,TT_loc/(2.0+TT_loc)) ! & *max(1.0,0.5*bio_local(icocc)*REDF(16)*REDF(11)) !icocc in mg C R_star=BioC(54)*prodc*BioC(53) & *max(0.0001,TT_loc/(2.0+TT_loc)) & *max(1.0,0.5*bio_local(icocc)*REDF(16)*REDF(11)) !icocc in mg C Pcaco3=R_star*(prodc*BioC(46)*bio_local(icocc) !enhet [mg C/m3] & - 0.5*BioC(17)*ZlonCo*bio_local(imeso) & - 0.5*BioC(18)*ZsonCo*bio_local(imicro) & - 0.5*BioC(51)*coc_off*bio_local(icocc)) L_star=BioC(55)*max(0.0,1.0-om_cal_loc) bio_change(icaco3)=Pcaco3 - L_Star*bio_local(icaco3) ! if ((ix==25).and.(jx==25).and.(mnproc>10)) then ! print*, 'Proc', mnproc, 'mass', bio_local(icaco3) ! print*, 'terms0', prodc,BioC(46),bio_local(icocc), ! print*, 'terms', prodc*BioC(46)*bio_local(icocc), ! & - 0.5*BioC(17)*bio_local(imeso), ! & - 0.5*BioC(18)*bio_local(imicro), ! & - BioC(51)*coc_off*bio_local(icocc) ! print*, 'Zoobiomass', bio_local(imicro), bio_local(imeso) ! print*, '54', BioC(54),'46', BioC(46), 'prodc',prodc ! print*, 'Change caco3: ',bio_change(icaco3) ! &,'Pcaco3',Pcaco3, 'L_star*b',L_Star*bio_local(icaco3), ! &'R_start', R_star ! end if ! Dissolved carbon bio_change(idic) = - BioC(46) & * prodc*BioC(53)*bio_local(icocc) & + Pcaco3 - L_Star*bio_local(icaco3) ! Alkalinity bio_change(ialk) = & + REDF(16)*(- Pcaco3 + L_Star*bio_local(icaco3)) end subroutine cocco end module m_ECOSM_cocco