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 15157 for NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/DOM/domzgr.F90 – NEMO

Ignore:
Timestamp:
2021-07-29T10:28:32+02:00 (3 years ago)
Author:
techene
Message:

#2695 isf+qco OK in both ISOMIP+ and WED025 (pass sette with and without key_qco)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/DOM/domzgr.F90

    r13295 r15157  
    224224      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top , k_bot               ! first & last ocean level 
    225225      ! 
    226       INTEGER  ::   jk     ! dummy loop index 
     226      INTEGER  ::   ji,jj,jk     ! dummy loop index 
    227227      INTEGER  ::   inum   ! local logical unit 
    228228      REAL(WP) ::   z_zco, z_zps, z_sco, z_cav 
     
    249249      CALL iom_get( inum, 'ln_isfcav', z_cav ) 
    250250      IF( z_cav == 0._wp ) THEN   ;   ld_isfcav = .false.   ;   ELSE   ;   ld_isfcav = .true.   ;   ENDIF 
     251      ! 
     252      !                          !* ocean top and bottom level 
     253      CALL iom_get( inum, jpdom_global, 'top_level'    , z2d   )   ! 1st wet T-points (ISF) 
     254      k_top(:,:) = NINT( z2d(:,:) ) 
     255      CALL iom_get( inum, jpdom_global, 'bottom_level' , z2d   )   ! last wet T-points 
     256      k_bot(:,:) = NINT( z2d(:,:) ) 
    251257      ! 
    252258      !                          !* vertical scale factors 
     
    278284         CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d )    ! 1D reference depth 
    279285         CALL e3_to_depth( pe3t   , pe3w   , pdept   , pdepw    )    ! 3D depths 
     286#if defined key_qco && key_isf 
     287!!st         IF( ln_isfcav ) THEN   ! ISF: adjust the calculation of T-point depth done in e3_to_depth subroutine 
     288!            pdept(:,:,1) = 0.5_wp * pe3w(:,:,1)       ! already computed by e3_to_depth 
     289            DO_3D( 1, 1, 1, 1, 2, jpk )                     ! vertical sum at partial cell xxxx other level  
     290               IF( jk == k_top(ji,jj) ) THEN                    ! first ocean point : partial cell 
     291                  gdept_0(ji,jj,jk) = gdepw_0(ji,jj,jk  ) + 0.5_wp * e3w_0(ji,jj,jk)   ! = risfdep + 1/2 e3w_0(mikt) 
     292               ELSE                                            ! other level  
     293                  gdept_0(ji,jj,jk) = gdept_0(ji,jj,jk-1) +          e3w_0(ji,jj,jk) 
     294               ENDIF 
     295            END_3D 
     296!!st         ENDIF 
     297#endif 
    280298         IF(lwp) THEN 
    281299            WRITE(numout,*) 
     
    285303         ENDIF 
    286304      ENDIF 
    287       ! 
    288       !                          !* ocean top and bottom level 
    289       CALL iom_get( inum, jpdom_global, 'top_level'    , z2d   )   ! 1st wet T-points (ISF) 
    290       k_top(:,:) = NINT( z2d(:,:) ) 
    291       CALL iom_get( inum, jpdom_global, 'bottom_level' , z2d   )   ! last wet T-points 
    292       k_bot(:,:) = NINT( z2d(:,:) ) 
    293305      ! 
    294306      ! reference depth for negative bathy (wetting and drying only) 
Note: See TracChangeset for help on using the changeset viewer.