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 | | !! |
| 236 | !!------------------------------------------------------------------ |
| 237 | !! Initialise arrays to zero and set up arrays for diagnostics |
| 238 | !!------------------------------------------------------------------ |
| 239 | CALL bio_medusa_init( kt ) |
| 240 | |
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 ) |