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 11949 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/iscplhsb.F90 – NEMO

Ignore:
Timestamp:
2019-11-22T15:29:17+01:00 (5 years ago)
Author:
acc
Message:

Merge in changes from 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. This just creates a fresh copy of this branch to use as the merge base. See ticket #2341

Location:
NEMO/branches/2019/dev_r11943_MERGE_2019/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src

    • Property svn:mergeinfo deleted
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DOM/iscplhsb.F90

    r11536 r11949  
    4040CONTAINS 
    4141 
    42    SUBROUTINE iscpl_cons(ptmask_b, psmask_b, pe3t_b, pts_flx, pvol_flx, prdt_iscpl) 
     42   SUBROUTINE iscpl_cons( Kbb, Kmm, ptmask_b, psmask_b, pe3t_b, pts_flx, pvol_flx, prdt_iscpl ) 
    4343      !!----------------------------------------------------------------------  
    4444      !!                   ***  ROUTINE iscpl_cons  *** 
     
    4848      !!                compute where the correction have to be applied 
    4949      !!  
    50       !! ** Method  :   compute tsn*e3t-tsb*e3tb and e3t-e3t_b 
    51       !!---------------------------------------------------------------------- 
     50      !! ** Method  :   compute tsn*e3tn-tsb*e3tb and e3tn-e3tb 
     51      !!---------------------------------------------------------------------- 
     52      INTEGER                     , INTENT(in ) :: Kbb, Kmm    !! time level indices 
    5253      REAL(wp), DIMENSION(:,:,:  ), INTENT(in ) :: ptmask_b    !! mask before 
    5354      REAL(wp), DIMENSION(:,:,:  ), INTENT(in ) :: pe3t_b      !! scale factor before 
     
    7879      z1_rdtiscpl = 1._wp / prdt_iscpl  
    7980 
    80       ! mask tsn and tsb  
    81       tsb(:,:,:,jp_tem) = tsb(:,:,:,jp_tem) * ptmask_b(:,:,:) 
    82       tsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) *  tmask  (:,:,:) 
    83       tsb(:,:,:,jp_sal) = tsb(:,:,:,jp_sal) * ptmask_b(:,:,:) 
    84       tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) *  tmask  (:,:,:) 
     81      ! mask ts(:,:,:,:,Kmm) and ts(:,:,:,:,Kbb)  
     82      ts(:,:,:,jp_tem,Kbb) = ts(:,:,:,jp_tem,Kbb) * ptmask_b(:,:,:) 
     83      ts(:,:,:,jp_tem,Kmm) = ts(:,:,:,jp_tem,Kmm) *  tmask  (:,:,:) 
     84      ts(:,:,:,jp_sal,Kbb) = ts(:,:,:,jp_sal,Kbb) * ptmask_b(:,:,:) 
     85      ts(:,:,:,jp_sal,Kmm) = ts(:,:,:,jp_sal,Kmm) *  tmask  (:,:,:) 
    8586 
    8687      !============================================================================== 
     
    8990 
    9091      !  
    91       zdssh(:,:) = sshn(:,:) * ssmask(:,:) - sshb(:,:) * psmask_b(:,:) 
     92      zdssh(:,:) = ssh(:,:,Kmm) * ssmask(:,:) - ssh(:,:,Kbb) * psmask_b(:,:) 
    9293      IF (.NOT. ln_linssh ) zdssh = 0.0_wp ! already included in the levels by definition 
    9394       
     
    9899 
    99100                  ! volume differences 
    100                   zde3t = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) - pe3t_b(ji,jj,jk) * ptmask_b(ji,jj,jk) 
     101                  zde3t = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) - pe3t_b(ji,jj,jk) * ptmask_b(ji,jj,jk) 
    101102 
    102103                  ! heat diff 
    103                   zdtem = tsn(ji,jj,jk,jp_tem) * e3t_n(ji,jj,jk) *  tmask  (ji,jj,jk)   & 
    104                         - tsb(ji,jj,jk,jp_tem) * pe3t_b (ji,jj,jk) * ptmask_b(ji,jj,jk) 
     104                  zdtem = ts(ji,jj,jk,jp_tem,Kmm) * e3t(ji,jj,jk,Kmm) *  tmask  (ji,jj,jk)   & 
     105                        - ts(ji,jj,jk,jp_tem,Kbb) * pe3t_b (ji,jj,jk) * ptmask_b(ji,jj,jk) 
    105106                  ! salt diff 
    106                   zdsal = tsn(ji,jj,jk,jp_sal) * e3t_n(ji,jj,jk) *  tmask  (ji,jj,jk)   & 
    107                         - tsb(ji,jj,jk,jp_sal) * pe3t_b (ji,jj,jk) * ptmask_b(ji,jj,jk) 
     107                  zdsal = ts(ji,jj,jk,jp_sal,Kmm) * e3t(ji,jj,jk,Kmm) *  tmask  (ji,jj,jk)   & 
     108                        - ts(ji,jj,jk,jp_sal,Kbb) * pe3t_b (ji,jj,jk) * ptmask_b(ji,jj,jk) 
    108109                
    109110                  ! shh changes 
     
    296297 
    297298 
    298    SUBROUTINE iscpl_div( phdivn ) 
     299   SUBROUTINE iscpl_div( Kmm, phdivn ) 
    299300      !!---------------------------------------------------------------------- 
    300301      !!                  ***  ROUTINE iscpl_div  *** 
     
    307308      !! ** Action  :   phdivn   increase by the iscpl correction term 
    308309      !!---------------------------------------------------------------------- 
     310      INTEGER                   , INTENT(in   ) ::   Kmm      ! time level index 
    309311      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   phdivn   ! horizontal divergence 
    310312      !! 
     
    315317         DO jj = 1, jpj 
    316318            DO ji = 1, jpi 
    317                phdivn(ji,jj,jk) = phdivn(ji,jj,jk) + hdiv_iscpl(ji,jj,jk) / e3t_n(ji,jj,jk) 
     319               phdivn(ji,jj,jk) = phdivn(ji,jj,jk) + hdiv_iscpl(ji,jj,jk) / e3t(ji,jj,jk,Kmm) 
    318320            END DO 
    319321         END DO 
Note: See TracChangeset for help on using the changeset viewer.