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 – NEMO

Changeset 15157 for NEMO/branches/2021


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)

Location:
NEMO/branches/2021/dev_r14318_RK3_stage1
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1/cfgs/WED025/cpp_WED025.fcm

    r14239 r15157  
    1  bld::tool::fppkeys key_xios key_si3 
     1 bld::tool::fppkeys key_xios key_si3  key_isf 
  • 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) 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/DYN/dynhpg.F90

    r15036 r15157  
    554554      ! compute rhd at the ice/oce interface (ocean side) 
    555555      ! usefull to reduce residual current in the test case ISOMIP with no melting 
    556       DO ji = 1, jpi 
    557          DO jj = 1, jpj 
    558             ikt = mikt(ji,jj) 
    559             zts_top(ji,jj,1) = ts(ji,jj,ikt,1,Kmm) 
    560             zts_top(ji,jj,2) = ts(ji,jj,ikt,2,Kmm) 
    561             zdep_top(ji,jj)  = MAX( risfdep(ji,jj) , gdept(ji,jj,1,Kmm) ) 
    562          END DO 
    563       END DO 
    564 !!st      CALL eos( zts_top, zdep_top, zrhd_top ) 
    565       CALL eos( zts_top, risfdep, zrhd_top ) 
    566  
     556      DO_2D( 1, 1, 1, 1 ) 
     557         ikt = mikt(ji,jj) 
     558         zts_top(ji,jj,1) = ts(ji,jj,ikt,1,Kmm) 
     559         zts_top(ji,jj,2) = ts(ji,jj,ikt,2,Kmm) 
     560      END_2D 
     561      DO_2D( 1, 1, 1, 1 ) 
     562         zdep_top(ji,jj)  = MAX( risfdep(ji,jj) , gdept(ji,jj,1,Kmm) ) 
     563      END_2D 
     564      CALL eos( zts_top, zdep_top, zrhd_top ) 
     565      ! 
    567566      !                     !===========================! 
    568567      !                     !=====  surface value  =====! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/ISF/isfload.F90

    r14064 r15157  
    8585      ! 
    8686      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
     87#if defined key_qco && key_isf 
     88         CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) ) 
     89#else 
    8790         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) ) 
    88 !!st ==>> CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) ) 
     91#endif 
    8992      END DO 
    9093      ! 
     
    9396      ! 
    9497      !                                !- Surface value + ice shelf gradient 
    95       pload(:,:) = 0._wp                      ! compute pressure due to ice shelf load  
    96       DO_2D( 1, 1, 1, 1 ) 
     98      pload(:,:) = 0._wp                      ! compute 2 x pressure due to ice shelf load  
     99      DO_2D( 1, 1, 1, 1 )                     ! since is will be multiply by 0.5 in hpg_isf 
    97100         ikt = mikt(ji,jj) 
    98101         ! 
    99102         IF ( ikt > 1 ) THEN 
    100103            !                                 ! top layer of the ice shelf 
     104#if defined key_qco && key_isf 
     105            pload(ji,jj) = pload(ji,jj) + zrhd(ji,jj,1) * e3w_0(ji,jj,1) 
     106            ! 
     107            DO jk = 2, ikt-1                  ! core layers of the ice shelf 
     108               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w_0(ji,jj,jk) 
     109            END DO 
     110            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 
     111            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +    zrhd(ji,jj,ikt-1) )   & 
     112               &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) ) 
     113#else 
    101114            pload(ji,jj) = pload(ji,jj)   & 
    102115               &         + zrhd (ji,jj,1) * e3w(ji,jj,1,Kmm) 
     
    109122            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +  zrhd(ji,jj,ikt-1)     )   & 
    110123               &                        * (     risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 
    111 !!st ==>>     &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) ) 
     124#endif 
    112125            ! 
    113126         END IF 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/TRA/traqsr.F90

    r15083 r15157  
    786786      zcoef    =  zprec * rho0_rcp / ( rDt * zQmax * pfr) 
    787787      ! 
    788       klev = jpkm1      ! Level of light extinction 
    789       DO jk = jpkm1, 1, -1 
    790          IF( SUM( tmask(:,:,jk) ) > 0 ) THEN    ! ocean point at that level 
    791             zdw  = MAXVAL( gdepw_0(:,:,jk+1) *       wmask(:,:,jk)         )    ! max w-depth at jk+1 level 
    792             ze3t = MINVAL(   e3t_0(:,:,jk  ) , mask=(wmask(:,:,jk+1)==1)   )    ! minimum e3t at jk   level 
    793             zhext =  - pL * LOG( zcoef * ze3t )                                 ! extinction depth 
    794             IF( zdw >= zhext )   klev = jk                                      ! last T-level reached by Qsr 
    795          ELSE                                   ! only land point at level jk 
    796             klev = jk                                                           ! local domain sea-bed level  
    797          ENDIF 
    798       END DO 
     788      IF( ln_zco .OR. ln_zps ) THEN      ! z- or zps coordinate (use 1D ref vertcial coordinate) 
     789         klev = jpkm1                              ! Level of light extinction zco / zps 
     790         DO jk = jpkm1, 1, -1 
     791            zdw  = gdepw_1d(jk+1)                  ! max w-depth at jk+1 level 
     792            ze3t =   e3t_1d(jk  )                  ! minimum e3t at jk   level 
     793            zhext =  - pL * LOG( zcoef * ze3t )    ! extinction depth 
     794            IF( zdw >= zhext )   klev = jk         ! last T-level reached by Qsr 
     795         END DO 
     796      ELSE                               ! s- or s-z- coordinate (use 3D vertical coordinate) 
     797         klev = jpkm1                              ! Level of light extinction  
     798         DO jk = jpkm1, 1, -1    !  
     799            IF( SUM( tmask(:,:,jk) ) > 0 ) THEN    ! ocean point at that level 
     800               zdw  = MAXVAL( gdepw_0(:,:,jk+1) *       wmask(:,:,jk)         )    ! max w-depth at jk+1 level 
     801               ze3t = MINVAL(   e3t_0(:,:,jk  ) , mask=(wmask(:,:,jk+1)==1)   )    ! minimum e3t at jk   level 
     802               zhext =  - pL * LOG( zcoef * ze3t )                                 ! extinction depth 
     803               IF( zdw >= zhext )   klev = jk                                      ! last T-level reached by Qsr 
     804            ELSE                                   ! only land point at level jk 
     805               klev = jk                                                           ! local domain sea-bed level  
     806            ENDIF 
     807         END DO 
     808         CALL mpp_max('tra_qsr', klev)             ! needed for reproducibility   !!st may be modified to avoid this comm. 
     809         !                                                                        !!st use ssmask to remove the comm ? 
     810      ENDIF 
    799811      ! 
    800812!!st      IF(lwp) WRITE(numout,*) '                level of e3t light extinction = ', klev, ' ref depth = ', gdepw_1d(klev+1), ' m' 
    801 !!st      ! 
    802 !!st      klev = jpkm1      ! Level of light extinction 
    803 !!st      DO jk = jpkm1, 1, -1 
    804 !!st         IF( SUM( tmask(:,:,jk) ) > 0 ) THEN    ! ocean point at that level 
    805 !!st            zdw  = MAXVAL( gdepw_0(:,:,jk+1) * wmask(:,:,jk) )    ! max w-depth at jk+1 level 
    806 !!st            ze3t = MINVAL(   e3t_0(:,:,jk  )                 )    ! minimum e3t at jk   level 
    807 !!st            zhext =  - pL * LOG( zcoef * pL )                   ! extinction depth 
    808 !!st            IF( zdw >= zhext )   klev = jk                        ! last T-level reached by Qsr 
    809 !!st         ELSE                                   ! only land point at level jk 
    810 !!st            klev = jk                                             ! local domain sea-bed level  
    811 !!st         ENDIF 
    812 !!st      END DO 
    813 !!st      ! 
    814 !!st      IF(lwp) WRITE(numout,*) '                level of pL light extinction = ', klev, ' ref depth = ', gdepw_1d(klev+1), ' m' 
    815       ! 
    816813   END FUNCTION qsr_ext_lev 
    817814 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/cpp_ISOMIP+.fcm

    r14239 r15157  
    1  bld::tool::fppkeys   key_xios  
     1 bld::tool::fppkeys   key_xios key_qco key_isf  
Note: See TracChangeset for help on using the changeset viewer.