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/trasbc.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/trasbc.F90

    r457 r503  
    44   !! Ocean active tracers:  surface boundary condition 
    55   !!============================================================================== 
    6    !! History : 
    7    !!   8.2  !  98-10  (G. Madec, G. Roullet, M. Imbard)  Original code 
    8    !!   8.2  !  01-02  (D. Ludicone)  sea ice and free surface 
    9    !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    10    !!   9.0  !  04-08  (C. Talandier) New trends organization 
     6   !! History :  8.2  !  98-10  (G. Madec, G. Roullet, M. Imbard)  Original code 
     7   !!            8.2  !  01-02  (D. Ludicone)  sea ice and free surface 
     8   !!            8.5  !  02-06  (G. Madec)  F90: Free form and module 
     9   !!---------------------------------------------------------------------- 
     10 
    1111   !!---------------------------------------------------------------------- 
    1212   !!   tra_sbc      : update the tracer trend at ocean surface 
    1313   !!---------------------------------------------------------------------- 
    14    !! * Modules used 
    1514   USE oce             ! ocean dynamics and active tracers 
    1615   USE dom_oce         ! ocean space domain variables 
     
    2625   PRIVATE 
    2726 
    28    !! * Routine accessibility 
    29    PUBLIC tra_sbc              ! routine called by step.F90 
     27   PUBLIC   tra_sbc    ! routine called by step.F90 
    3028 
    3129   !! * Substitutions 
     
    3533   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    3634   !! $Header$  
    37    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     35   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    3836   !!---------------------------------------------------------------------- 
    3937 
     
    7876      !!                with the tracer surface boundary condition  
    7977      !!              - save the trend it in ttrd ('key_trdtra') 
     78      !!---------------------------------------------------------------------- 
     79      USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace    
     80      USE oce, ONLY :   ztrds => va   ! use va as 3D workspace    
    8081      !! 
    81       !!---------------------------------------------------------------------- 
    82       !! * Modules used      
    83       USE oce, ONLY :    ztdta => ua,      & ! use ua as 3D workspace    
    84                          ztdsa => va         ! use va as 3D workspace    
    85  
    86       !! * Arguments 
    87       INTEGER, INTENT( in ) ::   kt          ! ocean time-step index 
    88  
    89       !! * Local declarations 
     82      INTEGER, INTENT(in) ::   kt     ! ocean time-step index 
     83      !! 
    9084      INTEGER  ::   ji, jj                   ! dummy loop indices 
    9185      REAL(wp) ::   zta, zsa, zsrau, zse3t   ! temporary scalars 
     
    9892      ENDIF 
    9993 
    100       ! 0. initialization 
    101       zsrau = 1. / rauw 
     94      zsrau = 1. / rauw             ! initialization 
    10295#if defined key_zco 
    10396      zse3t = 1. / e3t_0(1) 
    10497#endif 
    10598 
    106       ! Save ta and sa trends 
    107       IF( l_trdtra )   THEN 
    108          ztdta(:,:,:) = ta(:,:,:)  
    109          ztdsa(:,:,:) = sa(:,:,:)  
     99      IF( l_trdtra ) THEN           ! Save ta and sa trends 
     100         ztrdt(:,:,:) = ta(:,:,:)  
     101         ztrds(:,:,:) = sa(:,:,:)  
    110102      ENDIF 
    111103 
    112104      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
    113105 
    114       ! 1. Concentration dillution effect on (t,s) 
     106      ! Concentration dillution effect on (t,s) 
    115107      DO jj = 2, jpj 
    116108         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    118110            zse3t = 1. / fse3t(ji,jj,1) 
    119111#endif 
    120             ! temperature : heat flux 
    121             zta = ro0cpr * ( qt(ji,jj) - qsr(ji,jj) ) * zse3t 
    122  
    123             ! salinity :  concent./dilut. effect 
    124             zsa = emps(ji,jj) * zsrau * sn(ji,jj,1) * zse3t 
    125              
    126             ! add the trend to the general tracer trend 
    127             ta(ji,jj,1) = ta(ji,jj,1) + zta 
     112            zta = ro0cpr * ( qt(ji,jj) - qsr(ji,jj) ) * zse3t      ! temperature : heat flux 
     113            zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t      ! salinity :  concent./dilut. effect 
     114            ta(ji,jj,1) = ta(ji,jj,1) + zta                        ! add the trend to the general tracer trend 
    128115            sa(ji,jj,1) = sa(ji,jj,1) + zsa 
    129116         END DO 
    130117      END DO 
    131118 
    132       ! save the trends for diagnostic 
    133       ! sea surface boundary condition tracers trends 
    134       IF( l_trdtra )   THEN 
    135          ztdta(:,:,:) = ta(:,:,:) - ztdta(:,:,:) 
    136          ztdsa(:,:,:) = sa(:,:,:) - ztdsa(:,:,:) 
    137          CALL trd_mod(ztdta, ztdsa, jpttdnsr, 'TRA', kt) 
     119      IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic 
     120         ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:) 
     121         ztrds(:,:,:) = sa(:,:,:) - ztrds(:,:,:) 
     122         CALL trd_mod(ztrdt, ztrds, jptra_trd_nsr, 'TRA', kt) 
    138123      ENDIF 
    139        
    140       IF(ln_ctl) THEN         ! print mean trends (used for debugging) 
    141          CALL prt_ctl(tab3d_1=ta, clinfo1=' sbc  - Ta: ', mask1=tmask, & 
    142             &         tab3d_2=sa, clinfo2=' Sa: ', mask2=tmask, clinfo3='tra') 
    143       ENDIF 
    144  
     124      ! 
     125      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' sbc  - Ta: ', mask1=tmask,   & 
     126         &                       tab3d_2=sa, clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
     127      ! 
    145128   END SUBROUTINE tra_sbc 
    146129 
Note: See TracChangeset for help on using the changeset viewer.