472 | | !!---------------------------------------------------------------------- |
473 | | !! blank fast-sinking detritus 2D fields |
474 | | !!---------------------------------------------------------------------- |
475 | | !! |
476 | | ffastn(:,:) = 0.0 !! organic nitrogen |
477 | | ffastsi(:,:) = 0.0 !! biogenic silicon |
478 | | ffastfe(:,:) = 0.0 !! organic iron |
479 | | ffastc(:,:) = 0.0 !! organic carbon |
480 | | ffastca(:,:) = 0.0 !! biogenic calcium carbonate |
481 | | !! |
482 | | fsedn(:,:) = 0.0 !! Seafloor flux of N |
483 | | fsedsi(:,:) = 0.0 !! Seafloor flux of Si |
484 | | fsedfe(:,:) = 0.0 !! Seafloor flux of Fe |
485 | | fsedc(:,:) = 0.0 !! Seafloor flux of C |
486 | | fsedca(:,:) = 0.0 !! Seafloor flux of CaCO3 |
487 | | !! |
488 | | fregenfast(:,:) = 0.0 !! integrated N regeneration (fast detritus) |
489 | | fregenfastsi(:,:) = 0.0 !! integrated Si regeneration (fast detritus) |
490 | | # if defined key_roam |
491 | | fregenfastc(:,:) = 0.0 !! integrated C regeneration (fast detritus) |
492 | | # endif |
493 | | !! |
494 | | fccd(:,:) = 0.0 !! last depth level before CCD |
495 | | |
496 | | !!---------------------------------------------------------------------- |
497 | | !! blank nutrient/flux inventories |
498 | | !!---------------------------------------------------------------------- |
499 | | !! |
500 | | fflx_n(:,:) = 0.0 !! nitrogen flux total |
501 | | fflx_si(:,:) = 0.0 !! silicon flux total |
502 | | fflx_fe(:,:) = 0.0 !! iron flux total |
503 | | fifd_n(:,:) = 0.0 !! nitrogen fast detritus production |
504 | | fifd_si(:,:) = 0.0 !! silicon fast detritus production |
505 | | fifd_fe(:,:) = 0.0 !! iron fast detritus production |
506 | | fofd_n(:,:) = 0.0 !! nitrogen fast detritus remineralisation |
507 | | fofd_si(:,:) = 0.0 !! silicon fast detritus remineralisation |
508 | | fofd_fe(:,:) = 0.0 !! iron fast detritus remineralisation |
509 | | # if defined key_roam |
510 | | fflx_c(:,:) = 0.0 !! carbon flux total |
511 | | fflx_a(:,:) = 0.0 !! alkalinity flux total |
512 | | fflx_o2(:,:) = 0.0 !! oxygen flux total |
513 | | ftot_c(:,:) = 0.0 !! carbon inventory |
514 | | ftot_a(:,:) = 0.0 !! alkalinity inventory |
515 | | ftot_o2(:,:) = 0.0 !! oxygen inventory |
516 | | fifd_c(:,:) = 0.0 !! carbon fast detritus production |
517 | | fifd_a(:,:) = 0.0 !! alkalinity fast detritus production |
518 | | fifd_o2(:,:) = 0.0 !! oxygen fast detritus production |
519 | | fofd_c(:,:) = 0.0 !! carbon fast detritus remineralisation |
520 | | fofd_a(:,:) = 0.0 !! alkalinity fast detritus remineralisation |
521 | | fofd_o2(:,:) = 0.0 !! oxygen fast detritus remineralisation |
522 | | !! |
523 | | fnit_prod(:,:) = 0.0 !! (organic) nitrogen production |
524 | | fnit_cons(:,:) = 0.0 !! (organic) nitrogen consumption |
525 | | fsil_prod(:,:) = 0.0 !! (inorganic) silicon production |
526 | | fsil_cons(:,:) = 0.0 !! (inorganic) silicon consumption |
527 | | fcar_prod(:,:) = 0.0 !! (organic) carbon production |
528 | | fcar_cons(:,:) = 0.0 !! (organic) carbon consumption |
529 | | !! |
530 | | foxy_prod(:,:) = 0.0 !! oxygen production |
531 | | foxy_cons(:,:) = 0.0 !! oxygen consumption |
532 | | foxy_anox(:,:) = 0.0 !! unrealised oxygen consumption |
533 | | !! |
534 | | # endif |
535 | | ftot_n(:,:) = 0.0 !! N inventory |
536 | | ftot_si(:,:) = 0.0 !! Si inventory |
537 | | ftot_fe(:,:) = 0.0 !! Fe inventory |
538 | | ftot_pn(:,:) = 0.0 !! integrated non-diatom phytoplankton |
539 | | ftot_pd(:,:) = 0.0 !! integrated diatom phytoplankton |
540 | | ftot_zmi(:,:) = 0.0 !! integrated microzooplankton |
541 | | ftot_zme(:,:) = 0.0 !! integrated mesozooplankton |
542 | | ftot_det(:,:) = 0.0 !! integrated slow detritus, nitrogen |
543 | | ftot_dtc(:,:) = 0.0 !! integrated slow detritus, carbon |
544 | | !! |
545 | | fzmi_i(:,:) = 0.0 !! material grazed by microzooplankton |
546 | | fzmi_o(:,:) = 0.0 !! ... sum of fate of this material |
547 | | fzme_i(:,:) = 0.0 !! material grazed by mesozooplankton |
548 | | fzme_o(:,:) = 0.0 !! ... sum of fate of this material |
549 | | !! |
550 | | f_sbenin_n(:,:) = 0.0 !! slow detritus N -> benthic pool |
551 | | f_sbenin_fe(:,:) = 0.0 !! slow detritus Fe -> benthic pool |
552 | | f_sbenin_c(:,:) = 0.0 !! slow detritus C -> benthic pool |
553 | | f_fbenin_n(:,:) = 0.0 !! fast detritus N -> benthic pool |
554 | | f_fbenin_fe(:,:) = 0.0 !! fast detritus Fe -> benthic pool |
555 | | f_fbenin_si(:,:) = 0.0 !! fast detritus Si -> benthic pool |
556 | | f_fbenin_c(:,:) = 0.0 !! fast detritus C -> benthic pool |
557 | | f_fbenin_ca(:,:) = 0.0 !! fast detritus Ca -> benthic pool |
558 | | !! |
559 | | f_benout_n(:,:) = 0.0 !! benthic N pool -> dissolved |
560 | | f_benout_fe(:,:) = 0.0 !! benthic Fe pool -> dissolved |
561 | | f_benout_si(:,:) = 0.0 !! benthic Si pool -> dissolved |
562 | | f_benout_c(:,:) = 0.0 !! benthic C pool -> dissolved |
563 | | f_benout_ca(:,:) = 0.0 !! benthic Ca pool -> dissolved |
564 | | !! |
565 | | f_benout_lyso_ca(:,:) = 0.0 !! benthic Ca pool -> dissolved (when it shouldn't!) |
566 | | !! |
567 | | f_runoff(:,:) = 0.0 !! riverine runoff |
568 | | f_riv_n(:,:) = 0.0 !! riverine N input |
569 | | f_riv_si(:,:) = 0.0 !! riverine Si input |
570 | | f_riv_c(:,:) = 0.0 !! riverine C input |
571 | | f_riv_alk(:,:) = 0.0 !! riverine alk input |
572 | | !! |
573 | | !! Jpalm -- 06-03-2017 -- Forgotten var to init |
574 | | f_omarg(:,:) = 0.0 !! |
575 | | f_omcal(:,:) = 0.0 |
576 | | xFree(:,:) = 0.0 !! state variables for iron-ligand system |
577 | | fcomm_resp(:,:) = 0.0 |
578 | | fprn_ml(:,:) = 0.0 !! mixed layer PP diagnostics |
579 | | fprd_ml(:,:) = 0.0 !! mixed layer PP diagnostics |
580 | | !! |
581 | | fslownflux(:,:) = 0.0 |
582 | | fslowcflux(:,:) = 0.0 |
583 | | |
584 | | !! |
585 | | !! allocate and initiate 2D diag |
586 | | !! ----------------------------- |
587 | | !! Juju :: add kt condition !! |
588 | | IF ( lk_iomput .AND. .NOT. ln_diatrc ) THEN |
589 | | !! |
590 | | if ( kt == nittrc000 ) CALL trc_nam_iom_medusa !! initialise iom_use test |
591 | | !! |
592 | | CALL wrk_alloc( jpi, jpj, zw2d ) |
593 | | zw2d(:,:) = 0.0 !! |
594 | | IF ( med_diag%PRN%dgsave ) THEN |
595 | | CALL wrk_alloc( jpi, jpj, fprn2d ) |
596 | | fprn2d(:,:) = 0.0 !! |
597 | | ENDIF |
598 | | IF ( med_diag%MPN%dgsave ) THEN |
599 | | CALL wrk_alloc( jpi, jpj, fdpn2d ) |
600 | | fdpn2d(:,:) = 0.0 !! |
601 | | ENDIF |
602 | | IF ( med_diag%PRD%dgsave ) THEN |
603 | | CALL wrk_alloc( jpi, jpj, fprd2d ) |
604 | | fprd2d(:,:) = 0.0 !! |
605 | | ENDIF |
606 | | IF( med_diag%MPD%dgsave ) THEN |
607 | | CALL wrk_alloc( jpi, jpj, fdpd2d ) |
608 | | fdpd2d(:,:) = 0.0 !! |
609 | | ENDIF |
610 | | IF( med_diag%OPAL%dgsave ) THEN |
611 | | CALL wrk_alloc( jpi, jpj, fprds2d ) |
612 | | fprds2d(:,:) = 0.0 !! |
613 | | ENDIF |
614 | | IF( med_diag%OPALDISS%dgsave ) THEN |
615 | | CALL wrk_alloc( jpi, jpj, fsdiss2d ) |
616 | | fsdiss2d(:,:) = 0.0 !! |
617 | | ENDIF |
618 | | IF( med_diag%GMIPn%dgsave ) THEN |
619 | | CALL wrk_alloc( jpi, jpj, fgmipn2d ) |
620 | | fgmipn2d(:,:) = 0.0 !! |
621 | | ENDIF |
622 | | IF( med_diag%GMID%dgsave ) THEN |
623 | | CALL wrk_alloc( jpi, jpj, fgmid2d ) |
624 | | fgmid2d(:,:) = 0.0 !! |
625 | | ENDIF |
626 | | IF( med_diag%MZMI%dgsave ) THEN |
627 | | CALL wrk_alloc( jpi, jpj, fdzmi2d ) |
628 | | fdzmi2d(:,:) = 0.0 !! |
629 | | ENDIF |
630 | | IF( med_diag%GMEPN%dgsave ) THEN |
631 | | CALL wrk_alloc( jpi, jpj, fgmepn2d ) |
632 | | fgmepn2d(:,:) = 0.0 !! |
633 | | ENDIF |
634 | | IF( med_diag%GMEPD%dgsave ) THEN |
635 | | CALL wrk_alloc( jpi, jpj, fgmepd2d ) |
636 | | fgmepd2d(:,:) = 0.0 !! |
637 | | ENDIF |
638 | | IF( med_diag%GMEZMI%dgsave ) THEN |
639 | | CALL wrk_alloc( jpi, jpj, fgmezmi2d ) |
640 | | fgmezmi2d(:,:) = 0.0 !! |
641 | | ENDIF |
642 | | IF( med_diag%GMED%dgsave ) THEN |
643 | | CALL wrk_alloc( jpi, jpj, fgmed2d ) |
644 | | fgmed2d(:,:) = 0.0 !! |
645 | | ENDIF |
646 | | IF( med_diag%MZME%dgsave ) THEN |
647 | | CALL wrk_alloc( jpi, jpj, fdzme2d ) |
648 | | fdzme2d(:,:) = 0.0 !! |
649 | | ENDIF |
650 | | IF( med_diag%DETN%dgsave ) THEN |
651 | | CALL wrk_alloc( jpi, jpj, fslown2d ) |
652 | | fslown2d(:,:) = 0.0 !! |
653 | | ENDIF |
654 | | IF( med_diag%MDET%dgsave ) THEN |
655 | | CALL wrk_alloc( jpi, jpj, fdd2d ) |
656 | | fdd2d(:,:) = 0.0 !! |
657 | | ENDIF |
658 | | IF( med_diag%AEOLIAN%dgsave ) THEN |
659 | | CALL wrk_alloc( jpi, jpj, ffetop2d ) |
660 | | ffetop2d(:,:) = 0.0 !! |
661 | | ENDIF |
662 | | IF( med_diag%BENTHIC%dgsave ) THEN |
663 | | CALL wrk_alloc( jpi, jpj, ffebot2d ) |
664 | | ffebot2d(:,:) = 0.0 !! |
665 | | ENDIF |
666 | | IF( med_diag%SCAVENGE%dgsave ) THEN |
667 | | CALL wrk_alloc( jpi, jpj, ffescav2d ) |
668 | | ffescav2d(:,:) = 0.0 !! |
669 | | ENDIF |
670 | | IF( med_diag%PN_JLIM%dgsave ) THEN |
671 | | CALL wrk_alloc( jpi, jpj, fjln2d ) |
672 | | fjln2d(:,:) = 0.0 !! |
673 | | ENDIF |
674 | | IF( med_diag%PN_NLIM%dgsave ) THEN |
675 | | CALL wrk_alloc( jpi, jpj, fnln2d ) |
676 | | fnln2d(:,:) = 0.0 !! |
677 | | ENDIF |
678 | | IF( med_diag%PN_FELIM%dgsave ) THEN |
679 | | CALL wrk_alloc( jpi, jpj, ffln2d ) |
680 | | ffln2d(:,:) = 0.0 !! |
681 | | ENDIF |
682 | | IF( med_diag%PD_JLIM%dgsave ) THEN |
683 | | CALL wrk_alloc( jpi, jpj, fjld2d ) |
684 | | fjld2d(:,:) = 0.0 !! |
685 | | ENDIF |
686 | | IF( med_diag%PD_NLIM%dgsave ) THEN |
687 | | CALL wrk_alloc( jpi, jpj, fnld2d ) |
688 | | fnld2d(:,:) = 0.0 !! |
689 | | ENDIF |
690 | | IF( med_diag%PD_FELIM%dgsave ) THEN |
691 | | CALL wrk_alloc( jpi, jpj, ffld2d ) |
692 | | ffld2d(:,:) = 0.0 !! |
693 | | ENDIF |
694 | | IF( med_diag%PD_SILIM%dgsave ) THEN |
695 | | CALL wrk_alloc( jpi, jpj, fsld2d2 ) |
696 | | fsld2d2(:,:) = 0.0 !! |
697 | | ENDIF |
698 | | IF( med_diag%PDSILIM2%dgsave ) THEN |
699 | | CALL wrk_alloc( jpi, jpj, fsld2d ) |
700 | | fsld2d(:,:) = 0.0 !! |
701 | | ENDIF |
702 | | !! |
703 | | !! skip SDT_XXXX diagnostics here |
704 | | !! |
705 | | IF( med_diag%TOTREG_N%dgsave ) THEN |
706 | | CALL wrk_alloc( jpi, jpj, fregen2d ) |
707 | | fregen2d(:,:) = 0.0 !! |
708 | | ENDIF |
709 | | IF( med_diag%TOTRG_SI%dgsave ) THEN |
710 | | CALL wrk_alloc( jpi, jpj, fregensi2d ) |
711 | | fregensi2d(:,:) = 0.0 !! |
712 | | ENDIF |
713 | | !! |
714 | | !! skip REG_XXXX diagnostics here |
715 | | !! |
716 | | IF( med_diag%FASTN%dgsave ) THEN |
717 | | CALL wrk_alloc( jpi, jpj, ftempn2d ) |
718 | | ftempn2d(:,:) = 0.0 !! |
719 | | ENDIF |
720 | | IF( med_diag%FASTSI%dgsave ) THEN |
721 | | CALL wrk_alloc( jpi, jpj, ftempsi2d ) |
722 | | ftempsi2d(:,:) = 0.0 !! |
723 | | ENDIF |
724 | | IF( med_diag%FASTFE%dgsave ) THEN |
725 | | CALL wrk_alloc( jpi, jpj, ftempfe2d ) |
726 | | ftempfe2d(:,:) = 0.0 !! |
727 | | ENDIF |
728 | | IF( med_diag%FASTC%dgsave ) THEN |
729 | | CALL wrk_alloc( jpi, jpj, ftempc2d ) |
730 | | ftempc2d(:,:) = 0.0 !! |
731 | | ENDIF |
732 | | IF( med_diag%FASTCA%dgsave ) THEN |
733 | | CALL wrk_alloc( jpi, jpj, ftempca2d ) |
734 | | ftempca2d(:,:) = 0.0 !! |
735 | | ENDIF |
736 | | !! |
737 | | !! skip FDT_XXXX, RG_XXXXF, FDS_XXXX, RGS_XXXXF diagnostics here |
738 | | !! |
739 | | IF( med_diag%REMINN%dgsave ) THEN |
740 | | CALL wrk_alloc( jpi, jpj, freminn2d ) |
741 | | freminn2d(:,:) = 0.0 !! |
742 | | ENDIF |
743 | | IF( med_diag%REMINSI%dgsave ) THEN |
744 | | CALL wrk_alloc( jpi, jpj, freminsi2d ) |
745 | | freminsi2d(:,:) = 0.0 !! |
746 | | ENDIF |
747 | | IF( med_diag%REMINFE%dgsave ) THEN |
748 | | CALL wrk_alloc( jpi, jpj, freminfe2d ) |
749 | | freminfe2d(:,:) = 0.0 !! |
750 | | ENDIF |
751 | | IF( med_diag%REMINC%dgsave ) THEN |
752 | | CALL wrk_alloc( jpi, jpj, freminc2d ) |
753 | | freminc2d(:,:) = 0.0 !! |
754 | | ENDIF |
755 | | IF( med_diag%REMINCA%dgsave ) THEN |
756 | | CALL wrk_alloc( jpi, jpj, freminca2d ) |
757 | | freminca2d(:,:) = 0.0 !! |
758 | | ENDIF |
759 | | # if defined key_roam |
760 | | !! |
761 | | !! skip SEAFLRXX, MED_XXXX, INTFLX_XX, INT_XX, ML_XXX, OCAL_XXX, FE_XXXX, MED_XZE, WIND diagnostics here |
762 | | !! |
763 | | IF( med_diag%RR_0100%dgsave ) THEN |
764 | | CALL wrk_alloc( jpi, jpj, ffastca2d ) |
765 | | ffastca2d(:,:) = 0.0 !! |
766 | | ENDIF |
767 | | |
768 | | IF( med_diag%ATM_PCO2%dgsave ) THEN |
769 | | CALL wrk_alloc( jpi, jpj, f_pco2a2d ) |
770 | | f_pco2a2d(:,:) = 0.0 !! |
771 | | ENDIF |
772 | | !! |
773 | | !! skip OCN_PH diagnostic here |
774 | | !! |
775 | | IF( med_diag%OCN_PCO2%dgsave ) THEN |
776 | | CALL wrk_alloc( jpi, jpj, f_pco2w2d ) |
777 | | f_pco2w2d(:,:) = 0.0 !! |
778 | | ENDIF |
779 | | !! |
780 | | !! skip OCNH2CO3, OCN_HCO3, OCN_CO3 diagnostics here |
781 | | !! |
782 | | IF( med_diag%CO2FLUX%dgsave ) THEN |
783 | | CALL wrk_alloc( jpi, jpj, f_co2flux2d ) |
784 | | f_co2flux2d(:,:) = 0.0 !! |
785 | | ENDIF |
786 | | !! |
787 | | !! skip OM_XXX diagnostics here |
788 | | !! |
789 | | IF( med_diag%TCO2%dgsave ) THEN |
790 | | CALL wrk_alloc( jpi, jpj, f_TDIC2d ) |
791 | | f_TDIC2d(:,:) = 0.0 !! |
792 | | ENDIF |
793 | | IF( med_diag%TALK%dgsave ) THEN |
794 | | CALL wrk_alloc( jpi, jpj, f_TALK2d ) |
795 | | f_TALK2d(:,:) = 0.0 !! |
796 | | ENDIF |
797 | | IF( med_diag%KW660%dgsave ) THEN |
798 | | CALL wrk_alloc( jpi, jpj, f_kw6602d ) |
799 | | f_kw6602d(:,:) = 0.0 !! |
800 | | ENDIF |
801 | | IF( med_diag%ATM_PP0%dgsave ) THEN |
802 | | CALL wrk_alloc( jpi, jpj, f_pp02d ) |
803 | | f_pp02d(:,:) = 0.0 !! |
804 | | ENDIF |
805 | | IF( med_diag%O2FLUX%dgsave ) THEN |
806 | | CALL wrk_alloc( jpi, jpj, f_o2flux2d ) |
807 | | f_o2flux2d(:,:) = 0.0 !! |
808 | | ENDIF |
809 | | IF( med_diag%O2SAT%dgsave ) THEN |
810 | | CALL wrk_alloc( jpi, jpj, f_o2sat2d ) |
811 | | f_o2sat2d(:,:) = 0.0 !! |
812 | | ENDIF |
813 | | !! |
814 | | !! skip XXX_CCD diagnostics here |
815 | | !! |
816 | | IF( med_diag%SFR_OCAL%dgsave ) THEN |
817 | | CALL wrk_alloc( jpi, jpj, sfr_ocal2d ) |
818 | | sfr_ocal2d(:,:) = 0.0 !! |
819 | | ENDIF |
820 | | IF( med_diag%SFR_OARG%dgsave ) THEN |
821 | | CALL wrk_alloc( jpi, jpj, sfr_oarg2d ) |
822 | | sfr_oarg2d(:,:) = 0.0 !! |
823 | | ENDIF |
824 | | !! |
825 | | !! skip XX_PROD, XX_CONS, O2_ANOX, RR_XXXX diagnostics here |
826 | | !! |
827 | | IF( med_diag%IBEN_N%dgsave ) THEN |
828 | | CALL wrk_alloc( jpi, jpj, iben_n2d ) |
829 | | iben_n2d(:,:) = 0.0 !! |
830 | | ENDIF |
831 | | IF( med_diag%IBEN_FE%dgsave ) THEN |
832 | | CALL wrk_alloc( jpi, jpj, iben_fe2d ) |
833 | | iben_fe2d(:,:) = 0.0 !! |
834 | | ENDIF |
835 | | IF( med_diag%IBEN_C%dgsave ) THEN |
836 | | CALL wrk_alloc( jpi, jpj, iben_c2d ) |
837 | | iben_c2d(:,:) = 0.0 !! |
838 | | ENDIF |
839 | | IF( med_diag%IBEN_SI%dgsave ) THEN |
840 | | CALL wrk_alloc( jpi, jpj, iben_si2d ) |
841 | | iben_si2d(:,:) = 0.0 !! |
842 | | ENDIF |
843 | | IF( med_diag%IBEN_CA%dgsave ) THEN |
844 | | CALL wrk_alloc( jpi, jpj, iben_ca2d ) |
845 | | iben_ca2d(:,:) = 0.0 !! |
846 | | ENDIF |
847 | | IF( med_diag%OBEN_N%dgsave ) THEN |
848 | | CALL wrk_alloc( jpi, jpj, oben_n2d ) |
849 | | oben_n2d(:,:) = 0.0 !! |
850 | | ENDIF |
851 | | IF( med_diag%OBEN_FE%dgsave ) THEN |
852 | | CALL wrk_alloc( jpi, jpj, oben_fe2d ) |
853 | | oben_fe2d(:,:) = 0.0 !! |
854 | | ENDIF |
855 | | IF( med_diag%OBEN_C%dgsave ) THEN |
856 | | CALL wrk_alloc( jpi, jpj, oben_c2d ) |
857 | | oben_c2d(:,:) = 0.0 !! |
858 | | ENDIF |
859 | | IF( med_diag%OBEN_SI%dgsave ) THEN |
860 | | CALL wrk_alloc( jpi, jpj, oben_si2d ) |
861 | | oben_si2d(:,:) = 0.0 !! |
862 | | ENDIF |
863 | | IF( med_diag%OBEN_CA%dgsave ) THEN |
864 | | CALL wrk_alloc( jpi, jpj, oben_ca2d ) |
865 | | oben_ca2d(:,:) = 0.0 !! |
866 | | ENDIF |
867 | | !! |
868 | | !! skip BEN_XX diagnostics here |
869 | | !! |
870 | | IF( med_diag%RIV_N%dgsave ) THEN |
871 | | CALL wrk_alloc( jpi, jpj, rivn2d ) |
872 | | rivn2d(:,:) = 0.0 !! |
873 | | ENDIF |
874 | | IF( med_diag%RIV_SI%dgsave ) THEN |
875 | | CALL wrk_alloc( jpi, jpj, rivsi2d ) |
876 | | rivsi2d(:,:) = 0.0 !! |
877 | | ENDIF |
878 | | IF( med_diag%RIV_C%dgsave ) THEN |
879 | | CALL wrk_alloc( jpi, jpj, rivc2d ) |
880 | | rivc2d(:,:) = 0.0 !! |
881 | | ENDIF |
882 | | IF( med_diag%RIV_ALK%dgsave ) THEN |
883 | | CALL wrk_alloc( jpi, jpj, rivalk2d ) |
884 | | rivalk2d(:,:) = 0.0 !! |
885 | | ENDIF |
886 | | IF( med_diag%DETC%dgsave ) THEN |
887 | | CALL wrk_alloc( jpi, jpj, fslowc2d ) |
888 | | fslowc2d(:,:) = 0.0 !! |
889 | | ENDIF |
890 | | !! |
891 | | !! skip SDC_XXXX, INVTXXX diagnostics here |
892 | | !! |
893 | | IF( med_diag%LYSO_CA%dgsave ) THEN |
894 | | CALL wrk_alloc( jpi, jpj, lyso_ca2d ) |
895 | | lyso_ca2d(:,:) = 0.0 !! |
896 | | ENDIF |
897 | | !! |
898 | | !! skip COM_RESP diagnostic here |
899 | | !! |
900 | | IF( med_diag%PN_LLOSS%dgsave ) THEN |
901 | | CALL wrk_alloc( jpi, jpj, fdpn22d ) |
902 | | fdpn22d(:,:) = 0.0 !! |
903 | | ENDIF |
904 | | IF( med_diag%PD_LLOSS%dgsave ) THEN |
905 | | CALL wrk_alloc( jpi, jpj, fdpd22d ) |
906 | | fdpd22d(:,:) = 0.0 !! |
907 | | ENDIF |
908 | | IF( med_diag%ZI_LLOSS%dgsave ) THEN |
909 | | CALL wrk_alloc( jpi, jpj, fdzmi22d ) |
910 | | fdzmi22d(:,:) = 0.0 !! |
911 | | ENDIF |
912 | | IF( med_diag%ZE_LLOSS%dgsave ) THEN |
913 | | CALL wrk_alloc( jpi, jpj, fdzme22d ) |
914 | | fdzme22d(:,:) = 0.0 !! |
915 | | ENDIF |
916 | | IF( med_diag%ZI_MES_N%dgsave ) THEN |
917 | | CALL wrk_alloc( jpi, jpj, zimesn2d ) |
918 | | zimesn2d(:,:) = 0.0 !! |
919 | | ENDIF |
920 | | IF( med_diag%ZI_MES_D%dgsave ) THEN |
921 | | CALL wrk_alloc( jpi, jpj, zimesd2d ) |
922 | | zimesd2d(:,:) = 0.0 !! |
923 | | ENDIF |
924 | | IF( med_diag%ZI_MES_C%dgsave ) THEN |
925 | | CALL wrk_alloc( jpi, jpj, zimesc2d ) |
926 | | zimesc2d(:,:) = 0.0 !! |
927 | | ENDIF |
928 | | IF( med_diag%ZI_MESDC%dgsave ) THEN |
929 | | CALL wrk_alloc( jpi, jpj, zimesdc2d ) |
930 | | zimesdc2d(:,:) = 0.0 !! |
931 | | ENDIF |
932 | | IF( med_diag%ZI_EXCR%dgsave ) THEN |
933 | | CALL wrk_alloc( jpi, jpj, ziexcr2d ) |
934 | | ziexcr2d(:,:) = 0.0 !! |
935 | | ENDIF |
936 | | IF( med_diag%ZI_RESP%dgsave ) THEN |
937 | | CALL wrk_alloc( jpi, jpj, ziresp2d ) |
938 | | ziresp2d(:,:) = 0.0 !! |
939 | | ENDIF |
940 | | IF( med_diag%ZI_GROW%dgsave ) THEN |
941 | | CALL wrk_alloc( jpi, jpj, zigrow2d ) |
942 | | zigrow2d(:,:) = 0.0 !! |
943 | | ENDIF |
944 | | IF( med_diag%ZE_MES_N%dgsave ) THEN |
945 | | CALL wrk_alloc( jpi, jpj, zemesn2d ) |
946 | | zemesn2d(:,:) = 0.0 !! |
947 | | ENDIF |
948 | | IF( med_diag%ZE_MES_D%dgsave ) THEN |
949 | | CALL wrk_alloc( jpi, jpj, zemesd2d ) |
950 | | zemesd2d(:,:) = 0.0 !! |
951 | | ENDIF |
952 | | IF( med_diag%ZE_MES_C%dgsave ) THEN |
953 | | CALL wrk_alloc( jpi, jpj, zemesc2d ) |
954 | | zemesc2d(:,:) = 0.0 !! |
955 | | ENDIF |
956 | | IF( med_diag%ZE_MESDC%dgsave ) THEN |
957 | | CALL wrk_alloc( jpi, jpj, zemesdc2d ) |
958 | | zemesdc2d(:,:) = 0.0 !! |
959 | | ENDIF |
960 | | IF( med_diag%ZE_EXCR%dgsave ) THEN |
961 | | CALL wrk_alloc( jpi, jpj, zeexcr2d ) |
962 | | zeexcr2d(:,:) = 0.0 !! |
963 | | ENDIF |
964 | | IF( med_diag%ZE_RESP%dgsave ) THEN |
965 | | CALL wrk_alloc( jpi, jpj, zeresp2d ) |
966 | | zeresp2d(:,:) = 0.0 !! |
967 | | ENDIF |
968 | | IF( med_diag%ZE_GROW%dgsave ) THEN |
969 | | CALL wrk_alloc( jpi, jpj, zegrow2d ) |
970 | | zegrow2d(:,:) = 0.0 !! |
971 | | ENDIF |
972 | | IF( med_diag%MDETC%dgsave ) THEN |
973 | | CALL wrk_alloc( jpi, jpj, mdetc2d ) |
974 | | mdetc2d(:,:) = 0.0 !! |
975 | | ENDIF |
976 | | IF( med_diag%GMIDC%dgsave ) THEN |
977 | | CALL wrk_alloc( jpi, jpj, gmidc2d ) |
978 | | gmidc2d(:,:) = 0.0 !! |
979 | | ENDIF |
980 | | IF( med_diag%GMEDC%dgsave ) THEN |
981 | | CALL wrk_alloc( jpi, jpj, gmedc2d ) |
982 | | gmedc2d(:,:) = 0.0 !! |
983 | | ENDIF |
984 | | !! |
985 | | !! skip INT_XXX diagnostics here |
986 | | !! |
987 | | IF (jdms .eq. 1) THEN |
988 | | IF( med_diag%DMS_SURF%dgsave ) THEN |
989 | | CALL wrk_alloc( jpi, jpj, dms_surf2d ) |
990 | | dms_surf2d(:,:) = 0.0 !! |
991 | | ENDIF |
992 | | IF( med_diag%DMS_ANDR%dgsave ) THEN |
993 | | CALL wrk_alloc( jpi, jpj, dms_andr2d ) |
994 | | dms_andr2d(:,:) = 0.0 !! |
995 | | ENDIF |
996 | | IF( med_diag%DMS_SIMO%dgsave ) THEN |
997 | | CALL wrk_alloc( jpi, jpj, dms_simo2d ) |
998 | | dms_simo2d(:,:) = 0.0 !! |
999 | | ENDIF |
1000 | | IF( med_diag%DMS_ARAN%dgsave ) THEN |
1001 | | CALL wrk_alloc( jpi, jpj, dms_aran2d ) |
1002 | | dms_aran2d(:,:) = 0.0 !! |
1003 | | ENDIF |
1004 | | IF( med_diag%DMS_HALL%dgsave ) THEN |
1005 | | CALL wrk_alloc( jpi, jpj, dms_hall2d ) |
1006 | | dms_hall2d(:,:) = 0.0 !! |
1007 | | ENDIF |
1008 | | IF( med_diag%DMS_ANDM%dgsave ) THEN |
1009 | | CALL wrk_alloc( jpi, jpj, dms_andm2d ) |
1010 | | dms_andm2d(:,:) = 0.0 !! |
1011 | | ENDIF |
1012 | | ENDIF |
1013 | | !! |
1014 | | !! AXY (24/11/16): extra MOCSY diagnostics, 2D |
1015 | | IF( med_diag%ATM_XCO2%dgsave ) THEN |
1016 | | CALL wrk_alloc( jpi, jpj, f_xco2a_2d ) |
1017 | | f_xco2a_2d(:,:) = 0.0 !! |
1018 | | ENDIF |
1019 | | IF( med_diag%OCN_FCO2%dgsave ) THEN |
1020 | | CALL wrk_alloc( jpi, jpj, f_fco2w_2d ) |
1021 | | f_fco2w_2d(:,:) = 0.0 !! |
1022 | | ENDIF |
1023 | | IF( med_diag%ATM_FCO2%dgsave ) THEN |
1024 | | CALL wrk_alloc( jpi, jpj, f_fco2a_2d ) |
1025 | | f_fco2a_2d(:,:) = 0.0 !! |
1026 | | ENDIF |
1027 | | IF( med_diag%OCN_RHOSW%dgsave ) THEN |
1028 | | CALL wrk_alloc( jpi, jpj, f_ocnrhosw_2d ) |
1029 | | f_ocnrhosw_2d(:,:) = 0.0 !! |
1030 | | ENDIF |
1031 | | IF( med_diag%OCN_SCHCO2%dgsave ) THEN |
1032 | | CALL wrk_alloc( jpi, jpj, f_ocnschco2_2d ) |
1033 | | f_ocnschco2_2d(:,:) = 0.0 !! |
1034 | | ENDIF |
1035 | | IF( med_diag%OCN_KWCO2%dgsave ) THEN |
1036 | | CALL wrk_alloc( jpi, jpj, f_ocnkwco2_2d ) |
1037 | | f_ocnkwco2_2d(:,:) = 0.0 !! |
1038 | | ENDIF |
1039 | | IF( med_diag%OCN_K0%dgsave ) THEN |
1040 | | CALL wrk_alloc( jpi, jpj, f_ocnk0_2d ) |
1041 | | f_ocnk0_2d(:,:) = 0.0 !! |
1042 | | ENDIF |
1043 | | IF( med_diag%CO2STARAIR%dgsave ) THEN |
1044 | | CALL wrk_alloc( jpi, jpj, f_co2starair_2d ) |
1045 | | f_co2starair_2d(:,:) = 0.0 !! |
1046 | | ENDIF |
1047 | | IF( med_diag%OCN_DPCO2%dgsave ) THEN |
1048 | | CALL wrk_alloc( jpi, jpj, f_ocndpco2_2d ) |
1049 | | f_ocndpco2_2d(:,:) = 0.0 !! |
1050 | | ENDIF |
1051 | | # endif |
1052 | | IF( med_diag%TPP3%dgsave ) THEN |
1053 | | CALL wrk_alloc( jpi, jpj, jpk, tpp3d ) |
1054 | | tpp3d(:,:,:) = 0.0 !! |
1055 | | ENDIF |
1056 | | IF( med_diag%DETFLUX3%dgsave ) THEN |
1057 | | CALL wrk_alloc( jpi, jpj, jpk, detflux3d ) |
1058 | | detflux3d(:,:,:) = 0.0 !! |
1059 | | ENDIF |
1060 | | IF( med_diag%REMIN3N%dgsave ) THEN |
1061 | | CALL wrk_alloc( jpi, jpj, jpk, remin3dn ) |
1062 | | remin3dn(:,:,:) = 0.0 !! |
1063 | | ENDIF |
1064 | | !! |
1065 | | !! AXY (10/11/16): CMIP6 diagnostics, 2D |
1066 | | !! JPALM -- 17-11-16 -- put fgco2 alloc out of diag request |
1067 | | !! needed for coupling/passed through restart |
1068 | | !! IF( med_diag%FGCO2%dgsave ) THEN |
1069 | | CALL wrk_alloc( jpi, jpj, fgco2 ) |
1070 | | fgco2(:,:) = 0.0 !! |
1071 | | !! ENDIF |
1072 | | IF( med_diag%INTDISSIC%dgsave ) THEN |
1073 | | CALL wrk_alloc( jpi, jpj, intdissic ) |
1074 | | intdissic(:,:) = 0.0 !! |
1075 | | ENDIF |
1076 | | IF( med_diag%INTDISSIN%dgsave ) THEN |
1077 | | CALL wrk_alloc( jpi, jpj, intdissin ) |
1078 | | intdissin(:,:) = 0.0 !! |
1079 | | ENDIF |
1080 | | IF( med_diag%INTDISSISI%dgsave ) THEN |
1081 | | CALL wrk_alloc( jpi, jpj, intdissisi ) |
1082 | | intdissisi(:,:) = 0.0 !! |
1083 | | ENDIF |
1084 | | IF( med_diag%INTTALK%dgsave ) THEN |
1085 | | CALL wrk_alloc( jpi, jpj, inttalk ) |
1086 | | inttalk(:,:) = 0.0 !! |
1087 | | ENDIF |
1088 | | IF( med_diag%O2min%dgsave ) THEN |
1089 | | CALL wrk_alloc( jpi, jpj, o2min ) |
1090 | | o2min(:,:) = 1.e3 !! set to high value as we're looking for min(o2) |
1091 | | ENDIF |
1092 | | IF( med_diag%ZO2min%dgsave ) THEN |
1093 | | CALL wrk_alloc( jpi, jpj, zo2min ) |
1094 | | zo2min(:,:) = 0.0 !! |
1095 | | ENDIF |
1096 | | IF( med_diag%FBDDTALK%dgsave ) THEN |
1097 | | CALL wrk_alloc( jpi, jpj, fbddtalk ) |
1098 | | fbddtalk(:,:) = 0.0 !! |
1099 | | ENDIF |
1100 | | IF( med_diag%FBDDTDIC%dgsave ) THEN |
1101 | | CALL wrk_alloc( jpi, jpj, fbddtdic ) |
1102 | | fbddtdic(:,:) = 0.0 !! |
1103 | | ENDIF |
1104 | | IF( med_diag%FBDDTDIFE%dgsave ) THEN |
1105 | | CALL wrk_alloc( jpi, jpj, fbddtdife ) |
1106 | | fbddtdife(:,:) = 0.0 !! |
1107 | | ENDIF |
1108 | | IF( med_diag%FBDDTDIN%dgsave ) THEN |
1109 | | CALL wrk_alloc( jpi, jpj, fbddtdin ) |
1110 | | fbddtdin(:,:) = 0.0 !! |
1111 | | ENDIF |
1112 | | IF( med_diag%FBDDTDISI%dgsave ) THEN |
1113 | | CALL wrk_alloc( jpi, jpj, fbddtdisi ) |
1114 | | fbddtdisi(:,:) = 0.0 !! |
1115 | | ENDIF |
1116 | | !! |
1117 | | !! AXY (10/11/16): CMIP6 diagnostics, 3D |
1118 | | IF( med_diag%TPPD3%dgsave ) THEN |
1119 | | CALL wrk_alloc( jpi, jpj, jpk, tppd3 ) |
1120 | | tppd3(:,:,:) = 0.0 !! |
1121 | | ENDIF |
1122 | | IF( med_diag%BDDTALK3%dgsave ) THEN |
1123 | | CALL wrk_alloc( jpi, jpj, jpk, bddtalk3 ) |
1124 | | bddtalk3(:,:,:) = 0.0 !! |
1125 | | ENDIF |
1126 | | IF( med_diag%BDDTDIC3%dgsave ) THEN |
1127 | | CALL wrk_alloc( jpi, jpj, jpk, bddtdic3 ) |
1128 | | bddtdic3(:,:,:) = 0.0 !! |
1129 | | ENDIF |
1130 | | IF( med_diag%BDDTDIFE3%dgsave ) THEN |
1131 | | CALL wrk_alloc( jpi, jpj, jpk, bddtdife3 ) |
1132 | | bddtdife3(:,:,:) = 0.0 !! |
1133 | | ENDIF |
1134 | | IF( med_diag%BDDTDIN3%dgsave ) THEN |
1135 | | CALL wrk_alloc( jpi, jpj, jpk, bddtdin3 ) |
1136 | | bddtdin3(:,:,:) = 0.0 !! |
1137 | | ENDIF |
1138 | | IF( med_diag%BDDTDISI3%dgsave ) THEN |
1139 | | CALL wrk_alloc( jpi, jpj, jpk, bddtdisi3 ) |
1140 | | bddtdisi3(:,:,:) = 0.0 !! |
1141 | | ENDIF |
1142 | | IF( med_diag%FD_NIT3%dgsave ) THEN |
1143 | | CALL wrk_alloc( jpi, jpj, jpk, fd_nit3 ) |
1144 | | fd_nit3(:,:,:) = 0.0 !! |
1145 | | ENDIF |
1146 | | IF( med_diag%FD_SIL3%dgsave ) THEN |
1147 | | CALL wrk_alloc( jpi, jpj, jpk, fd_sil3 ) |
1148 | | fd_sil3(:,:,:) = 0.0 !! |
1149 | | ENDIF |
1150 | | IF( med_diag%FD_CAR3%dgsave ) THEN |
1151 | | CALL wrk_alloc( jpi, jpj, jpk, fd_car3 ) |
1152 | | fd_car3(:,:,:) = 0.0 !! |
1153 | | ENDIF |
1154 | | IF( med_diag%FD_CAL3%dgsave ) THEN |
1155 | | CALL wrk_alloc( jpi, jpj, jpk, fd_cal3 ) |
1156 | | fd_cal3(:,:,:) = 0.0 !! |
1157 | | ENDIF |
1158 | | IF( med_diag%DCALC3%dgsave ) THEN |
1159 | | CALL wrk_alloc( jpi, jpj, jpk, dcalc3 ) |
1160 | | dcalc3(:,:,: ) = 0.0 !! |
1161 | | ENDIF |
1162 | | IF( med_diag%EXPC3%dgsave ) THEN |
1163 | | CALL wrk_alloc( jpi, jpj, jpk, expc3 ) |
1164 | | expc3(:,:,: ) = 0.0 !! |
1165 | | ENDIF |
1166 | | IF( med_diag%EXPN3%dgsave ) THEN |
1167 | | CALL wrk_alloc( jpi, jpj, jpk, expn3 ) |
1168 | | expn3(:,:,: ) = 0.0 !! |
1169 | | ENDIF |
1170 | | IF( med_diag%FEDISS3%dgsave ) THEN |
1171 | | CALL wrk_alloc( jpi, jpj, jpk, fediss3 ) |
1172 | | fediss3(:,:,: ) = 0.0 !! |
1173 | | ENDIF |
1174 | | IF( med_diag%FESCAV3%dgsave ) THEN |
1175 | | CALL wrk_alloc( jpi, jpj, jpk, fescav3 ) |
1176 | | fescav3(:,:,: ) = 0.0 !! |
1177 | | ENDIF |
1178 | | IF( med_diag%MIGRAZP3%dgsave ) THEN |
1179 | | CALL wrk_alloc( jpi, jpj, jpk, migrazp3 ) |
1180 | | migrazp3(:,:,: ) = 0.0 !! |
1181 | | ENDIF |
1182 | | IF( med_diag%MIGRAZD3%dgsave ) THEN |
1183 | | CALL wrk_alloc( jpi, jpj, jpk, migrazd3 ) |
1184 | | migrazd3(:,:,: ) = 0.0 !! |
1185 | | ENDIF |
1186 | | IF( med_diag%MEGRAZP3%dgsave ) THEN |
1187 | | CALL wrk_alloc( jpi, jpj, jpk, megrazp3 ) |
1188 | | megrazp3(:,:,: ) = 0.0 !! |
1189 | | ENDIF |
1190 | | IF( med_diag%MEGRAZD3%dgsave ) THEN |
1191 | | CALL wrk_alloc( jpi, jpj, jpk, megrazd3 ) |
1192 | | megrazd3(:,:,: ) = 0.0 !! |
1193 | | ENDIF |
1194 | | IF( med_diag%MEGRAZZ3%dgsave ) THEN |
1195 | | CALL wrk_alloc( jpi, jpj, jpk, megrazz3 ) |
1196 | | megrazz3(:,:,: ) = 0.0 !! |
1197 | | ENDIF |
1198 | | IF( med_diag%O2SAT3%dgsave ) THEN |
1199 | | CALL wrk_alloc( jpi, jpj, jpk, o2sat3 ) |
1200 | | o2sat3(:,:,: ) = 0.0 !! |
1201 | | ENDIF |
1202 | | IF( med_diag%PBSI3%dgsave ) THEN |
1203 | | CALL wrk_alloc( jpi, jpj, jpk, pbsi3 ) |
1204 | | pbsi3(:,:,: ) = 0.0 !! |
1205 | | ENDIF |
1206 | | IF( med_diag%PCAL3%dgsave ) THEN |
1207 | | CALL wrk_alloc( jpi, jpj, jpk, pcal3 ) |
1208 | | pcal3(:,:,: ) = 0.0 !! |
1209 | | ENDIF |
1210 | | IF( med_diag%REMOC3%dgsave ) THEN |
1211 | | CALL wrk_alloc( jpi, jpj, jpk, remoc3 ) |
1212 | | remoc3(:,:,: ) = 0.0 !! |
1213 | | ENDIF |
1214 | | IF( med_diag%PNLIMJ3%dgsave ) THEN |
1215 | | CALL wrk_alloc( jpi, jpj, jpk, pnlimj3 ) |
1216 | | pnlimj3(:,:,: ) = 0.0 !! |
1217 | | ENDIF |
1218 | | IF( med_diag%PNLIMN3%dgsave ) THEN |
1219 | | CALL wrk_alloc( jpi, jpj, jpk, pnlimn3 ) |
1220 | | pnlimn3(:,:,: ) = 0.0 !! |
1221 | | ENDIF |
1222 | | IF( med_diag%PNLIMFE3%dgsave ) THEN |
1223 | | CALL wrk_alloc( jpi, jpj, jpk, pnlimfe3 ) |
1224 | | pnlimfe3(:,:,: ) = 0.0 !! |
1225 | | ENDIF |
1226 | | IF( med_diag%PDLIMJ3%dgsave ) THEN |
1227 | | CALL wrk_alloc( jpi, jpj, jpk, pdlimj3 ) |
1228 | | pdlimj3(:,:,: ) = 0.0 !! |
1229 | | ENDIF |
1230 | | IF( med_diag%PDLIMN3%dgsave ) THEN |
1231 | | CALL wrk_alloc( jpi, jpj, jpk, pdlimn3 ) |
1232 | | pdlimn3(:,:,: ) = 0.0 !! |
1233 | | ENDIF |
1234 | | IF( med_diag%PDLIMFE3%dgsave ) THEN |
1235 | | CALL wrk_alloc( jpi, jpj, jpk, pdlimfe3 ) |
1236 | | pdlimfe3(:,:,: ) = 0.0 !! |
1237 | | ENDIF |
1238 | | IF( med_diag%PDLIMSI3%dgsave ) THEN |
1239 | | CALL wrk_alloc( jpi, jpj, jpk, pdlimsi3 ) |
1240 | | pdlimsi3(:,:,: ) = 0.0 !! |
1241 | | ENDIF |
1242 | | |
1243 | | ENDIF |
1244 | | !! lk_iomput |
1245 | | !! |
| 238 | !!------------------------------------------------------------------ |
| 239 | !! Initialise arrays to zero and set up arrays for diagnostics |
| 240 | !!------------------------------------------------------------------ |
| 241 | CALL bio_medusa_init( kt ) |
| 242 | |
1727 | | f_wind = wndm(ji,jj) |
1728 | | IF (lk_oasis) THEN |
1729 | | f_xco2a = PCO2a_in_cpl(ji,jj) !! use 2D atm xCO2 from atm coupling |
1730 | | ENDIF |
1731 | | !! |
1732 | | !! AXY (23/06/15): as part of an effort to update the carbonate chemistry |
1733 | | !! in MEDUSA, the gas transfer velocity used in the carbon |
1734 | | !! and oxygen cycles has been harmonised and is calculated |
1735 | | !! by the same function here; this harmonisation includes |
1736 | | !! changes to the PML carbonate chemistry scheme so that |
1737 | | !! it too makes use of the same gas transfer velocity; the |
1738 | | !! preferred parameterisation of this is Wanninkhof (2014), |
1739 | | !! option 7 |
1740 | | !! |
1741 | | # if defined key_debug_medusa |
1742 | | IF (lwp) write (numout,*) 'trc_bio_medusa: entering gas_transfer' |
1743 | | CALL flush(numout) |
1744 | | # endif |
1745 | | CALL gas_transfer( f_wind, 1, 7, & ! inputs |
1746 | | f_kw660 ) ! outputs |
1747 | | # if defined key_debug_medusa |
1748 | | IF (lwp) write (numout,*) 'trc_bio_medusa: exiting gas_transfer' |
1749 | | CALL flush(numout) |
1750 | | # endif |
1751 | | !! |
1752 | | !! air pressure (atm); ultimately this will use air pressure at the base |
1753 | | !! of the UKESM1 atmosphere |
1754 | | !! |
1755 | | f_pp0 = 1.0 |
1756 | | !! |
1757 | | !! IF(lwp) WRITE(numout,*) ' MEDUSA ztmp =', ztmp |
1758 | | !! IF(lwp) WRITE(numout,*) ' MEDUSA zwind_i =', zwind_i(ji,jj) |
1759 | | !! IF(lwp) WRITE(numout,*) ' MEDUSA zwind_j =', zwind_j(ji,jj) |
1760 | | !! IF(lwp) WRITE(numout,*) ' MEDUSA f_wind =', f_wind |
1761 | | !! IF(lwp) WRITE(numout,*) ' MEDUSA fr_i =', fr_i(ji,jj) |
1762 | | !! |
1763 | | # if defined key_axy_carbchem |
1764 | | # if defined key_mocsy |
1765 | | !! |
1766 | | !! AXY (22/06/15): use Orr & Epitalon (2015) MOCSY-2 carbonate |
1767 | | !! chemistry package; note that depth is set to |
1768 | | !! zero in this call |
1769 | | CALL mocsy_interface( ztmp, zsal, zalk, zdic, zsil, zpho, & ! inputs |
1770 | | f_pp0, 0.0, gphit(ji,jj), f_kw660, f_xco2a, 1, & ! inputs |
1771 | | f_ph, f_pco2w, f_fco2w, f_h2co3, f_hco3, f_co3, f_omarg(ji,jj), & ! outputs |
1772 | | f_omcal(ji,jj), f_BetaD, f_rhosw, f_opres, f_insitut, & ! outputs |
1773 | | f_pco2atm, f_fco2atm, f_schmidtco2, f_kwco2, f_K0, & ! outputs |
1774 | | f_co2starair, f_co2flux, f_dpco2 ) ! outputs |
1775 | | !! |
1776 | | f_TDIC = (zdic / f_rhosw) * 1000. ! mmol / m3 -> umol / kg |
1777 | | f_TALK = (zalk / f_rhosw) * 1000. ! meq / m3 -> ueq / kg |
1778 | | f_dcf = f_rhosw |
1779 | | # else |
1780 | | iters = 0 |
1781 | | !! |
1782 | | !! carbon dioxide (CO2); Jerry Blackford code (ostensibly OCMIP-2, but not) |
1783 | | CALL trc_co2_medusa( ztmp, zsal, zdic, zalk, 0.0, f_kw660, f_xco2a, & ! inputs |
1784 | | f_ph, f_pco2w, f_h2co3, f_hco3, f_co3, f_omcal(ji,jj), & ! outputs |
1785 | | f_omarg(ji,jj), f_co2flux, f_TDIC, f_TALK, f_dcf, f_henry, iters ) ! outputs |
1786 | | !! |
1787 | | !! AXY (09/01/14): removed iteration and NaN checks; these have |
1788 | | !! been moved to trc_co2_medusa together with a |
1789 | | !! fudge that amends erroneous values (this is |
1790 | | !! intended to be a temporary fudge!); the |
1791 | | !! output warnings are retained here so that |
1792 | | !! failure position can be determined |
1793 | | if (iters .eq. 25) then |
1794 | | IF(lwp) WRITE(numout,*) ' trc_bio_medusa: ITERS WARNING, ', & |
1795 | | iters, ' AT (', ji, ', ', jj, ', ', jk, ') AT ', kt |
1796 | | endif |
1797 | | # endif |
1798 | | # else |
1799 | | !! AXY (18/04/13): switch off carbonate chemistry calculations; provide |
1800 | | !! quasi-sensible alternatives |
1801 | | f_ph = 8.1 |
1802 | | f_pco2w = f_xco2a |
1803 | | f_h2co3 = 0.005 * zdic |
1804 | | f_hco3 = 0.865 * zdic |
1805 | | f_co3 = 0.130 * zdic |
1806 | | f_omcal(ji,jj) = 4. |
1807 | | f_omarg(ji,jj) = 2. |
1808 | | f_co2flux = 0. |
1809 | | f_TDIC = zdic |
1810 | | f_TALK = zalk |
1811 | | f_dcf = 1.026 |
1812 | | f_henry = 1. |
1813 | | !! AXY (23/06/15): add in some extra MOCSY diagnostics |
1814 | | f_fco2w = f_xco2a |
1815 | | f_BetaD = 1. |
1816 | | f_rhosw = 1.026 |
1817 | | f_opres = 0. |
1818 | | f_insitut = ztmp |
1819 | | f_pco2atm = f_xco2a |
1820 | | f_fco2atm = f_xco2a |
1821 | | f_schmidtco2 = 660. |
1822 | | f_kwco2 = 0. |
1823 | | f_K0 = 0. |
1824 | | f_co2starair = f_xco2a |
1825 | | f_dpco2 = 0. |
1826 | | # endif |
1827 | | !! |
1828 | | !! mmol/m2/s -> mmol/m3/d; correct for sea-ice; divide through by layer thickness |
1829 | | f_co2flux = (1. - fr_i(ji,jj)) * f_co2flux * 86400. / fthk |
1830 | | !! |
1831 | | !! oxygen (O2); OCMIP-2 code |
1832 | | !! AXY (23/06/15): amend input list for oxygen to account for common gas |
1833 | | !! transfer velocity |
1834 | | !! CALL trc_oxy_medusa( ztmp, zsal, f_uwind, f_vwind, f_pp0, zoxy / 1000., fthk, & ! inputs |
1835 | | !! f_kw660, f_o2flux, f_o2sat ) ! outputs |
1836 | | CALL trc_oxy_medusa( ztmp, zsal, f_kw660, f_pp0, zoxy, & ! inputs |
1837 | | f_kwo2, f_o2flux, f_o2sat ) ! outputs |
1838 | | !! |
1839 | | !! mmol/m2/s -> mol/m3/d; correct for sea-ice; divide through by layer thickness |
1840 | | f_o2flux = (1. - fr_i(ji,jj)) * f_o2flux * 86400. / fthk |
1841 | | !! |
1842 | | !! Jpalm (08-2014) |
1843 | | !! DMS surface concentration calculation |
1844 | | !! initialy added for UKESM1 model. |
1845 | | !! using MET-OFFICE subroutine. |
1846 | | !! DMS module only needs Chl concentration and MLD |
1847 | | !! to get an aproximate value of DMS concentration. |
1848 | | !! air-sea fluxes are calculated by atmospheric chemitry model |
1849 | | !! from atm and oc-surface concentrations. |
1850 | | !! |
1851 | | !! AXY (13/03/15): this is amended to calculate all of the DMS |
1852 | | !! estimates examined during UKESM1 (see comments |
1853 | | !! in trcdms_medusa.F90) |
1854 | | !! |
1855 | | !! AXY (25/05/17): amended to additionally pass DIN limitation as well as [DIN]; |
1856 | | !! accounts for differences in nutrient half-saturations; changes |
1857 | | !! also made in trc_dms_medusa; this permits an additional DMS |
1858 | | !! calculation while retaining the existing Anderson one |
1859 | | !! |
1860 | | IF (jdms .eq. 1) THEN |
1861 | | !! |
1862 | | !! calculate weighted half-saturation for DIN uptake |
1863 | | dms_wtkn = ((zphn * xnln) + (zphd * xnld)) / (zphn + zphd) |
1864 | | !! |
1865 | | !! feed in correct inputs |
1866 | | if (jdms_input .eq. 0) then |
1867 | | !! use instantaneous inputs |
1868 | | dms_nlim = zdin / (zdin + dms_wtkn) |
1869 | | !! |
1870 | | CALL trc_dms_medusa( zchn, zchd, & ! inputs |
1871 | | hmld(ji,jj), qsr(ji,jj), & ! inputs |
1872 | | zdin, dms_nlim, & ! inputs |
1873 | | dms_andr, dms_simo, dms_aran, dms_hall, dms_andm ) ! outputs |
1874 | | else |
1875 | | !! use diel-average inputs |
1876 | | dms_nlim = zn_dms_din(ji,jj) / (zn_dms_din(ji,jj) + dms_wtkn) |
1877 | | !! |
1878 | | CALL trc_dms_medusa( zn_dms_chn(ji,jj), zn_dms_chd(ji,jj), & ! inputs |
1879 | | zn_dms_mld(ji,jj), zn_dms_qsr(ji,jj), & ! inputs |
1880 | | zn_dms_din(ji,jj), dms_nlim, & ! inputs |
1881 | | dms_andr, dms_simo, dms_aran, dms_hall, dms_andm ) ! outputs |
1882 | | endif |
1883 | | !! |
1884 | | !! assign correct output to variable passed to atmosphere |
1885 | | if (jdms_model .eq. 1) then |
1886 | | dms_surf = dms_andr |
1887 | | elseif (jdms_model .eq. 2) then |
1888 | | dms_surf = dms_simo |
1889 | | elseif (jdms_model .eq. 3) then |
1890 | | dms_surf = dms_aran |
1891 | | elseif (jdms_model .eq. 4) then |
1892 | | dms_surf = dms_hall |
1893 | | elseif (jdms_model .eq. 5) then |
1894 | | dms_surf = dms_andm |
1895 | | endif |
1896 | | !! |
1897 | | !! 2D diag through iom_use |
1898 | | IF( lk_iomput ) THEN |
1899 | | IF( med_diag%DMS_SURF%dgsave ) THEN |
1900 | | dms_surf2d(ji,jj) = dms_surf |
1901 | | ENDIF |
1902 | | IF( med_diag%DMS_ANDR%dgsave ) THEN |
1903 | | dms_andr2d(ji,jj) = dms_andr |
1904 | | ENDIF |
1905 | | IF( med_diag%DMS_SIMO%dgsave ) THEN |
1906 | | dms_simo2d(ji,jj) = dms_simo |
1907 | | ENDIF |
1908 | | IF( med_diag%DMS_ARAN%dgsave ) THEN |
1909 | | dms_aran2d(ji,jj) = dms_aran |
1910 | | ENDIF |
1911 | | IF( med_diag%DMS_HALL%dgsave ) THEN |
1912 | | dms_hall2d(ji,jj) = dms_hall |
1913 | | ENDIF |
1914 | | IF( med_diag%DMS_ANDM%dgsave ) THEN |
1915 | | dms_andm2d(ji,jj) = dms_andm |
1916 | | ENDIF |
1917 | | # if defined key_debug_medusa |
1918 | | IF (lwp) write (numout,*) 'trc_bio_medusa: finish calculating dms' |
1919 | | CALL flush(numout) |
1920 | | # endif |
1921 | | ENDIF |
1922 | | !! End iom |
1923 | | ENDIF |
1924 | | !! End DMS Loop |
1925 | | !! |
1926 | | !! store 2D outputs |
1927 | | !! |
1928 | | !! JPALM -- 17-11-16 -- put fgco2 out of diag request |
1929 | | !! is needed for coupling; pass through restart |
1930 | | !! IF( med_diag%FGCO2%dgsave ) THEN |
1931 | | !! convert from mol/m2/day to kg/m2/s |
1932 | | fgco2(ji,jj) = f_co2flux * fthk * CO2flux_conv !! mmol-C/m3/d -> kg-CO2/m2/s |
1933 | | !! ENDIF |
1934 | | IF ( lk_iomput ) THEN |
1935 | | IF( med_diag%ATM_PCO2%dgsave ) THEN |
1936 | | f_pco2a2d(ji,jj) = f_pco2atm |
1937 | | ENDIF |
1938 | | IF( med_diag%OCN_PCO2%dgsave ) THEN |
1939 | | f_pco2w2d(ji,jj) = f_pco2w |
1940 | | ENDIF |
1941 | | IF( med_diag%CO2FLUX%dgsave ) THEN |
1942 | | f_co2flux2d(ji,jj) = f_co2flux * fthk !! mmol/m3/d -> mmol/m2/d |
1943 | | ENDIF |
1944 | | IF( med_diag%TCO2%dgsave ) THEN |
1945 | | f_TDIC2d(ji,jj) = f_TDIC |
1946 | | ENDIF |
1947 | | IF( med_diag%TALK%dgsave ) THEN |
1948 | | f_TALK2d(ji,jj) = f_TALK |
1949 | | ENDIF |
1950 | | IF( med_diag%KW660%dgsave ) THEN |
1951 | | f_kw6602d(ji,jj) = f_kw660 |
1952 | | ENDIF |
1953 | | IF( med_diag%ATM_PP0%dgsave ) THEN |
1954 | | f_pp02d(ji,jj) = f_pp0 |
1955 | | ENDIF |
1956 | | IF( med_diag%O2FLUX%dgsave ) THEN |
1957 | | f_o2flux2d(ji,jj) = f_o2flux |
1958 | | ENDIF |
1959 | | IF( med_diag%O2SAT%dgsave ) THEN |
1960 | | f_o2sat2d(ji,jj) = f_o2sat |
1961 | | ENDIF |
1962 | | !! AXY (24/11/16): add in extra MOCSY diagnostics |
1963 | | IF( med_diag%ATM_XCO2%dgsave ) THEN |
1964 | | f_xco2a_2d(ji,jj) = f_xco2a |
1965 | | ENDIF |
1966 | | IF( med_diag%OCN_FCO2%dgsave ) THEN |
1967 | | f_fco2w_2d(ji,jj) = f_fco2w |
1968 | | ENDIF |
1969 | | IF( med_diag%ATM_FCO2%dgsave ) THEN |
1970 | | f_fco2a_2d(ji,jj) = f_fco2atm |
1971 | | ENDIF |
1972 | | IF( med_diag%OCN_RHOSW%dgsave ) THEN |
1973 | | f_ocnrhosw_2d(ji,jj) = f_rhosw |
1974 | | ENDIF |
1975 | | IF( med_diag%OCN_SCHCO2%dgsave ) THEN |
1976 | | f_ocnschco2_2d(ji,jj) = f_schmidtco2 |
1977 | | ENDIF |
1978 | | IF( med_diag%OCN_KWCO2%dgsave ) THEN |
1979 | | f_ocnkwco2_2d(ji,jj) = f_kwco2 |
1980 | | ENDIF |
1981 | | IF( med_diag%OCN_K0%dgsave ) THEN |
1982 | | f_ocnk0_2d(ji,jj) = f_K0 |
1983 | | ENDIF |
1984 | | IF( med_diag%CO2STARAIR%dgsave ) THEN |
1985 | | f_co2starair_2d(ji,jj) = f_co2starair |
1986 | | ENDIF |
1987 | | IF( med_diag%OCN_DPCO2%dgsave ) THEN |
1988 | | f_ocndpco2_2d(ji,jj) = f_dpco2 |
1989 | | ENDIF |
1990 | | ENDIF |
1991 | | !! |
1992 | | endif |
1993 | | !! End jk = 1 loop within ROAM key |
1994 | | |
1995 | | !! AXY (11/11/16): CMIP6 oxygen saturation 3D diagnostic |
1996 | | IF ( med_diag%O2SAT3%dgsave ) THEN |
1997 | | call oxy_sato( ztmp, zsal, f_o2sat3 ) |
1998 | | o2sat3(ji, jj, jk) = f_o2sat3 |
1999 | | ENDIF |
2000 | | |
2001 | | # endif |
2002 | | |
2003 | | if ( jk .eq. 1 ) then |
2004 | | !!---------------------------------------------------------------------- |
2005 | | !! River inputs |
2006 | | !!---------------------------------------------------------------------- |
2007 | | !! |
2008 | | !! runoff comes in as kg / m2 / s |
2009 | | !! used and written out as m3 / m2 / d (= m / d) |
2010 | | !! where 1000 kg / m2 / d = 1 m3 / m2 / d = 1 m / d |
2011 | | !! |
2012 | | !! AXY (17/07/14): the compiler doesn't like this line for some reason; |
2013 | | !! as MEDUSA doesn't even use runoff for riverine inputs, |
2014 | | !! a temporary solution is to switch off runoff entirely |
2015 | | !! here; again, this change is one of several that will |
2016 | | !! need revisiting once MEDUSA has bedded down in UKESM1; |
2017 | | !! particularly so if the land scheme provides information |
2018 | | !! concerning nutrient fluxes |
2019 | | !! |
2020 | | !! f_runoff(ji,jj) = sf_rnf(1)%fnow(ji,jj,1) / 1000. * 60. * 60. * 24. |
2021 | | f_runoff(ji,jj) = 0.0 |
2022 | | !! |
2023 | | !! nutrients are added via rivers to the model in one of two ways: |
2024 | | !! 1. via river concentration; i.e. the average nutrient concentration |
2025 | | !! of a river water is described by a spatial file, and this is |
2026 | | !! multiplied by runoff to give a nutrient flux |
2027 | | !! 2. via direct river flux; i.e. the average nutrient flux due to |
2028 | | !! rivers is described by a spatial file, and this is simply applied |
2029 | | !! as a direct nutrient flux (i.e. it does not relate or respond to |
2030 | | !! model runoff) |
2031 | | !! nutrient fields are derived from the GlobalNEWS 2 database; carbon and |
2032 | | !! alkalinity are derived from continent-scale DIC estimates (Huang et al., |
2033 | | !! 2012) and some Arctic river alkalinity estimates (Katya?) |
2034 | | !! |
2035 | | !! as of 19/07/12, riverine nutrients can now be spread vertically across |
2036 | | !! several grid cells rather than just poured into the surface box; this |
2037 | | !! block of code is still executed, however, to set up the total amounts |
2038 | | !! of nutrient entering via rivers |
2039 | | !! |
2040 | | !! nitrogen |
2041 | | if (jriver_n .eq. 1) then |
2042 | | !! river concentration specified; use runoff to calculate input |
2043 | | f_riv_n(ji,jj) = f_runoff(ji,jj) * riv_n(ji,jj) |
2044 | | elseif (jriver_n .eq. 2) then |
2045 | | !! river flux specified; independent of runoff |
2046 | | f_riv_n(ji,jj) = riv_n(ji,jj) |
2047 | | endif |
2048 | | !! |
2049 | | !! silicon |
2050 | | if (jriver_si .eq. 1) then |
2051 | | !! river concentration specified; use runoff to calculate input |
2052 | | f_riv_si(ji,jj) = f_runoff(ji,jj) * riv_si(ji,jj) |
2053 | | elseif (jriver_si .eq. 2) then |
2054 | | !! river flux specified; independent of runoff |
2055 | | f_riv_si(ji,jj) = riv_si(ji,jj) |
2056 | | endif |
2057 | | !! |
2058 | | !! carbon |
2059 | | if (jriver_c .eq. 1) then |
2060 | | !! river concentration specified; use runoff to calculate input |
2061 | | f_riv_c(ji,jj) = f_runoff(ji,jj) * riv_c(ji,jj) |
2062 | | elseif (jriver_c .eq. 2) then |
2063 | | !! river flux specified; independent of runoff |
2064 | | f_riv_c(ji,jj) = riv_c(ji,jj) |
2065 | | endif |
2066 | | !! |
2067 | | !! alkalinity |
2068 | | if (jriver_alk .eq. 1) then |
2069 | | !! river concentration specified; use runoff to calculate input |
2070 | | f_riv_alk(ji,jj) = f_runoff(ji,jj) * riv_alk(ji,jj) |
2071 | | elseif (jriver_alk .eq. 2) then |
2072 | | !! river flux specified; independent of runoff |
2073 | | f_riv_alk(ji,jj) = riv_alk(ji,jj) |
2074 | | endif |
2075 | | |
2076 | | endif |
2077 | | |
2078 | | !!---------------------------------------------------------------------- |
2079 | | !! Chlorophyll calculations |
2080 | | !!---------------------------------------------------------------------- |
2081 | | !! |
2082 | | !! non-diatoms |
2083 | | if (zphn.GT.rsmall) then |
2084 | | fthetan = max(tiny(zchn), (zchn * xxi) / (zphn + tiny(zphn))) |
2085 | | faln = xaln * fthetan |
2086 | | else |
2087 | | fthetan = 0. |
2088 | | faln = 0. |
2089 | | endif |
2090 | | !! |
2091 | | !! diatoms |
2092 | | if (zphd.GT.rsmall) then |
2093 | | fthetad = max(tiny(zchd), (zchd * xxi) / (zphd + tiny(zphd))) |
2094 | | fald = xald * fthetad |
2095 | | else |
2096 | | fthetad = 0. |
2097 | | fald = 0. |
2098 | | endif |
2099 | | |
2100 | | # if defined key_debug_medusa |
2101 | | !! report biological calculations |
2102 | | if (idf.eq.1.AND.idfval.eq.1) then |
2103 | | IF (lwp) write (numout,*) '------------------------------' |
2104 | | IF (lwp) write (numout,*) 'faln(',jk,') = ', faln |
2105 | | IF (lwp) write (numout,*) 'fald(',jk,') = ', fald |
2106 | | endif |
2107 | | # endif |
2108 | | |
2109 | | !!---------------------------------------------------------------------- |
2110 | | !! Phytoplankton light limitation |
2111 | | !!---------------------------------------------------------------------- |
2112 | | !! |
2113 | | !! It is assumed xpar is the depth-averaged (vertical layer) PAR |
2114 | | !! Light limitation (check self-shading) in W/m2 |
2115 | | !! |
2116 | | !! Note that there is no temperature dependence in phytoplankton |
2117 | | !! growth rate or any other function. |
2118 | | !! In calculation of Chl/Phy ratio tiny(phyto) is introduced to avoid |
2119 | | !! NaNs in case of Phy==0. |
2120 | | !! |
2121 | | !! fthetad and fthetan are Chl:C ratio (gChl/gC) in diat and non-diat: |
2122 | | !! for 1:1 Chl:P ratio (mgChl/mmolN) theta=0.012 |
2123 | | !! |
2124 | | !! AXY (16/07/09) |
2125 | | !! temperature for new Eppley style phytoplankton growth |
2126 | | loc_T = tsn(ji,jj,jk,jp_tem) |
2127 | | fun_T = 1.066**(1.0 * loc_T) |
2128 | | !! AXY (16/05/11): add in new Q10 (1.5, not 2.0) for |
2129 | | !phytoplankton |
2130 | | !! growth; remin. unaffected |
2131 | | fun_Q10 = jq10**((loc_T - 0.0) / 10.0) |
2132 | | if (jphy.eq.1) then |
2133 | | xvpnT = xvpn * fun_T |
2134 | | xvpdT = xvpd * fun_T |
2135 | | elseif (jphy.eq.2) then |
2136 | | xvpnT = xvpn * fun_Q10 |
2137 | | xvpdT = xvpd * fun_Q10 |
2138 | | else |
2139 | | xvpnT = xvpn |
2140 | | xvpdT = xvpd |
2141 | | endif |
2142 | | !! |
2143 | | !! non-diatoms |
2144 | | fchn1 = (xvpnT * xvpnT) + (faln * faln * xpar(ji,jj,jk) * xpar(ji,jj,jk)) |
2145 | | if (fchn1.GT.rsmall) then |
2146 | | fchn = xvpnT / (sqrt(fchn1) + tiny(fchn1)) |
2147 | | else |
2148 | | fchn = 0. |
2149 | | endif |
2150 | | fjln = fchn * faln * xpar(ji,jj,jk) !! non-diatom J term |
2151 | | fjlim_pn = fjln / xvpnT |
2152 | | !! |
2153 | | !! diatoms |
2154 | | fchd1 = (xvpdT * xvpdT) + (fald * fald * xpar(ji,jj,jk) * xpar(ji,jj,jk)) |
2155 | | if (fchd1.GT.rsmall) then |
2156 | | fchd = xvpdT / (sqrt(fchd1) + tiny(fchd1)) |
2157 | | else |
2158 | | fchd = 0. |
2159 | | endif |
2160 | | fjld = fchd * fald * xpar(ji,jj,jk) !! diatom J term |
2161 | | fjlim_pd = fjld / xvpdT |
2162 | | |
2163 | | # if defined key_debug_medusa |
2164 | | !! report phytoplankton light limitation |
2165 | | if (idf.eq.1.AND.idfval.eq.1) then |
2166 | | IF (lwp) write (numout,*) '------------------------------' |
2167 | | IF (lwp) write (numout,*) 'fchn(',jk,') = ', fchn |
2168 | | IF (lwp) write (numout,*) 'fchd(',jk,') = ', fchd |
2169 | | IF (lwp) write (numout,*) 'fjln(',jk,') = ', fjln |
2170 | | IF (lwp) write (numout,*) 'fjld(',jk,') = ', fjld |
2171 | | endif |
2172 | | # endif |
2173 | | |
2174 | | !!---------------------------------------------------------------------- |
2175 | | !! Phytoplankton nutrient limitation |
2176 | | !!---------------------------------------------------------------------- |
2177 | | !! |
2178 | | !! non-diatoms (N, Fe) |
2179 | | fnln = zdin / (zdin + xnln) !! non-diatom Qn term |
2180 | | ffln = zfer / (zfer + xfln) !! non-diatom Qf term |
2181 | | !! |
2182 | | !! diatoms (N, Si, Fe) |
2183 | | fnld = zdin / (zdin + xnld) !! diatom Qn term |
2184 | | fsld = zsil / (zsil + xsld) !! diatom Qs term |
2185 | | ffld = zfer / (zfer + xfld) !! diatom Qf term |
2186 | | |
2187 | | # if defined key_debug_medusa |
2188 | | !! report phytoplankton nutrient limitation |
2189 | | if (idf.eq.1.AND.idfval.eq.1) then |
2190 | | IF (lwp) write (numout,*) '------------------------------' |
2191 | | IF (lwp) write (numout,*) 'fnln(',jk,') = ', fnln |
2192 | | IF (lwp) write (numout,*) 'fnld(',jk,') = ', fnld |
2193 | | IF (lwp) write (numout,*) 'ffln(',jk,') = ', ffln |
2194 | | IF (lwp) write (numout,*) 'ffld(',jk,') = ', ffld |
2195 | | IF (lwp) write (numout,*) 'fsld(',jk,') = ', fsld |
2196 | | endif |
2197 | | # endif |
2198 | | |
2199 | | !!---------------------------------------------------------------------- |
2200 | | !! Primary production (non-diatoms) |
2201 | | !! (note: still needs multiplying by phytoplankton concentration) |
2202 | | !!---------------------------------------------------------------------- |
2203 | | !! |
2204 | | if (jliebig .eq. 0) then |
2205 | | !! multiplicative nutrient limitation |
2206 | | fpnlim = fnln * ffln |
2207 | | elseif (jliebig .eq. 1) then |
2208 | | !! Liebig Law (= most limiting) nutrient limitation |
2209 | | fpnlim = min(fnln, ffln) |
2210 | | endif |
2211 | | fprn = fjln * fpnlim |
2212 | | |
2213 | | !!---------------------------------------------------------------------- |
2214 | | !! Primary production (diatoms) |
2215 | | !! (note: still needs multiplying by phytoplankton concentration) |
2216 | | !! |
2217 | | !! production here is split between nitrogen production and that of |
2218 | | !! silicon; depending upon the "intracellular" ratio of Si:N, model |
2219 | | !! diatoms will uptake nitrogen/silicon differentially; this borrows |
2220 | | !! from the diatom model of Mongin et al. (2006) |
2221 | | !!---------------------------------------------------------------------- |
2222 | | !! |
2223 | | if (jliebig .eq. 0) then |
2224 | | !! multiplicative nutrient limitation |
2225 | | fpdlim = fnld * ffld |
2226 | | elseif (jliebig .eq. 1) then |
2227 | | !! Liebig Law (= most limiting) nutrient limitation |
2228 | | fpdlim = min(fnld, ffld) |
2229 | | endif |
2230 | | !! |
2231 | | if (zphd.GT.rsmall .AND. zpds.GT.rsmall) then |
2232 | | !! "intracellular" elemental ratios |
2233 | | ! fsin = zpds / (zphd + tiny(zphd)) |
2234 | | ! fnsi = zphd / (zpds + tiny(zpds)) |
2235 | | fsin = 0.0 |
2236 | | IF( zphd .GT. rsmall) fsin = zpds / zphd |
2237 | | fnsi = 0.0 |
2238 | | IF( zpds .GT. rsmall) fnsi = zphd / zpds |
2239 | | !! AXY (23/02/10): these next variables derive from Mongin et al. (2003) |
2240 | | fsin1 = 3.0 * xsin0 !! = 0.6 |
2241 | | fnsi1 = 1.0 / fsin1 !! = 1.667 |
2242 | | fnsi2 = 1.0 / xsin0 !! = 5.0 |
2243 | | !! |
2244 | | !! conditionalities based on ratios |
2245 | | !! nitrogen (and iron and carbon) |
2246 | | if (fsin.le.xsin0) then |
2247 | | fprd = 0.0 |
2248 | | fsld2 = 0.0 |
2249 | | elseif (fsin.lt.fsin1) then |
2250 | | fprd = xuif * ((fsin - xsin0) / (fsin + tiny(fsin))) * (fjld * fpdlim) |
2251 | | fsld2 = xuif * ((fsin - xsin0) / (fsin + tiny(fsin))) |
2252 | | elseif (fsin.ge.fsin1) then |
2253 | | fprd = (fjld * fpdlim) |
2254 | | fsld2 = 1.0 |
2255 | | endif |
2256 | | !! |
2257 | | !! silicon |
2258 | | if (fsin.lt.fnsi1) then |
2259 | | fprds = (fjld * fsld) |
2260 | | elseif (fsin.lt.fnsi2) then |
2261 | | fprds = xuif * ((fnsi - xnsi0) / (fnsi + tiny(fnsi))) * (fjld * fsld) |
2262 | | else |
2263 | | fprds = 0.0 |
2264 | | endif |
2265 | | else |
2266 | | fsin = 0.0 |
2267 | | fnsi = 0.0 |
2268 | | fprd = 0.0 |
2269 | | fsld2 = 0.0 |
2270 | | fprds = 0.0 |
2271 | | endif |
2272 | | |
2273 | | # if defined key_debug_medusa |
2274 | | !! report phytoplankton growth (including diatom silicon submodel) |
2275 | | if (idf.eq.1.AND.idfval.eq.1) then |
2276 | | IF (lwp) write (numout,*) '------------------------------' |
2277 | | IF (lwp) write (numout,*) 'fsin(',jk,') = ', fsin |
2278 | | IF (lwp) write (numout,*) 'fnsi(',jk,') = ', fnsi |
2279 | | IF (lwp) write (numout,*) 'fsld2(',jk,') = ', fsld2 |
2280 | | IF (lwp) write (numout,*) 'fprn(',jk,') = ', fprn |
2281 | | IF (lwp) write (numout,*) 'fprd(',jk,') = ', fprd |
2282 | | IF (lwp) write (numout,*) 'fprds(',jk,') = ', fprds |
2283 | | endif |
2284 | | # endif |
2285 | | |
2286 | | !!---------------------------------------------------------------------- |
2287 | | !! Mixed layer primary production |
2288 | | !! this block calculates the amount of primary production that occurs |
2289 | | !! within the upper mixed layer; this allows the separate diagnosis |
2290 | | !! of "sub-surface" primary production; it does assume that short- |
2291 | | !! term variability in mixed layer depth doesn't mess with things |
2292 | | !! though |
2293 | | !!---------------------------------------------------------------------- |
2294 | | !! |
2295 | | if (fdep1.le.hmld(ji,jj)) then |
2296 | | !! this level is entirely in the mixed layer |
2297 | | fq0 = 1.0 |
2298 | | elseif (fdep.ge.hmld(ji,jj)) then |
2299 | | !! this level is entirely below the mixed layer |
2300 | | fq0 = 0.0 |
2301 | | else |
2302 | | !! this level straddles the mixed layer |
2303 | | fq0 = (hmld(ji,jj) - fdep) / fthk |
2304 | | endif |
2305 | | !! |
2306 | | fprn_ml(ji,jj) = fprn_ml(ji,jj) + (fprn * zphn * fthk * fq0) |
2307 | | fprd_ml(ji,jj) = fprd_ml(ji,jj) + (fprd * zphd * fthk * fq0) |
2308 | | |
2309 | | !!---------------------------------------------------------------------- |
2310 | | !! Vertical Integral -- |
2311 | | !!---------------------------------------------------------------------- |
2312 | | ftot_pn(ji,jj) = ftot_pn(ji,jj) + (zphn * fthk) !! vertical integral non-diatom phytoplankton |
2313 | | ftot_pd(ji,jj) = ftot_pd(ji,jj) + (zphd * fthk) !! vertical integral diatom phytoplankton |
2314 | | ftot_zmi(ji,jj) = ftot_zmi(ji,jj) + (zzmi * fthk) !! vertical integral microzooplankton |
2315 | | ftot_zme(ji,jj) = ftot_zme(ji,jj) + (zzme * fthk) !! vertical integral mesozooplankton |
2316 | | ftot_det(ji,jj) = ftot_det(ji,jj) + (zdet * fthk) !! vertical integral slow detritus, nitrogen |
2317 | | ftot_dtc(ji,jj) = ftot_dtc(ji,jj) + (zdtc * fthk) !! vertical integral slow detritus, carbon |
2318 | | |
2319 | | !!---------------------------------------------------------------------- |
2320 | | !! More chlorophyll calculations |
2321 | | !!---------------------------------------------------------------------- |
2322 | | !! |
2323 | | !! frn = (xthetam / fthetan) * (fprn / (fthetan * xpar(ji,jj,jk))) |
2324 | | !! frd = (xthetam / fthetad) * (fprd / (fthetad * xpar(ji,jj,jk))) |
2325 | | frn = (xthetam * fchn * fnln * ffln ) / (fthetan + tiny(fthetan)) |
2326 | | !! AXY (12/05/09): there's potentially a problem here; fsld, silicic acid |
2327 | | !! limitation, is used in the following line to regulate chlorophyll |
2328 | | !! growth in a manner that is inconsistent with its use in the regulation |
2329 | | !! of biomass growth; the Mongin term term used in growth is more complex |
2330 | | !! than the simple multiplicative function used below |
2331 | | !! frd = (xthetam * fchd * fnld * ffld * fsld) / (fthetad + tiny(fthetad)) |
2332 | | !! AXY (12/05/09): this replacement line uses the new variable, fsld2, to |
2333 | | !! regulate chlorophyll growth |
2334 | | frd = (xthetamd * fchd * fnld * ffld * fsld2) / (fthetad + tiny(fthetad)) |
2335 | | |
2336 | | # if defined key_debug_medusa |
2337 | | !! report chlorophyll calculations |
2338 | | if (idf.eq.1.AND.idfval.eq.1) then |
2339 | | IF (lwp) write (numout,*) '------------------------------' |
2340 | | IF (lwp) write (numout,*) 'fthetan(',jk,') = ', fthetan |
2341 | | IF (lwp) write (numout,*) 'fthetad(',jk,') = ', fthetad |
2342 | | IF (lwp) write (numout,*) 'frn(',jk,') = ', frn |
2343 | | IF (lwp) write (numout,*) 'frd(',jk,') = ', frd |
2344 | | endif |
2345 | | # endif |
2346 | | |
2347 | | !!---------------------------------------------------------------------- |
2348 | | !! Zooplankton Grazing |
2349 | | !! this code supplements the base grazing model with one that |
2350 | | !! considers the C:N ratio of grazed food and balances this against |
2351 | | !! the requirements of zooplankton growth; this model is derived |
2352 | | !! from that of Anderson & Pondaven (2003) |
2353 | | !! |
2354 | | !! the current version of the code assumes a fixed C:N ratio for |
2355 | | !! detritus (in contrast to Anderson & Pondaven, 2003), though the |
2356 | | !! full equations are retained for future extension |
2357 | | !!---------------------------------------------------------------------- |
2358 | | !! |
2359 | | !!---------------------------------------------------------------------- |
2360 | | !! Microzooplankton first |
2361 | | !!---------------------------------------------------------------------- |
2362 | | !! |
2363 | | fmi1 = (xkmi * xkmi) + (xpmipn * zphn * zphn) + (xpmid * zdet * zdet) |
2364 | | fmi = xgmi * zzmi / fmi1 |
2365 | | fgmipn = fmi * xpmipn * zphn * zphn !! grazing on non-diatoms |
2366 | | fgmid = fmi * xpmid * zdet * zdet !! grazing on detrital nitrogen |
2367 | | # if defined key_roam |
2368 | | fgmidc = rsmall !acc |
2369 | | IF ( zdet .GT. rsmall ) fgmidc = (zdtc / (zdet + tiny(zdet))) * fgmid !! grazing on detrital carbon |
2370 | | # else |
2371 | | !! AXY (26/11/08): implicit detrital carbon change |
2372 | | fgmidc = xthetad * fgmid !! grazing on detrital carbon |
2373 | | # endif |
2374 | | !! |
2375 | | !! which translates to these incoming N and C fluxes |
2376 | | finmi = (1.0 - xphi) * (fgmipn + fgmid) |
2377 | | ficmi = (1.0 - xphi) * ((xthetapn * fgmipn) + fgmidc) |
2378 | | !! |
2379 | | !! the ideal food C:N ratio for microzooplankton |
2380 | | !! xbetan = 0.77; xthetaz = 5.625; xbetac = 0.64; xkc = 0.80 |
2381 | | fstarmi = (xbetan * xthetazmi) / (xbetac * xkc) |
2382 | | !! |
2383 | | !! process these to determine proportioning of grazed N and C |
2384 | | !! (since there is no explicit consideration of respiration, |
2385 | | !! only growth and excretion are calculated here) |
2386 | | fmith = (ficmi / (finmi + tiny(finmi))) |
2387 | | if (fmith.ge.fstarmi) then |
2388 | | fmigrow = xbetan * finmi |
2389 | | fmiexcr = 0.0 |
2390 | | else |
2391 | | fmigrow = (xbetac * xkc * ficmi) / xthetazmi |
2392 | | fmiexcr = ficmi * ((xbetan / (fmith + tiny(fmith))) - ((xbetac * xkc) / xthetazmi)) |
2393 | | endif |
2394 | | # if defined key_roam |
2395 | | fmiresp = (xbetac * ficmi) - (xthetazmi * fmigrow) |
2396 | | # endif |
2397 | | |
2398 | | # if defined key_debug_medusa |
2399 | | !! report microzooplankton grazing |
2400 | | if (idf.eq.1.AND.idfval.eq.1) then |
2401 | | IF (lwp) write (numout,*) '------------------------------' |
2402 | | IF (lwp) write (numout,*) 'fmi1(',jk,') = ', fmi1 |
2403 | | IF (lwp) write (numout,*) 'fmi(',jk,') = ', fmi |
2404 | | IF (lwp) write (numout,*) 'fgmipn(',jk,') = ', fgmipn |
2405 | | IF (lwp) write (numout,*) 'fgmid(',jk,') = ', fgmid |
2406 | | IF (lwp) write (numout,*) 'fgmidc(',jk,') = ', fgmidc |
2407 | | IF (lwp) write (numout,*) 'finmi(',jk,') = ', finmi |
2408 | | IF (lwp) write (numout,*) 'ficmi(',jk,') = ', ficmi |
2409 | | IF (lwp) write (numout,*) 'fstarmi(',jk,') = ', fstarmi |
2410 | | IF (lwp) write (numout,*) 'fmith(',jk,') = ', fmith |
2411 | | IF (lwp) write (numout,*) 'fmigrow(',jk,') = ', fmigrow |
2412 | | IF (lwp) write (numout,*) 'fmiexcr(',jk,') = ', fmiexcr |
2413 | | # if defined key_roam |
2414 | | IF (lwp) write (numout,*) 'fmiresp(',jk,') = ', fmiresp |
2415 | | # endif |
2416 | | endif |
2417 | | # endif |
2418 | | |
2419 | | !!---------------------------------------------------------------------- |
2420 | | !! Mesozooplankton second |
2421 | | !!---------------------------------------------------------------------- |
2422 | | !! |
2423 | | fme1 = (xkme * xkme) + (xpmepn * zphn * zphn) + (xpmepd * zphd * zphd) + & |
2424 | | (xpmezmi * zzmi * zzmi) + (xpmed * zdet * zdet) |
2425 | | fme = xgme * zzme / fme1 |
2426 | | fgmepn = fme * xpmepn * zphn * zphn !! grazing on non-diatoms |
2427 | | fgmepd = fme * xpmepd * zphd * zphd !! grazing on diatoms |
2428 | | fgmepds = fsin * fgmepd !! grazing on diatom silicon |
2429 | | fgmezmi = fme * xpmezmi * zzmi * zzmi !! grazing on microzooplankton |
2430 | | fgmed = fme * xpmed * zdet * zdet !! grazing on detrital nitrogen |
2431 | | # if defined key_roam |
2432 | | fgmedc = rsmall !acc |
2433 | | IF ( zdet .GT. rsmall ) fgmedc = (zdtc / (zdet + tiny(zdet))) * fgmed !! grazing on detrital carbon |
2434 | | # else |
2435 | | !! AXY (26/11/08): implicit detrital carbon change |
2436 | | fgmedc = xthetad * fgmed !! grazing on detrital carbon |
2437 | | # endif |
2438 | | !! |
2439 | | !! which translates to these incoming N and C fluxes |
2440 | | finme = (1.0 - xphi) * (fgmepn + fgmepd + fgmezmi + fgmed) |
2441 | | ficme = (1.0 - xphi) * ((xthetapn * fgmepn) + (xthetapd * fgmepd) + & |
2442 | | (xthetazmi * fgmezmi) + fgmedc) |
2443 | | !! |
2444 | | !! the ideal food C:N ratio for mesozooplankton |
2445 | | !! xbetan = 0.77; xthetaz = 5.625; xbetac = 0.64; xkc = 0.80 |
2446 | | fstarme = (xbetan * xthetazme) / (xbetac * xkc) |
2447 | | !! |
2448 | | !! process these to determine proportioning of grazed N and C |
2449 | | !! (since there is no explicit consideration of respiration, |
2450 | | !! only growth and excretion are calculated here) |
2451 | | fmeth = (ficme / (finme + tiny(finme))) |
2452 | | if (fmeth.ge.fstarme) then |
2453 | | fmegrow = xbetan * finme |
2454 | | fmeexcr = 0.0 |
2455 | | else |
2456 | | fmegrow = (xbetac * xkc * ficme) / xthetazme |
2457 | | fmeexcr = ficme * ((xbetan / (fmeth + tiny(fmeth))) - ((xbetac * xkc) / xthetazme)) |
2458 | | endif |
2459 | | # if defined key_roam |
2460 | | fmeresp = (xbetac * ficme) - (xthetazme * fmegrow) |
2461 | | # endif |
2462 | | |
2463 | | # if defined key_debug_medusa |
2464 | | !! report mesozooplankton grazing |
2465 | | if (idf.eq.1.AND.idfval.eq.1) then |
2466 | | IF (lwp) write (numout,*) '------------------------------' |
2467 | | IF (lwp) write (numout,*) 'fme1(',jk,') = ', fme1 |
2468 | | IF (lwp) write (numout,*) 'fme(',jk,') = ', fme |
2469 | | IF (lwp) write (numout,*) 'fgmepn(',jk,') = ', fgmepn |
2470 | | IF (lwp) write (numout,*) 'fgmepd(',jk,') = ', fgmepd |
2471 | | IF (lwp) write (numout,*) 'fgmepds(',jk,') = ', fgmepds |
2472 | | IF (lwp) write (numout,*) 'fgmezmi(',jk,') = ', fgmezmi |
2473 | | IF (lwp) write (numout,*) 'fgmed(',jk,') = ', fgmed |
2474 | | IF (lwp) write (numout,*) 'fgmedc(',jk,') = ', fgmedc |
2475 | | IF (lwp) write (numout,*) 'finme(',jk,') = ', finme |
2476 | | IF (lwp) write (numout,*) 'ficme(',jk,') = ', ficme |
2477 | | IF (lwp) write (numout,*) 'fstarme(',jk,') = ', fstarme |
2478 | | IF (lwp) write (numout,*) 'fmeth(',jk,') = ', fmeth |
2479 | | IF (lwp) write (numout,*) 'fmegrow(',jk,') = ', fmegrow |
2480 | | IF (lwp) write (numout,*) 'fmeexcr(',jk,') = ', fmeexcr |
2481 | | # if defined key_roam |
2482 | | IF (lwp) write (numout,*) 'fmeresp(',jk,') = ', fmeresp |
2483 | | # endif |
2484 | | endif |
2485 | | # endif |
2486 | | |
2487 | | fzmi_i(ji,jj) = fzmi_i(ji,jj) + fthk * ( & |
2488 | | fgmipn + fgmid ) |
2489 | | fzmi_o(ji,jj) = fzmi_o(ji,jj) + fthk * ( & |
2490 | | fmigrow + (xphi * (fgmipn + fgmid)) + fmiexcr + ((1.0 - xbetan) * finmi) ) |
2491 | | fzme_i(ji,jj) = fzme_i(ji,jj) + fthk * ( & |
2492 | | fgmepn + fgmepd + fgmezmi + fgmed ) |
2493 | | fzme_o(ji,jj) = fzme_o(ji,jj) + fthk * ( & |
2494 | | fmegrow + (xphi * (fgmepn + fgmepd + fgmezmi + fgmed)) + fmeexcr + ((1.0 - xbetan) * finme) ) |
2495 | | |
2496 | | !!---------------------------------------------------------------------- |
2497 | | !! Plankton metabolic losses |
2498 | | !! Linear loss processes assumed to be metabolic in origin |
2499 | | !!---------------------------------------------------------------------- |
2500 | | !! |
2501 | | fdpn2 = xmetapn * zphn |
2502 | | fdpd2 = xmetapd * zphd |
2503 | | fdpds2 = xmetapd * zpds |
2504 | | fdzmi2 = xmetazmi * zzmi |
2505 | | fdzme2 = xmetazme * zzme |
2506 | | |
2507 | | !!---------------------------------------------------------------------- |
2508 | | !! Plankton mortality losses |
2509 | | !! EKP (26/02/09): phytoplankton hyperbolic mortality term introduced |
2510 | | !! to improve performance in gyres |
2511 | | !!---------------------------------------------------------------------- |
2512 | | !! |
2513 | | !! non-diatom phytoplankton |
2514 | | if (jmpn.eq.1) fdpn = xmpn * zphn !! linear |
2515 | | if (jmpn.eq.2) fdpn = xmpn * zphn * zphn !! quadratic |
2516 | | if (jmpn.eq.3) fdpn = xmpn * zphn * & !! hyperbolic |
2517 | | (zphn / (xkphn + zphn)) |
2518 | | if (jmpn.eq.4) fdpn = xmpn * zphn * & !! sigmoid |
2519 | | ((zphn * zphn) / (xkphn + (zphn * zphn))) |
2520 | | !! |
2521 | | !! diatom phytoplankton |
2522 | | if (jmpd.eq.1) fdpd = xmpd * zphd !! linear |
2523 | | if (jmpd.eq.2) fdpd = xmpd * zphd * zphd !! quadratic |
2524 | | if (jmpd.eq.3) fdpd = xmpd * zphd * & !! hyperbolic |
2525 | | (zphd / (xkphd + zphd)) |
2526 | | if (jmpd.eq.4) fdpd = xmpd * zphd * & !! sigmoid |
2527 | | ((zphd * zphd) / (xkphd + (zphd * zphd))) |
2528 | | fdpds = fdpd * fsin |
2529 | | !! |
2530 | | !! microzooplankton |
2531 | | if (jmzmi.eq.1) fdzmi = xmzmi * zzmi !! linear |
2532 | | if (jmzmi.eq.2) fdzmi = xmzmi * zzmi * zzmi !! quadratic |
2533 | | if (jmzmi.eq.3) fdzmi = xmzmi * zzmi * & !! hyperbolic |
2534 | | (zzmi / (xkzmi + zzmi)) |
2535 | | if (jmzmi.eq.4) fdzmi = xmzmi * zzmi * & !! sigmoid |
2536 | | ((zzmi * zzmi) / (xkzmi + (zzmi * zzmi))) |
2537 | | !! |
2538 | | !! mesozooplankton |
2539 | | if (jmzme.eq.1) fdzme = xmzme * zzme !! linear |
2540 | | if (jmzme.eq.2) fdzme = xmzme * zzme * zzme !! quadratic |
2541 | | if (jmzme.eq.3) fdzme = xmzme * zzme * & !! hyperbolic |
2542 | | (zzme / (xkzme + zzme)) |
2543 | | if (jmzme.eq.4) fdzme = xmzme * zzme * & !! sigmoid |
2544 | | ((zzme * zzme) / (xkzme + (zzme * zzme))) |
2545 | | |
2546 | | !!---------------------------------------------------------------------- |
2547 | | !! Detritus remineralisation |
2548 | | !! Constant or temperature-dependent |
2549 | | !!---------------------------------------------------------------------- |
2550 | | !! |
2551 | | if (jmd.eq.1) then |
2552 | | !! temperature-dependent |
2553 | | fdd = xmd * fun_T * zdet |
2554 | | # if defined key_roam |
2555 | | fddc = xmdc * fun_T * zdtc |
2556 | | # endif |
2557 | | elseif (jmd.eq.2) then |
2558 | | !! AXY (16/05/13): add in Q10-based parameterisation (def in nmlst) |
2559 | | !! temperature-dependent |
2560 | | fdd = xmd * fun_Q10 * zdet |
2561 | | # if defined key_roam |
2562 | | fddc = xmdc * fun_Q10 * zdtc |
2563 | | # endif |
2564 | | else |
2565 | | !! temperature-independent |
2566 | | fdd = xmd * zdet |
2567 | | # if defined key_roam |
2568 | | fddc = xmdc * zdtc |
2569 | | # endif |
2570 | | endif |
2571 | | !! |
2572 | | !! AXY (22/07/09): accelerate detrital remineralisation in the bottom box |
2573 | | if ((jk.eq.jmbathy) .and. jsfd.eq.1) then |
2574 | | fdd = 1.0 * zdet |
2575 | | # if defined key_roam |
2576 | | fddc = 1.0 * zdtc |
2577 | | # endif |
2578 | | endif |
2579 | | |
2580 | | # if defined key_debug_medusa |
2581 | | !! report plankton mortality and remineralisation |
2582 | | if (idf.eq.1.AND.idfval.eq.1) then |
2583 | | IF (lwp) write (numout,*) '------------------------------' |
2584 | | IF (lwp) write (numout,*) 'fdpn2(',jk,') = ', fdpn2 |
2585 | | IF (lwp) write (numout,*) 'fdpd2(',jk,') = ', fdpd2 |
2586 | | IF (lwp) write (numout,*) 'fdpds2(',jk,')= ', fdpds2 |
2587 | | IF (lwp) write (numout,*) 'fdzmi2(',jk,')= ', fdzmi2 |
2588 | | IF (lwp) write (numout,*) 'fdzme2(',jk,')= ', fdzme2 |
2589 | | IF (lwp) write (numout,*) 'fdpn(',jk,') = ', fdpn |
2590 | | IF (lwp) write (numout,*) 'fdpd(',jk,') = ', fdpd |
2591 | | IF (lwp) write (numout,*) 'fdpds(',jk,') = ', fdpds |
2592 | | IF (lwp) write (numout,*) 'fdzmi(',jk,') = ', fdzmi |
2593 | | IF (lwp) write (numout,*) 'fdzme(',jk,') = ', fdzme |
2594 | | IF (lwp) write (numout,*) 'fdd(',jk,') = ', fdd |
2595 | | # if defined key_roam |
2596 | | IF (lwp) write (numout,*) 'fddc(',jk,') = ', fddc |
2597 | | # endif |
2598 | | endif |
2599 | | # endif |
2600 | | |
2601 | | !!---------------------------------------------------------------------- |
2602 | | !! Detritus addition to benthos |
2603 | | !! If activated, slow detritus in the bottom box will enter the |
2604 | | !! benthic pool |
2605 | | !!---------------------------------------------------------------------- |
2606 | | !! |
2607 | | if ((jk.eq.jmbathy) .and. jorgben.eq.1) then |
2608 | | !! this is the BOTTOM OCEAN BOX -> into the benthic pool! |
2609 | | !! |
2610 | | f_sbenin_n(ji,jj) = (zdet * vsed * 86400.) |
2611 | | f_sbenin_fe(ji,jj) = (zdet * vsed * 86400. * xrfn) |
2612 | | # if defined key_roam |
2613 | | f_sbenin_c(ji,jj) = (zdtc * vsed * 86400.) |
2614 | | # else |
2615 | | f_sbenin_c(ji,jj) = (zdet * vsed * 86400. * xthetad) |
2616 | | # endif |
2617 | | endif |
2618 | | |
2619 | | !!---------------------------------------------------------------------- |
2620 | | !! Iron chemistry and fractionation |
2621 | | !! following the Parekh et al. (2004) scheme adopted by the Met. |
2622 | | !! Office, Medusa models total iron but considers "free" and |
2623 | | !! ligand-bound forms for the purposes of scavenging (only "free" |
2624 | | !! iron can be scavenged |
2625 | | !!---------------------------------------------------------------------- |
2626 | | !! |
2627 | | !! total iron concentration (mmol Fe / m3 -> umol Fe / m3) |
2628 | | xFeT = zfer * 1.e3 |
2629 | | !! |
2630 | | !! calculate fractionation (based on Diat-HadOCC; in turn based on Parekh et al., 2004) |
2631 | | xb_coef_tmp = xk_FeL * (xLgT - xFeT) - 1.0 |
2632 | | xb2M4ac = max(((xb_coef_tmp * xb_coef_tmp) + (4.0 * xk_FeL * xLgT)), 0.0) |
2633 | | !! |
2634 | | !! "free" ligand concentration |
2635 | | xLgF = 0.5 * (xb_coef_tmp + (xb2M4ac**0.5)) / xk_FeL |
2636 | | !! |
2637 | | !! ligand-bound iron concentration |
2638 | | xFeL = xLgT - xLgF |
2639 | | !! |
2640 | | !! "free" iron concentration (and convert to mmol Fe / m3) |
2641 | | xFeF = (xFeT - xFeL) * 1.e-3 |
2642 | | xFree(ji,jj)= xFeF / (zfer + tiny(zfer)) |
2643 | | !! |
2644 | | !! scavenging of iron (multiple schemes); I'm only really happy with the |
2645 | | !! first one at the moment - the others involve assumptions (sometimes |
2646 | | !! guessed at by me) that are potentially questionable |
2647 | | !! |
2648 | | if (jiron.eq.1) then |
2649 | | !!---------------------------------------------------------------------- |
2650 | | !! Scheme 1: Dutkiewicz et al. (2005) |
2651 | | !! This scheme includes a single scavenging term based solely on a |
2652 | | !! fixed rate and the availablility of "free" iron |
2653 | | !!---------------------------------------------------------------------- |
2654 | | !! |
2655 | | ffescav = xk_sc_Fe * xFeF ! = mmol/m3/d |
2656 | | !! |
2657 | | !!---------------------------------------------------------------------- |
2658 | | !! |
2659 | | !! Mick's code contains a further (optional) implicit "scavenging" of |
2660 | | !! iron that sets an upper bound on "free" iron concentration, and |
2661 | | !! essentially caps the concentration of total iron as xFeL + "free" |
2662 | | !! iron; since the former is constrained by a fixed total ligand |
2663 | | !! concentration (= 1.0 umol/m3), and the latter isn't allowed above |
2664 | | !! this upper bound, total iron is constrained to a maximum of ... |
2665 | | !! |
2666 | | !! xFeL + min(xFeF, 0.3 umol/m3) = 1.0 + 0.3 = 1.3 umol / m3 |
2667 | | !! |
2668 | | !! In Mick's code, the actual value of total iron is reset to this |
2669 | | !! sum (i.e. TFe = FeL + Fe'; but Fe' <= 0.3 umol/m3); this isn't |
2670 | | !! our favoured approach to tracer updating here (not least because |
2671 | | !! of the leapfrog), so here the amount scavenged is augmented by an |
2672 | | !! additional amount that serves to drag total iron back towards that |
2673 | | !! expected from this limitation on iron concentration ... |
2674 | | !! |
2675 | | xmaxFeF = min((xFeF * 1.e3), 0.3) ! = umol/m3 |
2676 | | !! |
2677 | | !! Here, the difference between current total Fe and (FeL + Fe') is |
2678 | | !! calculated and added to the scavenging flux already calculated |
2679 | | !! above ... |
2680 | | !! |
2681 | | fdeltaFe = (xFeT - (xFeL + xmaxFeF)) * 1.e-3 ! = mmol/m3 |
2682 | | !! |
2683 | | !! This assumes that the "excess" iron is dissipated with a time- |
2684 | | !! scale of 1 day; seems reasonable to me ... (famous last words) |
2685 | | !! |
2686 | | ffescav = ffescav + fdeltaFe ! = mmol/m3/d |
2687 | | !! |
2688 | | # if defined key_deep_fe_fix |
2689 | | !! AXY (17/01/13) |
2690 | | !! stop scavenging for iron concentrations below 0.5 umol / m3 |
2691 | | !! at depths greater than 1000 m; this aims to end MEDUSA's |
2692 | | !! continual loss of iron at depth without impacting things |
2693 | | !! at the surface too much; the justification for this is that |
2694 | | !! it appears to be what Mick Follows et al. do in their work |
2695 | | !! (as evidenced by the iron initial condition they supplied |
2696 | | !! me with); to be honest, it looks like Follow et al. do this |
2697 | | !! at shallower depths than 1000 m, but I'll stick with this |
2698 | | !! for now; I suspect that this seemingly arbitrary approach |
2699 | | !! effectively "parameterises" the particle-based scavenging |
2700 | | !! rates that other models use (i.e. at depth there are no |
2701 | | !! sinking particles, so scavenging stops); it might be fun |
2702 | | !! justifying this in a paper though! |
2703 | | !! |
2704 | | if ((fdep.gt.1000.) .and. (xFeT.lt.0.5)) then |
2705 | | ffescav = 0. |
2706 | | endif |
2707 | | # endif |
2708 | | !! |
2709 | | elseif (jiron.eq.2) then |
2710 | | !!---------------------------------------------------------------------- |
2711 | | !! Scheme 2: Moore et al. (2004) |
2712 | | !! This scheme includes a single scavenging term that accounts for |
2713 | | !! both suspended and sinking particles in the water column; this |
2714 | | !! term scavenges total iron rather than "free" iron |
2715 | | !!---------------------------------------------------------------------- |
2716 | | !! |
2717 | | !! total iron concentration (mmol Fe / m3 -> umol Fe / m3) |
2718 | | xFeT = zfer * 1.e3 |
2719 | | !! |
2720 | | !! this has a base scavenging rate (12% / y) which is modified by local |
2721 | | !! particle concentration and sinking flux (and dust - but I'm ignoring |
2722 | | !! that here for now) and which is accelerated when Fe concentration gets |
2723 | | !! 0.6 nM (= 0.6 umol/m3 = 0.0006 mmol/m3), and decreased as concentrations |
2724 | | !! below 0.4 nM (= 0.4 umol/m3 = 0.0004 mmol/m3) |
2725 | | !! |
2726 | | !! base scavenging rate (0.12 / y) |
2727 | | fbase_scav = 0.12 / 365.25 |
2728 | | !! |
2729 | | !! calculate sinking particle part of scaling factor |
2730 | | !! this takes local fast sinking carbon (mmol C / m2 / d) and |
2731 | | !! gets it into nmol C / cm3 / s ("rdt" below is the number of seconds in |
2732 | | !! a model timestep) |
2733 | | !! |
2734 | | !! fscal_sink = ffastc(ji,jj) * 1.e2 / (86400.) |
2735 | | !! |
2736 | | !! ... actually, re-reading Moore et al.'s equations, it looks like he uses |
2737 | | !! his sinking flux directly, without scaling it by time-step or anything, |
2738 | | !! so I'll copy this here ... |
2739 | | !! |
2740 | | fscal_sink = ffastc(ji,jj) * 1.e2 |
2741 | | !! |
2742 | | !! calculate particle part of scaling factor |
2743 | | !! this totals up the carbon in suspended particles (Pn, Pd, Zmi, Zme, D), |
2744 | | !! which comes out in mmol C / m3 (= nmol C / cm3), and then multiplies it |
2745 | | !! by a magic factor, 0.002, to get it into nmol C / cm2 / s |
2746 | | !! |
2747 | | fscal_part = ((xthetapn * zphn) + (xthetapd * zphd) + (xthetazmi * zzmi) + & |
2748 | | (xthetazme * zzme) + (xthetad * zdet)) * 0.002 |
2749 | | !! |
2750 | | !! calculate scaling factor for base scavenging rate |
2751 | | !! this uses the (now correctly scaled) sinking flux and standing |
2752 | | !! particle concentration, divides through by some sort of reference |
2753 | | !! value (= 0.0066 nmol C / cm2 / s) and then uses this, or not if its |
2754 | | !! too high, to rescale the base scavenging rate |
2755 | | !! |
2756 | | fscal_scav = fbase_scav * min(((fscal_sink + fscal_part) / 0.0066), 4.0) |
2757 | | !! |
2758 | | !! the resulting scavenging rate is then scaled further according to the |
2759 | | !! local iron concentration (i.e. diminished in low iron regions; enhanced |
2760 | | !! in high iron regions; less alone in intermediate iron regions) |
2761 | | !! |
2762 | | if (xFeT.lt.0.4) then |
2763 | | !! |
2764 | | !! low iron region |
2765 | | !! |
2766 | | fscal_scav = fscal_scav * (xFeT / 0.4) |
2767 | | !! |
2768 | | elseif (xFeT.gt.0.6) then |
2769 | | !! |
2770 | | !! high iron region |
2771 | | !! |
2772 | | fscal_scav = fscal_scav + ((xFeT / 0.6) * (6.0 / 1.4)) |
2773 | | !! |
2774 | | else |
2775 | | !! |
2776 | | !! intermediate iron region: do nothing |
2777 | | !! |
2778 | | endif |
2779 | | !! |
2780 | | !! apply the calculated scavenging rate ... |
2781 | | !! |
2782 | | ffescav = fscal_scav * zfer |
2783 | | !! |
2784 | | elseif (jiron.eq.3) then |
2785 | | !!---------------------------------------------------------------------- |
2786 | | !! Scheme 3: Moore et al. (2008) |
2787 | | !! This scheme includes a single scavenging term that accounts for |
2788 | | !! sinking particles in the water column, and includes organic C, |
2789 | | !! biogenic opal, calcium carbonate and dust in this (though the |
2790 | | !! latter is ignored here until I work out what units the incoming |
2791 | | !! "dust" flux is in); this term scavenges total iron rather than |
2792 | | !! "free" iron |
2793 | | !!---------------------------------------------------------------------- |
2794 | | !! |
2795 | | !! total iron concentration (mmol Fe / m3 -> umol Fe / m3) |
2796 | | xFeT = zfer * 1.e3 |
2797 | | !! |
2798 | | !! this has a base scavenging rate which is modified by local |
2799 | | !! particle sinking flux (including dust - but I'm ignoring that |
2800 | | !! here for now) and which is accelerated when Fe concentration |
2801 | | !! is > 0.6 nM (= 0.6 umol/m3 = 0.0006 mmol/m3), and decreased as |
2802 | | !! concentrations < 0.5 nM (= 0.5 umol/m3 = 0.0005 mmol/m3) |
2803 | | !! |
2804 | | !! base scavenging rate (Fe_b in paper; units may be wrong there) |
2805 | | fbase_scav = 0.00384 ! (ng)^-1 cm |
2806 | | !! |
2807 | | !! calculate sinking particle part of scaling factor; this converts |
2808 | | !! mmol / m2 / d fluxes of organic carbon, silicon and calcium |
2809 | | !! carbonate into ng / cm2 / s fluxes; it is assumed here that the |
2810 | | !! mass conversions simply consider the mass of the main element |
2811 | | !! (C, Si and Ca) and *not* the mass of the molecules that they are |
2812 | | !! part of; Moore et al. (2008) is unclear on the conversion that |
2813 | | !! should be used |
2814 | | !! |
2815 | | !! milli -> nano; mol -> gram; /m2 -> /cm2; /d -> /s |
2816 | | fscal_csink = (ffastc(ji,jj) * 1.e6 * xmassc * 1.e-4 / 86400.) ! ng C / cm2 / s |
2817 | | fscal_sisink = (ffastsi(ji,jj) * 1.e6 * xmasssi * 1.e-4 / 86400.) ! ng Si / cm2 / s |
2818 | | fscal_casink = (ffastca(ji,jj) * 1.e6 * xmassca * 1.e-4 / 86400.) ! ng Ca / cm2 / s |
2819 | | !! |
2820 | | !! sum up these sinking fluxes and convert to ng / cm by dividing |
2821 | | !! through by a sinking rate of 100 m / d = 1.157 cm / s |
2822 | | fscal_sink = ((fscal_csink * 6.) + fscal_sisink + fscal_casink) / & |
2823 | | (100. * 1.e3 / 86400) ! ng / cm |
2824 | | !! |
2825 | | !! now calculate the scavenging rate based upon the base rate and |
2826 | | !! this particle flux scaling; according to the published units, |
2827 | | !! the result actually has *no* units, but as it must be expressed |
2828 | | !! per unit time for it to make any sense, I'm assuming a missing |
2829 | | !! "per second" |
2830 | | fscal_scav = fbase_scav * fscal_sink ! / s |
2831 | | !! |
2832 | | !! the resulting scavenging rate is then scaled further according to the |
2833 | | !! local iron concentration (i.e. diminished in low iron regions; enhanced |
2834 | | !! in high iron regions; less alone in intermediate iron regions) |
2835 | | !! |
2836 | | if (xFeT.lt.0.5) then |
2837 | | !! |
2838 | | !! low iron region (0.5 instead of the 0.4 in Moore et al., 2004) |
2839 | | !! |
2840 | | fscal_scav = fscal_scav * (xFeT / 0.5) |
2841 | | !! |
2842 | | elseif (xFeT.gt.0.6) then |
2843 | | !! |
2844 | | !! high iron region (functional form different in Moore et al., 2004) |
2845 | | !! |
2846 | | fscal_scav = fscal_scav + ((xFeT - 0.6) * 0.00904) |
2847 | | !! |
2848 | | else |
2849 | | !! |
2850 | | !! intermediate iron region: do nothing |
2851 | | !! |
2852 | | endif |
2853 | | !! |
2854 | | !! apply the calculated scavenging rate ... |
2855 | | !! |
2856 | | ffescav = fscal_scav * zfer |
2857 | | !! |
2858 | | elseif (jiron.eq.4) then |
2859 | | !!---------------------------------------------------------------------- |
2860 | | !! Scheme 4: Galbraith et al. (2010) |
2861 | | !! This scheme includes two scavenging terms, one for organic, |
2862 | | !! particle-based scavenging, and another for inorganic scavenging; |
2863 | | !! both terms scavenge "free" iron only |
2864 | | !!---------------------------------------------------------------------- |
2865 | | !! |
2866 | | !! Galbraith et al. (2010) present a more straightforward outline of |
2867 | | !! the scheme in Parekh et al. (2005) ... |
2868 | | !! |
2869 | | !! sinking particulate carbon available for scavenging |
2870 | | !! this assumes a sinking rate of 100 m / d (Moore & Braucher, 2008), |
2871 | | xCscav1 = (ffastc(ji,jj) * xmassc) / 100. ! = mg C / m3 |
2872 | | !! |
2873 | | !! scale by Honeyman et al. (1981) exponent coefficient |
2874 | | !! multiply by 1.e-3 to express C flux in g C rather than mg C |
2875 | | xCscav2 = (xCscav1 * 1.e-3)**0.58 |
2876 | | !! |
2877 | | !! multiply by Galbraith et al. (2010) scavenging rate |
2878 | | xk_org = 0.5 ! ((g C m/3)^-1) / d |
2879 | | xORGscav = xk_org * xCscav2 * xFeF |
2880 | | !! |
2881 | | !! Galbraith et al. (2010) also include an inorganic bit ... |
2882 | | !! |
2883 | | !! this occurs at a fixed rate, again based on the availability of |
2884 | | !! "free" iron |
2885 | | !! |
2886 | | !! k_inorg = 1000 d**-1 nmol Fe**-0.5 kg**-0.5 |
2887 | | !! |
2888 | | !! to implement this here, scale xFeF by 1026 to put in units of |
2889 | | !! umol/m3 which approximately equal nmol/kg |
2890 | | !! |
2891 | | xk_inorg = 1000. ! ((nmol Fe / kg)^1.5) |
2892 | | xINORGscav = (xk_inorg * (xFeF * 1026.)**1.5) * 1.e-3 |
2893 | | !! |
2894 | | !! sum these two terms together |
2895 | | ffescav = xORGscav + xINORGscav |
2896 | | else |
2897 | | !!---------------------------------------------------------------------- |
2898 | | !! No Scheme: you coward! |
2899 | | !! This scheme puts its head in the sand and eskews any decision about |
2900 | | !! how iron is removed from the ocean; prepare to get deluged in iron |
2901 | | !! you fool! |
2902 | | !!---------------------------------------------------------------------- |
2903 | | ffescav = 0. |
2904 | | endif |
2905 | | |
2906 | | !!---------------------------------------------------------------------- |
2907 | | !! Other iron cycle processes |
2908 | | !!---------------------------------------------------------------------- |
2909 | | !! |
2910 | | !! aeolian iron deposition |
2911 | | if (jk.eq.1) then |
2912 | | !! zirondep is in mmol-Fe / m2 / day |
2913 | | !! ffetop is in mmol-dissolved-Fe / m3 / day |
2914 | | ffetop = zirondep(ji,jj) * xfe_sol / fthk |
2915 | | else |
2916 | | ffetop = 0.0 |
2917 | | endif |
2918 | | !! |
2919 | | !! seafloor iron addition |
2920 | | !! AXY (10/07/12): amended to only apply sedimentary flux up to ~500 m down |
2921 | | !! if (jk.eq.(mbathy(ji,jj)-1).AND.jk.lt.i1100) then |
2922 | | if ((jk.eq.jmbathy).AND.jk.le.i0500) then |
2923 | | !! Moore et al. (2004) cite a coastal California value of 5 umol/m2/d, but adopt a |
2924 | | !! global value of 2 umol/m2/d for all areas < 1100 m; here we use this latter value |
2925 | | !! but apply it everywhere |
2926 | | !! AXY (21/07/09): actually, let's just apply it below 1100 m (levels 1-37) |
2927 | | ffebot = (xfe_sed / fthk) |
2928 | | else |
2929 | | ffebot = 0.0 |
2930 | | endif |
2931 | | |
2932 | | !! AXY (16/12/09): remove iron addition/removal processes |
2933 | | !! For the purposes of the quarter degree run, the iron cycle is being pegged to the |
2934 | | !! initial condition supplied by Mick Follows via restoration with a 30 day period; |
2935 | | !! iron addition at the seafloor is still permitted with the idea that this extra |
2936 | | !! iron will be removed by the restoration away from the source |
2937 | | !! ffescav = 0.0 |
2938 | | !! ffetop = 0.0 |
2939 | | !! ffebot = 0.0 |
2940 | | |
2941 | | # if defined key_debug_medusa |
2942 | | !! report miscellaneous calculations |
2943 | | if (idf.eq.1.AND.idfval.eq.1) then |
2944 | | IF (lwp) write (numout,*) '------------------------------' |
2945 | | IF (lwp) write (numout,*) 'xfe_sol = ', xfe_sol |
2946 | | IF (lwp) write (numout,*) 'xfe_mass = ', xfe_mass |
2947 | | IF (lwp) write (numout,*) 'ffetop(',jk,') = ', ffetop |
2948 | | IF (lwp) write (numout,*) 'ffebot(',jk,') = ', ffebot |
2949 | | IF (lwp) write (numout,*) 'xFree(',jk,') = ', xFree(ji,jj) |
2950 | | IF (lwp) write (numout,*) 'ffescav(',jk,') = ', ffescav |
2951 | | endif |
2952 | | # endif |
2953 | | |
2954 | | !!---------------------------------------------------------------------- |
2955 | | !! Miscellaneous |
2956 | | !!---------------------------------------------------------------------- |
2957 | | !! |
2958 | | !! diatom frustule dissolution |
2959 | | fsdiss = xsdiss * zpds |
2960 | | |
2961 | | # if defined key_debug_medusa |
2962 | | !! report miscellaneous calculations |
2963 | | if (idf.eq.1.AND.idfval.eq.1) then |
2964 | | IF (lwp) write (numout,*) '------------------------------' |
2965 | | IF (lwp) write (numout,*) 'fsdiss(',jk,') = ', fsdiss |
2966 | | endif |
2967 | | # endif |
2968 | | |
2969 | | !!---------------------------------------------------------------------- |
2970 | | !! Slow detritus creation |
2971 | | !!---------------------------------------------------------------------- |
2972 | | !! this variable integrates the creation of slow sinking detritus |
2973 | | !! to allow the split between fast and slow detritus to be |
2974 | | !! diagnosed |
2975 | | fslown = fdpn + fdzmi + ((1.0 - xfdfrac1) * fdpd) + & |
2976 | | ((1.0 - xfdfrac2) * fdzme) + ((1.0 - xbetan) * (finmi + finme)) |
2977 | | !! |
2978 | | !! this variable records the slow detrital sinking flux at this |
2979 | | !! particular depth; it is used in the output of this flux at |
2980 | | !! standard depths in the diagnostic outputs; needs to be |
2981 | | !! adjusted from per second to per day because of parameter vsed |
2982 | | fslownflux(ji,jj) = zdet * vsed * 86400. |
2983 | | # if defined key_roam |
2984 | | !! |
2985 | | !! and the same for detrital carbon |
2986 | | fslowc = (xthetapn * fdpn) + (xthetazmi * fdzmi) + & |
2987 | | (xthetapd * (1.0 - xfdfrac1) * fdpd) + & |
2988 | | (xthetazme * (1.0 - xfdfrac2) * fdzme) + & |
2989 | | ((1.0 - xbetac) * (ficmi + ficme)) |
2990 | | !! |
2991 | | !! this variable records the slow detrital sinking flux at this |
2992 | | !! particular depth; it is used in the output of this flux at |
2993 | | !! standard depths in the diagnostic outputs; needs to be |
2994 | | !! adjusted from per second to per day because of parameter vsed |
2995 | | fslowcflux(ji,jj) = zdtc * vsed * 86400. |
2996 | | # endif |
2997 | | |
2998 | | !!---------------------------------------------------------------------- |
2999 | | !! Nutrient regeneration |
3000 | | !! this variable integrates total nitrogen regeneration down the |
3001 | | !! watercolumn; its value is stored and output as a 2D diagnostic; |
3002 | | !! the corresponding dissolution flux of silicon (from sources |
3003 | | !! other than fast detritus) is also integrated; note that, |
3004 | | !! confusingly, the linear loss terms from plankton compartments |
3005 | | !! are labelled as fdX2 when one might have expected fdX or fdX1 |
3006 | | !!---------------------------------------------------------------------- |
3007 | | !! |
3008 | | !! nitrogen |
3009 | | fregen = (( (xphi * (fgmipn + fgmid)) + & ! messy feeding |
3010 | | (xphi * (fgmepn + fgmepd + fgmezmi + fgmed)) + & ! messy feeding |
3011 | | fmiexcr + fmeexcr + fdd + & ! excretion + D remin. |
3012 | | fdpn2 + fdpd2 + fdzmi2 + fdzme2) * fthk) ! linear mortality |
3013 | | !! |
3014 | | !! silicon |
3015 | | fregensi = (( fsdiss + ((1.0 - xfdfrac1) * fdpds) + & ! dissolution + non-lin. mortality |
3016 | | ((1.0 - xfdfrac3) * fgmepds) + & ! egestion by zooplankton |
3017 | | fdpds2) * fthk) ! linear mortality |
3018 | | # if defined key_roam |
3019 | | !! |
3020 | | !! carbon |
3021 | | fregenc = (( (xphi * ((xthetapn * fgmipn) + fgmidc)) + & ! messy feeding |
3022 | | (xphi * ((xthetapn * fgmepn) + (xthetapd * fgmepd) + & ! messy feeding |
3023 | | (xthetazmi * fgmezmi) + fgmedc)) + & ! messy feeding |
3024 | | fmiresp + fmeresp + fddc + & ! respiration + D remin. |
3025 | | (xthetapn * fdpn2) + (xthetapd * fdpd2) + & ! linear mortality |
3026 | | (xthetazmi * fdzmi2) + (xthetazme * fdzme2)) * fthk) ! linear mortality |
3027 | | # endif |
3028 | | |
3029 | | !!---------------------------------------------------------------------- |
3030 | | !! Fast-sinking detritus terms |
3031 | | !! "local" variables declared so that conservation can be checked; |
3032 | | !! the calculated terms are added to the fast-sinking flux later on |
3033 | | !! only after the flux entering this level has experienced some |
3034 | | !! remineralisation |
3035 | | !! note: these fluxes need to be scaled by the level thickness |
3036 | | !!---------------------------------------------------------------------- |
3037 | | !! |
3038 | | !! nitrogen: diatom and mesozooplankton mortality |
3039 | | ftempn = b0 * ((xfdfrac1 * fdpd) + (xfdfrac2 * fdzme)) |
3040 | | !! |
3041 | | !! silicon: diatom mortality and grazed diatoms |
3042 | | ftempsi = b0 * ((xfdfrac1 * fdpds) + (xfdfrac3 * fgmepds)) |
3043 | | !! |
3044 | | !! iron: diatom and mesozooplankton mortality |
3045 | | ftempfe = b0 * (((xfdfrac1 * fdpd) + (xfdfrac2 * fdzme)) * xrfn) |
3046 | | !! |
3047 | | !! carbon: diatom and mesozooplankton mortality |
3048 | | ftempc = b0 * ((xfdfrac1 * xthetapd * fdpd) + & |
3049 | | (xfdfrac2 * xthetazme * fdzme)) |
3050 | | !! |
3051 | | # if defined key_roam |
3052 | | if (jrratio.eq.0) then |
3053 | | !! CaCO3: latitudinally-based fraction of total primary production |
3054 | | !! absolute latitude of current grid cell |
3055 | | flat = abs(gphit(ji,jj)) |
3056 | | !! 0.10 at equator; 0.02 at pole |
3057 | | fcaco3 = xcaco3a + ((xcaco3b - xcaco3a) * ((90.0 - flat) / 90.0)) |
3058 | | elseif (jrratio.eq.1) then |
3059 | | !! CaCO3: Ridgwell et al. (2007) submodel, version 1 |
3060 | | !! this uses SURFACE omega calcite to regulate rain ratio |
3061 | | if (f_omcal(ji,jj).ge.1.0) then |
3062 | | fq1 = (f_omcal(ji,jj) - 1.0)**0.81 |
3063 | | else |
3064 | | fq1 = 0. |
3065 | | endif |
3066 | | fcaco3 = xridg_r0 * fq1 |
3067 | | elseif (jrratio.eq.2) then |
3068 | | !! CaCO3: Ridgwell et al. (2007) submodel, version 2 |
3069 | | !! this uses FULL 3D omega calcite to regulate rain ratio |
3070 | | if (f3_omcal(ji,jj,jk).ge.1.0) then |
3071 | | fq1 = (f3_omcal(ji,jj,jk) - 1.0)**0.81 |
3072 | | else |
3073 | | fq1 = 0. |
3074 | | endif |
3075 | | fcaco3 = xridg_r0 * fq1 |
3076 | | endif |
3077 | | # else |
3078 | | !! CaCO3: latitudinally-based fraction of total primary production |
3079 | | !! absolute latitude of current grid cell |
3080 | | flat = abs(gphit(ji,jj)) |
3081 | | !! 0.10 at equator; 0.02 at pole |
3082 | | fcaco3 = xcaco3a + ((xcaco3b - xcaco3a) * ((90.0 - flat) / 90.0)) |
3083 | | # endif |
3084 | | !! AXY (09/03/09): convert CaCO3 production from function of |
3085 | | !! primary production into a function of fast-sinking material; |
3086 | | !! technically, this is what Dunne et al. (2007) do anyway; they |
3087 | | !! convert total primary production estimated from surface |
3088 | | !! chlorophyll to an export flux for which they apply conversion |
3089 | | !! factors to estimate the various elemental fractions (Si, Ca) |
3090 | | ftempca = ftempc * fcaco3 |
3091 | | |
3092 | | # if defined key_debug_medusa |
3093 | | !! integrate total fast detritus production |
3094 | | if (idf.eq.1) then |
3095 | | fifd_n(ji,jj) = fifd_n(ji,jj) + (ftempn * fthk) |
3096 | | fifd_si(ji,jj) = fifd_si(ji,jj) + (ftempsi * fthk) |
3097 | | fifd_fe(ji,jj) = fifd_fe(ji,jj) + (ftempfe * fthk) |
3098 | | # if defined key_roam |
3099 | | fifd_c(ji,jj) = fifd_c(ji,jj) + (ftempc * fthk) |
3100 | | # endif |
3101 | | endif |
3102 | | |
3103 | | !! report quantities of fast-sinking detritus for each component |
3104 | | if (idf.eq.1.AND.idfval.eq.1) then |
3105 | | IF (lwp) write (numout,*) '------------------------------' |
3106 | | IF (lwp) write (numout,*) 'fdpd(',jk,') = ', fdpd |
3107 | | IF (lwp) write (numout,*) 'fdzme(',jk,') = ', fdzme |
3108 | | IF (lwp) write (numout,*) 'ftempn(',jk,') = ', ftempn |
3109 | | IF (lwp) write (numout,*) 'ftempsi(',jk,') = ', ftempsi |
3110 | | IF (lwp) write (numout,*) 'ftempfe(',jk,') = ', ftempfe |
3111 | | IF (lwp) write (numout,*) 'ftempc(',jk,') = ', ftempc |
3112 | | IF (lwp) write (numout,*) 'ftempca(',jk,') = ', ftempca |
3113 | | IF (lwp) write (numout,*) 'flat(',jk,') = ', flat |
3114 | | IF (lwp) write (numout,*) 'fcaco3(',jk,') = ', fcaco3 |
3115 | | endif |
3116 | | # endif |
3117 | | |
3118 | | !!---------------------------------------------------------------------- |
3119 | | !! This version of MEDUSA offers a choice of three methods for |
3120 | | !! handling the remineralisation of fast detritus. All three |
3121 | | !! do so in broadly the same way: |
3122 | | !! |
3123 | | !! 1. Fast detritus is stored as a 2D array [ ffastX ] |
3124 | | !! 2. Fast detritus is added level-by-level [ ftempX ] |
3125 | | !! 3. Fast detritus is not remineralised in the top box [ freminX ] |
3126 | | !! 4. Remaining fast detritus is remineralised in the bottom [ fsedX ] |
3127 | | !! box |
3128 | | !! |
3129 | | !! The three remineralisation methods are: |
3130 | | !! |
3131 | | !! 1. Ballast model (i.e. that published in Yool et al., 2011) |
3132 | | !! (1b. Ballast-sans-ballast model) |
3133 | | !! 2. Martin et al. (1987) |
3134 | | !! 3. Henson et al. (2011) |
3135 | | !! |
3136 | | !! The first of these couples C, N and Fe remineralisation to |
3137 | | !! the remineralisation of particulate Si and CaCO3, but the |
3138 | | !! latter two treat remineralisation of C, N, Fe, Si and CaCO3 |
3139 | | !! completely separately. At present a switch within the code |
3140 | | !! regulates which submodel is used, but this should be moved |
3141 | | !! to the namelist file. |
3142 | | !! |
3143 | | !! The ballast-sans-ballast submodel is an original development |
3144 | | !! feature of MEDUSA in which the ballast submodel's general |
3145 | | !! framework and parameterisation is used, but in which there |
3146 | | !! is no protection of organic material afforded by ballasting |
3147 | | !! minerals. While similar, it is not the same as the Martin |
3148 | | !! et al. (1987) submodel. |
3149 | | !! |
3150 | | !! Since the three submodels behave the same in terms of |
3151 | | !! accumulating sinking material and remineralising it all at |
3152 | | !! the seafloor, these portions of the code below are common to |
3153 | | !! all three. |
3154 | | !!---------------------------------------------------------------------- |
3155 | | |
3156 | | if (jexport.eq.1) then |
3157 | | !!====================================================================== |
3158 | | !! BALLAST SUBMODEL |
3159 | | !!====================================================================== |
3160 | | !! |
3161 | | !!---------------------------------------------------------------------- |
3162 | | !! Fast-sinking detritus fluxes, pt. 1: REMINERALISATION |
3163 | | !! aside from explicitly modelled, slow-sinking detritus, the |
3164 | | !! model includes an implicit representation of detrital |
3165 | | !! particles that sink too quickly to be modelled with |
3166 | | !! explicit state variables; this sinking flux is instead |
3167 | | !! instantaneously remineralised down the water column using |
3168 | | !! the version of Armstrong et al. (2002)'s ballast model |
3169 | | !! used by Dunne et al. (2007); the version of this model |
3170 | | !! here considers silicon and calcium carbonate ballast |
3171 | | !! minerals; this section of the code redistributes the fast |
3172 | | !! sinking material generated locally down the water column; |
3173 | | !! this differs from Dunne et al. (2007) in that fast sinking |
3174 | | !! material is distributed at *every* level below that it is |
3175 | | !! generated, rather than at every level below some fixed |
3176 | | !! depth; this scheme is also different in that sinking material |
3177 | | !! generated in one level is aggregated with that generated by |
3178 | | !! shallower levels; this should make the ballast model more |
3179 | | !! self-consistent (famous last words) |
3180 | | !!---------------------------------------------------------------------- |
3181 | | !! |
3182 | | if (jk.eq.1) then |
3183 | | !! this is the SURFACE OCEAN BOX (no remineralisation) |
3184 | | !! |
3185 | | freminc = 0.0 |
3186 | | freminn = 0.0 |
3187 | | freminfe = 0.0 |
3188 | | freminsi = 0.0 |
3189 | | freminca = 0.0 |
3190 | | elseif (jk.le.jmbathy) then |
3191 | | !! this is an OCEAN BOX (remineralise some material) |
3192 | | !! |
3193 | | !! set up CCD depth to be used depending on user choice |
3194 | | if (jocalccd.eq.0) then |
3195 | | !! use default CCD field |
3196 | | fccd_dep = ocal_ccd(ji,jj) |
3197 | | elseif (jocalccd.eq.1) then |
3198 | | !! use calculated CCD field |
3199 | | fccd_dep = f2_ccd_cal(ji,jj) |
3200 | | endif |
3201 | | !! |
3202 | | !! === organic carbon === |
3203 | | fq0 = ffastc(ji,jj) !! how much organic C enters this box (mol) |
3204 | | if (iball.eq.1) then |
3205 | | fq1 = (fq0 * xmassc) !! how much it weighs (mass) |
3206 | | fq2 = (ffastca(ji,jj) * xmassca) !! how much CaCO3 enters this box (mass) |
3207 | | fq3 = (ffastsi(ji,jj) * xmasssi) !! how much opal enters this box (mass) |
3208 | | fq4 = (fq2 * xprotca) + (fq3 * xprotsi) !! total protected organic C (mass) |
3209 | | !! this next term is calculated for C but used for N and Fe as well |
3210 | | !! it needs to be protected in case ALL C is protected |
3211 | | if (fq4.lt.fq1) then |
3212 | | fprotf = (fq4 / (fq1 + tiny(fq1))) !! protected fraction of total organic C (non-dim) |
3213 | | else |
3214 | | fprotf = 1.0 !! all organic C is protected (non-dim) |
3215 | | endif |
3216 | | fq5 = (1.0 - fprotf) !! unprotected fraction of total organic C (non-dim) |
3217 | | fq6 = (fq0 * fq5) !! how much organic C is unprotected (mol) |
3218 | | fq7 = (fq6 * exp(-(fthk / xfastc))) !! how much unprotected C leaves this box (mol) |
3219 | | fq8 = (fq7 + (fq0 * fprotf)) !! how much total C leaves this box (mol) |
3220 | | freminc = (fq0 - fq8) / fthk !! C remineralisation in this box (mol) |
3221 | | ffastc(ji,jj) = fq8 |
3222 | | # if defined key_debug_medusa |
3223 | | !! report in/out/remin fluxes of carbon for this level |
3224 | | if (idf.eq.1.AND.idfval.eq.1) then |
3225 | | IF (lwp) write (numout,*) '------------------------------' |
3226 | | IF (lwp) write (numout,*) 'totalC(',jk,') = ', fq1 |
3227 | | IF (lwp) write (numout,*) 'prtctC(',jk,') = ', fq4 |
3228 | | IF (lwp) write (numout,*) 'fprotf(',jk,') = ', fprotf |
3229 | | IF (lwp) write (numout,*) '------------------------------' |
3230 | | IF (lwp) write (numout,*) 'IN C(',jk,') = ', fq0 |
3231 | | IF (lwp) write (numout,*) 'LOST C(',jk,') = ', freminc * fthk |
3232 | | IF (lwp) write (numout,*) 'OUT C(',jk,') = ', fq8 |
3233 | | IF (lwp) write (numout,*) 'NEW C(',jk,') = ', ftempc * fthk |
3234 | | endif |
3235 | | # endif |
3236 | | else |
3237 | | fq1 = fq0 * exp(-(fthk / xfastc)) !! how much organic C leaves this box (mol) |
3238 | | freminc = (fq0 - fq1) / fthk !! C remineralisation in this box (mol) |
3239 | | ffastc(ji,jj) = fq1 |
3240 | | endif |
3241 | | !! |
3242 | | !! === organic nitrogen === |
3243 | | fq0 = ffastn(ji,jj) !! how much organic N enters this box (mol) |
3244 | | if (iball.eq.1) then |
3245 | | fq5 = (1.0 - fprotf) !! unprotected fraction of total organic N (non-dim) |
3246 | | fq6 = (fq0 * fq5) !! how much organic N is unprotected (mol) |
3247 | | fq7 = (fq6 * exp(-(fthk / xfastc))) !! how much unprotected N leaves this box (mol) |
3248 | | fq8 = (fq7 + (fq0 * fprotf)) !! how much total N leaves this box (mol) |
3249 | | freminn = (fq0 - fq8) / fthk !! N remineralisation in this box (mol) |
3250 | | ffastn(ji,jj) = fq8 |
3251 | | # if defined key_debug_medusa |
3252 | | !! report in/out/remin fluxes of carbon for this level |
3253 | | if (idf.eq.1.AND.idfval.eq.1) then |
3254 | | IF (lwp) write (numout,*) '------------------------------' |
3255 | | IF (lwp) write (numout,*) 'totalN(',jk,') = ', fq1 |
3256 | | IF (lwp) write (numout,*) 'prtctN(',jk,') = ', fq4 |
3257 | | IF (lwp) write (numout,*) 'fprotf(',jk,') = ', fprotf |
3258 | | IF (lwp) write (numout,*) '------------------------------' |
3259 | | if (freminn < 0.0) then |
3260 | | IF (lwp) write (numout,*) '** FREMIN ERROR **' |
3261 | | endif |
3262 | | IF (lwp) write (numout,*) 'IN N(',jk,') = ', fq0 |
3263 | | IF (lwp) write (numout,*) 'LOST N(',jk,') = ', freminn * fthk |
3264 | | IF (lwp) write (numout,*) 'OUT N(',jk,') = ', fq8 |
3265 | | IF (lwp) write (numout,*) 'NEW N(',jk,') = ', ftempn * fthk |
3266 | | endif |
3267 | | # endif |
3268 | | else |
3269 | | fq1 = fq0 * exp(-(fthk / xfastc)) !! how much organic N leaves this box (mol) |
3270 | | freminn = (fq0 - fq1) / fthk !! N remineralisation in this box (mol) |
3271 | | ffastn(ji,jj) = fq1 |
3272 | | endif |
3273 | | !! |
3274 | | !! === organic iron === |
3275 | | fq0 = ffastfe(ji,jj) !! how much organic Fe enters this box (mol) |
3276 | | if (iball.eq.1) then |
3277 | | fq5 = (1.0 - fprotf) !! unprotected fraction of total organic Fe (non-dim) |
3278 | | fq6 = (fq0 * fq5) !! how much organic Fe is unprotected (mol) |
3279 | | fq7 = (fq6 * exp(-(fthk / xfastc))) !! how much unprotected Fe leaves this box (mol) |
3280 | | fq8 = (fq7 + (fq0 * fprotf)) !! how much total Fe leaves this box (mol) |
3281 | | freminfe = (fq0 - fq8) / fthk !! Fe remineralisation in this box (mol) |
3282 | | ffastfe(ji,jj) = fq8 |
3283 | | else |
3284 | | fq1 = fq0 * exp(-(fthk / xfastc)) !! how much total Fe leaves this box (mol) |
3285 | | freminfe = (fq0 - fq1) / fthk !! Fe remineralisation in this box (mol) |
3286 | | ffastfe(ji,jj) = fq1 |
3287 | | endif |
3288 | | !! |
3289 | | !! === biogenic silicon === |
3290 | | fq0 = ffastsi(ji,jj) !! how much opal centers this box (mol) |
3291 | | fq1 = fq0 * exp(-(fthk / xfastsi)) !! how much opal leaves this box (mol) |
3292 | | freminsi = (fq0 - fq1) / fthk !! Si remineralisation in this box (mol) |
3293 | | ffastsi(ji,jj) = fq1 |
3294 | | !! |
3295 | | !! === biogenic calcium carbonate === |
3296 | | fq0 = ffastca(ji,jj) !! how much CaCO3 enters this box (mol) |
3297 | | if (fdep.le.fccd_dep) then |
3298 | | !! whole grid cell above CCD |
3299 | | fq1 = fq0 !! above lysocline, no Ca dissolves (mol) |
3300 | | freminca = 0.0 !! above lysocline, no Ca dissolves (mol) |
3301 | | fccd(ji,jj) = real(jk) !! which is the last level above the CCD? (#) |
3302 | | elseif (fdep.ge.fccd_dep) then |
3303 | | !! whole grid cell below CCD |
3304 | | fq1 = fq0 * exp(-(fthk / xfastca)) !! how much CaCO3 leaves this box (mol) |
3305 | | freminca = (fq0 - fq1) / fthk !! Ca remineralisation in this box (mol) |
3306 | | else |
3307 | | !! partial grid cell below CCD |
3308 | | fq2 = fdep1 - fccd_dep !! amount of grid cell below CCD (m) |
3309 | | fq1 = fq0 * exp(-(fq2 / xfastca)) !! how much CaCO3 leaves this box (mol) |
3310 | | freminca = (fq0 - fq1) / fthk !! Ca remineralisation in this box (mol) |
3311 | | endif |
3312 | | ffastca(ji,jj) = fq1 |
3313 | | else |
3314 | | !! this is BELOW THE LAST OCEAN BOX (do nothing) |
3315 | | freminc = 0.0 |
3316 | | freminn = 0.0 |
3317 | | freminfe = 0.0 |
3318 | | freminsi = 0.0 |
3319 | | freminca = 0.0 |
3320 | | endif |
3321 | | |
3322 | | elseif (jexport.eq.2.or.jexport.eq.3) then |
3323 | | if (jexport.eq.2) then |
3324 | | !!====================================================================== |
3325 | | !! MARTIN ET AL. (1987) SUBMODEL |
3326 | | !!====================================================================== |
3327 | | !! |
3328 | | !!---------------------------------------------------------------------- |
3329 | | !! This submodel uses the classic Martin et al. (1987) curve |
3330 | | !! to determine the attenuation of fast-sinking detritus down |
3331 | | !! the water column. All three organic elements, C, N and Fe, |
3332 | | !! are handled identically, and their quantities in sinking |
3333 | | !! particles attenuate according to a power relationship |
3334 | | !! governed by parameter "b". This is assigned a canonical |
3335 | | !! value of -0.858. Biogenic opal and calcium carbonate are |
3336 | | !! attentuated using the same function as in the ballast |
3337 | | !! submodel |
3338 | | !!---------------------------------------------------------------------- |
3339 | | !! |
3340 | | fb_val = -0.858 |
3341 | | elseif (jexport.eq.3) then |
3342 | | !!====================================================================== |
3343 | | !! HENSON ET AL. (2011) SUBMODEL |
3344 | | !!====================================================================== |
3345 | | !! |
3346 | | !!---------------------------------------------------------------------- |
3347 | | !! This submodel reconfigures the Martin et al. (1987) curve by |
3348 | | !! allowing the "b" value to vary geographically. Its value is |
3349 | | !! set, following Henson et al. (2011), as a function of local |
3350 | | !! sea surface temperature: |
3351 | | !! b = -1.06 + (0.024 * SST) |
3352 | | !! This means that remineralisation length scales are longer in |
3353 | | !! warm, tropical areas and shorter in cold, polar areas. This |
3354 | | !! does seem back-to-front (i.e. one would expect GREATER |
3355 | | !! remineralisation in warmer waters), but is an outcome of |
3356 | | !! analysis of sediment trap data, and it may reflect details |
3357 | | !! of ecosystem structure that pertain to particle production |
3358 | | !! rather than simply Q10. |
3359 | | !!---------------------------------------------------------------------- |
3360 | | !! |
3361 | | fl_sst = tsn(ji,jj,1,jp_tem) |
3362 | | fb_val = -1.06 + (0.024 * fl_sst) |
3363 | | endif |
3364 | | !! |
3365 | | if (jk.eq.1) then |
3366 | | !! this is the SURFACE OCEAN BOX (no remineralisation) |
3367 | | !! |
3368 | | freminc = 0.0 |
3369 | | freminn = 0.0 |
3370 | | freminfe = 0.0 |
3371 | | freminsi = 0.0 |
3372 | | freminca = 0.0 |
3373 | | elseif (jk.le.jmbathy) then |
3374 | | !! this is an OCEAN BOX (remineralise some material) |
3375 | | !! |
3376 | | !! === organic carbon === |
3377 | | fq0 = ffastc(ji,jj) !! how much organic C enters this box (mol) |
3378 | | fq1 = fq0 * ((fdep1/fdep)**fb_val) !! how much organic C leaves this box (mol) |
3379 | | freminc = (fq0 - fq1) / fthk !! C remineralisation in this box (mol) |
3380 | | ffastc(ji,jj) = fq1 |
3381 | | !! |
3382 | | !! === organic nitrogen === |
3383 | | fq0 = ffastn(ji,jj) !! how much organic N enters this box (mol) |
3384 | | fq1 = fq0 * ((fdep1/fdep)**fb_val) !! how much organic N leaves this box (mol) |
3385 | | freminn = (fq0 - fq1) / fthk !! N remineralisation in this box (mol) |
3386 | | ffastn(ji,jj) = fq1 |
3387 | | !! |
3388 | | !! === organic iron === |
3389 | | fq0 = ffastfe(ji,jj) !! how much organic Fe enters this box (mol) |
3390 | | fq1 = fq0 * ((fdep1/fdep)**fb_val) !! how much organic Fe leaves this box (mol) |
3391 | | freminfe = (fq0 - fq1) / fthk !! Fe remineralisation in this box (mol) |
3392 | | ffastfe(ji,jj) = fq1 |
3393 | | !! |
3394 | | !! === biogenic silicon === |
3395 | | fq0 = ffastsi(ji,jj) !! how much opal centers this box (mol) |
3396 | | fq1 = fq0 * exp(-(fthk / xfastsi)) !! how much opal leaves this box (mol) |
3397 | | freminsi = (fq0 - fq1) / fthk !! Si remineralisation in this box (mol) |
3398 | | ffastsi(ji,jj) = fq1 |
3399 | | !! |
3400 | | !! === biogenic calcium carbonate === |
3401 | | fq0 = ffastca(ji,jj) !! how much CaCO3 enters this box (mol) |
3402 | | if (fdep.le.ocal_ccd(ji,jj)) then |
3403 | | !! whole grid cell above CCD |
3404 | | fq1 = fq0 !! above lysocline, no Ca dissolves (mol) |
3405 | | freminca = 0.0 !! above lysocline, no Ca dissolves (mol) |
3406 | | fccd(ji,jj) = real(jk) !! which is the last level above the CCD? (#) |
3407 | | elseif (fdep.ge.ocal_ccd(ji,jj)) then |
3408 | | !! whole grid cell below CCD |
3409 | | fq1 = fq0 * exp(-(fthk / xfastca)) !! how much CaCO3 leaves this box (mol) |
3410 | | freminca = (fq0 - fq1) / fthk !! Ca remineralisation in this box (mol) |
3411 | | else |
3412 | | !! partial grid cell below CCD |
3413 | | fq2 = fdep1 - ocal_ccd(ji,jj) !! amount of grid cell below CCD (m) |
3414 | | fq1 = fq0 * exp(-(fq2 / xfastca)) !! how much CaCO3 leaves this box (mol) |
3415 | | freminca = (fq0 - fq1) / fthk !! Ca remineralisation in this box (mol) |
3416 | | endif |
3417 | | ffastca(ji,jj) = fq1 |
3418 | | else |
3419 | | !! this is BELOW THE LAST OCEAN BOX (do nothing) |
3420 | | freminc = 0.0 |
3421 | | freminn = 0.0 |
3422 | | freminfe = 0.0 |
3423 | | freminsi = 0.0 |
3424 | | freminca = 0.0 |
3425 | | endif |
3426 | | |
3427 | | endif |
3428 | | |
3429 | | !!---------------------------------------------------------------------- |
3430 | | !! Fast-sinking detritus fluxes, pt. 2: UPDATE FAST FLUXES |
3431 | | !! here locally calculated additions to the fast-sinking flux are added |
3432 | | !! to the total fast-sinking flux; this is done here such that material |
3433 | | !! produced in a particular layer is only remineralised below this |
3434 | | !! layer |
3435 | | !!---------------------------------------------------------------------- |
3436 | | !! |
3437 | | !! add sinking material generated in this layer to running totals |
3438 | | !! |
3439 | | !! === organic carbon === (diatom and mesozooplankton mortality) |
3440 | | ffastc(ji,jj) = ffastc(ji,jj) + (ftempc * fthk) |
3441 | | !! |
3442 | | !! === organic nitrogen === (diatom and mesozooplankton mortality) |
3443 | | ffastn(ji,jj) = ffastn(ji,jj) + (ftempn * fthk) |
3444 | | !! |
3445 | | !! === organic iron === (diatom and mesozooplankton mortality) |
3446 | | ffastfe(ji,jj) = ffastfe(ji,jj) + (ftempfe * fthk) |
3447 | | !! |
3448 | | !! === biogenic silicon === (diatom mortality and grazed diatoms) |
3449 | | ffastsi(ji,jj) = ffastsi(ji,jj) + (ftempsi * fthk) |
3450 | | !! |
3451 | | !! === biogenic calcium carbonate === (latitudinally-based fraction of total primary production) |
3452 | | ffastca(ji,jj) = ffastca(ji,jj) + (ftempca * fthk) |
3453 | | |
3454 | | !!---------------------------------------------------------------------- |
3455 | | !! Fast-sinking detritus fluxes, pt. 3: SEAFLOOR |
3456 | | !! remineralise all remaining fast-sinking detritus to dissolved |
3457 | | !! nutrients; the sedimentation fluxes calculated here allow the |
3458 | | !! separation of what's remineralised sinking through the final |
3459 | | !! ocean box from that which is added to the final box by the |
3460 | | !! remineralisation of material that reaches the seafloor (i.e. |
3461 | | !! the model assumes that *all* material that hits the seafloor |
3462 | | !! is remineralised and that none is permanently buried; hey, |
3463 | | !! this is a giant GCM model that can't be run for long enough |
3464 | | !! to deal with burial fluxes!) |
3465 | | !! |
3466 | | !! in a change to this process, in part so that MEDUSA behaves |
3467 | | !! a little more like ERSEM et al., fast-sinking detritus (N, Fe |
3468 | | !! and C) is converted to slow sinking detritus at the seafloor |
3469 | | !! instead of being remineralised; the rationale is that in |
3470 | | !! shallower shelf regions (... that are not fully mixed!) this |
3471 | | !! allows the detrital material to return slowly to dissolved |
3472 | | !! nutrient rather than instantaneously as now; the alternative |
3473 | | !! would be to explicitly handle seafloor organic material - a |
3474 | | !! headache I don't wish to experience at this point; note that |
3475 | | !! fast-sinking Si and Ca detritus is just remineralised as |
3476 | | !! per usual |
3477 | | !! |
3478 | | !! AXY (13/01/12) |
3479 | | !! in a further change to this process, again so that MEDUSA is |
3480 | | !! a little more like ERSEM et al., material that reaches the |
3481 | | !! seafloor can now be added to sediment pools and stored for |
3482 | | !! slow release; there are new 2D arrays for organic nitrogen, |
3483 | | !! iron and carbon and inorganic silicon and carbon that allow |
3484 | | !! fast and slow detritus that reaches the seafloor to be held |
3485 | | !! and released back to the water column more slowly; these arrays |
3486 | | !! are transferred via the tracer restart files between repeat |
3487 | | !! submissions of the model |
3488 | | !!---------------------------------------------------------------------- |
3489 | | !! |
3490 | | ffast2slowc = 0.0 |
3491 | | ffast2slown = 0.0 |
3492 | | ffast2slowfe = 0.0 |
3493 | | !! |
3494 | | if (jk.eq.jmbathy) then |
3495 | | !! this is the BOTTOM OCEAN BOX (remineralise everything) |
3496 | | !! |
3497 | | !! AXY (17/01/12): tweaked to include benthos pools |
3498 | | !! |
3499 | | !! === organic carbon === |
3500 | | if (jfdfate.eq.0 .and. jorgben.eq.0) then |
3501 | | freminc = freminc + (ffastc(ji,jj) / fthk) !! C remineralisation in this box (mol/m3) |
3502 | | elseif (jfdfate.eq.1 .and. jorgben.eq.0) then |
3503 | | ffast2slowc = ffastc(ji,jj) / fthk !! fast C -> slow C (mol/m3) |
3504 | | fslowc = fslowc + ffast2slowc |
3505 | | elseif (jfdfate.eq.0 .and. jorgben.eq.1) then |
3506 | | f_fbenin_c(ji,jj) = ffastc(ji,jj) !! fast C -> benthic C (mol/m2) |
3507 | | endif |
3508 | | fsedc(ji,jj) = ffastc(ji,jj) !! record seafloor C (mol/m2) |
3509 | | ffastc(ji,jj) = 0.0 |
3510 | | !! |
3511 | | !! === organic nitrogen === |
3512 | | if (jfdfate.eq.0 .and. jorgben.eq.0) then |
3513 | | freminn = freminn + (ffastn(ji,jj) / fthk) !! N remineralisation in this box (mol/m3) |
3514 | | elseif (jfdfate.eq.1 .and. jorgben.eq.0) then |
3515 | | ffast2slown = ffastn(ji,jj) / fthk !! fast N -> slow N (mol/m3) |
3516 | | fslown = fslown + ffast2slown |
3517 | | elseif (jfdfate.eq.0 .and. jorgben.eq.1) then |
3518 | | f_fbenin_n(ji,jj) = ffastn(ji,jj) !! fast N -> benthic N (mol/m2) |
3519 | | endif |
3520 | | fsedn(ji,jj) = ffastn(ji,jj) !! record seafloor N (mol/m2) |
3521 | | ffastn(ji,jj) = 0.0 |
3522 | | !! |
3523 | | !! === organic iron === |
3524 | | if (jfdfate.eq.0 .and. jorgben.eq.0) then |
3525 | | freminfe = freminfe + (ffastfe(ji,jj) / fthk) !! Fe remineralisation in this box (mol/m3) |
3526 | | elseif (jfdfate.eq.1 .and. jorgben.eq.0) then |
3527 | | ffast2slowfe = ffastn(ji,jj) / fthk !! fast Fe -> slow Fe (mol/m3) |
3528 | | elseif (jfdfate.eq.0 .and. jorgben.eq.1) then |
3529 | | f_fbenin_fe(ji,jj) = ffastfe(ji,jj) !! fast Fe -> benthic Fe (mol/m2) |
3530 | | endif |
3531 | | fsedfe(ji,jj) = ffastfe(ji,jj) !! record seafloor Fe (mol/m2) |
3532 | | ffastfe(ji,jj) = 0.0 |
3533 | | !! |
3534 | | !! === biogenic silicon === |
3535 | | if (jinorgben.eq.0) then |
3536 | | freminsi = freminsi + (ffastsi(ji,jj) / fthk) !! Si remineralisation in this box (mol/m3) |
3537 | | elseif (jinorgben.eq.1) then |
3538 | | f_fbenin_si(ji,jj) = ffastsi(ji,jj) !! fast Si -> benthic Si (mol/m2) |
3539 | | endif |
3540 | | fsedsi(ji,jj) = ffastsi(ji,jj) !! record seafloor Si (mol/m2) |
3541 | | ffastsi(ji,jj) = 0.0 |
3542 | | !! |
3543 | | !! === biogenic calcium carbonate === |
3544 | | if (jinorgben.eq.0) then |
3545 | | freminca = freminca + (ffastca(ji,jj) / fthk) !! Ca remineralisation in this box (mol/m3) |
3546 | | elseif (jinorgben.eq.1) then |
3547 | | f_fbenin_ca(ji,jj) = ffastca(ji,jj) !! fast Ca -> benthic Ca (mol/m2) |
3548 | | endif |
3549 | | fsedca(ji,jj) = ffastca(ji,jj) !! record seafloor Ca (mol/m2) |
3550 | | ffastca(ji,jj) = 0.0 |
3551 | | endif |
3552 | | |
3553 | | # if defined key_debug_medusa |
3554 | | if (idf.eq.1) then |
3555 | | !!---------------------------------------------------------------------- |
3556 | | !! Integrate total fast detritus remineralisation |
3557 | | !!---------------------------------------------------------------------- |
3558 | | !! |
3559 | | fofd_n(ji,jj) = fofd_n(ji,jj) + (freminn * fthk) |
3560 | | fofd_si(ji,jj) = fofd_si(ji,jj) + (freminsi * fthk) |
3561 | | fofd_fe(ji,jj) = fofd_fe(ji,jj) + (freminfe * fthk) |
3562 | | # if defined key_roam |
3563 | | fofd_c(ji,jj) = fofd_c(ji,jj) + (freminc * fthk) |
3564 | | # endif |
3565 | | endif |
3566 | | # endif |
3567 | | |
3568 | | !!---------------------------------------------------------------------- |
3569 | | !! Sort out remineralisation tally of fast-sinking detritus |
3570 | | !!---------------------------------------------------------------------- |
3571 | | !! |
3572 | | !! update fast-sinking regeneration arrays |
3573 | | fregenfast(ji,jj) = fregenfast(ji,jj) + (freminn * fthk) |
3574 | | fregenfastsi(ji,jj) = fregenfastsi(ji,jj) + (freminsi * fthk) |
3575 | | # if defined key_roam |
3576 | | fregenfastc(ji,jj) = fregenfastc(ji,jj) + (freminc * fthk) |
3577 | | # endif |
3578 | | |
3579 | | !!---------------------------------------------------------------------- |
3580 | | !! Benthic remineralisation fluxes |
3581 | | !!---------------------------------------------------------------------- |
3582 | | !! |
3583 | | if (jk.eq.jmbathy) then |
3584 | | !! |
3585 | | !! organic components |
3586 | | if (jorgben.eq.1) then |
3587 | | f_benout_n(ji,jj) = xsedn * zn_sed_n(ji,jj) |
3588 | | f_benout_fe(ji,jj) = xsedfe * zn_sed_fe(ji,jj) |
3589 | | f_benout_c(ji,jj) = xsedc * zn_sed_c(ji,jj) |
3590 | | endif |
3591 | | !! |
3592 | | !! inorganic components |
3593 | | if (jinorgben.eq.1) then |
3594 | | f_benout_si(ji,jj) = xsedsi * zn_sed_si(ji,jj) |
3595 | | f_benout_ca(ji,jj) = xsedca * zn_sed_ca(ji,jj) |
3596 | | !! |
3597 | | !! account for CaCO3 that dissolves when it shouldn't |
3598 | | if ( fdep .le. fccd_dep ) then |
3599 | | f_benout_lyso_ca(ji,jj) = xsedca * zn_sed_ca(ji,jj) |
3600 | | endif |
3601 | | endif |
3602 | | endif |
3603 | | CALL flush(numout) |
3604 | | |
3605 | | !!====================================================================== |
3606 | | !! LOCAL GRID CELL TRENDS |
3607 | | !!====================================================================== |
3608 | | !! |
3609 | | !!---------------------------------------------------------------------- |
3610 | | !! Determination of trends |
3611 | | !!---------------------------------------------------------------------- |
3612 | | !! |
3613 | | !!---------------------------------------------------------------------- |
3614 | | !! chlorophyll |
3615 | | btra(jpchn) = b0 * ( & |
3616 | | + ((frn * fprn * zphn) - fgmipn - fgmepn - fdpn - fdpn2) * (fthetan / xxi) ) |
3617 | | btra(jpchd) = b0 * ( & |
3618 | | + ((frd * fprd * zphd) - fgmepd - fdpd - fdpd2) * (fthetad / xxi) ) |
3619 | | !! |
3620 | | !!---------------------------------------------------------------------- |
3621 | | !! phytoplankton |
3622 | | btra(jpphn) = b0 * ( & |
3623 | | + (fprn * zphn) - fgmipn - fgmepn - fdpn - fdpn2 ) |
3624 | | btra(jpphd) = b0 * ( & |
3625 | | + (fprd * zphd) - fgmepd - fdpd - fdpd2 ) |
3626 | | btra(jppds) = b0 * ( & |
3627 | | + (fprds * zpds) - fgmepds - fdpds - fsdiss - fdpds2 ) |
3628 | | !! |
3629 | | !!---------------------------------------------------------------------- |
3630 | | !! zooplankton |
3631 | | btra(jpzmi) = b0 * ( & |
3632 | | + fmigrow - fgmezmi - fdzmi - fdzmi2 ) |
3633 | | btra(jpzme) = b0 * ( & |
3634 | | + fmegrow - fdzme - fdzme2 ) |
3635 | | !! |
3636 | | !!---------------------------------------------------------------------- |
3637 | | !! detritus |
3638 | | btra(jpdet) = b0 * ( & |
3639 | | + fdpn + ((1.0 - xfdfrac1) * fdpd) & ! mort. losses |
3640 | | + fdzmi + ((1.0 - xfdfrac2) * fdzme) & ! mort. losses |
3641 | | + ((1.0 - xbetan) * (finmi + finme)) & ! assim. inefficiency |
3642 | | - fgmid - fgmed - fdd & ! grazing and remin. |
3643 | | + ffast2slown ) ! seafloor fast->slow |
3644 | | !! |
3645 | | !!---------------------------------------------------------------------- |
3646 | | !! dissolved inorganic nitrogen nutrient |
3647 | | fn_cons = 0.0 & |
3648 | | - (fprn * zphn) - (fprd * zphd) ! primary production |
3649 | | fn_prod = 0.0 & |
3650 | | + (xphi * (fgmipn + fgmid)) & ! messy feeding remin. |
3651 | | + (xphi * (fgmepn + fgmepd + fgmezmi + fgmed)) & ! messy feeding remin. |
3652 | | + fmiexcr + fmeexcr + fdd + freminn & ! excretion and remin. |
3653 | | + fdpn2 + fdpd2 + fdzmi2 + fdzme2 ! metab. losses |
3654 | | !! |
3655 | | !! riverine flux |
3656 | | if ( jriver_n .gt. 0 ) then |
3657 | | f_riv_loc_n = f_riv_n(ji,jj) * friver_dep(jk,jmbathy) / fthk |
3658 | | fn_prod = fn_prod + f_riv_loc_n |
3659 | | endif |
3660 | | !! |
3661 | | !! benthic remineralisation |
3662 | | if (jk.eq.jmbathy .and. jorgben.eq.1 .and. ibenthic.eq.1) then |
3663 | | fn_prod = fn_prod + (f_benout_n(ji,jj) / fthk) |
3664 | | endif |
3665 | | !! |
3666 | | btra(jpdin) = b0 * ( & |
3667 | | fn_prod + fn_cons ) |
3668 | | !! |
3669 | | fnit_cons(ji,jj) = fnit_cons(ji,jj) + ( fthk * ( & ! consumption of dissolved nitrogen |
3670 | | fn_cons ) ) |
3671 | | fnit_prod(ji,jj) = fnit_prod(ji,jj) + ( fthk * ( & ! production of dissolved nitrogen |
3672 | | fn_prod ) ) |
3673 | | !! |
3674 | | !!---------------------------------------------------------------------- |
3675 | | !! dissolved silicic acid nutrient |
3676 | | fs_cons = 0.0 & |
3677 | | - (fprds * zpds) ! opal production |
3678 | | fs_prod = 0.0 & |
3679 | | + fsdiss & ! opal dissolution |
3680 | | + ((1.0 - xfdfrac1) * fdpds) & ! mort. loss |
3681 | | + ((1.0 - xfdfrac3) * fgmepds) & ! egestion of grazed Si |
3682 | | + freminsi + fdpds2 ! fast diss. and metab. losses |
3683 | | !! |
3684 | | !! riverine flux |
3685 | | if ( jriver_si .gt. 0 ) then |
3686 | | f_riv_loc_si = f_riv_si(ji,jj) * friver_dep(jk,jmbathy) / fthk |
3687 | | fs_prod = fs_prod + f_riv_loc_si |
3688 | | endif |
3689 | | !! |
3690 | | !! benthic remineralisation |
3691 | | if (jk.eq.jmbathy .and. jinorgben.eq.1 .and. ibenthic.eq.1) then |
3692 | | fs_prod = fs_prod + (f_benout_si(ji,jj) / fthk) |
3693 | | endif |
3694 | | !! |
3695 | | btra(jpsil) = b0 * ( & |
3696 | | fs_prod + fs_cons ) |
3697 | | !! |
3698 | | fsil_cons(ji,jj) = fsil_cons(ji,jj) + ( fthk * ( & ! consumption of dissolved silicon |
3699 | | fs_cons ) ) |
3700 | | fsil_prod(ji,jj) = fsil_prod(ji,jj) + ( fthk * ( & ! production of dissolved silicon |
3701 | | fs_prod ) ) |
3702 | | !! |
3703 | | !!---------------------------------------------------------------------- |
3704 | | !! dissolved "iron" nutrient |
3705 | | btra(jpfer) = b0 * ( & |
3706 | | + (xrfn * btra(jpdin)) + ffetop + ffebot - ffescav ) |
3707 | | |
3708 | | # if defined key_roam |
3709 | | !! |
3710 | | !!---------------------------------------------------------------------- |
3711 | | !! AXY (26/11/08): implicit detrital carbon change |
3712 | | btra(jpdtc) = b0 * ( & |
3713 | | + (xthetapn * fdpn) + ((1.0 - xfdfrac1) * (xthetapd * fdpd)) & ! mort. losses |
3714 | | + (xthetazmi * fdzmi) + ((1.0 - xfdfrac2) * (xthetazme * fdzme)) & ! mort. losses |
3715 | | + ((1.0 - xbetac) * (ficmi + ficme)) & ! assim. inefficiency |
3716 | | - fgmidc - fgmedc - fddc & ! grazing and remin. |
3717 | | + ffast2slowc ) ! seafloor fast->slow |
3718 | | !! |
3719 | | !!---------------------------------------------------------------------- |
3720 | | !! dissolved inorganic carbon |
3721 | | fc_cons = 0.0 & |
3722 | | - (xthetapn * fprn * zphn) - (xthetapd * fprd * zphd) ! primary production |
3723 | | fc_prod = 0.0 & |
3724 | | + (xthetapn * xphi * fgmipn) + (xphi * fgmidc) & ! messy feeding remin |
3725 | | + (xthetapn * xphi * fgmepn) + (xthetapd * xphi * fgmepd) & ! messy feeding remin |
3726 | | + (xthetazmi * xphi * fgmezmi) + (xphi * fgmedc) & ! messy feeding remin |
3727 | | + fmiresp + fmeresp + fddc + freminc + (xthetapn * fdpn2) & ! resp., remin., losses |
3728 | | + (xthetapd * fdpd2) + (xthetazmi * fdzmi2) & ! losses |
3729 | | + (xthetazme * fdzme2) ! losses |
3730 | | !! |
3731 | | !! riverine flux |
3732 | | if ( jriver_c .gt. 0 ) then |
3733 | | f_riv_loc_c = f_riv_c(ji,jj) * friver_dep(jk,jmbathy) / fthk |
3734 | | fc_prod = fc_prod + f_riv_loc_c |
3735 | | endif |
3736 | | !! |
3737 | | !! benthic remineralisation |
3738 | | if (jk.eq.jmbathy .and. jorgben.eq.1 .and. ibenthic.eq.1) then |
3739 | | fc_prod = fc_prod + (f_benout_c(ji,jj) / fthk) |
3740 | | endif |
3741 | | if (jk.eq.jmbathy .and. jinorgben.eq.1 .and. ibenthic.eq.1) then |
3742 | | fc_prod = fc_prod + (f_benout_ca(ji,jj) / fthk) |
3743 | | endif |
3744 | | !! |
3745 | | !! community respiration (does not include CaCO3 terms - obviously!) |
3746 | | fcomm_resp(ji,jj) = fcomm_resp(ji,jj) + fc_prod |
3747 | | !! |
3748 | | !! CaCO3 |
3749 | | fc_prod = fc_prod - ftempca + freminca |
3750 | | !! |
3751 | | !! riverine flux |
3752 | | if ( jk .eq. 1 .and. jriver_c .gt. 0 ) then |
3753 | | fc_prod = fc_prod + f_riv_c(ji,jj) |
3754 | | endif |
3755 | | !! |
3756 | | btra(jpdic) = b0 * ( & |
3757 | | fc_prod + fc_cons ) |
3758 | | !! |
3759 | | fcar_cons(ji,jj) = fcar_cons(ji,jj) + ( fthk * ( & ! consumption of dissolved carbon |
3760 | | fc_cons ) ) |
3761 | | fcar_prod(ji,jj) = fcar_prod(ji,jj) + ( fthk * ( & ! production of dissolved carbon |
3762 | | fc_prod ) ) |
3763 | | !! |
3764 | | !!---------------------------------------------------------------------- |
3765 | | !! alkalinity |
3766 | | fa_prod = 0.0 & |
3767 | | + (2.0 * freminca) ! CaCO3 dissolution |
3768 | | fa_cons = 0.0 & |
3769 | | - (2.0 * ftempca) ! CaCO3 production |
3770 | | !! |
3771 | | !! riverine flux |
3772 | | if ( jriver_alk .gt. 0 ) then |
3773 | | f_riv_loc_alk = f_riv_alk(ji,jj) * friver_dep(jk,jmbathy) / fthk |
3774 | | fa_prod = fa_prod + f_riv_loc_alk |
3775 | | endif |
3776 | | !! |
3777 | | !! benthic remineralisation |
3778 | | if (jk.eq.jmbathy .and. jinorgben.eq.1 .and. ibenthic.eq.1) then |
3779 | | fa_prod = fa_prod + (2.0 * f_benout_ca(ji,jj) / fthk) |
3780 | | endif |
3781 | | !! |
3782 | | btra(jpalk) = b0 * ( & |
3783 | | fa_prod + fa_cons ) |
3784 | | !! |
3785 | | !!---------------------------------------------------------------------- |
3786 | | !! oxygen (has protection at low O2 concentrations; OCMIP-2 style) |
3787 | | fo2_prod = 0.0 & |
3788 | | + (xthetanit * fprn * zphn) & ! Pn primary production, N |
3789 | | + (xthetanit * fprd * zphd) & ! Pd primary production, N |
3790 | | + (xthetarem * xthetapn * fprn * zphn) & ! Pn primary production, C |
3791 | | + (xthetarem * xthetapd * fprd * zphd) ! Pd primary production, C |
3792 | | fo2_ncons = 0.0 & |
3793 | | - (xthetanit * xphi * fgmipn) & ! Pn messy feeding remin., N |
3794 | | - (xthetanit * xphi * fgmid) & ! D messy feeding remin., N |
3795 | | - (xthetanit * xphi * fgmepn) & ! Pn messy feeding remin., N |
3796 | | - (xthetanit * xphi * fgmepd) & ! Pd messy feeding remin., N |
3797 | | - (xthetanit * xphi * fgmezmi) & ! Zi messy feeding remin., N |
3798 | | - (xthetanit * xphi * fgmed) & ! D messy feeding remin., N |
3799 | | - (xthetanit * fmiexcr) & ! microzoo excretion, N |
3800 | | - (xthetanit * fmeexcr) & ! mesozoo excretion, N |
3801 | | - (xthetanit * fdd) & ! slow detritus remin., N |
3802 | | - (xthetanit * freminn) & ! fast detritus remin., N |
3803 | | - (xthetanit * fdpn2) & ! Pn losses, N |
3804 | | - (xthetanit * fdpd2) & ! Pd losses, N |
3805 | | - (xthetanit * fdzmi2) & ! Zmi losses, N |
3806 | | - (xthetanit * fdzme2) ! Zme losses, N |
3807 | | !! |
3808 | | !! benthic remineralisation |
3809 | | if (jk.eq.jmbathy .and. jorgben.eq.1 .and. ibenthic.eq.1) then |
3810 | | fo2_ncons = fo2_ncons - (xthetanit * f_benout_n(ji,jj) / fthk) |
3811 | | endif |
3812 | | fo2_ccons = 0.0 & |
3813 | | - (xthetarem * xthetapn * xphi * fgmipn) & ! Pn messy feeding remin., C |
3814 | | - (xthetarem * xphi * fgmidc) & ! D messy feeding remin., C |
3815 | | - (xthetarem * xthetapn * xphi * fgmepn) & ! Pn messy feeding remin., C |
3816 | | - (xthetarem * xthetapd * xphi * fgmepd) & ! Pd messy feeding remin., C |
3817 | | - (xthetarem * xthetazmi * xphi * fgmezmi) & ! Zi messy feeding remin., C |
3818 | | - (xthetarem * xphi * fgmedc) & ! D messy feeding remin., C |
3819 | | - (xthetarem * fmiresp) & ! microzoo respiration, C |
3820 | | - (xthetarem * fmeresp) & ! mesozoo respiration, C |
3821 | | - (xthetarem * fddc) & ! slow detritus remin., C |
3822 | | - (xthetarem * freminc) & ! fast detritus remin., C |
3823 | | - (xthetarem * xthetapn * fdpn2) & ! Pn losses, C |
3824 | | - (xthetarem * xthetapd * fdpd2) & ! Pd losses, C |
3825 | | - (xthetarem * xthetazmi * fdzmi2) & ! Zmi losses, C |
3826 | | - (xthetarem * xthetazme * fdzme2) ! Zme losses, C |
3827 | | !! |
3828 | | !! benthic remineralisation |
3829 | | if (jk.eq.jmbathy .and. jorgben.eq.1 .and. ibenthic.eq.1) then |
3830 | | fo2_ccons = fo2_ccons - (xthetarem * f_benout_c(ji,jj) / fthk) |
3831 | | endif |
3832 | | fo2_cons = fo2_ncons + fo2_ccons |
3833 | | !! |
3834 | | !! is this a suboxic zone? |
3835 | | if (zoxy.lt.xo2min) then ! deficient O2; production fluxes only |
3836 | | btra(jpoxy) = b0 * ( & |
3837 | | fo2_prod ) |
3838 | | foxy_prod(ji,jj) = foxy_prod(ji,jj) + ( fthk * fo2_prod ) |
3839 | | foxy_anox(ji,jj) = foxy_anox(ji,jj) + ( fthk * fo2_cons ) |
3840 | | else ! sufficient O2; production + consumption fluxes |
3841 | | btra(jpoxy) = b0 * ( & |
3842 | | fo2_prod + fo2_cons ) |
3843 | | foxy_prod(ji,jj) = foxy_prod(ji,jj) + ( fthk * fo2_prod ) |
3844 | | foxy_cons(ji,jj) = foxy_cons(ji,jj) + ( fthk * fo2_cons ) |
3845 | | endif |
3846 | | !! |
3847 | | !! air-sea fluxes (if this is the surface box) |
3848 | | if (jk.eq.1) then |
3849 | | !! |
3850 | | !! CO2 flux |
3851 | | btra(jpdic) = btra(jpdic) + (b0 * f_co2flux) |
3852 | | !! |
3853 | | !! O2 flux (mol/m3/s -> mmol/m3/d) |
3854 | | btra(jpoxy) = btra(jpoxy) + (b0 * f_o2flux) |
3855 | | endif |
3856 | | # endif |
3857 | | |
3858 | | # if defined key_debug_medusa |
3859 | | !! report state variable fluxes (not including fast-sinking detritus) |
3860 | | if (idf.eq.1.AND.idfval.eq.1) then |
3861 | | IF (lwp) write (numout,*) '------------------------------' |
3862 | | IF (lwp) write (numout,*) 'btra(jpchn)(',jk,') = ', btra(jpchn) |
3863 | | IF (lwp) write (numout,*) 'btra(jpchd)(',jk,') = ', btra(jpchd) |
3864 | | IF (lwp) write (numout,*) 'btra(jpphn)(',jk,') = ', btra(jpphn) |
3865 | | IF (lwp) write (numout,*) 'btra(jpphd)(',jk,') = ', btra(jpphd) |
3866 | | IF (lwp) write (numout,*) 'btra(jppds)(',jk,') = ', btra(jppds) |
3867 | | IF (lwp) write (numout,*) 'btra(jpzmi)(',jk,') = ', btra(jpzmi) |
3868 | | IF (lwp) write (numout,*) 'btra(jpzme)(',jk,') = ', btra(jpzme) |
3869 | | IF (lwp) write (numout,*) 'btra(jpdet)(',jk,') = ', btra(jpdet) |
3870 | | IF (lwp) write (numout,*) 'btra(jpdin)(',jk,') = ', btra(jpdin) |
3871 | | IF (lwp) write (numout,*) 'btra(jpsil)(',jk,') = ', btra(jpsil) |
3872 | | IF (lwp) write (numout,*) 'btra(jpfer)(',jk,') = ', btra(jpfer) |
3873 | | # if defined key_roam |
3874 | | IF (lwp) write (numout,*) 'btra(jpdtc)(',jk,') = ', btra(jpdtc) |
3875 | | IF (lwp) write (numout,*) 'btra(jpdic)(',jk,') = ', btra(jpdic) |
3876 | | IF (lwp) write (numout,*) 'btra(jpalk)(',jk,') = ', btra(jpalk) |
3877 | | IF (lwp) write (numout,*) 'btra(jpoxy)(',jk,') = ', btra(jpoxy) |
3878 | | # endif |
3879 | | endif |
3880 | | # endif |
3881 | | |
3882 | | !!---------------------------------------------------------------------- |
3883 | | !! Integrate calculated fluxes for mass balance |
3884 | | !!---------------------------------------------------------------------- |
3885 | | !! |
3886 | | !! === nitrogen === |
3887 | | fflx_n(ji,jj) = fflx_n(ji,jj) + & |
3888 | | fthk * ( btra(jpphn) + btra(jpphd) + btra(jpzmi) + btra(jpzme) + btra(jpdet) + btra(jpdin) ) |
3889 | | !! === silicon === |
3890 | | fflx_si(ji,jj) = fflx_si(ji,jj) + & |
3891 | | fthk * ( btra(jppds) + btra(jpsil) ) |
3892 | | !! === iron === |
3893 | | fflx_fe(ji,jj) = fflx_fe(ji,jj) + & |
3894 | | fthk * ( ( xrfn * ( btra(jpphn) + btra(jpphd) + btra(jpzmi) + btra(jpzme) + btra(jpdet)) ) + btra(jpfer) ) |
3895 | | # if defined key_roam |
3896 | | !! === carbon === |
3897 | | fflx_c(ji,jj) = fflx_c(ji,jj) + & |
3898 | | fthk * ( (xthetapn * btra(jpphn)) + (xthetapd * btra(jpphd)) + & |
3899 | | (xthetazmi * btra(jpzmi)) + (xthetazme * btra(jpzme)) + btra(jpdtc) + btra(jpdic) ) |
3900 | | !! === alkalinity === |
3901 | | fflx_a(ji,jj) = fflx_a(ji,jj) + & |
3902 | | fthk * ( btra(jpalk) ) |
3903 | | !! === oxygen === |
3904 | | fflx_o2(ji,jj) = fflx_o2(ji,jj) + & |
3905 | | fthk * ( btra(jpoxy) ) |
3906 | | # endif |
3907 | | |
3908 | | !!---------------------------------------------------------------------- |
3909 | | !! Apply calculated tracer fluxes |
3910 | | !!---------------------------------------------------------------------- |
3911 | | !! |
3912 | | !! units: [unit of tracer] per second (fluxes are calculated above per day) |
3913 | | !! |
3914 | | ibio_switch = 1 |
3915 | | # if defined key_gulf_finland |
3916 | | !! AXY (17/05/13): fudge in a Gulf of Finland correction; uses longitude- |
3917 | | !! latitude range to establish if this is a Gulf of Finland |
3918 | | !! grid cell; if so, then BGC fluxes are ignored (though |
3919 | | !! still calculated); for reference, this is meant to be a |
3920 | | !! temporary fix to see if all of my problems can be done |
3921 | | !! away with if I switch off BGC fluxes in the Gulf of |
3922 | | !! Finland, which currently appears the source of trouble |
3923 | | if ( glamt(ji,jj).gt.24.7 .and. glamt(ji,jj).lt.27.8 .and. & |
3924 | | & gphit(ji,jj).gt.59.2 .and. gphit(ji,jj).lt.60.2 ) then |
3925 | | ibio_switch = 0 |
3926 | | endif |
3927 | | # endif |
3928 | | if (ibio_switch.eq.1) then |
3929 | | tra(ji,jj,jk,jpchn) = tra(ji,jj,jk,jpchn) + (btra(jpchn) / 86400.) |
3930 | | tra(ji,jj,jk,jpchd) = tra(ji,jj,jk,jpchd) + (btra(jpchd) / 86400.) |
3931 | | tra(ji,jj,jk,jpphn) = tra(ji,jj,jk,jpphn) + (btra(jpphn) / 86400.) |
3932 | | tra(ji,jj,jk,jpphd) = tra(ji,jj,jk,jpphd) + (btra(jpphd) / 86400.) |
3933 | | tra(ji,jj,jk,jppds) = tra(ji,jj,jk,jppds) + (btra(jppds) / 86400.) |
3934 | | tra(ji,jj,jk,jpzmi) = tra(ji,jj,jk,jpzmi) + (btra(jpzmi) / 86400.) |
3935 | | tra(ji,jj,jk,jpzme) = tra(ji,jj,jk,jpzme) + (btra(jpzme) / 86400.) |
3936 | | tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + (btra(jpdet) / 86400.) |
3937 | | tra(ji,jj,jk,jpdin) = tra(ji,jj,jk,jpdin) + (btra(jpdin) / 86400.) |
3938 | | tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + (btra(jpsil) / 86400.) |
3939 | | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + (btra(jpfer) / 86400.) |
3940 | | # if defined key_roam |
3941 | | tra(ji,jj,jk,jpdtc) = tra(ji,jj,jk,jpdtc) + (btra(jpdtc) / 86400.) |
3942 | | tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + (btra(jpdic) / 86400.) |
3943 | | tra(ji,jj,jk,jpalk) = tra(ji,jj,jk,jpalk) + (btra(jpalk) / 86400.) |
3944 | | tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) + (btra(jpoxy) / 86400.) |
3945 | | # endif |
3946 | | endif |
3947 | | |
3948 | | !! AXY (18/11/16): CMIP6 diagnostics |
3949 | | IF( med_diag%FBDDTALK%dgsave ) THEN |
3950 | | fbddtalk(ji,jj) = fbddtalk(ji,jj) + (btra(jpalk) * fthk) |
3951 | | ENDIF |
3952 | | IF( med_diag%FBDDTDIC%dgsave ) THEN |
3953 | | fbddtdic(ji,jj) = fbddtdic(ji,jj) + (btra(jpdic) * fthk) |
3954 | | ENDIF |
3955 | | IF( med_diag%FBDDTDIFE%dgsave ) THEN |
3956 | | fbddtdife(ji,jj) = fbddtdife(ji,jj) + (btra(jpfer) * fthk) |
3957 | | ENDIF |
3958 | | IF( med_diag%FBDDTDIN%dgsave ) THEN |
3959 | | fbddtdin(ji,jj) = fbddtdin(ji,jj) + (btra(jpdin) * fthk) |
3960 | | ENDIF |
3961 | | IF( med_diag%FBDDTDISI%dgsave ) THEN |
3962 | | fbddtdisi(ji,jj) = fbddtdisi(ji,jj) + (btra(jpsil) * fthk) |
3963 | | ENDIF |
3964 | | !! |
3965 | | IF( med_diag%BDDTALK3%dgsave ) THEN |
3966 | | bddtalk3(ji,jj,jk) = btra(jpalk) |
3967 | | ENDIF |
3968 | | IF( med_diag%BDDTDIC3%dgsave ) THEN |
3969 | | bddtdic3(ji,jj,jk) = btra(jpdic) |
3970 | | ENDIF |
3971 | | IF( med_diag%BDDTDIFE3%dgsave ) THEN |
3972 | | bddtdife3(ji,jj,jk) = btra(jpfer) |
3973 | | ENDIF |
3974 | | IF( med_diag%BDDTDIN3%dgsave ) THEN |
3975 | | bddtdin3(ji,jj,jk) = btra(jpdin) |
3976 | | ENDIF |
3977 | | IF( med_diag%BDDTDISI3%dgsave ) THEN |
3978 | | bddtdisi3(ji,jj,jk) = btra(jpsil) |
3979 | | ENDIF |
3980 | | |
3981 | | # if defined key_debug_medusa |
3982 | | IF (lwp) write (numout,*) '------' |
3983 | | IF (lwp) write (numout,*) 'trc_bio_medusa: end all calculations' |
3984 | | IF (lwp) write (numout,*) 'trc_bio_medusa: now outputs' |
3985 | | CALL flush(numout) |
3986 | | # endif |
3987 | | |
3988 | | # if defined key_axy_nancheck |
3989 | | !!---------------------------------------------------------------------- |
3990 | | !! Check calculated tracer fluxes |
3991 | | !!---------------------------------------------------------------------- |
3992 | | !! |
3993 | | DO jn = 1,jptra |
3994 | | fq0 = btra(jn) |
3995 | | !! AXY (30/01/14): "isnan" problem on HECTOR |
3996 | | !! if (fq0 /= fq0 ) then |
3997 | | if ( ieee_is_nan( fq0 ) ) then |
3998 | | !! there's a NaN here |
3999 | | if (lwp) write(numout,*) 'NAN detected in btra(', ji, ',', & |
4000 | | & jj, ',', jk, ',', jn, ') at time', kt |
4001 | | CALL ctl_stop( 'trcbio_medusa, NAN in btra field' ) |
4002 | | endif |
4003 | | ENDDO |
4004 | | DO jn = 1,jptra |
4005 | | fq0 = tra(ji,jj,jk,jn) |
4006 | | !! AXY (30/01/14): "isnan" problem on HECTOR |
4007 | | !! if (fq0 /= fq0 ) then |
4008 | | if ( ieee_is_nan( fq0 ) ) then |
4009 | | !! there's a NaN here |
4010 | | if (lwp) write(numout,*) 'NAN detected in tra(', ji, ',', & |
4011 | | & jj, ',', jk, ',', jn, ') at time', kt |
4012 | | CALL ctl_stop( 'trcbio_medusa, NAN in tra field' ) |
4013 | | endif |
4014 | | ENDDO |
4015 | | CALL flush(numout) |
4016 | | # endif |
4017 | | |
4018 | | !!---------------------------------------------------------------------- |
4019 | | !! Check model conservation |
4020 | | !! these terms merely sum up the tendency terms of the relevant |
4021 | | !! state variables, which should sum to zero; the iron cycle is |
4022 | | !! complicated by fluxes that add (aeolian deposition and seafloor |
4023 | | !! remineralisation) and remove (scavenging) dissolved iron from |
4024 | | !! the model (i.e. the sum of iron fluxes is unlikely to be zero) |
4025 | | !!---------------------------------------------------------------------- |
4026 | | !! |
4027 | | !! fnit0 = btra(jpphn) + btra(jpphd) + btra(jpzmi) + btra(jpzme) + btra(jpdet) + btra(jpdin) ! + ftempn |
4028 | | !! fsil0 = btra(jppds) + btra(jpsil) ! + ftempsi |
4029 | | !! ffer0 = (xrfn * fnit0) + btra(jpfer) |
4030 | | # if defined key_roam |
4031 | | !! fcar0 = 0. |
4032 | | !! falk0 = 0. |
4033 | | !! foxy0 = 0. |
4034 | | # endif |
4035 | | !! |
4036 | | !! if (kt/240*240.eq.kt) then |
4037 | | !! if (ji.eq.2.and.jj.eq.2.and.jk.eq.1) then |
4038 | | !! IF (lwp) write (*,*) '*******!MEDUSA Conservation!*******',kt |
4039 | | # if defined key_roam |
4040 | | !! IF (lwp) write (*,*) fnit0,fsil0,ffer0,fcar0,falk0,foxy0 |
4041 | | # else |
4042 | | !! IF (lwp) write (*,*) fnit0,fsil0,ffer0 |
4043 | | # endif |
4044 | | !! endif |
4045 | | !! endif |
4046 | | |
4047 | | # if defined key_trc_diabio |
4048 | | !!====================================================================== |
4049 | | !! LOCAL GRID CELL DIAGNOSTICS |
4050 | | !!====================================================================== |
4051 | | !! |
4052 | | !!---------------------------------------------------------------------- |
4053 | | !! Full diagnostics key_trc_diabio: |
4054 | | !! LOBSTER and PISCES support full diagnistics option key_trc_diabio |
4055 | | !! which gives an option of FULL output of biological sourses and sinks. |
4056 | | !! I cannot see any reason for doing this. If needed, it can be done |
4057 | | !! as shown below. |
4058 | | !!---------------------------------------------------------------------- |
4059 | | !! |
4060 | | IF(lwp) WRITE(numout,*) ' MEDUSA does not support key_trc_diabio' |
4061 | | !! trbio(ji,jj,jk, 1) = fprn |
4062 | | # endif |
4063 | | |
4064 | | IF( lk_iomput .AND. .NOT. ln_diatrc ) THEN |
4065 | | !!---------------------------------------------------------------------- |
4066 | | !! Add in XML diagnostics stuff |
4067 | | !!---------------------------------------------------------------------- |
4068 | | !! |
4069 | | !! ** 2D diagnostics |
4070 | | # if defined key_debug_medusa |
4071 | | IF (lwp) write (numout,*) 'trc_bio_medusa: diag in ij-jj-jk loop' |
4072 | | CALL flush(numout) |
4073 | | # endif |
4074 | | IF ( med_diag%PRN%dgsave ) THEN |
4075 | | fprn2d(ji,jj) = fprn2d(ji,jj) + (fprn * zphn * fthk) |
4076 | | ENDIF |
4077 | | IF ( med_diag%MPN%dgsave ) THEN |
4078 | | fdpn2d(ji,jj) = fdpn2d(ji,jj) + (fdpn * fthk) |
4079 | | ENDIF |
4080 | | IF ( med_diag%PRD%dgsave ) THEN |
4081 | | fprd2d(ji,jj) = fprd2d(ji,jj) + (fprd * zphd * fthk) |
4082 | | ENDIF |
4083 | | IF( med_diag%MPD%dgsave ) THEN |
4084 | | fdpd2d(ji,jj) = fdpd2d(ji,jj) + (fdpd * fthk) |
4085 | | ENDIF |
4086 | | ! IF( med_diag%DSED%dgsave ) THEN |
4087 | | ! CALL iom_put( "DSED" , ftot_n ) |
4088 | | ! ENDIF |
4089 | | IF( med_diag%OPAL%dgsave ) THEN |
4090 | | fprds2d(ji,jj) = fprds2d(ji,jj) + (fprds * zpds * fthk) |
4091 | | ENDIF |
4092 | | IF( med_diag%OPALDISS%dgsave ) THEN |
4093 | | fsdiss2d(ji,jj) = fsdiss2d(ji,jj) + (fsdiss * fthk) |
4094 | | ENDIF |
4095 | | IF( med_diag%GMIPn%dgsave ) THEN |
4096 | | fgmipn2d(ji,jj) = fgmipn2d(ji,jj) + (fgmipn * fthk) |
4097 | | ENDIF |
4098 | | IF( med_diag%GMID%dgsave ) THEN |
4099 | | fgmid2d(ji,jj) = fgmid2d(ji,jj) + (fgmid * fthk) |
4100 | | ENDIF |
4101 | | IF( med_diag%MZMI%dgsave ) THEN |
4102 | | fdzmi2d(ji,jj) = fdzmi2d(ji,jj) + (fdzmi * fthk) |
4103 | | ENDIF |
4104 | | IF( med_diag%GMEPN%dgsave ) THEN |
4105 | | fgmepn2d(ji,jj) = fgmepn2d(ji,jj) + (fgmepn * fthk) |
4106 | | ENDIF |
4107 | | IF( med_diag%GMEPD%dgsave ) THEN |
4108 | | fgmepd2d(ji,jj) = fgmepd2d(ji,jj) + (fgmepd * fthk) |
4109 | | ENDIF |
4110 | | IF( med_diag%GMEZMI%dgsave ) THEN |
4111 | | fgmezmi2d(ji,jj) = fgmezmi2d(ji,jj) + (fgmezmi * fthk) |
4112 | | ENDIF |
4113 | | IF( med_diag%GMED%dgsave ) THEN |
4114 | | fgmed2d(ji,jj) = fgmed2d(ji,jj) + (fgmed * fthk) |
4115 | | ENDIF |
4116 | | IF( med_diag%MZME%dgsave ) THEN |
4117 | | fdzme2d(ji,jj) = fdzme2d(ji,jj) + (fdzme * fthk) |
4118 | | ENDIF |
4119 | | ! IF( med_diag%DEXP%dgsave ) THEN |
4120 | | ! CALL iom_put( "DEXP" , ftot_n ) |
4121 | | ! ENDIF |
4122 | | IF( med_diag%DETN%dgsave ) THEN |
4123 | | fslown2d(ji,jj) = fslown2d(ji,jj) + (fslown * fthk) |
4124 | | ENDIF |
4125 | | IF( med_diag%MDET%dgsave ) THEN |
4126 | | fdd2d(ji,jj) = fdd2d(ji,jj) + (fdd * fthk) |
4127 | | ENDIF |
4128 | | IF( med_diag%AEOLIAN%dgsave ) THEN |
4129 | | ffetop2d(ji,jj) = ffetop2d(ji,jj) + (ffetop * fthk) |
4130 | | ENDIF |
4131 | | IF( med_diag%BENTHIC%dgsave ) THEN |
4132 | | ffebot2d(ji,jj) = ffebot2d(ji,jj) + (ffebot * fthk) |
4133 | | ENDIF |
4134 | | IF( med_diag%SCAVENGE%dgsave ) THEN |
4135 | | ffescav2d(ji,jj) = ffescav2d(ji,jj) + (ffescav * fthk) |
4136 | | ENDIF |
4137 | | IF( med_diag%PN_JLIM%dgsave ) THEN |
4138 | | ! fjln2d(ji,jj) = fjln2d(ji,jj) + (fjln * zphn * fthk) |
4139 | | fjln2d(ji,jj) = fjln2d(ji,jj) + (fjlim_pn * zphn * fthk) |
4140 | | ENDIF |
4141 | | IF( med_diag%PN_NLIM%dgsave ) THEN |
4142 | | fnln2d(ji,jj) = fnln2d(ji,jj) + (fnln * zphn * fthk) |
4143 | | ENDIF |
4144 | | IF( med_diag%PN_FELIM%dgsave ) THEN |
4145 | | ffln2d(ji,jj) = ffln2d(ji,jj) + (ffln * zphn * fthk) |
4146 | | ENDIF |
4147 | | IF( med_diag%PD_JLIM%dgsave ) THEN |
4148 | | ! fjld2d(ji,jj) = fjld2d(ji,jj) + (fjld * zphd * fthk) |
4149 | | fjld2d(ji,jj) = fjld2d(ji,jj) + (fjlim_pd * zphd * fthk) |
4150 | | ENDIF |
4151 | | IF( med_diag%PD_NLIM%dgsave ) THEN |
4152 | | fnld2d(ji,jj) = fnld2d(ji,jj) + (fnld * zphd * fthk) |
4153 | | ENDIF |
4154 | | IF( med_diag%PD_FELIM%dgsave ) THEN |
4155 | | ffld2d(ji,jj) = ffld2d(ji,jj) + (ffld * zphd * fthk) |
4156 | | ENDIF |
4157 | | IF( med_diag%PD_SILIM%dgsave ) THEN |
4158 | | fsld2d2(ji,jj) = fsld2d2(ji,jj) + (fsld2 * zphd * fthk) |
4159 | | ENDIF |
4160 | | IF( med_diag%PDSILIM2%dgsave ) THEN |
4161 | | fsld2d(ji,jj) = fsld2d(ji,jj) + (fsld * zphd * fthk) |
4162 | | ENDIF |
4163 | | !! |
4164 | | IF( med_diag%TOTREG_N%dgsave ) THEN |
4165 | | fregen2d(ji,jj) = fregen2d(ji,jj) + fregen |
4166 | | ENDIF |
4167 | | IF( med_diag%TOTRG_SI%dgsave ) THEN |
4168 | | fregensi2d(ji,jj) = fregensi2d(ji,jj) + fregensi |
4169 | | ENDIF |
4170 | | !! |
4171 | | IF( med_diag%FASTN%dgsave ) THEN |
4172 | | ftempn2d(ji,jj) = ftempn2d(ji,jj) + (ftempn * fthk) |
4173 | | ENDIF |
4174 | | IF( med_diag%FASTSI%dgsave ) THEN |
4175 | | ftempsi2d(ji,jj) = ftempsi2d(ji,jj) + (ftempsi * fthk) |
4176 | | ENDIF |
4177 | | IF( med_diag%FASTFE%dgsave ) THEN |
4178 | | ftempfe2d(ji,jj) =ftempfe2d(ji,jj) + (ftempfe * fthk) |
4179 | | ENDIF |
4180 | | IF( med_diag%FASTC%dgsave ) THEN |
4181 | | ftempc2d(ji,jj) = ftempc2d(ji,jj) + (ftempc * fthk) |
4182 | | ENDIF |
4183 | | IF( med_diag%FASTCA%dgsave ) THEN |
4184 | | ftempca2d(ji,jj) = ftempca2d(ji,jj) + (ftempca * fthk) |
4185 | | ENDIF |
4186 | | !! |
4187 | | IF( med_diag%REMINN%dgsave ) THEN |
4188 | | freminn2d(ji,jj) = freminn2d(ji,jj) + (freminn * fthk) |
4189 | | ENDIF |
4190 | | IF( med_diag%REMINSI%dgsave ) THEN |
4191 | | freminsi2d(ji,jj) = freminsi2d(ji,jj) + (freminsi * fthk) |
4192 | | ENDIF |
4193 | | IF( med_diag%REMINFE%dgsave ) THEN |
4194 | | freminfe2d(ji,jj)= freminfe2d(ji,jj) + (freminfe * fthk) |
4195 | | ENDIF |
4196 | | IF( med_diag%REMINC%dgsave ) THEN |
4197 | | freminc2d(ji,jj) = freminc2d(ji,jj) + (freminc * fthk) |
4198 | | ENDIF |
4199 | | IF( med_diag%REMINCA%dgsave ) THEN |
4200 | | freminca2d(ji,jj) = freminca2d(ji,jj) + (freminca * fthk) |
4201 | | ENDIF |
4202 | | !! |
4203 | | # if defined key_roam |
4204 | | !! |
4205 | | !! AXY (09/11/16): CMIP6 diagnostics |
4206 | | IF( med_diag%FD_NIT3%dgsave ) THEN |
4207 | | fd_nit3(ji,jj,jk) = ffastn(ji,jj) |
4208 | | ENDIF |
4209 | | IF( med_diag%FD_SIL3%dgsave ) THEN |
4210 | | fd_sil3(ji,jj,jk) = ffastsi(ji,jj) |
4211 | | ENDIF |
4212 | | IF( med_diag%FD_CAR3%dgsave ) THEN |
4213 | | fd_car3(ji,jj,jk) = ffastc(ji,jj) |
4214 | | ENDIF |
4215 | | IF( med_diag%FD_CAL3%dgsave ) THEN |
4216 | | fd_cal3(ji,jj,jk) = ffastca(ji,jj) |
4217 | | ENDIF |
4218 | | !! |
4219 | | IF (jk.eq.i0100) THEN |
4220 | | IF( med_diag%RR_0100%dgsave ) THEN |
4221 | | ffastca2d(ji,jj) = & |
4222 | | ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) |
4223 | | ENDIF |
4224 | | ELSE IF (jk.eq.i0500) THEN |
4225 | | IF( med_diag%RR_0500%dgsave ) THEN |
4226 | | ffastca2d(ji,jj) = & |
4227 | | ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) |
4228 | | ENDIF |
4229 | | ELSE IF (jk.eq.i1000) THEN |
4230 | | IF( med_diag%RR_1000%dgsave ) THEN |
4231 | | ffastca2d(ji,jj) = & |
4232 | | ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) |
4233 | | ENDIF |
4234 | | ELSE IF (jk.eq.jmbathy) THEN |
4235 | | IF( med_diag%IBEN_N%dgsave ) THEN |
4236 | | iben_n2d(ji,jj) = f_sbenin_n(ji,jj) + f_fbenin_n(ji,jj) |
4237 | | ENDIF |
4238 | | IF( med_diag%IBEN_FE%dgsave ) THEN |
4239 | | iben_fe2d(ji,jj) = f_sbenin_fe(ji,jj) + f_fbenin_fe(ji,jj) |
4240 | | ENDIF |
4241 | | IF( med_diag%IBEN_C%dgsave ) THEN |
4242 | | iben_c2d(ji,jj) = f_sbenin_c(ji,jj) + f_fbenin_c(ji,jj) |
4243 | | ENDIF |
4244 | | IF( med_diag%IBEN_SI%dgsave ) THEN |
4245 | | iben_si2d(ji,jj) = f_fbenin_si(ji,jj) |
4246 | | ENDIF |
4247 | | IF( med_diag%IBEN_CA%dgsave ) THEN |
4248 | | iben_ca2d(ji,jj) = f_fbenin_ca(ji,jj) |
4249 | | ENDIF |
4250 | | IF( med_diag%OBEN_N%dgsave ) THEN |
4251 | | oben_n2d(ji,jj) = f_benout_n(ji,jj) |
4252 | | ENDIF |
4253 | | IF( med_diag%OBEN_FE%dgsave ) THEN |
4254 | | oben_fe2d(ji,jj) = f_benout_fe(ji,jj) |
4255 | | ENDIF |
4256 | | IF( med_diag%OBEN_C%dgsave ) THEN |
4257 | | oben_c2d(ji,jj) = f_benout_c(ji,jj) |
4258 | | ENDIF |
4259 | | IF( med_diag%OBEN_SI%dgsave ) THEN |
4260 | | oben_si2d(ji,jj) = f_benout_si(ji,jj) |
4261 | | ENDIF |
4262 | | IF( med_diag%OBEN_CA%dgsave ) THEN |
4263 | | oben_ca2d(ji,jj) = f_benout_ca(ji,jj) |
4264 | | ENDIF |
4265 | | IF( med_diag%SFR_OCAL%dgsave ) THEN |
4266 | | sfr_ocal2d(ji,jj) = f3_omcal(ji,jj,jk) |
4267 | | ENDIF |
4268 | | IF( med_diag%SFR_OARG%dgsave ) THEN |
4269 | | sfr_oarg2d(ji,jj) = f3_omarg(ji,jj,jk) |
4270 | | ENDIF |
4271 | | IF( med_diag%LYSO_CA%dgsave ) THEN |
4272 | | lyso_ca2d(ji,jj) = f_benout_lyso_ca(ji,jj) |
4273 | | ENDIF |
4274 | | ENDIF |
4275 | | !! end bathy-1 diags |
4276 | | !! |
4277 | | IF( med_diag%RIV_N%dgsave ) THEN |
4278 | | rivn2d(ji,jj) = rivn2d(ji,jj) + (f_riv_loc_n * fthk) |
4279 | | ENDIF |
4280 | | IF( med_diag%RIV_SI%dgsave ) THEN |
4281 | | rivsi2d(ji,jj) = rivsi2d(ji,jj) + (f_riv_loc_si * fthk) |
4282 | | ENDIF |
4283 | | IF( med_diag%RIV_C%dgsave ) THEN |
4284 | | rivc2d(ji,jj) = rivc2d(ji,jj) + (f_riv_loc_c * fthk) |
4285 | | ENDIF |
4286 | | IF( med_diag%RIV_ALK%dgsave ) THEN |
4287 | | rivalk2d(ji,jj) = rivalk2d(ji,jj) + (f_riv_loc_alk * fthk) |
4288 | | ENDIF |
4289 | | IF( med_diag%DETC%dgsave ) THEN |
4290 | | fslowc2d(ji,jj) = fslowc2d(ji,jj) + (fslowc * fthk) |
4291 | | ENDIF |
4292 | | !! |
4293 | | !! |
4294 | | !! |
4295 | | IF( med_diag%PN_LLOSS%dgsave ) THEN |
4296 | | fdpn22d(ji,jj) = fdpn22d(ji,jj) + (fdpn2 * fthk) |
4297 | | ENDIF |
4298 | | IF( med_diag%PD_LLOSS%dgsave ) THEN |
4299 | | fdpd22d(ji,jj) = fdpd22d(ji,jj) + (fdpd2 * fthk) |
4300 | | ENDIF |
4301 | | IF( med_diag%ZI_LLOSS%dgsave ) THEN |
4302 | | fdzmi22d(ji,jj) = fdzmi22d(ji,jj) + (fdzmi2 * fthk) |
4303 | | ENDIF |
4304 | | IF( med_diag%ZE_LLOSS%dgsave ) THEN |
4305 | | fdzme22d(ji,jj) = fdzme22d(ji,jj) + (fdzme2 * fthk) |
4306 | | ENDIF |
4307 | | IF( med_diag%ZI_MES_N%dgsave ) THEN |
4308 | | zimesn2d(ji,jj) = zimesn2d(ji,jj) + & |
4309 | | (xphi * (fgmipn + fgmid) * fthk) |
4310 | | ENDIF |
4311 | | IF( med_diag%ZI_MES_D%dgsave ) THEN |
4312 | | zimesd2d(ji,jj) = zimesd2d(ji,jj) + & |
4313 | | ((1. - xbetan) * finmi * fthk) |
4314 | | ENDIF |
4315 | | IF( med_diag%ZI_MES_C%dgsave ) THEN |
4316 | | zimesc2d(ji,jj) = zimesc2d(ji,jj) + & |
4317 | | (xphi * ((xthetapn * fgmipn) + fgmidc) * fthk) |
4318 | | ENDIF |
4319 | | IF( med_diag%ZI_MESDC%dgsave ) THEN |
4320 | | zimesdc2d(ji,jj) = zimesdc2d(ji,jj) + & |
4321 | | ((1. - xbetac) * ficmi * fthk) |
4322 | | ENDIF |
4323 | | IF( med_diag%ZI_EXCR%dgsave ) THEN |
4324 | | ziexcr2d(ji,jj) = ziexcr2d(ji,jj) + (fmiexcr * fthk) |
4325 | | ENDIF |
4326 | | IF( med_diag%ZI_RESP%dgsave ) THEN |
4327 | | ziresp2d(ji,jj) = ziresp2d(ji,jj) + (fmiresp * fthk) |
4328 | | ENDIF |
4329 | | IF( med_diag%ZI_GROW%dgsave ) THEN |
4330 | | zigrow2d(ji,jj) = zigrow2d(ji,jj) + (fmigrow * fthk) |
4331 | | ENDIF |
4332 | | IF( med_diag%ZE_MES_N%dgsave ) THEN |
4333 | | zemesn2d(ji,jj) = zemesn2d(ji,jj) + & |
4334 | | (xphi * (fgmepn + fgmepd + fgmezmi + fgmed) * fthk) |
4335 | | ENDIF |
4336 | | IF( med_diag%ZE_MES_D%dgsave ) THEN |
4337 | | zemesd2d(ji,jj) = zemesd2d(ji,jj) + & |
4338 | | ((1. - xbetan) * finme * fthk) |
4339 | | ENDIF |
4340 | | IF( med_diag%ZE_MES_C%dgsave ) THEN |
4341 | | zemesc2d(ji,jj) = zemesc2d(ji,jj) + & |
4342 | | (xphi * ((xthetapn * fgmepn) + (xthetapd * fgmepd) + & |
4343 | | (xthetazmi * fgmezmi) + fgmedc) * fthk) |
4344 | | ENDIF |
4345 | | IF( med_diag%ZE_MESDC%dgsave ) THEN |
4346 | | zemesdc2d(ji,jj) = zemesdc2d(ji,jj) + & |
4347 | | ((1. - xbetac) * ficme * fthk) |
4348 | | ENDIF |
4349 | | IF( med_diag%ZE_EXCR%dgsave ) THEN |
4350 | | zeexcr2d(ji,jj) = zeexcr2d(ji,jj) + (fmeexcr * fthk) |
4351 | | ENDIF |
4352 | | IF( med_diag%ZE_RESP%dgsave ) THEN |
4353 | | zeresp2d(ji,jj) = zeresp2d(ji,jj) + (fmeresp * fthk) |
4354 | | ENDIF |
4355 | | IF( med_diag%ZE_GROW%dgsave ) THEN |
4356 | | zegrow2d(ji,jj) = zegrow2d(ji,jj) + (fmegrow * fthk) |
4357 | | ENDIF |
4358 | | IF( med_diag%MDETC%dgsave ) THEN |
4359 | | mdetc2d(ji,jj) = mdetc2d(ji,jj) + (fddc * fthk) |
4360 | | ENDIF |
4361 | | IF( med_diag%GMIDC%dgsave ) THEN |
4362 | | gmidc2d(ji,jj) = gmidc2d(ji,jj) + (fgmidc * fthk) |
4363 | | ENDIF |
4364 | | IF( med_diag%GMEDC%dgsave ) THEN |
4365 | | gmedc2d(ji,jj) = gmedc2d(ji,jj) + (fgmedc * fthk) |
4366 | | ENDIF |
4367 | | !! |
4368 | | # endif |
4369 | | !! |
4370 | | !! ** 3D diagnostics |
4371 | | IF( med_diag%TPP3%dgsave ) THEN |
4372 | | tpp3d(ji,jj,jk) = (fprn * zphn) + (fprd * zphd) |
4373 | | !CALL iom_put( "TPP3" , tpp3d ) |
4374 | | ENDIF |
4375 | | IF( med_diag%TPPD3%dgsave ) THEN |
4376 | | tppd3(ji,jj,jk) = (fprd * zphd) |
4377 | | ENDIF |
4378 | | |
4379 | | IF( med_diag%REMIN3N%dgsave ) THEN |
4380 | | remin3dn(ji,jj,jk) = fregen + (freminn * fthk) !! remineralisation |
4381 | | !CALL iom_put( "REMIN3N" , remin3dn ) |
4382 | | ENDIF |
4383 | | !! IF( med_diag%PH3%dgsave ) THEN |
4384 | | !! CALL iom_put( "PH3" , f3_pH ) |
4385 | | !! ENDIF |
4386 | | !! IF( med_diag%OM_CAL3%dgsave ) THEN |
4387 | | !! CALL iom_put( "OM_CAL3" , f3_omcal ) |
4388 | | !! ENDIF |
4389 | | !! |
4390 | | !! AXY (09/11/16): CMIP6 diagnostics |
4391 | | IF ( med_diag%DCALC3%dgsave ) THEN |
4392 | | dcalc3(ji,jj,jk) = freminca |
4393 | | ENDIF |
4394 | | IF ( med_diag%FEDISS3%dgsave ) THEN |
4395 | | fediss3(ji,jj,jk) = ffetop |
4396 | | ENDIF |
4397 | | IF ( med_diag%FESCAV3%dgsave ) THEN |
4398 | | fescav3(ji,jj,jk) = ffescav |
4399 | | ENDIF |
4400 | | IF ( med_diag%MIGRAZP3%dgsave ) THEN |
4401 | | migrazp3(ji,jj,jk) = fgmipn * xthetapn |
4402 | | ENDIF |
4403 | | IF ( med_diag%MIGRAZD3%dgsave ) THEN |
4404 | | migrazd3(ji,jj,jk) = fgmidc |
4405 | | ENDIF |
4406 | | IF ( med_diag%MEGRAZP3%dgsave ) THEN |
4407 | | megrazp3(ji,jj,jk) = (fgmepn * xthetapn) + (fgmepd * xthetapd) |
4408 | | ENDIF |
4409 | | IF ( med_diag%MEGRAZD3%dgsave ) THEN |
4410 | | megrazd3(ji,jj,jk) = fgmedc |
4411 | | ENDIF |
4412 | | IF ( med_diag%MEGRAZZ3%dgsave ) THEN |
4413 | | megrazz3(ji,jj,jk) = (fgmezmi * xthetazmi) |
4414 | | ENDIF |
4415 | | IF ( med_diag%PBSI3%dgsave ) THEN |
4416 | | pbsi3(ji,jj,jk) = (fprds * zpds) |
4417 | | ENDIF |
4418 | | IF ( med_diag%PCAL3%dgsave ) THEN |
4419 | | pcal3(ji,jj,jk) = ftempca |
4420 | | ENDIF |
4421 | | IF ( med_diag%REMOC3%dgsave ) THEN |
4422 | | remoc3(ji,jj,jk) = freminc |
4423 | | ENDIF |
4424 | | IF ( med_diag%PNLIMJ3%dgsave ) THEN |
4425 | | ! pnlimj3(ji,jj,jk) = fjln |
4426 | | pnlimj3(ji,jj,jk) = fjlim_pn |
4427 | | ENDIF |
4428 | | IF ( med_diag%PNLIMN3%dgsave ) THEN |
4429 | | pnlimn3(ji,jj,jk) = fnln |
4430 | | ENDIF |
4431 | | IF ( med_diag%PNLIMFE3%dgsave ) THEN |
4432 | | pnlimfe3(ji,jj,jk) = ffln |
4433 | | ENDIF |
4434 | | IF ( med_diag%PDLIMJ3%dgsave ) THEN |
4435 | | ! pdlimj3(ji,jj,jk) = fjld |
4436 | | pdlimj3(ji,jj,jk) = fjlim_pd |
4437 | | ENDIF |
4438 | | IF ( med_diag%PDLIMN3%dgsave ) THEN |
4439 | | pdlimn3(ji,jj,jk) = fnld |
4440 | | ENDIF |
4441 | | IF ( med_diag%PDLIMFE3%dgsave ) THEN |
4442 | | pdlimfe3(ji,jj,jk) = ffld |
4443 | | ENDIF |
4444 | | IF ( med_diag%PDLIMSI3%dgsave ) THEN |
4445 | | pdlimsi3(ji,jj,jk) = fsld2 |
4446 | | ENDIF |
4447 | | !! |
4448 | | !! ** Without using iom_use |
4449 | | ELSE IF( ln_diatrc ) THEN |
4450 | | # if defined key_debug_medusa |
4451 | | IF (lwp) write (numout,*) 'trc_bio_medusa: diag in ij-jj-jk ln_diatrc' |
4452 | | CALL flush(numout) |
4453 | | # endif |
4454 | | !!---------------------------------------------------------------------- |
4455 | | !! Prepare 2D diagnostics |
4456 | | !!---------------------------------------------------------------------- |
4457 | | !! |
4458 | | !! if ((kt / 240*240).eq.kt) then |
4459 | | !! IF (lwp) write (*,*) '*******!MEDUSA DIAADD!*******',kt |
4460 | | !! endif |
4461 | | trc2d(ji,jj,1) = ftot_n(ji,jj) !! nitrogen inventory |
4462 | | trc2d(ji,jj,2) = ftot_si(ji,jj) !! silicon inventory |
4463 | | trc2d(ji,jj,3) = ftot_fe(ji,jj) !! iron inventory |
4464 | | trc2d(ji,jj,4) = trc2d(ji,jj,4) + (fprn * zphn * fthk) !! non-diatom production |
4465 | | trc2d(ji,jj,5) = trc2d(ji,jj,5) + (fdpn * fthk) !! non-diatom non-grazing losses |
4466 | | trc2d(ji,jj,6) = trc2d(ji,jj,6) + (fprd * zphd * fthk) !! diatom production |
4467 | | trc2d(ji,jj,7) = trc2d(ji,jj,7) + (fdpd * fthk) !! diatom non-grazing losses |
4468 | | !! diagnostic field 8 is (ostensibly) supplied by trcsed.F |
4469 | | trc2d(ji,jj,9) = trc2d(ji,jj,9) + (fprds * zpds * fthk) !! diatom silicon production |
4470 | | trc2d(ji,jj,10) = trc2d(ji,jj,10) + (fsdiss * fthk) !! diatom silicon dissolution |
4471 | | trc2d(ji,jj,11) = trc2d(ji,jj,11) + (fgmipn * fthk) !! microzoo grazing on non-diatoms |
4472 | | trc2d(ji,jj,12) = trc2d(ji,jj,12) + (fgmid * fthk) !! microzoo grazing on detrital nitrogen |
4473 | | trc2d(ji,jj,13) = trc2d(ji,jj,13) + (fdzmi * fthk) !! microzoo non-grazing losses |
4474 | | trc2d(ji,jj,14) = trc2d(ji,jj,14) + (fgmepn * fthk) !! mesozoo grazing on non-diatoms |
4475 | | trc2d(ji,jj,15) = trc2d(ji,jj,15) + (fgmepd * fthk) !! mesozoo grazing on diatoms |
4476 | | trc2d(ji,jj,16) = trc2d(ji,jj,16) + (fgmezmi * fthk) !! mesozoo grazing on microzoo |
4477 | | trc2d(ji,jj,17) = trc2d(ji,jj,17) + (fgmed * fthk) !! mesozoo grazing on detrital nitrogen |
4478 | | trc2d(ji,jj,18) = trc2d(ji,jj,18) + (fdzme * fthk) !! mesozoo non-grazing losses |
4479 | | !! diagnostic field 19 is (ostensibly) supplied by trcexp.F |
4480 | | trc2d(ji,jj,20) = trc2d(ji,jj,20) + (fslown * fthk) !! slow sinking detritus N production |
4481 | | trc2d(ji,jj,21) = trc2d(ji,jj,21) + (fdd * fthk) !! detrital remineralisation |
4482 | | trc2d(ji,jj,22) = trc2d(ji,jj,22) + (ffetop * fthk) !! aeolian iron addition |
4483 | | trc2d(ji,jj,23) = trc2d(ji,jj,23) + (ffebot * fthk) !! seafloor iron addition |
4484 | | trc2d(ji,jj,24) = trc2d(ji,jj,24) + (ffescav * fthk) !! "free" iron scavenging |
4485 | | trc2d(ji,jj,25) = trc2d(ji,jj,25) + (fjlim_pn * zphn * fthk) !! non-diatom J limitation term |
4486 | | trc2d(ji,jj,26) = trc2d(ji,jj,26) + (fnln * zphn * fthk) !! non-diatom N limitation term |
4487 | | trc2d(ji,jj,27) = trc2d(ji,jj,27) + (ffln * zphn * fthk) !! non-diatom Fe limitation term |
4488 | | trc2d(ji,jj,28) = trc2d(ji,jj,28) + (fjlim_pd * zphd * fthk) !! diatom J limitation term |
4489 | | trc2d(ji,jj,29) = trc2d(ji,jj,29) + (fnld * zphd * fthk) !! diatom N limitation term |
4490 | | trc2d(ji,jj,30) = trc2d(ji,jj,30) + (ffld * zphd * fthk) !! diatom Fe limitation term |
4491 | | trc2d(ji,jj,31) = trc2d(ji,jj,31) + (fsld2 * zphd * fthk) !! diatom Si limitation term |
4492 | | trc2d(ji,jj,32) = trc2d(ji,jj,32) + (fsld * zphd * fthk) !! diatom Si uptake limitation term |
4493 | | if (jk.eq.i0100) trc2d(ji,jj,33) = fslownflux(ji,jj) !! slow detritus flux at 100 m |
4494 | | if (jk.eq.i0200) trc2d(ji,jj,34) = fslownflux(ji,jj) !! slow detritus flux at 200 m |
4495 | | if (jk.eq.i0500) trc2d(ji,jj,35) = fslownflux(ji,jj) !! slow detritus flux at 500 m |
4496 | | if (jk.eq.i1000) trc2d(ji,jj,36) = fslownflux(ji,jj) !! slow detritus flux at 1000 m |
4497 | | trc2d(ji,jj,37) = trc2d(ji,jj,37) + fregen !! non-fast N full column regeneration |
4498 | | trc2d(ji,jj,38) = trc2d(ji,jj,38) + fregensi !! non-fast Si full column regeneration |
4499 | | if (jk.eq.i0100) trc2d(ji,jj,39) = trc2d(ji,jj,37) !! non-fast N regeneration to 100 m |
4500 | | if (jk.eq.i0200) trc2d(ji,jj,40) = trc2d(ji,jj,37) !! non-fast N regeneration to 200 m |
4501 | | if (jk.eq.i0500) trc2d(ji,jj,41) = trc2d(ji,jj,37) !! non-fast N regeneration to 500 m |
4502 | | if (jk.eq.i1000) trc2d(ji,jj,42) = trc2d(ji,jj,37) !! non-fast N regeneration to 1000 m |
4503 | | trc2d(ji,jj,43) = trc2d(ji,jj,43) + (ftempn * fthk) !! fast sinking detritus N production |
4504 | | trc2d(ji,jj,44) = trc2d(ji,jj,44) + (ftempsi * fthk) !! fast sinking detritus Si production |
4505 | | trc2d(ji,jj,45) = trc2d(ji,jj,45) + (ftempfe * fthk) !! fast sinking detritus Fe production |
4506 | | trc2d(ji,jj,46) = trc2d(ji,jj,46) + (ftempc * fthk) !! fast sinking detritus C production |
4507 | | trc2d(ji,jj,47) = trc2d(ji,jj,47) + (ftempca * fthk) !! fast sinking detritus CaCO3 production |
4508 | | if (jk.eq.i0100) trc2d(ji,jj,48) = ffastn(ji,jj) !! fast detritus N flux at 100 m |
4509 | | if (jk.eq.i0200) trc2d(ji,jj,49) = ffastn(ji,jj) !! fast detritus N flux at 200 m |
4510 | | if (jk.eq.i0500) trc2d(ji,jj,50) = ffastn(ji,jj) !! fast detritus N flux at 500 m |
4511 | | if (jk.eq.i1000) trc2d(ji,jj,51) = ffastn(ji,jj) !! fast detritus N flux at 1000 m |
4512 | | if (jk.eq.i0100) trc2d(ji,jj,52) = fregenfast(ji,jj) !! N regeneration to 100 m |
4513 | | if (jk.eq.i0200) trc2d(ji,jj,53) = fregenfast(ji,jj) !! N regeneration to 200 m |
4514 | | if (jk.eq.i0500) trc2d(ji,jj,54) = fregenfast(ji,jj) !! N regeneration to 500 m |
4515 | | if (jk.eq.i1000) trc2d(ji,jj,55) = fregenfast(ji,jj) !! N regeneration to 1000 m |
4516 | | if (jk.eq.i0100) trc2d(ji,jj,56) = ffastsi(ji,jj) !! fast detritus Si flux at 100 m |
4517 | | if (jk.eq.i0200) trc2d(ji,jj,57) = ffastsi(ji,jj) !! fast detritus Si flux at 200 m |
4518 | | if (jk.eq.i0500) trc2d(ji,jj,58) = ffastsi(ji,jj) !! fast detritus Si flux at 500 m |
4519 | | if (jk.eq.i1000) trc2d(ji,jj,59) = ffastsi(ji,jj) !! fast detritus Si flux at 1000 m |
4520 | | if (jk.eq.i0100) trc2d(ji,jj,60) = fregenfastsi(ji,jj) !! Si regeneration to 100 m |
4521 | | if (jk.eq.i0200) trc2d(ji,jj,61) = fregenfastsi(ji,jj) !! Si regeneration to 200 m |
4522 | | if (jk.eq.i0500) trc2d(ji,jj,62) = fregenfastsi(ji,jj) !! Si regeneration to 500 m |
4523 | | if (jk.eq.i1000) trc2d(ji,jj,63) = fregenfastsi(ji,jj) !! Si regeneration to 1000 m |
4524 | | trc2d(ji,jj,64) = trc2d(ji,jj,64) + (freminn * fthk) !! sum of fast-sinking N fluxes |
4525 | | trc2d(ji,jj,65) = trc2d(ji,jj,65) + (freminsi * fthk) !! sum of fast-sinking Si fluxes |
4526 | | trc2d(ji,jj,66) = trc2d(ji,jj,66) + (freminfe * fthk) !! sum of fast-sinking Fe fluxes |
4527 | | trc2d(ji,jj,67) = trc2d(ji,jj,67) + (freminc * fthk) !! sum of fast-sinking C fluxes |
4528 | | trc2d(ji,jj,68) = trc2d(ji,jj,68) + (freminca * fthk) !! sum of fast-sinking Ca fluxes |
4529 | | if (jk.eq.jmbathy) then |
4530 | | trc2d(ji,jj,69) = fsedn(ji,jj) !! N sedimentation flux |
4531 | | trc2d(ji,jj,70) = fsedsi(ji,jj) !! Si sedimentation flux |
4532 | | trc2d(ji,jj,71) = fsedfe(ji,jj) !! Fe sedimentation flux |
4533 | | trc2d(ji,jj,72) = fsedc(ji,jj) !! C sedimentation flux |
4534 | | trc2d(ji,jj,73) = fsedca(ji,jj) !! Ca sedimentation flux |
4535 | | endif |
4536 | | if (jk.eq.1) trc2d(ji,jj,74) = qsr(ji,jj) |
4537 | | if (jk.eq.1) trc2d(ji,jj,75) = xpar(ji,jj,jk) |
4538 | | !! if (jk.eq.1) trc2d(ji,jj,75) = real(iters) |
4539 | | !! diagnostic fields 76 to 80 calculated below |
4540 | | trc2d(ji,jj,81) = trc2d(ji,jj,81) + fprn_ml(ji,jj) !! mixed layer non-diatom production |
4541 | | trc2d(ji,jj,82) = trc2d(ji,jj,82) + fprd_ml(ji,jj) !! mixed layer diatom production |
4542 | | # if defined key_gulf_finland |
4543 | | if (jk.eq.1) trc2d(ji,jj,83) = real(ibio_switch) !! Gulf of Finland check |
4544 | | # else |
4545 | | trc2d(ji,jj,83) = ocal_ccd(ji,jj) !! calcite CCD depth |
4546 | | # endif |
4547 | | trc2d(ji,jj,84) = fccd(ji,jj) !! last model level above calcite CCD depth |
4548 | | if (jk.eq.1) trc2d(ji,jj,85) = xFree(ji,jj) !! surface "free" iron |
4549 | | if (jk.eq.i0200) trc2d(ji,jj,86) = xFree(ji,jj) !! "free" iron at 100 m |
4550 | | if (jk.eq.i0200) trc2d(ji,jj,87) = xFree(ji,jj) !! "free" iron at 200 m |
4551 | | if (jk.eq.i0500) trc2d(ji,jj,88) = xFree(ji,jj) !! "free" iron at 500 m |
4552 | | if (jk.eq.i1000) trc2d(ji,jj,89) = xFree(ji,jj) !! "free" iron at 1000 m |
4553 | | !! AXY (27/06/12): extract "euphotic depth" |
4554 | | if (jk.eq.1) trc2d(ji,jj,90) = xze(ji,jj) |
4555 | | !! |
4556 | | # if defined key_roam |
4557 | | !! ROAM provisionally has access to a further 20 2D diagnostics |
4558 | | if (jk .eq. 1) then |
4559 | | trc2d(ji,jj,91) = trc2d(ji,jj,91) + f_wind !! surface wind |
4560 | | trc2d(ji,jj,92) = trc2d(ji,jj,92) + f_pco2atm !! atmospheric pCO2 |
4561 | | trc2d(ji,jj,93) = trc2d(ji,jj,93) + f_ph !! ocean pH |
4562 | | trc2d(ji,jj,94) = trc2d(ji,jj,94) + f_pco2w !! ocean pCO2 |
4563 | | trc2d(ji,jj,95) = trc2d(ji,jj,95) + f_h2co3 !! ocean H2CO3 conc. |
4564 | | trc2d(ji,jj,96) = trc2d(ji,jj,96) + f_hco3 !! ocean HCO3 conc. |
4565 | | trc2d(ji,jj,97) = trc2d(ji,jj,97) + f_co3 !! ocean CO3 conc. |
4566 | | trc2d(ji,jj,98) = trc2d(ji,jj,98) + f_co2flux !! air-sea CO2 flux |
4567 | | trc2d(ji,jj,99) = trc2d(ji,jj,99) + f_omcal(ji,jj) !! ocean omega calcite |
4568 | | trc2d(ji,jj,100) = trc2d(ji,jj,100) + f_omarg(ji,jj) !! ocean omega aragonite |
4569 | | trc2d(ji,jj,101) = trc2d(ji,jj,101) + f_TDIC !! ocean TDIC |
4570 | | trc2d(ji,jj,102) = trc2d(ji,jj,102) + f_TALK !! ocean TALK |
4571 | | trc2d(ji,jj,103) = trc2d(ji,jj,103) + f_kw660 !! surface kw660 |
4572 | | trc2d(ji,jj,104) = trc2d(ji,jj,104) + f_pp0 !! surface pressure |
4573 | | trc2d(ji,jj,105) = trc2d(ji,jj,105) + f_o2flux !! air-sea O2 flux |
4574 | | trc2d(ji,jj,106) = trc2d(ji,jj,106) + f_o2sat !! ocean O2 saturation |
4575 | | trc2d(ji,jj,107) = f2_ccd_cal(ji,jj) !! depth calcite CCD |
4576 | | trc2d(ji,jj,108) = f2_ccd_arg(ji,jj) !! depth aragonite CCD |
4577 | | endif |
4578 | | if (jk .eq. jmbathy) then |
4579 | | trc2d(ji,jj,109) = f3_omcal(ji,jj,jk) !! seafloor omega calcite |
4580 | | trc2d(ji,jj,110) = f3_omarg(ji,jj,jk) !! seafloor omega aragonite |
4581 | | endif |
4582 | | !! diagnostic fields 111 to 117 calculated below |
4583 | | if (jk.eq.i0100) trc2d(ji,jj,118) = ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) !! rain ratio at 100 m |
4584 | | if (jk.eq.i0500) trc2d(ji,jj,119) = ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) !! rain ratio at 500 m |
4585 | | if (jk.eq.i1000) trc2d(ji,jj,120) = ffastca(ji,jj)/MAX(ffastc(ji,jj), rsmall) !! rain ratio at 1000 m |
4586 | | !! AXY (18/01/12): benthic flux diagnostics |
4587 | | if (jk.eq.jmbathy) then |
4588 | | trc2d(ji,jj,121) = f_sbenin_n(ji,jj) + f_fbenin_n(ji,jj) |
4589 | | trc2d(ji,jj,122) = f_sbenin_fe(ji,jj) + f_fbenin_fe(ji,jj) |
4590 | | trc2d(ji,jj,123) = f_sbenin_c(ji,jj) + f_fbenin_c(ji,jj) |
4591 | | trc2d(ji,jj,124) = f_fbenin_si(ji,jj) |
4592 | | trc2d(ji,jj,125) = f_fbenin_ca(ji,jj) |
4593 | | trc2d(ji,jj,126) = f_benout_n(ji,jj) |
4594 | | trc2d(ji,jj,127) = f_benout_fe(ji,jj) |
4595 | | trc2d(ji,jj,128) = f_benout_c(ji,jj) |
4596 | | trc2d(ji,jj,129) = f_benout_si(ji,jj) |
4597 | | trc2d(ji,jj,130) = f_benout_ca(ji,jj) |
4598 | | endif |
4599 | | !! diagnostics fields 131 to 135 calculated below |
4600 | | trc2d(ji,jj,136) = f_runoff(ji,jj) |
4601 | | !! AXY (19/07/12): amended to allow for riverine nutrient addition below surface |
4602 | | trc2d(ji,jj,137) = trc2d(ji,jj,137) + (f_riv_loc_n * fthk) |
4603 | | trc2d(ji,jj,138) = trc2d(ji,jj,138) + (f_riv_loc_si * fthk) |
4604 | | trc2d(ji,jj,139) = trc2d(ji,jj,139) + (f_riv_loc_c * fthk) |
4605 | | trc2d(ji,jj,140) = trc2d(ji,jj,140) + (f_riv_loc_alk * fthk) |
4606 | | trc2d(ji,jj,141) = trc2d(ji,jj,141) + (fslowc * fthk) !! slow sinking detritus C production |
4607 | | if (jk.eq.i0100) trc2d(ji,jj,142) = fslowcflux(ji,jj) !! slow detritus flux at 100 m |
4608 | | if (jk.eq.i0200) trc2d(ji,jj,143) = fslowcflux(ji,jj) !! slow detritus flux at 200 m |
4609 | | if (jk.eq.i0500) trc2d(ji,jj,144) = fslowcflux(ji,jj) !! slow detritus flux at 500 m |
4610 | | if (jk.eq.i1000) trc2d(ji,jj,145) = fslowcflux(ji,jj) !! slow detritus flux at 1000 m |
4611 | | trc2d(ji,jj,146) = trc2d(ji,jj,146) + ftot_c(ji,jj) !! carbon inventory |
4612 | | trc2d(ji,jj,147) = trc2d(ji,jj,147) + ftot_a(ji,jj) !! alkalinity inventory |
4613 | | trc2d(ji,jj,148) = trc2d(ji,jj,148) + ftot_o2(ji,jj) !! oxygen inventory |
4614 | | if (jk.eq.jmbathy) then |
4615 | | trc2d(ji,jj,149) = f_benout_lyso_ca(ji,jj) |
4616 | | endif |
4617 | | trc2d(ji,jj,150) = fcomm_resp(ji,jj) * fthk !! community respiration |
4618 | | !! |
4619 | | !! AXY (14/02/14): a Valentines Day gift to BASIN - a shedload of new |
4620 | | !! diagnostics that they'll most likely never need! |
4621 | | !! (actually, as with all such gifts, I'm giving them |
4622 | | !! some things I'd like myself!) |
4623 | | !! |
4624 | | !! ---------------------------------------------------------------------- |
4625 | | !! linear losses |
4626 | | !! non-diatom |
4627 | | trc2d(ji,jj,151) = trc2d(ji,jj,151) + (fdpn2 * fthk) |
4628 | | !! diatom |
4629 | | trc2d(ji,jj,152) = trc2d(ji,jj,152) + (fdpd2 * fthk) |
4630 | | !! microzooplankton |
4631 | | trc2d(ji,jj,153) = trc2d(ji,jj,153) + (fdzmi2 * fthk) |
4632 | | !! mesozooplankton |
4633 | | trc2d(ji,jj,154) = trc2d(ji,jj,154) + (fdzme2 * fthk) |
4634 | | !! ---------------------------------------------------------------------- |
4635 | | !! microzooplankton grazing |
4636 | | !! microzooplankton messy -> N |
4637 | | trc2d(ji,jj,155) = trc2d(ji,jj,155) + (xphi * (fgmipn + fgmid) * fthk) |
4638 | | !! microzooplankton messy -> D |
4639 | | trc2d(ji,jj,156) = trc2d(ji,jj,156) + ((1. - xbetan) * finmi * fthk) |
4640 | | !! microzooplankton messy -> DIC |
4641 | | trc2d(ji,jj,157) = trc2d(ji,jj,157) + (xphi * ((xthetapn * fgmipn) + fgmidc) * fthk) |
4642 | | !! microzooplankton messy -> Dc |
4643 | | trc2d(ji,jj,158) = trc2d(ji,jj,158) + ((1. - xbetac) * ficmi * fthk) |
4644 | | !! microzooplankton excretion |
4645 | | trc2d(ji,jj,159) = trc2d(ji,jj,159) + (fmiexcr * fthk) |
4646 | | !! microzooplankton respiration |
4647 | | trc2d(ji,jj,160) = trc2d(ji,jj,160) + (fmiresp * fthk) |
4648 | | !! microzooplankton growth |
4649 | | trc2d(ji,jj,161) = trc2d(ji,jj,161) + (fmigrow * fthk) |
4650 | | !! ---------------------------------------------------------------------- |
4651 | | !! mesozooplankton grazing |
4652 | | !! mesozooplankton messy -> N |
4653 | | trc2d(ji,jj,162) = trc2d(ji,jj,162) + (xphi * (fgmepn + fgmepd + fgmezmi + fgmed) * fthk) |
4654 | | !! mesozooplankton messy -> D |
4655 | | trc2d(ji,jj,163) = trc2d(ji,jj,163) + ((1. - xbetan) * finme * fthk) |
4656 | | !! mesozooplankton messy -> DIC |
4657 | | trc2d(ji,jj,164) = trc2d(ji,jj,164) + (xphi * ((xthetapn * fgmepn) + (xthetapd * fgmepd) + & |
4658 | | & (xthetazmi * fgmezmi) + fgmedc) * fthk) |
4659 | | !! mesozooplankton messy -> Dc |
4660 | | trc2d(ji,jj,165) = trc2d(ji,jj,165) + ((1. - xbetac) * ficme * fthk) |
4661 | | !! mesozooplankton excretion |
4662 | | trc2d(ji,jj,166) = trc2d(ji,jj,166) + (fmeexcr * fthk) |
4663 | | !! mesozooplankton respiration |
4664 | | trc2d(ji,jj,167) = trc2d(ji,jj,167) + (fmeresp * fthk) |
4665 | | !! mesozooplankton growth |
4666 | | trc2d(ji,jj,168) = trc2d(ji,jj,168) + (fmegrow * fthk) |
4667 | | !! ---------------------------------------------------------------------- |
4668 | | !! miscellaneous |
4669 | | trc2d(ji,jj,169) = trc2d(ji,jj,169) + (fddc * fthk) !! detrital C remineralisation |
4670 | | trc2d(ji,jj,170) = trc2d(ji,jj,170) + (fgmidc * fthk) !! microzoo grazing on detrital carbon |
4671 | | trc2d(ji,jj,171) = trc2d(ji,jj,171) + (fgmedc * fthk) !! mesozoo grazing on detrital carbon |
4672 | | !! |
4673 | | !! ---------------------------------------------------------------------- |
4674 | | !! |
4675 | | !! AXY (23/10/14): extract primary production related surface fields to |
4676 | | !! deal with diel cycle issues; hijacking BASIN 150m |
4677 | | !! diagnostics to do so (see commented out diagnostics |
4678 | | !! below this section) |
4679 | | !! |
4680 | | !! extract fields at surface |
4681 | | !! if (jk .eq. 1) then |
4682 | | !! trc2d(ji,jj,172) = zchn !! Pn chlorophyll |
4683 | | !! trc2d(ji,jj,173) = zphn !! Pn biomass |
4684 | | !! trc2d(ji,jj,174) = fjln !! Pn J-term |
4685 | | !! trc2d(ji,jj,175) = (fprn * zphn) !! Pn PP |
4686 | | !! trc2d(ji,jj,176) = zchd !! Pd chlorophyll |
4687 | | !! trc2d(ji,jj,177) = zphd !! Pd biomass |
4688 | | !! trc2d(ji,jj,178) = fjld !! Pd J-term |
4689 | | !! trc2d(ji,jj,179) = xpar(ji,jj,jk) !! Pd PP |
4690 | | !! trc2d(ji,jj,180) = loc_T !! local temperature |
4691 | | !! endif |
4692 | | !! !! |
4693 | | !! !! extract fields at 50m (actually 44-50m) |
4694 | | !! if (jk .eq. 18) then |
4695 | | !! trc2d(ji,jj,181) = zchn !! Pn chlorophyll |
4696 | | !! trc2d(ji,jj,182) = zphn !! Pn biomass |
4697 | | !! trc2d(ji,jj,183) = fjln !! Pn J-term |
4698 | | !! trc2d(ji,jj,184) = (fprn * zphn) !! Pn PP |
4699 | | !! trc2d(ji,jj,185) = zchd !! Pd chlorophyll |
4700 | | !! trc2d(ji,jj,186) = zphd !! Pd biomass |
4701 | | !! trc2d(ji,jj,187) = fjld !! Pd J-term |
4702 | | !! trc2d(ji,jj,188) = xpar(ji,jj,jk) !! Pd PP |
4703 | | !! trc2d(ji,jj,189) = loc_T !! local temperature |
4704 | | !! endi |