- Timestamp:
- 2017-05-12T10:21:30+02:00 (7 years ago)
- Location:
- branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r7986 r8023 32 32 !! - river inputs 33 33 !!---------------------------------------------------------------------- 34 USE bio_medusa_mod, ONLY: dms_andr, dms_andr2d, dms_aran, & 34 USE bio_medusa_mod, ONLY: f_riv_alk, f_riv_c, f_riv_n, & 35 f_riv_si, f_runoff, & 36 fgco2, & 37 # if defined key_roam 38 dms_andr, dms_andr2d, dms_aran, & 35 39 dms_aran2d, dms_hall, dms_hall2d, & 36 40 dms_simo, dms_simo2d, dms_surf, & 37 dms_surf2d, iters, f_BetaD,&41 dms_surf2d, f_BetaD, & 38 42 f_co2flux, f_co2flux2d, f_co2starair, & 39 43 f_co2starair_2d, f_co3, & … … 50 54 f_pco2w, f_pco2w2d, f_ph, f_pp0, & 51 55 f_pp02d, f_rhosw, & 52 f_riv_alk, f_riv_c, f_riv_n, &53 f_riv_si, f_runoff, &54 56 f_schmidtco2, f_TALK, f_TALK2d, & 55 57 f_TDIC, f_TDIC2d, f_xco2a, f_xco2a_2d, & 56 fgco2, & 57 zalk, zchd, zchn, zdic, zdin, zoxy, & 58 zpho, zsal, zsil, ztmp 58 iters, & 59 zalk, zdic, zoxy, zsal, ztmp, & 60 # endif 61 # if defined key_mocsy 62 zpho, & 63 # endif 64 zchd, zchn, zdin, zsil 59 65 USE dom_oce, ONLY: e3t_0, e3t_n, gphit, tmask 60 USE gastransfer, ONLY: gas_transfer 66 # if defined key_iomput 61 67 USE iom, ONLY: lk_iomput 68 # endif 62 69 USE in_out_manager, ONLY: lwp, numout 63 USE mocsy_wrapper, ONLY: mocsy_interface64 70 USE oce, ONLY: PCO2a_in_cpl 65 71 USE par_oce, ONLY: jpim1, jpjm1 … … 72 78 zn_dms_mld, zn_dms_qsr 73 79 USE trc, ONLY: med_diag 80 USE zdfmxl, ONLY: hmld 81 82 # if defined key_roam 83 USE gastransfer, ONLY: gas_transfer 84 # if defined key_mocsy 85 USE mocsy_wrapper, ONLY: mocsy_interface 86 # else 74 87 USE trcco2_medusa, ONLY: trc_co2_medusa 88 # endif 75 89 USE trcdms_medusa, ONLY: trc_dms_medusa 76 90 USE trcoxy_medusa, ONLY: trc_oxy_medusa 77 USE zdfmxl, ONLY: hmld 91 # endif 78 92 79 93 !!* Substitution … … 83 97 INTEGER, INTENT( in ) :: kt 84 98 99 # if defined key_roam 85 100 !! jpalm 14-07-2016: convert CO2flux diag from mmol/m2/d to kg/m2/s 86 101 REAL, PARAMETER :: weight_CO2_mol = 44.0095 !! g / mol 87 102 REAL, PARAMETER :: secs_in_day = 86400.0 !! s / d 88 103 REAL, PARAMETER :: CO2flux_conv = (1.e-6 * weight_CO2_mol) / secs_in_day 104 # endif 89 105 90 106 INTEGER :: ji, jj -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag.F90
r8012 r8023 30 30 !! This called from TRC_BIO_MEDUSA and calculates diagnostics 31 31 !!------------------------------------------------------------------- 32 USE bio_medusa_mod, ONLY: dcalc3, dms_andr, dms_aran, & 33 dms_hall, dms_simo, dms_surf, & 34 f_benout_c, f_benout_ca, f_benout_fe, & 35 f_benout_lyso_ca, f_benout_n, & 36 f_benout_si, & 37 f_co2flux, f_co3, & 38 f_fbenin_c, f_fbenin_ca, f_fbenin_fe, & 39 f_fbenin_n, f_fbenin_si, & 40 f_h2co3, f_hco3, & 41 f_kw660, & 42 f_o2flux, f_o2sat, f_omarg, f_omcal, & 43 f_pco2atm, f_pco2w, f_ph, f_pp0, & 44 f_riv_loc_alk, f_riv_loc_c, & 45 f_riv_loc_n, f_riv_loc_si, & 46 f_runoff, & 47 f_sbenin_c, f_sbenin_fe, & 48 f_sbenin_n, & 49 f_TALK, f_TDIC, & 50 fccd, fcomm_resp, & 51 fd_cal3, fd_car3, fd_nit3, fd_sil3, & 52 fdep1, & 53 fdd, fdd2d, fddc, & 54 fdpd, fdpd2, fdpd22d, fdpd2d, & 55 fdpn, fdpn2, fdpn22d, fdpn2d, & 56 fdzme, fdzme2, fdzme22d, fdzme2d, & 57 fdzmi, fdzmi2, fdzmi22d, fdzmi2d, & 58 fediss3, fescav3, & 59 ffastc, ffastca, ffastca2d, & 60 ffastn, ffastsi, & 61 ffebot, ffebot2d, ffescav, ffescav2d, & 62 ffetop, ffetop2d, & 63 ffld, ffld2d, ffln2, ffln2d, & 64 fgmed, fgmed2d, fgmedc, & 65 fgmepd, fgmepd2d, fgmepn, fgmepn2d, & 66 fgmezmi, fgmezmi2d, & 67 fgmid, fgmid2d, fgmidc, & 68 fgmipn, fgmipn2d, & 69 ficme, ficmi, finme, finmi, & 70 fjlim_pd, fjlim_pn, fjld2d, fjln2d, & 71 fmeexcr, fmegrow, fmeresp, & 72 fmiexcr, fmigrow, fmiresp, & 73 fnld, fnld2d, fnln, fnln2d, & 74 fprd, fprd_ml, fprd2d, & 75 fprds, fprds2d, & 76 fprn, fprn_ml, fprn2d, & 77 fregen, fregen2d, & 78 fregenfast, fregenfastsi, & 79 fregensi, fregensi2d, & 80 freminc, freminc2d, & 81 freminca, freminca2d, & 82 freminfe, freminfe2d, & 83 freminn, freminn2d, & 84 freminsi, freminsi2d, & 85 fsdiss, fsdiss2d, & 86 fsedc, fsedca, fsedfe, fsedn, fsedsi, & 87 fsld, fsld2, fsld2d, fsld2d2, & 88 fslown, fslowc, fslown2d, & 89 fslowc2d, fslowcflux, fslownflux, & 90 ftempc, ftempc2d, ftempca, ftempca2d, & 91 ftempfe, ftempfe2d, & 92 ftempn, ftempn2d, ftempsi, ftempsi2d, & 93 ftot_a, ftot_c, ftot_fe, ftot_n, & 94 ftot_o2, ftot_si, & 95 gmedc2d, gmidc2d, & 96 iben_c2d, iben_ca2d, iben_fe2d, & 97 iben_n2d, iben_si2d, & 98 intdissic, intdissin, & 99 intdissisi, inttalk, & 100 iters, lyso_ca2d, & 101 mdetc2d, megrazd3, megrazp3, & 102 megrazz3, & 103 migrazd3, migrazp3, & 104 o2min, o2sat3, & 105 oben_c2d, oben_ca2d, oben_fe2d, & 106 oben_n2d, oben_si2d, & 107 pbsi3, pcal3, & 108 pdlimfe3, pdlimj3, pdlimn3, & 109 pnlimfe3, pnlimj3, pnlimn3, pdlimsi3, & 110 remin3dn, remoc3, & 111 rivalk2d, rivc2d, rivn2d, rivsi2d, & 112 sfr_oarg2d, sfr_ocal2d, & 113 tpp3d, tppd3, xFree, & 114 zeexcr2d, zegrow2d, zemesc2d, & 115 zemesd2d, zemesdc2d, zemesn2d, & 116 zeresp2d, & 117 ziexcr2d, zigrow2d, zimesc2d, & 118 zimesd2d, zimesdc2d, zimesn2d, & 119 ziresp2d, & 120 zo2min, & 121 zalk, zdet, zdic, zdin, zdtc, & 122 zfer, zoxy, zpds, zphd, zphn, & 123 zsal, zsil, ztmp, zzme, zzmi 32 USE bio_medusa_mod 124 33 USE dom_oce, ONLY: e3t_0, e3t_n, gdepw_0, gdepw_n, & 125 34 mbathy, tmask 126 35 USE in_out_manager, ONLY: lwp, numout 36 # if defined key_iomput 127 37 USE iom, ONLY: lk_iomput 38 # endif 128 39 USE par_kind, ONLY: wp 129 40 USE par_oce, ONLY: jpim1, jpjm1 … … 137 48 xthetapd, xthetapn, xthetazme, xthetazmi, xze 138 49 USE trc, ONLY: ln_diatrc, med_diag, trc2d, trc3d 50 # if defined key_roam 139 51 USE trcoxy_medusa, ONLY: oxy_sato 52 # endif 140 53 141 54 !!* Substitution -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90
r7927 r8023 34 34 USE dom_oce, ONLY: tmask 35 35 USE in_out_manager, ONLY: lwp, numout 36 # if defined key_iomput 36 37 USE iom, ONLY: iom_put 38 # endif 37 39 USE lbclnk, ONLY: lbc_lnk 38 40 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
r7920 r8023 34 34 USE dom_oce, ONLY: atfp, atfp1, neuler, rdt 35 35 USE in_out_manager, ONLY: lwp, numout 36 # if defined key_iomput 36 37 USE iom, ONLY: iom_put, lk_iomput 38 # endif 37 39 USE lbclnk, ONLY: lbc_lnk 38 40 USE par_medusa, ONLY: jp_medusa_2d, jp_medusa_3d, & -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90
r7912 r8023 33 33 !!---------------------------------------------------------------------- 34 34 USE bio_medusa_mod 35 USE iom, ONLY: lk_iomput, numout36 35 USE par_oce, ONLY: jpi, jpj, jpk 37 36 USE sms_medusa, ONLY: jdms 38 USE trc, ONLY: ln_diatrc, med_diag, nittrc000 37 USE trc, ONLY: ln_diatrc, med_diag, nittrc000, & 38 trc2d, trc3d 39 USE wrk_nemo, ONLY: wrk_alloc 40 41 # if defined key_iomput 42 USE iom, ONLY: lk_iomput, numout 39 43 USE trcnam_medusa, ONLY: trc_nam_iom_medusa 40 USE wrk_nemo, ONLY: wrk_alloc 44 # endif 41 45 42 46 !! time (integer timestep) … … 47 51 flush(numout) 48 52 ! 53 54 IF( ln_diatrc ) THEN 55 !! blank 2D diagnostic array 56 trc2d(:,:,:) = 0.e0 57 !! 58 !! blank 3D diagnostic array 59 trc3d(:,:,:,:) = 0.e0 60 ENDIF 61 49 62 !!---------------------------------------------------------------------- 50 63 !! Zero fast-sinking detritus 2D fields … … 92 105 ftot_o2(:,:) = 0.0 !! oxygen inventory 93 106 fifd_c(:,:) = 0.0 !! carbon fast detritus production 94 fifd_a(:,:) = 0.0 !! alkalinity fast detritus production 95 fifd_o2(:,:) = 0.0 !! oxygen fast detritus production 107 ! I don't think fifd_a or fifd_o2 are used - marc 11/5/17 108 ! fifd_a(:,:) = 0.0 !! alkalinity fast detritus production 109 ! fifd_o2(:,:) = 0.0 !! oxygen fast detritus production 96 110 fofd_c(:,:) = 0.0 !! carbon fast detritus remineralisation 97 fofd_a(:,:) = 0.0 !! alkalinity fast detritus remineralisation 98 fofd_o2(:,:) = 0.0 !! oxygen fast detritus remineralisation 111 ! I don't think fofd_a or fofd_o2 are used - marc 11/5/17 112 ! fofd_a(:,:) = 0.0 !! alkalinity fast detritus remineralisation 113 ! fofd_o2(:,:) = 0.0 !! oxygen fast detritus remineralisation 99 114 !! 100 115 fnit_prod(:,:) = 0.0 !! (organic) nitrogen production -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_mod.F90
r8012 r8023 11 11 !!---------------------------------------------------------------------- 12 12 !! 'key_medusa' MEDUSA 13 !!---------------------------------------------------------------------- 14 !! Variable conventions 15 !!---------------------------------------------------------------------- 16 !! 17 !! names: z*** - state variable 18 !! f*** - function (or temporary variable used in part of a function) 19 !! b*** - right-hand part (sources and sinks) 20 !! i*** - integer variable (usually used in yes/no flags) 13 21 !!---------------------------------------------------------------------- 14 22 USE par_kind, ONLY: wp … … 115 123 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_c,ftot_a,ftot_o2 116 124 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fflx_c,fflx_a,fflx_o2 117 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c,fifd_a,fifd_o2 118 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c,fofd_a,fofd_o2 125 ! I don't think fifd_a, fifd_o2, fofd_a or fofd_o2 are used - marc 11/5/17 126 ! REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c,fifd_a,fifd_o2 127 ! REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c,fofd_a,fofd_o2 128 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c 129 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c 119 130 # endif 120 131 … … 136 147 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsil_prod,fsil_cons 137 148 149 # if defined key_roam 138 150 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_xco2a 139 151 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ph,f_pco2w,f_h2co3 … … 163 175 !! AXY (13/03/15): add in other DMS calculations 164 176 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_andr,dms_simo,dms_aran,dms_hall 177 # endif 165 178 166 179 !! Benthic fluxes … … 266 279 USE lib_mpp, ONLY: ctl_warn 267 280 USE par_oce, ONLY: jpi, jpj 268 ! USE par_trc269 281 !!------------------------------------------------------------------- 270 282 ! … … 273 285 zzme(jpi,jpj),zdet(jpi,jpj),zdtc(jpi,jpj), & 274 286 zdin(jpi,jpj),zsil(jpi,jpj),zfer(jpi,jpj), & 287 # if defined key_roam 275 288 zdic(jpi,jpj),zalk(jpi,jpj),zoxy(jpi,jpj), & 276 289 ztmp(jpi,jpj),zsal(jpi,jpj), & 290 # endif 291 # if defined key_mocsy 277 292 zpho(jpi,jpj), & 293 # endif 278 294 fthetan(jpi,jpj),faln(jpi,jpj),fchn1(jpi,jpj), & 279 295 fchn(jpi,jpj),fjln(jpi,jpj),fprn(jpi,jpj), & … … 307 323 fdpn(jpi,jpj),fdpd(jpi,jpj),fdpds(jpi,jpj), & 308 324 fdzmi(jpi,jpj),fdzme(jpi,jpj),fdd(jpi,jpj), & 325 # if defined key_roam 309 326 fddc(jpi,jpj), & 327 # endif 310 328 fdpn2(jpi,jpj),fdpd2(jpi,jpj),fdpds2(jpi,jpj), & 311 329 fdzmi2(jpi,jpj),fdzme2(jpi,jpj), & … … 337 355 ftot_c(jpi,jpj),ftot_a(jpi,jpj),ftot_o2(jpi,jpj), & 338 356 fflx_c(jpi,jpj),fflx_a(jpi,jpj),fflx_o2(jpi,jpj), & 339 fifd_c(jpi,jpj),fifd_a(jpi,jpj),fifd_o2(jpi,jpj), & 340 fofd_c(jpi,jpj),fofd_a(jpi,jpj),fofd_o2(jpi,jpj), & 357 ! I don't think fifd_a, fifd_o2, fofd_a or fofd_o2 are used - marc 11/5/17 358 ! fifd_c(jpi,jpj),fifd_a(jpi,jpj),fifd_o2(jpi,jpj), & 359 ! fofd_c(jpi,jpj),fofd_a(jpi,jpj),fofd_o2(jpi,jpj), & 360 fifd_c(jpi,jpj), & 361 fofd_c(jpi,jpj), & 341 362 # endif 342 363 fzmi_i(jpi,jpj),fzmi_o(jpi,jpj),fzme_i(jpi,jpj), & … … 347 368 fnit_prod(jpi,jpj),fnit_cons(jpi,jpj), & 348 369 fsil_prod(jpi,jpj),fsil_cons(jpi,jpj), & 370 # if defined key_roam 349 371 f_xco2a(jpi,jpj), & 350 372 f_ph(jpi,jpj),f_pco2w(jpi,jpj),f_h2co3(jpi,jpj), & … … 369 391 dms_andr(jpi,jpj),dms_simo(jpi,jpj), & 370 392 dms_aran(jpi,jpj),dms_hall(jpi,jpj), & 393 # endif 371 394 f_sbenin_n(jpi,jpj),f_sbenin_fe(jpi,jpj), & 372 395 f_sbenin_c(jpi,jpj), & -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_update.F90
r7996 r8023 41 41 fbddtalk, fbddtdic, fbddtdife, & 42 42 fbddtdin, fbddtdisi, & 43 fcar_cons, fcar_prod, fcomm_resp, & 44 fdd, fddc, fdpd, fdpd2, fdpds, fdpds2, & 43 fdd, fdpd, fdpd2, fdpds, fdpds2, & 45 44 fdpn, fdpn2, & 46 45 fdzme, fdzme2, fdzmi, fdzmi2, & 47 46 ffast2slowc, ffast2slown, & 48 47 ffebot, ffetop, ffescav, & 49 fflx_a, fflx_c, fflx_fe, fflx_n, & 50 fflx_o2, fflx_si, & 48 fflx_fe, fflx_n, fflx_si, & 51 49 fgmed, fgmepd, fgmedc, fgmepd, fgmepds, & 52 50 fgmepn, fgmezmi, & … … 56 54 fmiexcr, fmigrow, fmiresp, & 57 55 fnit_cons, fnit_prod, & 58 foxy_anox, foxy_cons, foxy_prod, &59 56 fprd, fprds, fprn, & 60 57 frd, & … … 63 60 fsil_cons, fsil_prod, fsdiss, & 64 61 ftempca, fthetad, fthetan, & 65 zoxy, zpds, zphd, zphn 62 # if defined key_roam 63 fcar_cons, fcar_prod, fcomm_resp, & 64 fddc, fflx_a, fflx_c, fflx_o2, zoxy, & 65 foxy_anox, foxy_cons, foxy_prod, & 66 # endif 67 zpds, zphd, zphn 66 68 USE dom_oce, ONLY: e3t_0, e3t_n, gphit, mbathy, tmask 67 69 USE in_out_manager, ONLY: lwp, numout -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/carb_chem.F90
r7975 r8023 39 39 f_pco2w, f_ph, f_pp0, f_rhosw, & 40 40 f_schmidtco2, f_TALK, f_TDIC, f_xco2a, & 41 zalk, zdic, zpho, zsal, zsil, ztmp 41 # if defined key_mocsy 42 zpho, & 43 # endif 44 zalk, zdic, zsal, zsil, ztmp 42 45 USE dom_oce, ONLY: gdept_0, gdept_n, gdepw_0, gdepw_n, & 43 46 gphit, mbathy, tmask 44 47 USE in_out_manager, ONLY: lwp, numout 45 USE mocsy_wrapper, ONLY: mocsy_interface46 48 USE oce, ONLY: PCO2a_in_cpl, tsb, tsn 47 49 USE par_kind, ONLY: wp … … 54 56 f3_omcal, f3_pH 55 57 USE trc, ONLY: trn 58 59 # if defined key_mocsy 60 USE mocsy_wrapper, ONLY: mocsy_interface 61 # else 56 62 USE trcco2_medusa, ONLY: trc_co2_medusa 63 # endif 57 64 58 65 !!* Substitution -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90
r7986 r8023 32 32 !! - Fast-sinking detritus 33 33 !!------------------------------------------------------------------- 34 USE bio_medusa_mod, ONLY: fdd, fddc, & 35 f_sbenin_c, f_sbenin_fe, & 36 f_sbenin_n, & 34 USE bio_medusa_mod, ONLY: f_sbenin_c, f_sbenin_fe, & 35 f_sbenin_n, fdd, & 36 # if defined key_roam 37 fddc, & 38 # endif 37 39 fun_T, fun_Q10, zdet, zdtc 38 40 USE detritus_fast_sink_mod, ONLY: detritus_fast_sink -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus_fast_sink.F90
r8012 r8023 48 48 fgmid, fgmipn, & 49 49 ficme, ficmi, & 50 fifd_ c, fifd_fe, fifd_n, fifd_si,&50 fifd_fe, fifd_n, fifd_si, & 51 51 finme, finmi, & 52 52 fmeexcr, fmiexcr, & … … 64 64 ftempsi, & 65 65 # if defined key_roam 66 f ofd_c, fregenfastc,&66 fifd_c, fofd_c, fregenfastc, & 67 67 # endif 68 68 idf, idfval, & -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r8012 r8023 6 6 !! History : 7 7 !! - ! 1999-07 (M. Levy) original code 8 !! - ! 2000-12 (E. Kestenare) assign parameters to name individual tracers 8 !! - ! 2000-12 (E. Kestenare) assign parameters to name 9 !! individual tracers 9 10 !! - ! 2001-03 (M. Levy) LNO3 + dia2d 10 11 !! 2.0 ! 2007-12 (C. Deltel, G. Madec) F90 … … 18 19 !! - ! 2015-06 (A. Yool) Update to include MOCSY 19 20 !! - ! 2015-07 (A. Yool) Update for rolling averages 20 !! - ! 2015-10 (J. Palm) Update for diag outputs through iom_use 21 !! - ! 2015-10 (J. Palm) Update for diag outputs through 22 !! iom_use 21 23 !! - ! 2016-11 (A. Yool) Updated diags for CMIP6 22 24 !!---------------------------------------------------------------------- … … 59 61 !! trc_bio_medusa : 60 62 !!---------------------------------------------------------------------- 61 USE oce_trc62 USE trc63 USE sms_medusa64 USE lbclnk65 USE prtctl_trc ! Print control for debugging66 USE trcsed_medusa67 USE sbc_oce ! surface forcing68 USE sbcrnf ! surface boundary condition: runoff variables69 USE in_out_manager ! I/O manager70 # if defined key_iomput71 USE iom72 USE trcnam_medusa ! JPALM 13-11-2015 -- if iom_use for diag73 !!USE trc_nam_iom_medusa ! JPALM 13-11-2015 -- if iom_use for diag74 # endif75 # if defined key_roam76 USE gastransfer77 # if defined key_mocsy78 USE mocsy_wrapper79 # else80 USE trcco2_medusa81 # endif82 USE trcoxy_medusa83 !! Jpalm (08/08/2014)84 USE trcdms_medusa85 # endif86 !! AXY (18/01/12): brought in for benthic timestepping87 USE trcnam_trp ! AXY (24/05/2013)88 USE trdmxl_trc89 USE trdtrc_oce ! AXY (24/05/2013)90 91 63 !! AXY (30/01/14): necessary to find NaNs on HECTOR 92 64 USE, INTRINSIC :: ieee_arithmetic 93 65 66 USE bio_medusa_mod, ONLY: b0, fdep1, & 67 ibenthic, idf, idfval, & 68 # if defined key_roam 69 f_xco2a, & 70 zalk, zdic, zoxy, zsal, ztmp, & 71 # endif 72 # if defined key_mocsy 73 zpho, & 74 # endif 75 zchd, zchn, zdet, zdin, zdtc, & 76 zfer, zpds, zphd, zphn, zsil, & 77 zzme, zzmi 78 USE dom_oce, ONLY: e3t_0, e3t_n, & 79 gdept_0, gdept_n, & 80 gdepw_0, gdepw_n, & 81 nday_year, nsec_day, nyear, & 82 rdt, tmask 83 USE in_out_manager, ONLY: lwp, numout 84 # if defined key_iomput 85 USE iom, ONLY: lk_iomput 86 # endif 87 USE lbclnk, ONLY: lbc_lnk 88 USE lib_mpp, ONLY: ctl_stop 89 USE oce, ONLY: tsb, tsn 90 USE par_kind, ONLY: wp 91 USE par_medusa, ONLY: jpalk, jpchd, jpchn, jpdet, & 92 jpdic, jpdin, jpdtc, jpfer, & 93 jpoxy, jppds, jpphd, jpphn, & 94 jpsil, jpzme, jpzmi 95 USE par_oce, ONLY: jp_sal, jp_tem, jpi, jpim1, & 96 jpj, jpjm1, jpk 94 97 !! JPALM (27-06-2016): add lk_oasis for CO2 and DMS coupling with atm 95 98 USE sbc_oce, ONLY: lk_oasis 96 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl, & 97 PCO2a_in_cpl 98 USE bio_medusa_mod 99 USE sms_medusa, ONLY: hist_pco2 100 USE trc, ONLY: ln_diatrc, ln_rsttr, & 101 nittrc000, trn 102 99 103 USE bio_medusa_init_mod, ONLY: bio_medusa_init 100 104 USE carb_chem_mod, ONLY: carb_chem … … 124 128 125 129 SUBROUTINE trc_bio_medusa( kt ) 126 !!------------------------------------------------------------------ ---130 !!------------------------------------------------------------------ 127 131 !! *** ROUTINE trc_bio *** 128 132 !! 129 !! ** Purpose : compute the now trend due to biogeochemical processes 130 !! and add it to the general trend of passive tracers equations 131 !! 132 !! ** Method : each now biological flux is calculated in function of now 133 !! concentrations of tracers. 134 !! depending on the tracer, these fluxes are sources or sinks. 135 !! the total of the sources and sinks for each tracer 133 !! ** Purpose : compute the now trend due to biogeochemical processes 134 !! and add it to the general trend of passive tracers 135 !! equations 136 !! 137 !! ** Method : each now biological flux is calculated in function of 138 !! now concentrations of tracers. 139 !! depending on the tracer, these fluxes are sources or 140 !! sinks. 141 !! The total of the sources and sinks for each tracer 136 142 !! is added to the general trend. 137 143 !! … … 143 149 !! IF 'key_trc_diabio' defined , the biogeochemical trends 144 150 !! for passive tracers are saved for futher diagnostics. 145 !!------------------------------------------------------------------ ---146 !! 147 !! 148 !!------------------------------------------------------------------ ----151 !!------------------------------------------------------------------ 152 !! 153 !! 154 !!------------------------------------------------------------------ 149 155 !! Variable conventions 150 !!------------------------------------------------------------------ ----156 !!------------------------------------------------------------------ 151 157 !! 152 158 !! names: z*** - state variable 153 !! f*** - function (or temporary variable used in part of a function) 159 !! f*** - function (or temporary variable used in part of 160 !! a function) 154 161 !! x*** - parameter 155 162 !! b*** - right-hand part (sources and sinks) … … 162 169 INTEGER :: ji,jj,jk,jn 163 170 !! 164 !! AXY (27/07/10): add in indices for depth horizons (for sinking flux 165 !! and seafloor iron inputs) 166 !! INTEGER :: i0100, i0200, i0500, i1000, i1100 167 !! 168 !! model state variables 169 ! REAL(wp), DIMENSION(jpi,jpj) :: zchn,zchd,zphn,zphd,zpds,zzmi 170 ! REAL(wp), DIMENSION(jpi,jpj) :: zzme,zdet,zdtc,zdin,zsil,zfer 171 ! zage doesn't seem to be used - marc 19/4/17 172 ! REAL(wp) :: zage 173 !# if defined key_roam 174 ! REAL(wp), DIMENSION(jpi,jpj) :: zdic, zalk, zoxy 175 ! REAL(wp), DIMENSION(jpi,jpj) :: ztmp, zsal 176 !# endif 177 !# if defined key_mocsy 178 ! REAL(wp), DIMENSION(jpi,jpj) :: zpho 179 !# endif 180 !! 181 !! integrated source and sink terms 182 ! REAL(wp) :: b0 183 !! AXY (23/08/13): changed from individual variables for each flux to 184 !! an array that holds all fluxes 185 REAL(wp), DIMENSION(jpi,jpj,jp_medusa) :: btra 186 !! 187 !! primary production and chl related quantities 188 ! REAL(wp), DIMENSION(jpi,jpj) :: fthetan,faln,fchn1,fchn,fjln,fprn,frn 189 ! REAL(wp), DIMENSION(jpi,jpj) :: fthetad,fald,fchd1,fchd,fjld,fprd,frd 190 !! AXY (23/11/16): add in light-only limitation term (normalised 0-1 range) 191 ! REAL(wp), DIMENSION(jpi,jpj) :: fjlim_pn, fjlim_pd 192 !! AXY (03/02/11): add in Liebig terms 193 ! REAL(wp), DIMENSION(jpi,jpj) :: fpnlim, fpdlim 194 !! AXY (16/07/09): add in Eppley curve functionality 195 ! REAL(wp), DIMENSION(jpi,jpj) :: fun_T,xvpnT,xvpdT 196 INTEGER :: ieppley 197 !! AXY (16/05/11): per Katya's prompting, add in new T-dependence 198 !! for phytoplankton growth only (i.e. no change 199 !! for remineralisation) 200 ! REAL(wp), DIMENSION(jpi,jpj) :: fun_Q10 201 !! AXY (01/03/10): add in mixed layer PP diagnostics 202 ! REAL(wp), DIMENSION(jpi,jpj) :: fprn_ml,fprd_ml 203 !! 204 !! nutrient limiting factors 205 ! REAL(wp), DIMENSION(jpi,jpj) :: fnln,ffln2 !! N and Fe 206 ! REAL(wp), DIMENSION(jpi,jpj) :: fnld,ffld,fsld,fsld2 !! N, Fe and Si 207 !! 208 !! silicon cycle 209 ! REAL(wp), DIMENSION(jpi,jpj) :: fsin,fnsi,fprds,fsdiss 210 REAL(wp) :: fsin1,fnsi1,fnsi2 211 !! 212 !! iron cycle; includes parameters for Parekh et al. (2005) iron scheme 213 ! REAL(wp), DIMENSION(jpi,jpj) :: ffetop,ffebot,ffescav 214 REAL(wp) :: xLgF, xFeT, xFeF, xFeL !! state variables for iron-ligand system 215 ! REAL(wp), DIMENSION(jpi,jpj) :: xFree !! state variables for iron-ligand system 216 REAL(wp) :: xb_coef_tmp, xb2M4ac !! iron-ligand parameters 217 REAL(wp) :: xmaxFeF,fdeltaFe !! max Fe' parameters 218 !! 219 !! local parameters for Moore et al. (2004) alternative scavenging scheme 220 REAL(wp) :: fbase_scav,fscal_sink,fscal_part,fscal_scav 221 !! 222 !! local parameters for Moore et al. (2008) alternative scavenging scheme 223 REAL(wp) :: fscal_csink,fscal_sisink,fscal_casink 224 !! 225 !! local parameters for Galbraith et al. (2010) alternative scavenging scheme 226 REAL(wp) :: xCscav1, xCscav2, xk_org, xORGscav !! organic portion of scavenging 227 REAL(wp) :: xk_inorg, xINORGscav !! inorganic portion of scavenging 228 !! 229 !! microzooplankton grazing 230 ! REAL(wp), DIMENSION(jpi,jpj) :: fmi1,fmi,fgmipn,fgmid,fgmidc 231 ! REAL(wp), DIMENSION(jpi,jpj) :: finmi,ficmi,fstarmi,fmith,fmigrow,fmiexcr,fmiresp 232 !! 233 !! mesozooplankton grazing 234 ! REAL(wp), DIMENSION(jpi,jpj) :: fme1,fme,fgmepn,fgmepd,fgmepds,fgmezmi,fgmed,fgmedc 235 ! REAL(wp), DIMENSION(jpi,jpj) :: finme,ficme,fstarme,fmeth,fmegrow,fmeexcr,fmeresp 236 !! 237 !! mortality/Remineralisation (defunct parameter "fz" removed) 238 ! REAL(wp), DIMENSION(jpi,jpj) :: fdpn,fdpd,fdpds,fdzmi,fdzme,fdd 171 INTEGER :: iball 239 172 # if defined key_roam 240 ! REAL(wp), DIMENSION(jpi,jpj) :: fddc 241 # endif 242 ! REAL(wp), DIMENSION(jpi,jpj) :: fdpn2,fdpd2,fdpds2,fdzmi2,fdzme2 243 ! REAL(wp), DIMENSION(jpi,jpj) :: fslown, fslowc 244 ! REAL(wp), DIMENSION(jpi,jpj) :: fslownflux, fslowcflux 245 ! REAL(wp), DIMENSION(jpi,jpj) :: fregen,fregensi 246 ! REAL(wp), DIMENSION(jpi,jpj) :: fregenfast,fregenfastsi 247 # if defined key_roam 248 !! Doesn't look like this is used - marc 10/4/17 249 !! REAL(wp), DIMENSION(jpi,jpj) :: fregenc 250 ! REAL(wp), DIMENSION(jpi,jpj) :: fregenfastc 251 # endif 252 !! 253 !! particle flux 254 ! REAL(WP), DIMENSION(jpi,jpj) :: fdep1,fcaco3 255 ! REAL(WP), DIMENSION(jpi,jpj) :: ftempn,ftempsi,ftempfe,ftempc,ftempca 256 ! REAL(wp), DIMENSION(jpi,jpj) :: freminn,freminsi,freminfe,freminc,freminca 257 ! REAL(wp), DIMENSION(jpi,jpj) :: ffastn,ffastsi,ffastfe,ffastc,ffastca 258 ! REAL(wp), DIMENSION(jpi,jpj) :: fprotf 259 ! REAL(wp), DIMENSION(jpi,jpj) :: fsedn,fsedsi,fsedfe,fsedc,fsedca 260 ! REAL(wp), DIMENSION(jpi,jpj) :: fccd 261 ! REAL(wp), DIMENSION(jpi,jpj) :: fccd_dep 262 !! 263 !! AXY (06/07/11): alternative fast detritus schemes 264 REAL(wp) :: fb_val, fl_sst 265 !! 266 !! AXY (08/07/11): fate of fast detritus reaching the seafloor 267 ! I don't think ffast2slowfe is used - marc 10/4/17 268 ! REAL(wp), DIMENSION(jpi,jpj) :: ffast2slown,ffast2slowfe,ffast2slowc 269 ! REAL(wp), DIMENSION(jpi,jpj) :: ffast2slown,ffast2slowc 270 !! 271 !! conservation law 272 REAL(wp) :: fnit0,fsil0,ffer0 273 # if defined key_roam 274 REAL(wp) :: fcar0,falk0,foxy0 275 # endif 173 !! 174 INTEGER :: iyr1, iyr2 175 !! 176 # endif 276 177 !! 277 178 !! temporary variables 278 REAL(wp) :: fq0,fq1,fq2,fq3,fq4,fq5,fq6,fq7,fq8,fq9 279 !! 280 !! water column nutrient and flux integrals 281 ! REAL(wp), DIMENSION(jpi,jpj) :: ftot_n,ftot_si,ftot_fe 282 ! REAL(wp), DIMENSION(jpi,jpj) :: fflx_n,fflx_si,fflx_fe 283 ! REAL(wp), DIMENSION(jpi,jpj) :: fifd_n,fifd_si,fifd_fe 284 ! REAL(wp), DIMENSION(jpi,jpj) :: fofd_n,fofd_si,fofd_fe 285 # if defined key_roam 286 ! REAL(wp), DIMENSION(jpi,jpj) :: ftot_c,ftot_a,ftot_o2 287 ! REAL(wp), DIMENSION(jpi,jpj) :: fflx_c,fflx_a,fflx_o2 288 ! REAL(wp), DIMENSION(jpi,jpj) :: fifd_c,fifd_a,fifd_o2 289 ! REAL(wp), DIMENSION(jpi,jpj) :: fofd_c,fofd_a,fofd_o2 290 # endif 291 !! 292 !! zooplankton grazing integrals 293 ! REAL(wp), DIMENSION(jpi,jpj) :: fzmi_i,fzmi_o,fzme_i,fzme_o 294 !! 295 !! limitation term temporary variables 296 ! REAL(wp), DIMENSION(jpi,jpj) :: ftot_pn,ftot_pd 297 ! REAL(wp), DIMENSION(jpi,jpj) :: ftot_zmi,ftot_zme,ftot_det,ftot_dtc 298 !! use ballast scheme (1) or simple exponential scheme (0; a conservation test) 299 INTEGER :: iball 300 !! use biological fluxes (1) or not (0) 301 ! INTEGER :: ibio_switch 302 !! 303 !! diagnose fluxes (should only be used in 1D runs) 304 ! INTEGER :: idf, idfval 305 !! 306 !! nitrogen and silicon production and consumption 307 REAL(wp) :: fn_prod, fn_cons, fs_prod, fs_cons 308 ! REAL(wp), DIMENSION(jpi,jpj) :: fnit_prod, fnit_cons, fsil_prod, fsil_cons 309 # if defined key_roam 310 !! 311 !! flags to help with calculating the position of the CCD 312 ! Moved into carb_chem.F90 - marc 20/4/17 313 ! INTEGER, DIMENSION(jpi,jpj) :: i2_omcal,i2_omarg 314 !! 315 !! AXY (24/11/16): add xCO2 variable for atmosphere (what we actually have) 316 ! REAL(wp) :: f_xco2a 317 ! REAL(wp), DIMENSION(jpi,jpj) :: f_ph, f_pco2w, f_h2co3, f_hco3, f_co3, f_co2flux 318 ! REAL(wp), DIMENSION(jpi,jpj) :: f_TDIC, f_TALK, f_dcf, f_henry 319 ! REAL(wp), DIMENSION(jpi,jpj) :: f_pp0 320 ! REAL(wp), DIMENSION(jpi,jpj) :: f_kw660, f_o2flux, f_o2sat 321 REAL(wp) :: f_o2sat3 322 ! REAL(wp), DIMENSION(jpi,jpj) :: f_omcal, f_omarg 323 !! 324 !! AXY (23/06/15): additional diagnostics for MOCSY and oxygen 325 ! REAL(wp), DIMENSION(jpi,jpj) :: f_fco2w, f_BetaD, f_rhosw, f_opres, f_insitut, f_pco2atm, f_fco2atm 326 ! REAL(wp), DIMENSION(jpi,jpj) :: f_schmidtco2, f_kwco2, f_K0, f_co2starair, f_dpco2, f_kwo2 327 !! jpalm 14-07-2016: convert CO2flux diag from mmol/m2/d to kg/m2/s 328 REAL, PARAMETER :: weight_CO2_mol = 44.0095 !! g / mol 329 REAL, PARAMETER :: secs_in_day = 86400.0 !! s / d 330 REAL, PARAMETER :: CO2flux_conv = (1.e-6 * weight_CO2_mol) / secs_in_day 331 332 !! 333 ! INTEGER, DIMENSION(jpi,jpj) :: iters 334 REAL(wp) :: f_year 335 INTEGER :: i_year 336 INTEGER :: iyr1, iyr2 337 !! 338 !! carbon, alkalinity production and consumption 339 REAL(wp) :: fc_prod, fc_cons, fa_prod, fa_cons 340 ! REAL(wp), DIMENSION(jpi,jpj) :: fcomm_resp 341 ! REAL(wp), DIMENSION(jpi,jpj) :: fcar_prod, fcar_cons 342 !! 343 !! oxygen production and consumption (and non-consumption) 344 REAL(wp), DIMENSION(jpi,jpj) :: fo2_prod, fo2_cons, fo2_ncons, fo2_ccons 345 ! REAL(wp), DIMENSION(jpi,jpj) :: foxy_prod, foxy_cons, foxy_anox 346 !! Jpalm (11-08-2014) 347 !! add DMS in MEDUSA for UKESM1 model 348 ! REAL(wp), DIMENSION(jpi,jpj) :: dms_surf 349 !! AXY (13/03/15): add in other DMS calculations 350 ! REAL(wp), DIMENSION(jpi,jpj) :: dms_andr, dms_simo, dms_aran, dms_hall 351 352 # endif 353 !! 354 !! benthic fluxes 355 ! INTEGER :: ibenthic 356 ! REAL(wp), DIMENSION(jpi,jpj) :: f_sbenin_n, f_sbenin_fe, f_sbenin_c 357 ! REAL(wp), DIMENSION(jpi,jpj) :: f_fbenin_n, f_fbenin_fe, f_fbenin_si, f_fbenin_c, f_fbenin_ca 358 ! REAL(wp), DIMENSION(jpi,jpj) :: f_benout_n, f_benout_fe, f_benout_si, f_benout_c, f_benout_ca 359 REAL(wp) :: zfact 360 !! 361 !! benthic fluxes of CaCO3 that shouldn't happen because of lysocline 362 ! REAL(wp), DIMENSION(jpi,jpj) :: f_benout_lyso_ca 363 !! 364 !! riverine fluxes 365 ! REAL(wp), DIMENSION(jpi,jpj) :: f_runoff, f_riv_n, f_riv_si, f_riv_c, f_riv_alk 366 !! AXY (19/07/12): variables for local riverine fluxes to handle inputs below surface 367 ! REAL(wp), DIMENSION(jpi,jpj) :: f_riv_loc_n, f_riv_loc_si, f_riv_loc_c, f_riv_loc_alk 368 !!--------------------------------------------------------------------- 179 REAL(wp) :: fq0,fq1,fq2,fq3,fq4 180 !! 181 !!------------------------------------------------------------------ 369 182 370 183 # if defined key_debug_medusa … … 384 197 !! AXY (13/01/12): is benthic model properly interactive? 0 = no, 1 = yes 385 198 ibenthic = 1 386 387 !! not sure what this is for; it's not used anywhere; commenting out388 !! fbodn(:,:) = 0.e0389 390 !!391 IF( ln_diatrc ) THEN392 !! blank 2D diagnostic array393 trc2d(:,:,:) = 0.e0394 !!395 !! blank 3D diagnostic array396 trc3d(:,:,:,:) = 0.e0397 ENDIF398 199 399 200 !!------------------------------------------------------------------ … … 587 388 !! OPEN wet point IF..THEN loop 588 389 if (tmask(ji,jj,jk) == 1) then 589 !!====================================================== ===390 !!====================================================== 590 391 !! SETUP LOCAL GRID CELL 591 !!====================================================== ===392 !!====================================================== 592 393 !! 593 !!------------------------------------------------------ ---394 !!------------------------------------------------------ 594 395 !! Some notes on grid vertical structure 595 396 !! - fsdepw(ji,jj,jk) is the depth of the upper surface of … … 598 399 !! level jk 599 400 !! - fse3t(ji,jj,jk) is the thickness of level jk 600 !!------------------------------------------------------ ---401 !!------------------------------------------------------ 601 402 !! 602 403 !! AXY (01/03/10): set up level depth (bottom of level) … … 864 665 865 666 #else 866 !!===================================================================== =667 !!===================================================================== 867 668 !! Dummy module : No MEDUSA bio-model 868 !!===================================================================== =669 !!===================================================================== 869 670 CONTAINS 870 671 SUBROUTINE trc_bio_medusa( kt ) ! Empty routine … … 874 675 #endif 875 676 876 !!===================================================================== =677 !!===================================================================== 877 678 END MODULE trcbio_medusa
Note: See TracChangeset
for help on using the changeset viewer.