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 15459 for NEMO/trunk/src/TOP/PISCES/P4Z/p4zint.F90 – NEMO

Ignore:
Timestamp:
2021-10-29T10:19:18+02:00 (3 years ago)
Author:
cetlod
Message:

Various bug fixes and more comments in PISCES routines ; sette test OK in debug mode, nn_hls=1/2, with tiling ; run.stat unchanged ; of course tracer.stat different

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/TOP/PISCES/P4Z/p4zint.F90

    r15090 r15459  
    11MODULE p4zint 
    2    !!====================================================================== 
     2   !!========================================================================= 
    33   !!                         ***  MODULE p4zint  *** 
    44   !! TOP :   PISCES interpolation and computation of various accessory fields 
    5    !!====================================================================== 
     5   !!========================================================================= 
    66   !! History :   1.0  !  2004-03 (O. Aumont) Original code 
    77   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90 
     
    3737      INTEGER, INTENT( in ) ::   Kbb, Kmm ! time level indices 
    3838      ! 
    39       INTEGER  :: ji, jj                 ! dummy loop indices 
    40       REAL(wp) :: zvar                   ! local variable 
     39      INTEGER  :: ji, jj, jk              ! dummy loop indices 
     40      REAL(wp) :: zrum, zcodel, zargu, zvar 
    4141      !!--------------------------------------------------------------------- 
    4242      ! 
     
    4545      ! Computation of phyto and zoo metabolic rate 
    4646      ! ------------------------------------------- 
    47       tgfunc (:,:,:) = EXP( 0.063913 * ts(:,:,:,jp_tem,Kmm) ) 
    48       tgfunc2(:,:,:) = EXP( 0.07608  * ts(:,:,:,jp_tem,Kmm) ) 
     47      ! Generic temperature dependence (Eppley, 1972) 
     48      tgfunc (:,:,:) = EXP( 0.0631 * ts(:,:,:,jp_tem,Kmm) ) 
     49      ! Temperature dependence of mesozooplankton (Buitenhuis et al. (2005)) 
     50      tgfunc2(:,:,:) = EXP( 0.0761 * ts(:,:,:,jp_tem,Kmm) ) 
     51 
    4952 
    5053      ! Computation of the silicon dependant half saturation  constant for silica uptake 
    51       ! --------------------------------------------------- 
     54      ! This is based on an old study by Pondaven et al. (1998) 
     55      ! -------------------------------------------------------------------------------- 
    5256      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    5357         zvar = tr(ji,jj,1,jpsil,Kbb) * tr(ji,jj,1,jpsil,Kbb) 
     
    5559      END_2D 
    5660      ! 
     61      ! At the end of each year, the half saturation constant for silica is  
     62      ! updated as this is based on the highest concentration reached over  
     63      ! the year 
     64      ! ------------------------------------------------------------------- 
    5765      IF( nday_year == nyear_len(1) ) THEN 
    5866         xksi   (:,:) = xksimax(:,:) 
    5967         xksimax(:,:) = 0._wp 
    6068      ENDIF 
     69      ! 
     70      ! compute the day length depending on latitude and the day 
     71      ! Astronomical parameterization taken from HAMOCC3 
     72      zrum = REAL( nday_year - 80, wp ) / REAL( nyear_len(1), wp ) 
     73      zcodel = ASIN(  SIN( zrum * rpi * 2._wp ) * SIN( rad * 23.5_wp )  ) 
     74 
     75      ! day length in hours 
     76      strn(:,:) = 0. 
     77      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     78         zargu = TAN( zcodel ) * TAN( gphit(ji,jj) * rad ) 
     79         zargu = MAX( -1., MIN(  1., zargu ) ) 
     80         strn(ji,jj) = MAX( 0.0, 24. - 2. * ACOS( zargu ) / rad / 15. ) 
     81      END_2D 
     82      ! 
     83      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
     84        ! denitrification factor computed from O2 levels 
     85         ! This factor diagnoses below which level of O2 denitrification 
     86         ! is active 
     87         nitrfac(ji,jj,jk) = MAX(  0.e0, 0.4 * ( 6.e-6  - tr(ji,jj,jk,jpoxy,Kbb) )    & 
     88            &                                / ( oxymin + tr(ji,jj,jk,jpoxy,Kbb) )  ) 
     89         nitrfac(ji,jj,jk) = MIN( 1., nitrfac(ji,jj,jk) ) 
     90         ! 
     91         ! redox factor computed from NO3 levels 
     92         ! This factor diagnoses below which level of NO3 additional redox 
     93         ! reactions are taking place. 
     94         nitrfac2(ji,jj,jk) = MAX( 0.e0,       ( 1.E-6 - tr(ji,jj,jk,jpno3,Kbb) )  & 
     95            &                                / ( 1.E-6 + tr(ji,jj,jk,jpno3,Kbb) ) ) 
     96         nitrfac2(ji,jj,jk) = MIN( 1., nitrfac2(ji,jj,jk) ) 
     97      END_3D 
    6198      ! 
    6299      IF( ln_timing )   CALL timing_stop('p4z_int') 
Note: See TracChangeset for help on using the changeset viewer.