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

Ignore:
Timestamp:
2019-05-15T21:19:35+02:00 (5 years ago)
Author:
acc
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : interface changes to tra and trc routines for design compliance and consistency. Fully SETTE tested (non-AGRIF, only)

File:
1 edited

Legend:

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

    r10954 r10985  
    4242CONTAINS 
    4343 
    44    SUBROUTINE tra_npc( kt, Kmm, Krhs ) 
     44   SUBROUTINE tra_npc( kt, Kmm, Krhs, pts, Kaa ) 
    4545      !!---------------------------------------------------------------------- 
    4646      !!                  ***  ROUTINE tranpc  *** 
     
    5858      !! References :     Madec, et al., 1991, JPO, 21, 9, 1349-1371. 
    5959      !!---------------------------------------------------------------------- 
    60       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    61       INTEGER, INTENT(in) ::   Kmm, Krhs  ! time level indices 
     60      INTEGER,                                   INTENT(in   ) :: kt              ! ocean time-step index 
     61      INTEGER,                                   INTENT(in   ) :: Kmm, Krhs, Kaa  ! time level indices 
     62      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts             ! active tracers and RHS of tracer equation 
    6263      ! 
    6364      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     
    6768      REAL(wp) ::   zta, zalfa, zsum_temp, zsum_alfa, zaw, zdz, zsum_z 
    6869      REAL(wp) ::   zsa, zbeta, zsum_sali, zsum_beta, zbw, zrw, z1_r2dt 
    69       REAL(wp), PARAMETER ::   zn2_zero = 1.e-14_wp      ! acceptance criteria for neutrality (N2==0) 
    70       REAL(wp), DIMENSION(        jpk     ) ::   zvn2         ! vertical profile of N2 at 1 given point... 
    71       REAL(wp), DIMENSION(        jpk,jpts) ::   zvts, zvab   ! vertical profile of T & S , and  alpha & betaat 1 given point 
    72       REAL(wp), DIMENSION(jpi,jpj,jpk     ) ::   zn2          ! N^2  
    73       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts) ::   zab          ! alpha and beta 
    74       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds   ! 3D workspace 
     70      REAL(wp), PARAMETER ::   zn2_zero = 1.e-14_wp             ! acceptance criteria for neutrality (N2==0) 
     71      REAL(wp), DIMENSION(        jpk     )   ::   zvn2         ! vertical profile of N2 at 1 given point... 
     72      REAL(wp), DIMENSION(        jpk,jpts)   ::   zvts, zvab   ! vertical profile of T & S , and  alpha & betaat 1 given point 
     73      REAL(wp), DIMENSION(jpi,jpj,jpk     )   ::   zn2          ! N^2  
     74      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts)   ::   zab          ! alpha and beta 
     75      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds ! 3D workspace 
    7576      ! 
    7677      LOGICAL, PARAMETER :: l_LB_debug = .FALSE. ! set to true if you want to follow what is 
     
    8586         IF( l_trdtra )   THEN                    !* Save initial after fields 
    8687            ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
    87             ztrdt(:,:,:) = ts(:,:,:,jp_tem,Krhs)  
    88             ztrds(:,:,:) = ts(:,:,:,jp_sal,Krhs) 
     88            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa)  
     89            ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa) 
    8990         ENDIF 
    9091         ! 
     
    9697         ENDIF 
    9798         ! 
    98          CALL eos_rab( ts(:,:,:,:,Krhs), zab, Kmm )         ! after alpha and beta (given on T-points) 
    99          CALL bn2    ( ts(:,:,:,:,Krhs), zab, zn2, Kmm )    ! after Brunt-Vaisala  (given on W-points) 
     99         CALL eos_rab( pts(:,:,:,:,Kaa), zab, Kmm )         ! after alpha and beta (given on T-points) 
     100         CALL bn2    ( pts(:,:,:,:,Kaa), zab, zn2, Kmm )    ! after Brunt-Vaisala  (given on W-points) 
    100101         ! 
    101102         inpcc = 0 
     
    106107               IF( tmask(ji,jj,2) == 1 ) THEN      ! At least 2 ocean points 
    107108                  !                                     ! consider one ocean column  
    108                   zvts(:,jp_tem) = ts(ji,jj,:,jp_tem,Krhs)      ! temperature 
    109                   zvts(:,jp_sal) = ts(ji,jj,:,jp_sal,Krhs)      ! salinity 
     109                  zvts(:,jp_tem) = pts(ji,jj,:,jp_tem,Kaa)      ! temperature 
     110                  zvts(:,jp_sal) = pts(ji,jj,:,jp_sal,Kaa)      ! salinity 
    110111                  ! 
    111112                  zvab(:,jp_tem)  = zab(ji,jj,:,jp_tem)     ! Alpha  
     
    287288                  END DO ! DO WHILE ( .NOT. l_column_treated ) 
    288289 
    289                   !! Updating tsa: 
    290                   ts(ji,jj,:,jp_tem,Krhs) = zvts(:,jp_tem) 
    291                   ts(ji,jj,:,jp_sal,Krhs) = zvts(:,jp_sal) 
     290                  !! Updating pts: 
     291                  pts(ji,jj,:,jp_tem,Kaa) = zvts(:,jp_tem) 
     292                  pts(ji,jj,:,jp_sal,Kaa) = zvts(:,jp_sal) 
    292293 
    293294                  !! LB:  Potentially some other global variable beside theta and S can be treated here 
     
    303304         IF( l_trdtra ) THEN         ! send the Non penetrative mixing trends for diagnostic 
    304305            z1_r2dt = 1._wp / (2._wp * rdt) 
    305             ztrdt(:,:,:) = ( ts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) ) * z1_r2dt 
    306             ztrds(:,:,:) = ( ts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) ) * z1_r2dt 
     306            ztrdt(:,:,:) = ( pts(:,:,:,jp_tem,Kaa) - ztrdt(:,:,:) ) * z1_r2dt 
     307            ztrds(:,:,:) = ( pts(:,:,:,jp_sal,Kaa) - ztrds(:,:,:) ) * z1_r2dt 
    307308            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_npc, ztrdt ) 
    308309            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_npc, ztrds ) 
     
    310311         ENDIF 
    311312         ! 
    312          CALL lbc_lnk_multi( 'tranpc', ts(:,:,:,jp_tem,Krhs), 'T', 1., ts(:,:,:,jp_sal,Krhs), 'T', 1. ) 
     313         CALL lbc_lnk_multi( 'tranpc', pts(:,:,:,jp_tem,Kaa), 'T', 1., pts(:,:,:,jp_sal,Kaa), 'T', 1. ) 
    313314         ! 
    314315         IF( lwp .AND. l_LB_debug ) THEN 
Note: See TracChangeset for help on using the changeset viewer.