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 503 for trunk/NEMO/OPA_SRC/TRA/traqsr.F90 – NEMO

Ignore:
Timestamp:
2006-09-27T10:52:29+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_064 : CT : general trends update including the addition of mean windows analysis possibility in the mixed layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/traqsr.F90

    r474 r503  
    44   !! Ocean physics: solar radiation penetration in the top ocean levels 
    55   !!====================================================================== 
    6    !! History : 
    7    !!   6.0  !  90-10  (B. Blanke)  Original code 
    8    !!   7.0  !  91-11  (G. Madec) 
    9    !!        !  96-01  (G. Madec)  s-coordinates 
    10    !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    11    !!   9.0  !  04-08  (C. Talandier) New trends organization 
    12    !!   9.0  !  05-11  (G. Madec) zco, zps, sco coordinate 
     6   !! History :  6.0  !  90-10  (B. Blanke)  Original code 
     7   !!            7.0  !  91-11  (G. Madec) 
     8   !!                 !  96-01  (G. Madec)  s-coordinates 
     9   !!            8.5  !  02-06  (G. Madec)  F90: Free form and module 
     10   !!            9.0  !  05-11  (G. Madec) zco, zps, sco coordinate 
     11   !!---------------------------------------------------------------------- 
     12 
    1313   !!---------------------------------------------------------------------- 
    1414   !!   tra_qsr      : trend due to the solar radiation penetration 
    1515   !!   tra_qsr_init : solar radiation penetration initialization 
    1616   !!---------------------------------------------------------------------- 
    17    !! * Modules used 
    1817   USE oce             ! ocean dynamics and active tracers 
    1918   USE dom_oce         ! ocean space and time domain 
     
    2928   PRIVATE 
    3029 
    31    !! * Routine accessibility 
    32    PUBLIC tra_qsr      ! routine called by step.F90 (ln_traqsr=T) 
    33    PUBLIC tra_qsr_init ! routine called by opa.F90 
    34  
    35    !! * Shared module variables 
    36    LOGICAL, PUBLIC ::   ln_traqsr = .TRUE.   !: qsr flag (Default=T) 
    37  
    38    !! * Module variables 
    39    REAL(wp), PUBLIC ::  & !!! * penetrative solar radiation namelist * 
    40       rabs = 0.58_wp,   &  ! fraction associated with xsi1 
    41       xsi1 = 0.35_wp,   &  ! first depth of extinction  
    42       xsi2 = 23.0_wp       ! second depth of extinction  
    43       !                    ! (default values: water type Ib) 
    44    LOGICAL ::           &  
    45       ln_qsr_sms = .false. ! flag to use or not the biological  
    46       !                    ! fluxes for light  
     30   PUBLIC   tra_qsr      ! routine called by step.F90 (ln_traqsr=T) 
     31   PUBLIC   tra_qsr_init ! routine called by opa.F90 
     32 
     33   !!* Namelist namqsr: penetrative solar radiation 
     34   LOGICAL , PUBLIC ::   ln_traqsr = .TRUE.   !: qsr flag (Default=T) 
     35   REAL(wp), PUBLIC ::   rabs = 0.58_wp       ! fraction associated with xsi1 
     36   REAL(wp), PUBLIC ::   xsi1 = 0.35_wp       ! first depth of extinction  
     37   REAL(wp), PUBLIC ::   xsi2 = 23.0_wp       ! second depth of extinction (default values: water type Ib) 
     38   LOGICAL , PUBLIC ::   ln_qsr_sms = .false. ! flag to use or not the biological fluxes for light  
     39   NAMELIST/namqsr/ ln_traqsr, rabs, xsi1, xsi2, ln_qsr_sms 
    4740    
    48    INTEGER ::    & 
    49       nksr                 ! number of levels 
    50    REAL(wp), DIMENSION(jpk) ::   & 
    51       gdsr                 ! profile of the solar flux penetration 
     41   INTEGER ::   nksr   ! number of levels 
     42   REAL(wp), DIMENSION(jpk) ::   gdsr   ! profile of the solar flux penetration 
    5243 
    5344   !! * Substitutions 
     
    5748   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    5849   !! $Header$  
    59    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     50   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    6051   !!---------------------------------------------------------------------- 
    6152 
     
    8677      !! ** Action  : - update ta with the penetrative solar radiation trend 
    8778      !!              - save the trend in ttrd ('key_trdtra') 
    88       !! 
    89       !!---------------------------------------------------------------------- 
    90       !! * Modules used      
    91       USE oce, ONLY :    ztrdt => ua,   & ! use ua as 3D workspace    
    92                          ztrds => va      ! use va as 3D workspace    
    93  
    94       !! * Arguments 
    95       INTEGER, INTENT( in ) ::   kt       ! ocean time-step 
    96  
    97       !! * Local declarations 
    98       INTEGER ::    ji, jj, jk            ! dummy loop indexes 
    99       REAL(wp) ::   zc0 , zta             ! temporary scalars 
     79      !!---------------------------------------------------------------------- 
     80      USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace    
     81      USE oce, ONLY :   ztrds => va   ! use va as 3D workspace    
     82      !! 
     83      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     84      !! 
     85      INTEGER  ::    ji, jj, jk       ! dummy loop indexes 
     86      REAL(wp) ::   zc0 , zta         ! temporary scalars 
    10087      !!---------------------------------------------------------------------- 
    10188 
    10289      IF( kt == nit000 ) THEN 
    103          IF ( lwp ) WRITE(numout,*) 
    104          IF ( lwp ) WRITE(numout,*) 'tra_qsr : penetration of the surface solar radiation' 
    105          IF ( lwp ) WRITE(numout,*) '~~~~~~~' 
     90         IF(lwp) WRITE(numout,*) 
     91         IF(lwp) WRITE(numout,*) 'tra_qsr : penetration of the surface solar radiation' 
     92         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    10693         CALL tra_qsr_init 
    10794      ENDIF 
    10895 
    109       ! Save ta and sa trends 
    110       IF( l_trdtra )   THEN 
     96      IF( l_trdtra ) THEN      ! Save ta and sa trends 
    11197         ztrdt(:,:,:) = ta(:,:,:)  
    11298         ztrds(:,:,:) = 0.e0 
     
    122108            DO jj = 2, jpjm1 
    123109               DO ji = fs_2, fs_jpim1   ! vector opt. 
    124                    
    125110                  zc0 = ro0cpr  / fse3t(ji,jj,jk)         ! compute the qsr trend 
    126111                  zta = zc0 * ( etot3(ji,jj,jk  ) * tmask(ji,jj,jk)     & 
    127112                     &        - etot3(ji,jj,jk+1) * tmask(ji,jj,jk+1) ) 
    128                    
    129113                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta       ! add qsr trend to the temperature trend 
    130                    
    131114               END DO 
    132115            END DO 
     
    179162      ENDIF 
    180163 
    181       ! qsr tracers trends saved the trends for diagnostics 
    182       IF( l_trdtra )   THEN 
     164      IF( l_trdtra ) THEN     ! qsr tracers trends saved for diagnostics 
    183165         ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:) 
    184          CALL trd_mod( ztrdt, ztrds, jpttdqsr, 'TRA', kt ) 
    185       ENDIF 
    186  
     166         CALL trd_mod( ztrdt, ztrds, jptra_trd_qsr, 'TRA', kt ) 
     167      ENDIF 
    187168      !                       ! print mean trends (used for debugging) 
    188169      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' qsr  - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 
    189  
     170      ! 
    190171   END SUBROUTINE tra_qsr 
    191172 
     
    206187      !! ** Action  : - initialize xsr1, xsr2 and rabs 
    207188      !! 
    208       !! Reference : 
    209       !!   Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp. 
    210       !!---------------------------------------------------------------------- 
    211       INTEGER ::    ji,jj,jk, &  ! dummy loop index 
    212                     indic        ! temporary integer 
    213       REAL(wp) ::   zc0 , zc1 , zc2 ,   & ! temporary scalars 
    214          &          zcst, zdp1, zdp2      !    "         " 
    215  
    216       NAMELIST/namqsr/ ln_traqsr, rabs, xsi1, xsi2, ln_qsr_sms 
    217       !!---------------------------------------------------------------------- 
    218  
    219       ! Read Namelist namqsr : ratio and length of penetration 
    220       ! -------------------- 
    221       REWIND ( numnam ) 
     189      !! Reference : Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp. 
     190      !!---------------------------------------------------------------------- 
     191      INTEGER  ::   ji, jj, jk   ! dummy loop index 
     192      INTEGER  ::   indic        ! temporary integer 
     193      REAL(wp) ::   zc0 , zc1 , zc2    ! temporary scalars 
     194      REAL(wp) ::   zcst, zdp1, zdp2   !    "         " 
     195      !!---------------------------------------------------------------------- 
     196 
     197      REWIND ( numnam )           ! Read Namelist namqsr : ratio and length of penetration 
    222198      READ   ( numnam, namqsr ) 
    223199 
    224       ! Parameter control and print 
    225       ! --------------------------- 
    226       IF( ln_traqsr  ) THEN 
     200      IF( ln_traqsr  ) THEN       ! Parameter control and print 
    227201         IF(lwp) THEN 
    228202            WRITE(numout,*) 
     
    248222         CALL ctl_stop( '             0<rabs<1, 0<xsi1, or 0<xsi2 not satisfied' ) 
    249223 
    250       ! Initialization of gdsr 
    251       ! ---------------------- 
     224      !                           ! Initialization of gdsr 
    252225      IF( ln_zco .OR. ln_zps ) THEN 
    253  
     226         ! 
    254227         ! z-coordinate with or without partial step : same w-level everywhere inside the ocean 
    255228         gdsr(:) = 0.e0 
     
    283256            END DO 
    284257         ENDIF 
    285  
     258         ! 
    286259      ENDIF 
    287260 
     
    302275            END DO 
    303276         END DO  
    304        ENDIF 
    305  
     277      ENDIF 
     278      ! 
    306279   END SUBROUTINE tra_qsr_init 
    307280 
Note: See TracChangeset for help on using the changeset viewer.