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 10954 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/TRA/traldf.F90 – NEMO

Ignore:
Timestamp:
2019-05-09T18:12:29+02:00 (5 years ago)
Author:
acc
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Convert TRA modules and all knock on effects of these conversions. SETTE tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/TRA/traldf.F90

    r10946 r10954  
    4747CONTAINS 
    4848 
    49    SUBROUTINE tra_ldf( kt, Kmm, Krhs ) 
     49   SUBROUTINE tra_ldf( kt, Kbb, Kmm, Krhs ) 
    5050      !!---------------------------------------------------------------------- 
    5151      !!                  ***  ROUTINE tra_ldf  *** 
     
    5454      !!---------------------------------------------------------------------- 
    5555      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    56       INTEGER, INTENT( in ) ::   Kmm, Krhs  ! ocean time level indices 
     56      INTEGER, INTENT( in ) ::   Kbb, Kmm, Krhs  ! ocean time level indices 
    5757      !! 
    5858      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds 
     
    6363      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    6464         ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) )  
    65          ztrdt(:,:,:) = tsa(:,:,:,jp_tem)  
    66          ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     65         ztrdt(:,:,:) = ts(:,:,:,jp_tem,Krhs)  
     66         ztrds(:,:,:) = ts(:,:,:,jp_sal,Krhs) 
    6767      ENDIF 
    6868      ! 
    6969      SELECT CASE ( nldf_tra )                 !* compute lateral mixing trend and add it to the general trend 
    7070      CASE ( np_lap   )                                  ! laplacian: iso-level operator 
    71          CALL tra_ldf_lap  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb,      tsa, jpts,  1  ) 
     71         CALL tra_ldf_lap  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs),                   jpts,  1, Kmm ) 
    7272      CASE ( np_lap_i )                                  ! laplacian: standard iso-neutral operator (Madec) 
    73          CALL tra_ldf_iso  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb, tsb, tsa, jpts,  1  ) 
     73         CALL tra_ldf_iso  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts,  1, Kmm ) 
    7474      CASE ( np_lap_it )                                 ! laplacian: triad iso-neutral operator (griffies) 
    75          CALL tra_ldf_triad( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb, tsb, tsa, jpts,  1, Kmm  ) 
     75         CALL tra_ldf_triad( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts,  1, Kmm ) 
    7676      CASE ( np_blp , np_blp_i , np_blp_it )             ! bilaplacian: iso-level & iso-neutral operators 
    77          CALL tra_ldf_blp  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, tsb      , tsa, jpts, nldf_tra, Kmm ) 
     77         CALL tra_ldf_blp  ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs),            jpts, nldf_tra, Kmm ) 
    7878      END SELECT 
    7979      ! 
    8080      IF( l_trdtra )   THEN                    !* save the horizontal diffusive trends for further diagnostics 
    81          ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    82          ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 
     81         ztrdt(:,:,:) = ts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
     82         ztrds(:,:,:) = ts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 
    8383         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 
    8484         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) 
     
    8686      ENDIF 
    8787      !                                        !* print mean trends (used for debugging) 
    88       IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf  - Ta: ', mask1=tmask,               & 
    89          &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
     88      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ts(:,:,:,jp_tem,Krhs), clinfo1=' ldf  - Ta: ', mask1=tmask,               & 
     89         &                       tab3d_2=ts(:,:,:,jp_sal,Krhs), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    9090      ! 
    9191      IF( ln_timing )   CALL timing_stop('tra_ldf') 
Note: See TracChangeset for help on using the changeset viewer.