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 2052 for branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP – NEMO

Ignore:
Timestamp:
2010-08-13T11:15:17+02:00 (14 years ago)
Author:
cetlod
Message:

Improve the merge TRA-TRC, see ticket:701

Location:
branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP/trcsbc.F90

    r2030 r2052  
    6666      INTEGER  ::   ji, jj, jn           ! dummy loop indices 
    6767      REAL(wp) ::   ztra, zsrau, zse3t   ! temporary scalars 
     68      REAL(wp), DIMENSION(jpi,jpj) ::   zemps  ! surface freshwater flux 
    6869      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrtrd 
    6970      CHARACTER (len=22) :: charout 
     
    7677      ENDIF 
    7778 
     79 
    7880      IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 
    7981 
     82#if ! defined key_offline 
     83      ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff 
     84      IF( lk_vvl ) THEN   ;   zemps(:,:) = emps(:,:) - emp(:,:)   ! volume variable 
     85      ELSE                ;   zemps(:,:) = emps(:,:) - rnf(:,:)   ! linear free surface  
     86      ENDIF  
     87#else 
     88      ! emps in dynamical files contains emps - rnf 
     89      IF( lk_vvl ) THEN   ;   zemps(:,:) = 0.         ! No concentration/dilution effect  
     90      ELSE                ;   zemps(:,:) = emps(:,:)  ! emps -rnf  
     91      ENDIF 
     92#endif 
    8093      ! 0. initialization 
    8194      zsrau = 1. / rau0 
     
    8598 
    8699      DO jn = 1, jptra 
    87          ! 1. Concentration dillution effect on tra 
     100         ! 
    88101         IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
    89102 
    90103         DO jj = 2, jpj 
    91104            DO ji = fs_2, fs_jpim1   ! vector opt. 
    92 #if ! defined key_zco 
     105#if ! defined key_zco  
    93106               zse3t = 1. / fse3t(ji,jj,1) 
    94107#endif 
    95                IF( lk_vvl ) THEN   ;   ztra = 0.e0                         ! No concent./dilut. effect 
    96                ELSE                ;   ztra = emps(ji,jj) * zsrau * trn(ji,jj,1,jn) * zse3t * tmask(ji,jj,1)  
    97                ENDIF 
     108               ! add the trend to the general tracer trend 
     109               ztra = zemps(ji,jj) *  zsrau * trn(ji,jj,1,jn) * zse3t 
    98110               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ztra 
    99111            END DO 
     
    107119      END DO                                                     ! tracer loop 
    108120      !                                                          ! =========== 
     121      IF( l_trdtrc ) DEALLOCATE( ztrtrd ) 
    109122 
    110       IF( l_trdtrc ) DEALLOCATE( ztrtrd ) 
    111123      IF( ln_ctl )   THEN 
    112124         WRITE(charout, FMT="('sbc ')") ;  CALL prt_ctl_trc_info(charout) 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP/trctrp.F90

    r2030 r2052  
    6262      IF( .NOT. lk_trc_c1d ) THEN 
    6363         ! 
    64                                  CALL trc_sbc( kstp )            ! surface boundary condition 
    65           IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme 
    66           IF( lk_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends 
    67                                  CALL trc_adv( kstp )            ! horizontal & vertical advection  
    68                                  CALL trc_ldf( kstp )            ! lateral mixing 
     64                                CALL trc_sbc( kstp )            ! surface boundary condition 
     65         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme 
     66         IF( lk_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends 
     67                                CALL trc_adv( kstp )            ! horizontal & vertical advection  
     68                                CALL trc_ldf( kstp )            ! lateral mixing 
    6969#if ! defined key_offline 
    70           IF( lk_zdfkpp )        CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
     70         IF( lk_zdfkpp )        CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
    7171#endif 
    7272#if defined key_agrif 
    73           IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge 
     73         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge 
    7474#endif 
    75                                  CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields 
    76                                  CALL trc_nxt( kstp )            ! tracer fields at next time step      
    77          IF( ln_trcrad )         CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
    78          IF( ln_zps    )         CALL zps_hde_trc( kstp, jptra, trb, gtru, gtrv )  ! Partial steps: now horizontal gradient of passive 
    79                                                                           ! tracers at the bottom ocean level 
    80       ELSE 
    81                                  CALL trc_sbc( kstp )            ! surface boundary condition 
     75                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields 
     76         IF( ln_zps    )        CALL zps_hde_trc( kstp, jptra, trn, gtru, gtrv )  ! Partial steps: now horizontal gradient of passive 
     77                                                                ! tracers at the bottom ocean level 
     78                                CALL trc_nxt( kstp )            ! tracer fields at next time step      
     79         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     80         ! 
     81      ELSE                                               ! 1D vertical configuration 
     82                                CALL trc_sbc( kstp )            ! surface boundary condition 
    8283#if ! defined key_offline 
    83           IF( lk_zdfkpp )        CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
     84          IF( lk_zdfkpp )       CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
    8485#endif 
    85                                  CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields 
    86                                  CALL trc_nxt( kstp )            ! tracer fields at next time step      
    87           IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     86                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields 
     87                                CALL trc_nxt( kstp )            ! tracer fields at next time step      
     88          IF( ln_trcrad )       CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
    8889         ! 
    8990      END IF 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP/trczdf.F90

    r2034 r2052  
    6363      IF( kt == nittrc000 )   CALL zdf_ctl          ! initialisation & control of options 
    6464 
     65#if ! defined key_pisces 
    6566      IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nit000 
    6667         r2dt(:) =  rdttra(:) * FLOAT(nn_dttrc)          ! = rdtra (restarting with Euler time stepping) 
     
    6869         r2dt(:) = 2. * rdttra(:) * FLOAT(nn_dttrc)      ! = 2 rdttra (leapfrog) 
    6970      ENDIF 
     71#else 
     72      r2dt(:) =  rdttra(:) * FLOAT(nn_dttrc)          ! = rdtra (restarting with Euler time stepping) 
     73#endif 
    7074 
    7175      IF( l_trdtrc )  THEN 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP/trdmld_trc.F90

    r2030 r2052  
    382382            DO ji = 1,jpi 
    383383               ik = nmld_trc(ji,jj) 
    384                zavt = fstravs(ji,jj,ik) 
     384               zavt = fsavs(ji,jj,ik) 
    385385               DO jn = 1, jptra 
    386386                  IF( ln_trdtrc(jn) )    & 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90

    r2030 r2052  
    99#if defined key_top && defined key_trdmld_trc 
    1010   !!---------------------------------------------------------------------- 
    11    USE oce_trc 
    1211   USE in_out_manager  ! I/O manager 
    1312   USE iom             ! I/O module 
Note: See TracChangeset for help on using the changeset viewer.