Ignore:
Timestamp:
2019-11-08T12:26:42+01:00 (11 months ago)
Author:
mathiot
Message:

ENHANCE-02_ISF_nemo: add timing in the main isf routine + various bug fixes + cosmetic changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90

    r11852 r11876  
    1616   USE isf     ! ice shelf variables 
    1717 
    18    USE dom_oce ! vertical scale factor 
     18   USE dom_oce ! vertical scale factor and depth 
    1919 
    2020   IMPLICIT NONE 
     
    250250      INTEGER,  DIMENSION(jpi,jpj), INTENT(  out) :: ktop        ! top level affected by the ice shelf parametrisation 
    251251      !!-------------------------- IN  ------------------------------------- 
    252       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pdep        ! top depth of the parametrisation influence 
     252      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pdep        ! top depth of the parametrisation influence 
    253253      !!-------------------------------------------------------------------- 
    254254      INTEGER :: ji,jj 
     
    256256      !!-------------------------------------------------------------------- 
    257257      ! 
    258       ! compute top level (need to be recomputed each time (z*, z~)  
     258      ! if we need to recompute the top level at every time stepcompute top level (z*, z~)  
     259      ! in case of weak ht_n variation we can assume the top level of htbl to be constant 
     260      ! => only done using gdepw_0 
    259261      ! be sure pdep is already correctly bounded 
    260262      ! test: this routine run on isfdraft should return mikt 
     
    263265      DO ji = 1, jpi 
    264266         DO jj = 1, jpj 
     267            ! comput ktop 
    265268            ikt = 2 
    266             DO WHILE ( gdepw_n(ji,jj,ikt) <= pdep(ji,jj ) ) ;  ikt = ikt + 1 ;  END DO 
     269            DO WHILE ( gdepw_0(ji,jj,ikt) <= pdep(ji,jj ) ) ;  ikt = ikt + 1 ;  END DO 
    267270            ktop(ji,jj) = ikt - 1 
     271            ! 
     272            ! update pdep 
     273            pdep(ji,jj) = gdepw_0(ji,jj,ktop(ji,jj)) 
    268274         END DO 
    269275      END DO 
Note: See TracChangeset for help on using the changeset viewer.