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 2082 for branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2010-09-10T12:32:58+02:00 (14 years ago)
Author:
cetlod
Message:

Improve the merge of TRA-TRC, see ticket #717

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/step.F90

    r2027 r2082  
    105105      ! Ocean physics update                (ua, va, ta, sa used as workspace) 
    106106      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    107                          CALL bn2( tb, sb, rn2b )     ! before Brunt-Vaisala frequency 
    108                          CALL bn2( tn, sn, rn2  )     ! now    Brunt-Vaisala frequency 
     107                         CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency 
     108                         CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
    109109      ! 
    110110      !  VERTICAL PHYSICS    
     
    137137      ! 
    138138      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
    139                          CALL eos( tb, sb, rhd )                ! before in situ density 
    140          IF( ln_zps )    CALL zps_hde( kstp, tb, sb, rhd,  &    ! Partial steps: before horizontal gradient 
    141             &                              gtu, gsu, gru,  &    ! of t, s, rd at the last ocean level 
    142             &                              gtv, gsv, grv ) 
     139                         CALL eos( tsb, rhd )                ! before in situ density 
     140         IF( ln_zps )    CALL zps_hde( kstp, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient 
     141            &                                      rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    143142                         CALL ldf_slp( kstp, rhd, rn2b )        ! before slope of the lateral mixing 
    144143      ENDIF 
     
    169168      ! Active tracers                              (ua, va used as workspace) 
    170169      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    171                              ta(:,:,:) = 0.e0               ! set tracer trends to zero 
    172                              sa(:,:,:) = 0.e0 
    173  
    174                              CALL tra_swap 
     170                             tsa(:,:,:,:) = 0.e0               ! set tracer trends to zero 
     171 
    175172                             CALL tra_sbc    ( kstp )       ! surface boundary condition 
    176173      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr 
     
    192189         IF( ln_zdfnpc   )   CALL tra_npc    ( kstp )            ! update after fields by non-penetrative convection 
    193190                             CALL tra_nxt    ( kstp )            ! tracer fields at next time step 
    194                              CALL tra_unswap 
    195                              CALL eos( ta, sa, rhd, rhop )       ! Time-filtered in situ density for hpg computation 
    196          IF( ln_zps      )   CALL zps_hde( kstp, ta, sa, rhd,   &   ! Partial steps: time filtered hor. derivative 
    197             &                                   gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level 
    198             &                                   gtv, gsv, grv ) 
     191                             CALL eos( tsa, rhd, rhop )       ! Time-filtered in situ density for hpg computation 
     192         IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: time filtered hor. derivative 
     193            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    199194          
    200195      ELSE                                                  ! centered hpg  (eos then time stepping) 
    201                              CALL tra_unswap 
    202                              CALL eos( tn, sn, rhd, rhop )       ! now in situ density for hpg computation 
    203          IF( ln_zps      )   CALL zps_hde( kstp, tn, sn, rhd,   &   ! Partial steps: now horizontal derivative 
    204             &                                   gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level 
    205             &                                   gtv, gsv, grv ) 
    206                              CALL tra_swap 
     196                             CALL eos( tsn, rhd, rhop )       ! now in situ density for hpg computation 
     197         IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: now hor. derivative 
     198            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    207199         IF( ln_zdfnpc   )   CALL tra_npc    ( kstp )       ! update after fields by non-penetrative convection 
    208200                             CALL tra_nxt    ( kstp )       ! tracer fields at next time step 
     201      ENDIF  
    209202                             CALL tra_unswap 
    210       ENDIF  
    211203 
    212204      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.