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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    • Property svn:eol-style deleted
    r1834 r2528  
    2020   PUBLIC   trc_oce_rgb_read   ! routine called by traqsr.F90 
    2121   PUBLIC   trc_oce_ext_lev    ! function called by traqsr.F90 at least 
    22     
     22  
     23   REAL(wp), PUBLIC                          ::   r_si2   !: largest depth of extinction (blue & 0.01 mg.m-3)  (RGB) 
    2324   REAL(wp), PUBLIC , DIMENSION(jpi,jpj,jpk) ::   etot3   !: light absortion coefficient 
    2425 
     
    3536#endif 
    3637 
     38#if defined key_offline 
     39   !!---------------------------------------------------------------------- 
     40   !!   'key_offline'                                     OFFLINE mode           
     41   !!---------------------------------------------------------------------- 
     42   LOGICAL, PUBLIC, PARAMETER ::   lk_offline = .TRUE.   !: offline flag 
     43#else 
     44   !!---------------------------------------------------------------------- 
     45   !!   Default option                                   NO  OFFLINE mode           
     46   !!---------------------------------------------------------------------- 
     47   LOGICAL, PUBLIC, PARAMETER ::   lk_offline = .FALSE.   !: offline flag 
     48#endif 
     49 
    3750   !! * Substitutions 
    3851#  include "domzgr_substitute.h90" 
    3952   !!---------------------------------------------------------------------- 
    40    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     53   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    4154   !! $Id$  
    42    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)  
     55   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4356   !!---------------------------------------------------------------------- 
    4457 
     
    138151      prgb(:,:) = zrgb(2:4,:) 
    139152      ! 
     153      r_si2 = 1.e0 / zrgb(2, 1)        ! blue with the smallest chlorophyll concentration) 
     154      IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2 
     155      ! 
    140156      DO jc = 1, 61                         ! check 
    141157         zchl = zrgb(1,jc) 
     
    164180      REAL(wp), DIMENSION(3,61), INTENT(out) ::   prgb   ! tabulated attenuation coefficient 
    165181      !! 
    166       INTEGER  ::   jchl, jband   ! dummy loop indices 
     182      INTEGER  ::   jc, jb ! dummy loop indice 
     183      INTEGER  ::   irgb   ! temporary integer 
     184      REAL(wp) ::   zchl   ! temporary scalar 
    167185      INTEGER  ::   numlight 
    168       REAL(wp) ::   zchl 
    169       !!---------------------------------------------------------------------- 
    170       ! 
    171       CALL ctl_opn( numlight, 'kRGB61.txt', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    172       DO jchl = 1, 61 
    173          READ(numlight,*) zchl, ( prgb(jband,jchl), jband=1,3 ) 
    174       END DO 
    175       CLOSE( numlight ) 
     186      !!---------------------------------------------------------------------- 
    176187      ! 
    177188      IF(lwp) THEN                         ! control print 
     
    179190         WRITE(numout,*) ' trc_oce_rgb_read : optical look-up table read in kRGB61.txt file' 
    180191         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~' 
     192         WRITE(numout,*)  
    181193      ENDIF 
     194      ! 
     195      CALL ctl_opn( numlight, 'kRGB61.txt', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
     196      DO jc = 1, 61 
     197         READ(numlight,*) zchl, ( prgb(jb,jc), jb = 1, 3 ) 
     198         irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )    
     199         IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb   
     200         IF( irgb /= jc ) THEN   
     201            IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb 
     202            CALL ctl_stop( 'trc_oce_rgb_read : inconsistency in Chl tabulated attenuation coeff.' ) 
     203         ENDIF 
     204      END DO 
     205      CLOSE( numlight ) 
     206      ! 
     207      r_si2 = 1.e0 / prgb(1, 1)      ! blue with the smallest chlorophyll concentration) 
     208      IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2 
    182209      ! 
    183210   END SUBROUTINE trc_oce_rgb_read 
Note: See TracChangeset for help on using the changeset viewer.