Ignore:
Timestamp:
2020-06-19T17:37:47+02:00 (3 months ago)
Author:
orioltp
Message:

dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation: merge with trunk@13134, see #2364

Location:
NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@12931        sette 
  • NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/OCE/SBC/sbcblk.F90

    r12546 r13135  
    627627 
    628628      END SELECT 
    629  
     629       
     630      IF( iom_use('Cd_oce') )   CALL iom_put("Cd_oce",   zcd_oce * tmask(:,:,1)) 
     631      IF( iom_use('Ce_oce') )   CALL iom_put("Ce_oce",   zce_oce * tmask(:,:,1)) 
     632      IF( iom_use('Ch_oce') )   CALL iom_put("Ch_oce",   zch_oce * tmask(:,:,1)) 
     633      !! LB: mainly here for debugging purpose: 
     634      IF( iom_use('theta_zt') ) CALL iom_put("theta_zt", (ztpot-rt0) * tmask(:,:,1)) ! potential temperature at z=zt 
     635      IF( iom_use('q_zt') )     CALL iom_put("q_zt",     zqair       * tmask(:,:,1)) ! specific humidity       " 
     636      IF( iom_use('theta_zu') ) CALL iom_put("theta_zu", (t_zu -rt0) * tmask(:,:,1)) ! potential temperature at z=zu 
     637      IF( iom_use('q_zu') )     CALL iom_put("q_zu",     q_zu        * tmask(:,:,1)) ! specific humidity       " 
     638      IF( iom_use('ssq') )      CALL iom_put("ssq",      pssq        * tmask(:,:,1)) ! saturation specific humidity at z=0 
     639      IF( iom_use('wspd_blk') ) CALL iom_put("wspd_blk", zU_zu       * tmask(:,:,1)) ! bulk wind speed at z=zu 
     640       
    630641      IF( ln_skin_cs .OR. ln_skin_wl ) THEN 
    631642         !! ptsk and pssq have been updated!!! 
     
    639650      END IF 
    640651 
    641       !!      CALL iom_put( "Cd_oce", zcd_oce)  ! output value of pure ocean-atm. transfer coef. 
    642       !!      CALL iom_put( "Ch_oce", zch_oce)  ! output value of pure ocean-atm. transfer coef. 
    643  
    644       IF( ABS(rn_zu - rn_zqt) < 0.1_wp ) THEN 
    645          !! If zu == zt, then ensuring once for all that: 
    646          t_zu(:,:) = ztpot(:,:) 
    647          q_zu(:,:) = zqair(:,:) 
    648       ENDIF 
    649  
    650  
    651652      !  Turbulent fluxes over ocean  => BULK_FORMULA @ sbcblk_phy.F90 
    652653      ! ------------------------------------------------------------- 
    653654 
    654655      IF( ln_abl ) THEN         !==  ABL formulation  ==!   multiplication by rho_air and turbulent fluxes computation done in ablstp 
    655          !! FL do we need this multiplication by tmask ... ??? 
    656656         DO_2D_11_11 
    657             zztmp = zU_zu(ji,jj) !* tmask(ji,jj,1) 
     657            zztmp = zU_zu(ji,jj) 
    658658            wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod 
    659659            pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 
    660660            psen(ji,jj)   = zztmp * zch_oce(ji,jj) 
    661661            pevp(ji,jj)   = zztmp * zce_oce(ji,jj) 
     662            rhoa(ji,jj)   = rho_air( ptair(ji,jj), phumi(ji,jj), pslp(ji,jj) ) 
    662663         END_2D 
    663664      ELSE                      !==  BLK formulation  ==!   turbulent fluxes computation 
    664665         CALL BULK_FORMULA( rn_zu, ptsk(:,:), pssq(:,:), t_zu(:,:), q_zu(:,:), & 
    665             &               zcd_oce(:,:), zch_oce(:,:), zce_oce(:,:),         & 
    666             &               wndm(:,:), zU_zu(:,:), pslp(:,:),                 & 
    667             &               taum(:,:), psen(:,:), zqla(:,:),                  & 
    668             &               pEvap=pevp(:,:), prhoa=rhoa(:,:) ) 
     666            &               zcd_oce(:,:), zch_oce(:,:), zce_oce(:,:),          & 
     667            &               wndm(:,:), zU_zu(:,:), pslp(:,:),                  & 
     668            &               taum(:,:), psen(:,:), zqla(:,:),                   & 
     669            &               pEvap=pevp(:,:), prhoa=rhoa(:,:), pfact_evap=rn_efac ) 
    669670 
    670671         zqla(:,:) = zqla(:,:) * tmask(:,:,1) 
     
    683684         ! ... utau, vtau at U- and V_points, resp. 
    684685         !     Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 
    685          !     Note the use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves 
    686          DO_2D_10_10 
     686         !     Note that coastal wind stress is not used in the code... so this extra care has no effect 
     687         DO_2D_00_00 
    687688            utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( zwnd_i(ji,jj) + zwnd_i(ji+1,jj  ) ) & 
    688689               &          * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
     
    888889         Ce_ice(:,:) = Ch_ice(:,:)       ! sensible and latent heat transfer coef. are considered identical 
    889890      ENDIF 
    890  
    891       !! IF ( iom_use("Cd_ice") ) CALL iom_put("Cd_ice", Cd_ice)   ! output value of pure ice-atm. transfer coef. 
    892       !! IF ( iom_use("Ch_ice") ) CALL iom_put("Ch_ice", Ch_ice)   ! output value of pure ice-atm. transfer coef. 
    893  
     891       
     892      IF( iom_use('Cd_ice') ) CALL iom_put("Cd_ice", Cd_ice) 
     893      IF( iom_use('Ce_ice') ) CALL iom_put("Ce_ice", Ce_ice) 
     894      IF( iom_use('Ch_ice') ) CALL iom_put("Ch_ice", Ch_ice) 
     895       
    894896      ! local scalars ( place there for vector optimisation purposes) 
    895       !IF (ln_abl) rhoa  (:,:)  = rho_air( ptair(:,:), phumi(:,:), pslp(:,:) ) !!GS: rhoa must be (re)computed here with ABL to avoid division by zero after (TBI) 
    896897      zcd_dui(:,:) = wndm_ice(:,:) * Cd_ice(:,:) 
    897898 
    898899      IF( ln_blk ) THEN 
    899          ! ------------------------------------------------------------ ! 
    900          !    Wind stress relative to the moving ice ( U10m - U_ice )   ! 
    901          ! ------------------------------------------------------------ ! 
    902          ! C-grid ice dynamics :   U & V-points (same as ocean) 
    903          DO_2D_00_00 
    904             putaui(ji,jj) = 0.5_wp * (  rhoa(ji+1,jj) * zcd_dui(ji+1,jj)             & 
    905                &                      + rhoa(ji  ,jj) * zcd_dui(ji  ,jj)  )          & 
    906                &         * ( 0.5_wp * ( pwndi(ji+1,jj) + pwndi(ji,jj) ) - rn_vfac * puice(ji,jj) ) 
    907             pvtaui(ji,jj) = 0.5_wp * (  rhoa(ji,jj+1) * zcd_dui(ji,jj+1)             & 
    908                &                      + rhoa(ji,jj  ) * zcd_dui(ji,jj  )  )          & 
    909                &         * ( 0.5_wp * ( pwndj(ji,jj+1) + pwndj(ji,jj) ) - rn_vfac * pvice(ji,jj) ) 
     900         ! ------------------------------------------------------------- ! 
     901         !    Wind stress relative to the moving ice ( U10m - U_ice )    ! 
     902         ! ------------------------------------------------------------- ! 
     903         zztmp1 = rn_vfac * 0.5_wp 
     904         DO_2D_01_01    ! at T point  
     905            putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * ( pwndi(ji,jj) - zztmp1 * ( puice(ji-1,jj  ) + puice(ji,jj) ) ) 
     906            pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * ( pwndj(ji,jj) - zztmp1 * ( pvice(ji  ,jj-1) + pvice(ji,jj) ) ) 
    910907         END_2D 
    911          CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1.0_wp, pvtaui, 'V', -1.0_wp ) 
     908         ! 
     909         DO_2D_00_00    ! U & V-points (same as ocean). 
     910            ! take care of the land-sea mask to avoid "pollution" of coastal stress. p[uv]taui used in frazil and  rheology  
     911            zztmp1 = 0.5_wp * ( 2. - umask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji+1,jj  ,1) ) 
     912            zztmp2 = 0.5_wp * ( 2. - vmask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji  ,jj+1,1) ) 
     913            putaui(ji,jj) = zztmp1 * ( putaui(ji,jj) + putaui(ji+1,jj  ) ) 
     914            pvtaui(ji,jj) = zztmp2 * ( pvtaui(ji,jj) + pvtaui(ji  ,jj+1) ) 
     915         END_2D 
     916         CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1._wp, pvtaui, 'V', -1._wp ) 
    912917         ! 
    913918         IF(sn_cfctl%l_prtctl)  CALL prt_ctl( tab2d_1=putaui  , clinfo1=' blk_ice: putaui : '   & 
     
    10461051      evap_ice (:,:,:) = rn_efac * qla_ice (:,:,:) * z1_rLsub    ! sublimation 
    10471052      devap_ice(:,:,:) = rn_efac * dqla_ice(:,:,:) * z1_rLsub    ! d(sublimation)/dT 
    1048       zevap    (:,:)   = rn_efac * ( emp(:,:) + tprecip(:,:) )   ! evaporation over ocean 
     1053      zevap    (:,:)   = emp(:,:) + tprecip(:,:)   ! evaporation over ocean  !LB: removed rn_efac here, correct??? 
    10491054 
    10501055      ! --- evaporation minus precipitation --- ! 
Note: See TracChangeset for help on using the changeset viewer.