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 7403 for branches/2016/dev_merge_2016/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90 – NEMO

Ignore:
Timestamp:
2016-11-30T17:56:53+01:00 (8 years ago)
Author:
timgraham
Message:

Merge dev_INGV_METO_merge_2016 into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_merge_2016/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90

    r6325 r7403  
    1111   !!             3.5  !  2012-05  (C. Ethe) Merge PISCES-LOBSTER 
    1212   !!---------------------------------------------------------------------- 
    13 #if defined key_pisces || defined key_pisces_reduced 
    14    !!---------------------------------------------------------------------- 
    15    !!   'key_pisces'                                       PISCES bio-model 
    16    !!---------------------------------------------------------------------- 
    1713   !! trc_ini_pisces   : PISCES biochemical model initialisation 
    1814   !!---------------------------------------------------------------------- 
    19    USE par_trc         ! TOP parameters 
     15   USE par_trc         !  TOP parameters 
    2016   USE oce_trc         !  shared variables between ocean and passive tracers 
    2117   USE trc             !  passive tracers common variables  
     18   USE trcnam_pisces   !  PISCES namelist 
    2219   USE sms_pisces      !  PISCES Source Minus Sink variables 
    2320 
     
    4138      !!---------------------------------------------------------------------- 
    4239 
    43       IF( lk_p4z ) THEN  ;   CALL p4z_ini   !  PISCES 
    44       ELSE               ;   CALL p2z_ini   !  LOBSTER 
     40      ! 
     41      CALL trc_nam_pisces 
     42      ! 
     43      IF( ln_p4z .OR. ln_p5z ) THEN  ;   CALL p4z_ini   !  PISCES 
     44      ELSE                           ;   CALL p2z_ini   !  LOBSTER 
    4545      ENDIF 
    4646 
     
    5353      !! ** Purpose :   Initialisation of the PISCES biochemical model 
    5454      !!---------------------------------------------------------------------- 
    55 #if defined key_pisces  
    5655      ! 
    5756      USE p4zsms          ! Main P4Z routine 
     
    7069      USE p4zlys          !  Calcite saturation 
    7170      USE p4zsed          !  Sedimentation & burial 
     71      USE p4zpoc          !  Remineralization of organic particles 
     72      USE p4zligand       !  Remineralization of organic ligands 
     73      USE p5zlim          !  Co-limitations of differents nutrients 
     74      USE p5zprod         !  Growth rate of the 2 phyto groups 
     75      USE p5zmicro        !  Sources and sinks of microzooplankton 
     76      USE p5zmeso         !  Sources and sinks of mesozooplankton 
     77      USE p5zmort         !  Mortality terms for phytoplankton 
     78 
    7279      ! 
    7380      REAL(wp), SAVE :: sco2   =  2.312e-3_wp 
     
    7986      REAL(wp), SAVE :: no3    =  30.9e-6_wp * 7.625_wp 
    8087      ! 
    81       INTEGER  ::  ji, jj, jk, ierr 
     88      INTEGER  ::  ji, jj, jk, jn, ierr 
    8289      REAL(wp) ::  zcaralk, zbicarb, zco3 
    8390      REAL(wp) ::  ztmas, ztmas1 
    84       !!---------------------------------------------------------------------- 
    85  
    86       IF(lwp) WRITE(numout,*) 
    87       IF(lwp) WRITE(numout,*) ' p4z_ini :   PISCES biochemical model initialisation' 
    88       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    89  
    90                                                  ! Allocate PISCES arrays 
     91      CHARACTER(len = 20)  ::  cltra 
     92 
     93      !!---------------------------------------------------------------------- 
     94 
     95      IF(lwp) THEN 
     96         WRITE(numout,*) 
     97         IF( ln_p4z ) THEN  
     98            WRITE(numout,*) ' p4z_ini :   PISCES biochemical model initialisation' 
     99         ELSE 
     100            WRITE(numout,*) ' p5z_ini :   PISCES biochemical model initialisation' 
     101            WRITE(numout,*) '             With variable stoichiometry' 
     102         ENDIF 
     103         WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
     104      ENDIF 
     105      ! 
     106      ! Allocate PISCES arrays 
    91107      ierr =         sms_pisces_alloc()           
    92108      ierr = ierr +  p4z_che_alloc() 
    93109      ierr = ierr +  p4z_sink_alloc() 
    94110      ierr = ierr +  p4z_opt_alloc() 
    95       ierr = ierr +  p4z_prod_alloc() 
    96       ierr = ierr +  p4z_rem_alloc() 
    97111      ierr = ierr +  p4z_flx_alloc() 
    98112      ierr = ierr +  p4z_sed_alloc() 
     113      ierr = ierr +  p4z_rem_alloc() 
     114      IF( ln_p4z ) THEN 
     115         ierr = ierr +  p4z_lim_alloc() 
     116         ierr = ierr +  p4z_prod_alloc() 
     117      ELSE 
     118         ierr = ierr +  p5z_lim_alloc() 
     119         ierr = ierr +  p5z_prod_alloc() 
     120      ENDIF 
    99121      ! 
    100122      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     
    104126      r1_ryyss = 1. / ryyss 
    105127      ! 
     128 
     129      ! assign an index in trc arrays for each prognostic variables 
     130      DO jn = 1, jptra 
     131        cltra = ctrcnm(jn)  
     132        IF( cltra == 'DIC'      )   jpdic = jn      !: dissolved inoganic carbon concentration  
     133        IF( cltra == 'Alkalini' )   jptal = jn      !: total alkalinity  
     134        IF( cltra == 'O2'       )   jpoxy = jn      !: oxygen carbon concentration  
     135        IF( cltra == 'CaCO3'    )   jpcal = jn      !: calcite  concentration  
     136        IF( cltra == 'PO4'      )   jppo4 = jn      !: phosphate concentration  
     137        IF( cltra == 'POC'      )   jppoc = jn      !: small particulate organic phosphate concentration 
     138        IF( cltra == 'Si'       )   jpsil = jn      !: silicate concentration 
     139        IF( cltra == 'PHY'      )   jpphy = jn      !: phytoplancton concentration  
     140        IF( cltra == 'ZOO'      )   jpzoo = jn      !: zooplancton concentration 
     141        IF( cltra == 'DOC'      )   jpdoc = jn      !: dissolved organic carbon concentration  
     142        IF( cltra == 'PHY2'     )   jpdia = jn      !: Diatoms Concentration 
     143        IF( cltra == 'ZOO2'     )   jpmes = jn      !: Mesozooplankton Concentration 
     144        IF( cltra == 'DSi'      )   jpdsi = jn      !: Diatoms Silicate Concentration 
     145        IF( cltra == 'Fer'      )   jpfer = jn      !: Iron Concentration 
     146        IF( cltra == 'BFe'      )   jpbfe = jn      !: Big iron particles Concentration 
     147        IF( cltra == 'GOC'      )   jpgoc = jn      !: Big particulate organic phosphate concentration 
     148        IF( cltra == 'SFe'      )   jpsfe = jn      !: Small iron particles Concentration 
     149        IF( cltra == 'DFe'      )   jpdfe = jn      !: Diatoms iron Concentration 
     150        IF( cltra == 'GSi'      )   jpgsi = jn      !: (big) Silicate Concentration 
     151        IF( cltra == 'NFe'      )   jpnfe = jn      !: Nano iron Concentration 
     152        IF( cltra == 'NCHL'     )   jpnch = jn      !: Nano Chlorophyll Concentration 
     153        IF( cltra == 'DCHL'     )   jpdch = jn      !: Diatoms Chlorophyll Concentration 
     154        IF( cltra == 'NO3'      )   jpno3 = jn      !: Nitrates Concentration 
     155        IF( cltra == 'NH4'      )   jpnh4 = jn      !: Ammonium Concentration 
     156        IF( cltra == 'DON'      )   jpdon = jn      !: Dissolved organic N Concentration 
     157        IF( cltra == 'DOP'      )   jpdop = jn      !: Dissolved organic P Concentration 
     158        IF( cltra == 'PON'      )   jppon = jn      !: Small Nitrogen particle Concentration 
     159        IF( cltra == 'POP'      )   jppop = jn      !: Small Phosphorus particle Concentration 
     160        IF( cltra == 'GON'      )   jpgon = jn      !: Big Nitrogen particles Concentration 
     161        IF( cltra == 'GOP'      )   jpgop = jn      !: Big Phosphorus Concentration 
     162        IF( cltra == 'PHYN'     )   jpnph = jn      !: Nanophytoplankton N biomass 
     163        IF( cltra == 'PHYP'     )   jppph = jn      !: Nanophytoplankton P biomass 
     164        IF( cltra == 'DIAN'     )   jpndi = jn      !: Diatoms N biomass 
     165        IF( cltra == 'DIAP'     )   jppdi = jn      !: Diatoms P biomass 
     166        IF( cltra == 'PIC'      )   jppic = jn      !: Picophytoplankton C biomass 
     167        IF( cltra == 'PICN'     )   jpnpi = jn      !: Picophytoplankton N biomass 
     168        IF( cltra == 'PICP'     )   jpppi = jn      !: Picophytoplankton P biomass 
     169        IF( cltra == 'PFe'      )   jppfe = jn      !: Picophytoplankton Fe biomass 
     170        IF( cltra == 'LGW'      )   jplgw = jn      !: Weak ligands 
     171        IF( cltra == 'LFe'      )   jpfep = jn      !: Fe nanoparticle 
     172      ENDDO 
    106173 
    107174      CALL p4z_sms_init       !  Maint routine 
     
    116183      rdenit  =  ( ( o2ut + o2nit ) * 0.80 - rno3 - rno3 * 0.60 ) / rno3 
    117184      rdenita =   3._wp /  5._wp 
    118  
     185      IF( ln_p5z ) THEN 
     186         no3rat3 = no3rat3 / rno3 
     187         po4rat3 = po4rat3 / po4r 
     188      ENDIF 
    119189 
    120190      ! Initialization of tracer concentration in case of  no restart  
    121191      !-------------------------------------------------------------- 
    122       IF( .NOT. ln_rsttr ) THEN   
    123           
     192      IF( .NOT.ln_rsttr ) THEN   
    124193         trn(:,:,:,jpdic) = sco2 
    125194         trn(:,:,:,jpdoc) = bioma0 
     
    129198         trn(:,:,:,jppo4) = po4 / po4r 
    130199         trn(:,:,:,jppoc) = bioma0 
    131 #  if ! defined key_kriest 
    132200         trn(:,:,:,jpgoc) = bioma0 
    133201         trn(:,:,:,jpbfe) = bioma0 * 5.e-6 
    134 #  else 
    135          trn(:,:,:,jpnum) = bioma0 / ( 6. * xkr_massp ) 
    136 #  endif 
    137202         trn(:,:,:,jpsil) = silic1 
    138203         trn(:,:,:,jpdsi) = bioma0 * 0.15 
     
    150215         trn(:,:,:,jpno3) = no3 
    151216         trn(:,:,:,jpnh4) = bioma0 
    152  
     217         IF( ln_ligand) THEN 
     218            trn(:,:,:,jplgw) = 0.6E-9 
     219            trn(:,:,:,jpfep) = 0. * 5.e-6 
     220         ENDIF 
     221         IF( ln_p5z ) THEN 
     222            trn(:,:,:,jpdon) = bioma0 
     223            trn(:,:,:,jpdop) = bioma0 
     224            trn(:,:,:,jppon) = bioma0 
     225            trn(:,:,:,jppop) = bioma0 
     226            trn(:,:,:,jpgon) = bioma0 
     227            trn(:,:,:,jpgop) = bioma0 
     228            trn(:,:,:,jpnph) = bioma0 
     229            trn(:,:,:,jppph) = bioma0 
     230            trn(:,:,:,jppic) = bioma0 
     231            trn(:,:,:,jpnpi) = bioma0 
     232            trn(:,:,:,jpppi) = bioma0 
     233            trn(:,:,:,jpndi) = bioma0 
     234            trn(:,:,:,jppdi) = bioma0 
     235            trn(:,:,:,jppfe) = bioma0 * 5.e-6 
     236            trn(:,:,:,jppch) = bioma0 * 12. / 55. 
     237         ENDIF 
    153238         ! initialize the half saturation constant for silicate 
    154239         ! ---------------------------------------------------- 
     
    158243 
    159244 
    160       CALL p4z_sink_init      !  vertical flux of particulate organic matter 
    161       CALL p4z_opt_init       !  Optic: PAR in the water column 
    162       CALL p4z_lim_init       !  co-limitations by the various nutrients 
    163       CALL p4z_prod_init      !  phytoplankton growth rate over the global ocean. 
    164       CALL p4z_sbc_init       !  boundary conditions 
    165       CALL p4z_fechem_init    !  Iron chemistry 
    166       CALL p4z_rem_init       !  remineralisation 
    167       CALL p4z_mort_init      !  phytoplankton mortality  
    168       CALL p4z_micro_init     !  microzooplankton 
    169       CALL p4z_meso_init      !  mesozooplankton 
    170       CALL p4z_lys_init       !  calcite saturation 
    171       CALL p4z_flx_init       !  gas exchange  
     245      CALL p4z_sink_init         !  vertical flux of particulate organic matter 
     246      CALL p4z_opt_init          !  Optic: PAR in the water column 
     247      IF( ln_p4z ) THEN 
     248         CALL p4z_lim_init       !  co-limitations by the various nutrients 
     249         CALL p4z_prod_init      !  phytoplankton growth rate over the global ocean. 
     250      ELSE 
     251         CALL p5z_lim_init       !  co-limitations by the various nutrients 
     252         CALL p5z_prod_init      !  phytoplankton growth rate over the global ocean. 
     253      ENDIF 
     254      CALL p4z_sbc_init          !  boundary conditions 
     255      CALL p4z_fechem_init       !  Iron chemistry 
     256      CALL p4z_rem_init          !  remineralisation 
     257      CALL p4z_poc_init          !  remineralisation of organic particles 
     258      IF( ln_ligand ) & 
     259         & CALL p4z_ligand_init  !  remineralisation of organic ligands 
     260 
     261      IF( ln_p4z ) THEN 
     262         CALL p4z_mort_init      !  phytoplankton mortality  
     263         CALL p4z_micro_init     !  microzooplankton 
     264         CALL p4z_meso_init      !  mesozooplankton 
     265      ELSE 
     266         CALL p5z_mort_init      !  phytoplankton mortality  
     267         CALL p5z_micro_init     !  microzooplankton 
     268         CALL p5z_meso_init      !  mesozooplankton 
     269      ENDIF 
     270      CALL p4z_lys_init          !  calcite saturation 
     271      IF( .NOT.l_co2cpl ) & 
     272        & CALL p4z_flx_init      !  gas exchange  
    172273 
    173274      ndayflxtr = 0 
     
    176277      IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done' 
    177278      IF(lwp) WRITE(numout,*)  
    178 #endif 
    179279      ! 
    180280   END SUBROUTINE p4z_ini 
     
    186286      !! ** Purpose :   Initialisation of the LOBSTER biochemical model 
    187287      !!---------------------------------------------------------------------- 
    188 #if defined key_pisces_reduced  
    189288      ! 
    190289      USE p2zopt 
     
    193292      USE p2zsed 
    194293      ! 
    195       INTEGER  ::  ji, jj, jk, ierr 
     294      INTEGER  ::  ji, jj, jk, jn, ierr 
     295      CHARACTER(len = 10)  ::  cltra 
    196296      !!---------------------------------------------------------------------- 
    197297 
     
    205305      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
    206306      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' ) 
     307 
     308      DO jn = 1, jptra 
     309        cltra = ctrcnm(jn)  
     310        IF( cltra == 'DET' )   jpdet = jn       !: detritus                    [mmoleN/m3] 
     311        IF( cltra == 'ZOO' )   jpzoo = jn       !: zooplancton concentration   [mmoleN/m3] 
     312        IF( cltra == 'PHY' )   jpphy = jn       !: phytoplancton concentration [mmoleN/m3] 
     313        IF( cltra == 'NO3' )   jpno3 = jn       !: nitrate concentration       [mmoleN/m3] 
     314        IF( cltra == 'NH4' )   jpnh4 = jn       !: ammonium concentration      [mmoleN/m3] 
     315        IF( cltra == 'DOM' )   jpdom = jn       !: dissolved organic matter    [mmoleN/m3] 
     316      ENDDO 
     317 
     318      jpkb = 10        !  last level where depth less than 200 m 
     319      DO jk = jpkm1, 1, -1 
     320         IF( gdept_1d(jk) > 200. ) jpkb = jk  
     321      END DO 
     322      IF (lwp) WRITE(numout,*) 
     323      IF (lwp) WRITE(numout,*) ' first vertical layers where biology is active (200m depth ) ', jpkb 
     324      IF (lwp) WRITE(numout,*) 
     325      jpkbm1 = jpkb - 1 
     326      ! 
     327 
    207328 
    208329      ! LOBSTER initialisation for GYRE : init NO3=f(density) by asklod AS Kremeur 2005-07 
     
    214335         trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:) 
    215336         trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:) 
    216          WHERE( rhd(:,:,:) <= 24.5e-3 )  ;  trn(:,:,:,jpno3 ) = 2._wp * tmask(:,:,:) 
     337         WHERE( rhd(:,:,:) <= 24.5e-3 )  ;  trn(:,:,:,jpno3) = 2._wp * tmask(:,:,:) 
    217338         ELSE WHERE                      ;  trn(:,:,:,jpno3) = ( 15.55 * ( rhd(:,:,:) * 1000. ) - 380.11 ) * tmask(:,:,:) 
    218339         END WHERE                        
     
    227348      IF(lwp) WRITE(numout,*) 'Initialization of LOBSTER tracers done' 
    228349      IF(lwp) WRITE(numout,*)  
    229 #endif 
    230350      ! 
    231351   END SUBROUTINE p2z_ini 
    232 #else 
    233    !!---------------------------------------------------------------------- 
    234    !!   Dummy module                            No PISCES biochemical model 
    235    !!---------------------------------------------------------------------- 
    236 CONTAINS 
    237    SUBROUTINE trc_ini_pisces             ! Empty routine 
    238    END SUBROUTINE trc_ini_pisces 
    239 #endif 
    240352 
    241353   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.