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 7256 for branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP – NEMO

Ignore:
Timestamp:
2016-11-18T08:18:45+01:00 (7 years ago)
Author:
cbricaud
Message:

phaze NEMO routines in CRS branch with nemo_v3_6_STABLE branch at rev 7213 (09-09-2016) (merge -r 5519:7213 )

Location:
branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r6101 r7256  
    3535   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   restotr   ! restoring coeff. on tracers (s-1) 
    3636 
    37    INTEGER, PARAMETER           ::   npncts   = 5        ! number of closed sea 
     37   INTEGER, PARAMETER           ::   npncts   = 8        ! number of closed sea 
    3838   INTEGER, DIMENSION(npncts)   ::   nctsi1, nctsj1      ! south-west closed sea limits (i,j) 
    3939   INTEGER, DIMENSION(npncts)   ::   nctsi2, nctsj2      ! north-east closed sea limits (i,j) 
     
    107107                
    108108               jl = n_trc_index(jn)  
    109                CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    110                ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     109               CALL trc_dta( kt, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000 
    111110 
    112111               SELECT CASE ( nn_zdmp_tr ) 
     
    208207            ! 
    209208                                                        ! Caspian Sea 
    210             nctsi1(1)   = 332  ; nctsj1(1)   = 243 - isrow 
    211             nctsi2(1)   = 344  ; nctsj2(1)   = 275 - isrow 
     209            nctsi1(1)   = 333  ; nctsj1(1)   = 243 - isrow 
     210            nctsi2(1)   = 342  ; nctsj2(1)   = 274 - isrow 
     211            !                                           ! Lake Superior 
     212            nctsi1(2)   = 198  ; nctsj1(2)   = 258 - isrow 
     213            nctsi2(2)   = 204  ; nctsj2(2)   = 262 - isrow 
     214            !                                           ! Lake Michigan 
     215            nctsi1(3)   = 201  ; nctsj1(3)   = 250 - isrow 
     216            nctsi2(3)   = 203  ; nctsj2(3)   = 256 - isrow 
     217            !                                           ! Lake Huron 
     218            nctsi1(4)   = 204  ; nctsj1(4)   = 252 - isrow 
     219            nctsi2(4)   = 209  ; nctsj2(4)   = 256 - isrow 
     220            !                                           ! Lake Erie 
     221            nctsi1(5)   = 206  ; nctsj1(5)   = 249 - isrow 
     222            nctsi2(5)   = 209  ; nctsj2(5)   = 251 - isrow 
     223            !                                           ! Lake Ontario 
     224            nctsi1(6)   = 210  ; nctsj1(6)   = 252 - isrow 
     225            nctsi2(6)   = 212  ; nctsj2(6)   = 252 - isrow 
     226            !                                           ! Victoria Lake 
     227            nctsi1(7)   = 321  ; nctsj1(7)   = 180 - isrow 
     228            nctsi2(7)   = 322  ; nctsj2(7)   = 189 - isrow 
     229            !                                           ! Baltic Sea 
     230            nctsi1(8)   = 297  ; nctsj1(8)   = 270 - isrow 
     231            nctsi2(8)   = 308  ; nctsj2(8)   = 293 - isrow 
    212232            !                                         
    213233            !                                           ! ======================= 
     
    283303            IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    284304                jl = n_trc_index(jn) 
    285                 CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    286                 ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     305                CALL trc_dta( kt, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000 
    287306                DO jc = 1, npncts 
    288307                   DO jk = 1, jpkm1 
    289308                      DO jj = nctsj1(jc), nctsj2(jc) 
    290309                         DO ji = nctsi1(jc), nctsi2(jc) 
    291                             trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk) * tmask(ji,jj,jk) 
     310                            trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk) 
    292311                            trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
    293312                         ENDDO 
     
    317336      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init') 
    318337      ! 
     338      !Allocate arrays 
     339      IF( trc_dmp_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trc_dmp_init: unable to allocate arrays' ) 
    319340 
    320341      IF( lzoom )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r5602 r7256  
    1818   USE trc             ! ocean passive tracers variables 
    1919   USE trcnam_trp      ! passive tracers transport namelist variables 
    20    USE ldftra_oce      ! lateral diffusion coefficient on tracers 
     20   USE ldftra_oce,ONLY: ln_traldf_grif,rn_aht_0,rn_ahtb_0,lk_traldf_eiv     ! lateral diffusion coefficient on tracers 
    2121   USE ldfslp          ! ??? 
    2222   USE traldf_bilapg   ! lateral mixing            (tra_ldf_bilapg routine) 
     
    5656      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    5757      !! 
    58       INTEGER            :: jn 
     58      INTEGER            :: ji, jj, jk, jn 
     59      REAL(wp)           :: zdep 
    5960      CHARACTER (len=22) :: charout 
    6061      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd 
     
    6667 
    6768      rldf = rldf_rat 
    68  
     69      ! 
     70      r_fact_lap(:,:,:) = 1. 
     71      DO jk= 1, jpk 
     72         DO jj = 1, jpj 
     73            DO ji = 1, jpi 
     74               IF( fsdept(ji,jj,jk) > 200. .AND. gphit(ji,jj) < 5. .AND. gphit(ji,jj) > -5. ) THEN 
     75                  zdep = MAX( fsdept(ji,jj,jk) - 1000., 0. ) / 1000. 
     76                  r_fact_lap(ji,jj,jk) = MAX( 1., rn_fact_lap * EXP( -zdep ) ) 
     77               ENDIF 
     78            END DO 
     79         END DO 
     80      END DO 
     81      ! 
    6982      IF( l_trdtrc )  THEN 
    7083         CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90

    r5602 r7256  
    4040   REAL(wp), PUBLIC ::   rn_ahtrc_0          !: diffusivity coefficient for passive tracer (m2/s) 
    4141   REAL(wp), PUBLIC ::   rn_ahtrb_0          !: background diffusivity coefficient for passive tracer (m2/s) 
     42   REAL(wp), PUBLIC ::   rn_fact_lap         !: Enhanced zonal diffusivity coefficent in the equatorial domain 
    4243 
    4344   !                                        !!: ** Treatment of Negative concentrations ( nam_trcrad ) 
     
    7475      NAMELIST/namtrc_ldf/ ln_trcldf_lap  ,     & 
    7576         &                 ln_trcldf_bilap, ln_trcldf_level,     & 
    76          &                 ln_trcldf_hor  , ln_trcldf_iso  , rn_ahtrc_0, rn_ahtrb_0 
     77         &                 ln_trcldf_hor  , ln_trcldf_iso  , rn_ahtrc_0, rn_ahtrb_0,   & 
     78         &                 rn_fact_lap 
     79 
    7780      NAMELIST/namtrc_zdf/ ln_trczdf_exp  , nn_trczdf_exp 
    7881      NAMELIST/namtrc_rad/ ln_trcrad 
     
    127130         WRITE(numout,*) '      diffusivity coefficient                                 rn_ahtrc_0 = ', rn_ahtrc_0 
    128131         WRITE(numout,*) '      background hor. diffusivity                             rn_ahtrb_0 = ', rn_ahtrb_0 
     132         WRITE(numout,*) '      enhanced zonal diffusivity                             rn_fact_lap = ', rn_fact_lap 
    129133      ENDIF 
    130134 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90

    r7210 r7256  
    104104      ENDIF 
    105105 
     106#if defined key_agrif 
     107      CALL Agrif_trc                   ! AGRIF zoom boundaries 
     108#endif 
    106109      ! Update after tracer on domain lateral boundaries 
    107110      DO jn = 1, jptra 
     
    112115#if defined key_bdy 
    113116!!      CALL bdy_trc( kt )               ! BDY open boundaries 
    114 #endif 
    115 #if defined key_agrif 
    116       CALL Agrif_trc                   ! AGRIF zoom boundaries 
    117117#endif 
    118118 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r7210 r7256  
    103103         IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
    104104 
    105          IF( ln_rsttr .AND.    &                     ! Restart: read in restart  file 
     105         IF( ln_rsttr .AND. .NOT.ln_top_euler .AND.   &                     ! Restart: read in restart  file 
    106106            iom_varid( numrtr, 'sbc_'//TRIM(ctrcnm(1))//'_b', ldstop = .FALSE. ) > 0 ) THEN 
    107107            IF(lwp) WRITE(numout,*) '          nittrc000-nn_dttrc surface tracer content forcing fields red in the restart file' 
     
    172172            END DO 
    173173         ENDIF 
     174         ! 
     175         CALL lbc_lnk( sbc_trc(:,:,jn), 'T', 1. ) 
    174176         !                                       Concentration dilution effect on tracers due to evaporation & precipitation  
    175177         DO jj = 2, jpj 
     
    190192      !                                           Write in the tracer restar  file 
    191193      !                                          ******************************* 
    192       IF( lrst_trc ) THEN 
     194      IF( lrst_trc .AND. .NOT.ln_top_euler ) THEN 
    193195         IF(lwp) WRITE(numout,*) 
    194196         IF(lwp) WRITE(numout,*) 'sbc : ocean surface tracer content forcing fields written in tracer restart file ',   & 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r7217 r7256  
    1818   USE trcnam_trp      ! passive tracers transport namelist variables 
    1919   USE trabbl          ! bottom boundary layer               (trc_bbl routine) 
    20    USE trabbl_crs      ! bottom boundary layer               (trc_bbl routine) 
    2120   USE trcbbl          ! bottom boundary layer               (trc_bbl routine) 
    22    USE trcbbl_crs      ! bottom boundary layer               (trc_bbl routine) 
    2321   USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine) 
    2422   USE trcdmp          ! internal damping                    (trc_dmp routine) 
     
    7674      IF( .NOT. lk_c1d ) THEN 
    7775         ! 
    78                                CALL trc_sbc( kstp ) 
    79          IF( ln_crs_top ) THEN ;    CALL trc_bbl_crs( kstp ) 
    80          ELSE              ;    CALL trc_bbl( kstp ) 
    81          ENDIF 
    82          IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends 
    83  
    84          IF( ln_crs_top ) THEN ;    CALL trc_adv_crs( kstp ) 
    85          ELSE              ;    CALL trc_adv( kstp ) 
     76                                       CALL trc_sbc( kstp ) 
     77         IF( lk_trabbl )               CALL trc_bbl( kstp ) 
     78         IF( ln_trcdmp )               CALL trc_dmp( kstp )            ! internal damping trends 
     79         IF( ln_crs_top ) THEN    ;    CALL trc_adv_crs( kstp ) 
     80         ELSE                     ;    CALL trc_adv( kstp ) 
    8681         ENDIF 
    8782 
    88          IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only 
    89          IF( ln_crs_top ) THEN ;    CALL trc_ldf_crs( kstp ) 
    90          ELSE              ;    CALL trc_ldf( kstp ) 
     83         IF( ln_zps ) THEN 
     84           IF( ln_crs_top ) THEN 
     85              CALL zps_hde_crs( kstp, jptra, trn, gtru, gtrv ) 
     86           ELSE 
     87              IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kstp, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom 
     88              ELSE                 ; CALL zps_hde    ( kstp, jptra, trb, gtru, gtrv )                                      !  only bottom 
     89              ENDIF 
     90           ENDIF 
     91         ENDIF 
     92 
     93         IF( ln_crs_top ) THEN    ;    CALL trc_ldf_crs( kstp ) 
     94         ELSE                     ;    CALL trc_ldf( kstp ) 
    9195         ENDIF 
    9296         IF( .NOT. lk_offline .AND. lk_zdfkpp )    & 
    93             &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
     97            &                          CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
    9498#if defined key_agrif 
    9599         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge 
    96100#endif 
    97          IF( ln_crs_top ) THEN ;    CALL trc_zdf_crs( kstp ) 
    98          ELSE              ;    CALL trc_zdf( kstp ) 
     101         IF( ln_crs_top ) THEN    ;    CALL trc_zdf_crs( kstp ) 
     102         ELSE                     ;    CALL trc_zdf( kstp ) 
    99103         ENDIF 
    100  
    101                                 CALL trc_nxt( kstp )            ! tracer fields at next time step      
    102          IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     104         ! 
     105                                       CALL trc_nxt( kstp )            ! tracer fields at next time step      
     106         IF( ln_trcrad )               CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     107         IF( ln_trcdmp_clo )           CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only 
    103108 
    104109#if defined key_agrif 
    105110      IF( .NOT. Agrif_Root())   CALL Agrif_Update_Trc( kstp )   ! Update tracer at AGRIF zoom boundaries : children only 
    106111#endif 
    107           ! Partial steps: now horizontal gradient of passive 
    108          IF( ln_zps    )THEN 
    109             IF( ln_crs_top ) THEN   
    110                CALL zps_hde_crs( kstp, jptra, trn, gtru, gtrv ) 
    111             ELSE 
    112                IF( ln_isfcav )THEN 
    113                   CALL zps_hde_isf( kstp, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive 
    114                ELSE 
    115                   CALL zps_hde    ( kstp, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive 
    116                ENDIF 
    117             ENDIF 
    118          ENDIF 
    119                                                                 ! tracers at the bottom ocean level 
    120          ! 
     112 
    121113      ELSE                                               ! 1D vertical configuration 
    122114                                CALL trc_sbc( kstp )            ! surface boundary condition 
     
    130122      ! 
    131123      IF( nn_timing == 1 )   CALL timing_stop('trc_trp') 
     124      ! 
     1259400  FORMAT(a25,i4,D23.16) 
    132126      ! 
    133127   END SUBROUTINE trc_trp 
Note: See TracChangeset for help on using the changeset viewer.