New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 8489 for branches/NERC/dev_r5518_GO6_MEDUSA_conserv/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90 – NEMO

Ignore:
Timestamp:
2017-09-01T16:55:53+02:00 (7 years ago)
Author:
jpalmier
Message:

JPALM -- gmed ticket #346 : improve MEDUSA conservation -- import BBL bug fix from NEMO ticket #1932 to GO6 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_GO6_MEDUSA_conserv/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90

    r8441 r8489  
    66   !! History : 
    77   !!   -   ! 2017-04 (M. Stringer)        Code taken from trcbio_medusa.F90 
     8   !!   -   ! 2017-08 (A. Yool)            Revise slow-sinking of detritus 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_medusa 
     
    3536                                        f_sbenin_n, fdd,                   & 
    3637                                        idf, idfval,                       &    
    37 # if defined key_roam 
     38                                        fslowsink,                         & 
     39                                        fslowgain, fslowloss,              & 
     40# if defined key_roam 
     41                                        fslowsinkc,                        & 
     42                                        fslowgainc, fslowlossc,            & 
    3843                                        fddc,                              & 
    3944# endif 
    4045                                        fun_T, fun_Q10, zdet, zdtc 
    4146      USE detritus_fast_sink_mod, ONLY: detritus_fast_sink 
    42       USE dom_oce,                ONLY: mbathy, tmask 
     47      USE dom_oce,                ONLY: mbathy, e3t_0, e3t_n, gphit, tmask 
    4348      USE in_out_manager,         ONLY: lwp, numout 
    4449      USE par_oce,                ONLY: jpim1, jpjm1 
    4550      USE sms_medusa,             ONLY: jmd, jorgben, jsfd, vsed,          & 
    4651                                        xrfn, xmd, xmdc, xthetad 
     52 
     53   !!* Substitution 
     54#  include "domzgr_substitute.h90" 
    4755 
    4856      !! Level 
     
    123131         DO ji = 2,jpim1 
    124132            if (tmask(ji,jj,jk) == 1) then 
     133               !!---------------------------------------------------------------------- 
     134               !! Detritus sinking (AXY, 08/08/18) 
     135          !! Replaces slow-sinking done in trcsed_medusa.F90 
     136               !! 
     137               !! Uses the fslowsink variable to carry slow-sinking detritus from one 
     138               !! grid level to the next, variable fslowgain to "add" detritus sinking 
     139               !! from above and variable fslowloss to "subtract" detritus sinking out 
     140               !! to below; these variables appear in the differential equations of 
     141               !! detrital nitrogen and carbon below 
     142               !!---------------------------------------------------------------------- 
     143               !! 
     144               fslowgain(ji,jj)  = fslowsink(ji,jj) / fse3t(ji,jj,jk)                  ! = mmol N / m3 / d 
     145               if (jk.lt.mbathy(ji,jj)) then 
     146                  fslowloss(ji,jj)  = (zdet(ji,jj) * vsed * 86400.) / fse3t(ji,jj,jk)  ! = mmol N / m3 / d 
     147               else 
     148                  fslowloss(ji,jj)  = 0.                                               ! = mmol N / m3 / d 
     149               endif 
     150               fslowsink(ji,jj) = fslowloss(ji,jj) * fse3t(ji,jj,jk)                   ! = mmol N / m2 / d 
     151               !! 
     152#  if defined key_roam 
     153               fslowgainc(ji,jj) = fslowsinkc(ji,jj) / fse3t(ji,jj,jk)                 ! = mmol C / m3 / d 
     154               if (jk.lt.mbathy(ji,jj)) then 
     155                  fslowlossc(ji,jj) = (zdtc(ji,jj) * vsed * 86400.) / fse3t(ji,jj,jk)  ! = mmol C / m3 / d 
     156               else 
     157                  fslowlossc(ji,jj) = 0.                                               ! = mmol C / m3 / d 
     158               endif 
     159               fslowsinkc(ji,jj) = fslowlossc(ji,jj) * fse3t(ji,jj,jk)                 ! = mmol C / m2 / d 
     160#  endif 
     161            ENDIF 
     162         ENDDO 
     163      ENDDO 
     164 
     165      DO jj = 2,jpjm1 
     166         DO ji = 2,jpim1 
     167            if (tmask(ji,jj,jk) == 1) then 
    125168               !!--------------------------------------------------------- 
    126169               !! Detritus addition to benthos 
Note: See TracChangeset for help on using the changeset viewer.