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 12068 for NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traisf.F90 – NEMO

Ignore:
Timestamp:
2019-12-05T13:18:21+01:00 (4 years ago)
Author:
davestorkey
Message:

2019/UKMO_MERGE_2019 : Merging in changes from ENHANCE-02_ISF_nemo.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traisf.F90

    r11970 r12068  
    3535CONTAINS 
    3636 
    37    SUBROUTINE tra_isf ( kt ) 
     37   SUBROUTINE tra_isf ( kt, Kmm, pts, Krhs ) 
    3838      !!---------------------------------------------------------------------- 
    3939      !!                  ***  ROUTINE tra_isf  *** 
     
    4141      !! ** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc) 
    4242      !! 
    43       !! ** Action  : - update tsa for cav, par and cpl case 
     43      !! ** Action  : - update pts(:,:,:,:,Krhs) for cav, par and cpl case 
    4444      !!---------------------------------------------------------------------- 
    45       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     45      INTEGER                                  , INTENT(in   ) :: kt        ! ocean time step 
     46      INTEGER                                  , INTENT(in   ) :: Kmm, Krhs ! ocean time level indices 
     47      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts       ! active tracers and RHS of tracer equation 
    4648      !!---------------------------------------------------------------------- 
    4749      ! 
     
    5557      ! 
    5658      ! cavity case 
    57       IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa) 
     59      IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, pts(:,:,:,:,Krhs)) 
    5860      ! 
    5961      ! parametrisation case 
    60       IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, tsa) 
     62      IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, pts(:,:,:,:,Krhs)) 
    6163      ! 
    6264      ! ice sheet coupling case 
    6365      IF ( ln_isfcpl ) THEN 
    6466         ! 
    65          IF ( kt == nit000  ) CALL tra_isf_cpl(risfcpl_tsc       , tsa) 
    66          IF ( kt == nit000+1) CALL tra_isf_cpl(risfcpl_tsc*0.5_wp, tsa) 
     67         IF ( kt == nit000  ) CALL tra_isf_cpl(Kmm, risfcpl_tsc       , pts(:,:,:,:,Krhs)) 
     68         IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) 
    6769         ! 
    6870         ! ensure 0 trend due to unconservation of the ice shelf coupling 
    69          IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 
     71         IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs)) 
    7072         ! 
    7173      END IF 
    7274      ! 
    7375      IF ( ln_isfdebug ) THEN 
    74          CALL debug('tra_isf: tsa T', tsa(:,:,:,1)) 
    75          CALL debug('tra_isf: tsa S', tsa(:,:,:,2)) 
     76         CALL debug('tra_isf: pts(:,:,:,:,Krhs) T', pts(:,:,:,1,Krhs)) 
     77         CALL debug('tra_isf: pts(:,:,:,:,Krhs) S', pts(:,:,:,2,Krhs)) 
    7678      END IF 
    7779      ! 
     
    8688      !! *** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case 
    8789      !! 
    88       !! *** Action :: Update tsa with the surface boundary condition trend  
     90      !! *** Action :: Update pts(:,:,:,:,Krhs) with the surface boundary condition trend  
    8991      !! 
    9092      !!---------------------------------------------------------------------- 
     
    103105      ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) 
    104106      ! 
    105       ! update tsa 
     107      ! update pts(:,:,:,:,Krhs) 
    106108      DO jj = 1,jpj 
    107109         DO ji = 1,jpi 
     
    123125   END SUBROUTINE tra_isf_mlt 
    124126   ! 
    125    SUBROUTINE tra_isf_cpl( ptsc, ptsa ) 
     127   SUBROUTINE tra_isf_cpl( Kmm, ptsc, ptsa ) 
    126128      !!---------------------------------------------------------------------- 
    127129      !!                  ***  ROUTINE tra_isf_cpl  *** 
    128130      !! 
    129       !! *** Action :: Update tsa with the ice shelf coupling trend  
     131      !! *** Action :: Update pts(:,:,:,:,Krhs) with the ice shelf coupling trend  
    130132      !! 
    131133      !!---------------------------------------------------------------------- 
    132134      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa 
    133135      !!---------------------------------------------------------------------- 
     136      INTEGER                              , INTENT(in   ) :: Kmm   ! ocean time level index 
    134137      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) :: ptsc 
    135138      !!---------------------------------------------------------------------- 
     
    138141      ! 
    139142      DO jk = 1,jpk 
    140          ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
    141          ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
     143         ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 
     144         ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 
    142145      END DO 
    143146      ! 
Note: See TracChangeset for help on using the changeset viewer.