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

Changeset 15551


Ignore:
Timestamp:
2021-11-28T21:19:36+01:00 (2 years ago)
Author:
gsamson
Message:

last changes on branch; ticket #2632

Location:
NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbc_phy.F90

    r14592 r15551  
    257257        zmask = 1._wp 
    258258        ztpot = ptpot 
     259        zta   = 0._wp 
    259260      ELSE 
    260261        zmask = 0._wp  
     262        ztpot = 0._wp 
    261263        zta   = pta 
    262264      ENDIF 
     
    585587      REAL(wp) :: ztptv 
    586588      !!------------------------------------------------------------------- 
    587       IF( PRESENT(pta_layer) .AND. PRESENT(pqa_layer) ) l_ptqa_l_prvd=.TRUE. 
     589      IF( PRESENT(pta_layer) .AND. PRESENT(pqa_layer) ) l_ptqa_l_prvd = .TRUE. 
    588590      ! 
    589591      zsstv = virt_temp_sclr( psst, pssq )   ! virtual potential SST 
     
    610612      INTEGER  ::   ji, jj 
    611613 
    612       IF( PRESENT(pta_layer) .AND. PRESENT(pqa_layer) ) l_ptqa_l_prvd=.TRUE. 
    613       DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    614          IF( l_ptqa_l_prvd ) THEN  !!GS: "IF" inside loop needs to be removed 
     614      IF( PRESENT(pta_layer) .AND. PRESENT(pqa_layer) ) l_ptqa_l_prvd = .TRUE. 
     615      IF( l_ptqa_l_prvd ) THEN 
     616         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    615617            Ri_bulk_vctr(ji,jj) = Ri_bulk_sclr( pz, psst(ji,jj), ptha(ji,jj), pssq(ji,jj), pqa(ji,jj), pub(ji,jj), & 
    616618               &                                pta_layer=pta_layer(ji,jj ),  pqa_layer=pqa_layer(ji,jj ) ) 
    617          ELSE 
     619         END_2D 
     620      ELSE 
     621         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    618622            Ri_bulk_vctr(ji,jj) = Ri_bulk_sclr( pz, psst(ji,jj), ptha(ji,jj), pssq(ji,jj), pqa(ji,jj), pub(ji,jj) ) 
    619          END IF 
    620       END_2D 
     623         END_2D 
     624      END IF 
    621625 
    622626   END FUNCTION Ri_bulk_vctr 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbcblk.F90

    r15548 r15551  
    275275         IF( ln_ANDREAS )      & 
    276276            & CALL ctl_stop( 'sbc_blk_init: Cool-skin/warm-layer param. not compatible with ANDREAS algorithm' ) 
    277          IF( nn_fsbc /= 1 ) & 
    278             & CALL ctl_stop( 'sbc_blk_init: Please set "nn_fsbc" to 1 when using cool-skin/warm-layer param.') 
     277         !IF( nn_fsbc /= 1 ) & 
     278         !   & CALL ctl_stop( 'sbc_blk_init: Please set "nn_fsbc" to 1 when using cool-skin/warm-layer param.') 
    279279      END IF 
    280280 
     
    555555         ! Potential temperature of air at z=rn_zqt (most reanalysis products provide absolute temp., not potential temp.) 
    556556         IF( ln_tair_pot ) THEN 
    557             theta_air_zt(:,:)        = sf(jp_tair )%fnow(:,:,1) 
     557            ! temperature read into file is already potential temperature, do nothing... 
     558            theta_air_zt(:,:) = sf(jp_tair )%fnow(:,:,1) 
    558559         ELSE 
    559560            ! temperature read into file is ABSOLUTE temperature (that's the case for ECMWF products for example...) 
     
    584585            qsr_ice(:,:,1) =          sf(jp_qsr)%fnow(:,:,1) 
    585586         ENDIF 
    586          tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1)    !#LB: should it be POTENTIAL temperature instead ???? 
    587          !tatm_ice(:,:) = theta_air_zt(:,:)         !#LB: THIS! ? 
     587         tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1)    !#LB: should it be POTENTIAL temperature (theta_air_zt) instead ???? 
    588588         qatm_ice(:,:) = q_air_zt(:,:) 
    589589         tprecip(:,:)  = sf(jp_prec)%fnow(:,:,1) * rn_pfac 
     
    649649      REAL(wp), DIMENSION(jpi,jpj) ::   zce_oce           ! latent   heat transfert coefficient over ocean 
    650650      REAL(wp), DIMENSION(jpi,jpj) ::   zsspt             ! potential sea-surface temperature [K] 
    651       REAL(wp), DIMENSION(jpi,jpj) ::   zpre, ztabs 
     651      REAL(wp), DIMENSION(jpi,jpj) ::   zpre, ztabs       ! air pressure [Pa] & absolute temperature [K] 
    652652      REAL(wp), DIMENSION(jpi,jpj) ::   zztmp1, zztmp2 
    653653      !!--------------------------------------------------------------------- 
     
    762762 
    763763      IF( ln_skin_cs .OR. ln_skin_wl ) THEN 
    764          !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of ptsk and pssq: 
     764         !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of zsspt, pssq & ptsk: 
    765765         WHERE ( fr_i(:,:) > 0.001_wp ) 
    766766            ! sea-ice present, we forget about the update, using what we backed up before call to turb_*() 
     
    768768            pssq(:,:)  = zztmp2(:,:) 
    769769         END WHERE 
    770          !! ptsk and pssq have been updated!!! 
     770         ! apply potential temperature increment to abolute SST 
    771771         ptsk(:,:) = ptsk(:,:) + ( zsspt(:,:) - zztmp1(:,:) ) 
    772772      END IF 
     
    789789      ELSE                      !==  BLK formulation  ==!   turbulent fluxes computation 
    790790 
    791          zpre(:,:) = pres_temp( q_zu(:,:), pslp(:,:), rn_zu, ptpot=theta_zu(:,:), pta=ztabs(:,:) ) 
    792          rhoa(:,:) = rho_air( ztabs(:,:), q_zu(:,:), zpre(:,:) ) 
    793          !!GS: for debug, to be removed  
    794          CALL iom_put( "pres_zu", zpre(:,:)*tmask(:,:,1) ) 
    795          CALL iom_put( "slp", pslp(:,:)*tmask(:,:,1) ) 
    796          CALL iom_put( "tabs_zu", (ztabs(:,:)-rt0)*tmask(:,:,1) ) 
     791         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     792            zpre(ji,jj) = pres_temp( q_zu(ji,jj), pslp(ji,jj), rn_zu, ptpot=theta_zu(ji,jj), pta=ztabs(ji,jj) ) 
     793            rhoa(ji,jj) = rho_air( ztabs(ji,jj), q_zu(ji,jj), zpre(ji,jj) ) 
     794         END_2D 
    797795 
    798796         CALL BULK_FORMULA( rn_zu, zsspt(:,:), pssq(:,:), theta_zu(:,:), q_zu(:,:), & 
     
    808806 
    809807         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    810          IF( wndm(ji,jj) > 0._wp ) THEN 
    811             zztmp = taum(ji,jj) / wndm(ji,jj) 
     808            IF( wndm(ji,jj) > 0._wp ) THEN 
     809              zztmp = taum(ji,jj) / wndm(ji,jj) 
    812810#if defined key_cyclone 
    813             ztau_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
    814             ztau_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
     811               ztau_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
     812               ztau_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
    815813#else 
    816             ztau_i(ji,jj) = zztmp * pwndi(ji,jj) 
    817             ztau_j(ji,jj) = zztmp * pwndj(ji,jj) 
     814               ztau_i(ji,jj) = zztmp * pwndi(ji,jj) 
     815               ztau_j(ji,jj) = zztmp * pwndj(ji,jj) 
    818816#endif 
    819          ELSE 
    820             ztau_i(ji,jj) = 0._wp 
    821             ztau_j(ji,jj) = 0._wp 
    822          ENDIF 
     817            ELSE 
     818               ztau_i(ji,jj) = 0._wp 
     819               ztau_j(ji,jj) = 0._wp 
     820            ENDIF 
    823821         END_2D 
    824822 
     
    867865      ptsk(:,:) = ( ptsk(:,:) - rt0 ) * tmask(:,:,1)  ! Back to Celsius 
    868866 
    869       CALL iom_put( "sspt", zsspt(:,:)-rt0 ) 
    870867      IF( ln_skin_cs .OR. ln_skin_wl ) THEN 
    871868         CALL iom_put( "t_skin" ,  ptsk        )  ! T_skin in Celsius 
    872          CALL iom_put( "dt_skin" , ptsk - pst  )  ! T_skin - SST temperature difference... 
     869         CALL iom_put( "dt_skin" , ptsk - pst  )  ! T_skin - SST temperature difference 
    873870      ENDIF 
    874871      ! 
     
    984981      !! ** Method  :   compute momentum using bulk formulation 
    985982      !!                formulea, ice variables and read atmospheric fields. 
     983      !!                NB: ice drag coefficient is assumed to be a constant 
    986984      !!--------------------------------------------------------------------- 
    987985      REAL(wp) , INTENT(in   ), DIMENSION(:,:  ) ::   pslp    ! sea-level pressure [Pa] 
     
    10161014      ! potential sea-ice surface temperature [K] 
    10171015      zsipt(:,:) = theta_exner( ptsui(:,:), pslp(:,:) ) 
    1018        
     1016 
    10191017      ! sea-ice <-> atmosphere bulk transfer coefficients 
    10201018      SELECT CASE( nblk_ice ) 
     
    10461044      END SELECT 
    10471045 
    1048       ztmp(:,:) = ( 1._wp - MAX(0._wp, SIGN( 1._wp, 1.E-6_wp - fr_i )) )*tmask(:,:,1) ! mask for presence of ice ! 
    1049       IF( iom_use('spt_ice')) CALL iom_put("spt_ice", (zsipt-rt0)*ztmp) 
     1046      IF( iom_use('Cd_ice').OR.iom_use('Ce_ice').OR.iom_use('Ch_ice').OR.iom_use('taum_ice').OR.iom_use('utau_ice').OR.iom_use('vtau_ice') ) & 
     1047         & ztmp(:,:) = ( 1._wp - MAX(0._wp, SIGN( 1._wp, 1.E-6_wp - fr_i )) )*tmask(:,:,1) ! mask for presence of ice ! 
     1048 
    10501049      IF( iom_use('Cd_ice') ) CALL iom_put("Cd_ice", Cd_ice*ztmp) 
    10511050      IF( iom_use('Ce_ice') ) CALL iom_put("Ce_ice", Ce_ice*ztmp) 
     
    11311130      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_dqsb        ! sensible  heat sensitivity over ice 
    11321131      REAL(wp), DIMENSION(jpi,jpj)     ::   zevap, zsnw   ! evaporation and snw distribution after wind blowing (SI3) 
     1132      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
    11331133      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri 
    11341134      REAL(wp), DIMENSION(jpi,jpj)     ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg) 
     
    11361136      ! 
    11371137      zcoef_dqlw = 4._wp * emiss_i * stefan             ! local scalars 
    1138       ! 
    11391138      zztmp = 1. / ( 1. - albo ) 
    11401139      dqla_ice(:,:,:) = 0._wp 
     1140 
    11411141      ! Heat content per unit mass (J/kg) 
    11421142      zcptrain(:,:) = (      ptair        - rt0 ) * rcp  * tmask(:,:,1) 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbcblk_algo_coare3p0.F90

    r14592 r15551  
    189189      REAL(wp), DIMENSION(jpi,jpj) :: zeta_u        ! stability parameter at height zu 
    190190      REAL(wp), DIMENSION(jpi,jpj) :: ztmp0, ztmp1, ztmp2 
    191       REAL(wp), DIMENSION(jpi,jpj) :: zpre, zrhoa, zta 
     191      REAL(wp), DIMENSION(jpi,jpj) :: zpre, zrhoa, zta ! air pressure [Pa], density [kg/m3] & absolute temperature [k] 
    192192      ! 
    193193      REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zeta_t  ! stability parameter at height zt 
     
    323323 
    324324         IF(( l_use_cs ).OR.( l_use_wl )) THEN 
    325             zpre(:,:) = pres_temp( q_zu(:,:), slp(:,:), zu, ptpot=t_zu(:,:), pta=zta(:,:) ) 
     325            zpre(:,:)  = pres_temp( q_zu(:,:), slp(:,:), zu, ptpot=t_zu(:,:), pta=zta(:,:) ) 
    326326            zrhoa(:,:) = rho_air( zta(:,:), q_zu(:,:), zpre(:,:) ) 
    327327         ENDIF 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbcblk_algo_coare3p6.F90

    r14592 r15551  
    179179      REAL(wp), DIMENSION(jpi,jpj) :: zeta_u        ! stability parameter at height zu 
    180180      REAL(wp), DIMENSION(jpi,jpj) :: ztmp0, ztmp1, ztmp2 
    181       REAL(wp), DIMENSION(jpi,jpj) :: zpre, zrhoa, zta 
     181      REAL(wp), DIMENSION(jpi,jpj) :: zpre, zrhoa, zta ! air pressure [Pa], density [kg/m3] & absolute temperature [k] 
    182182      ! 
    183183      REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zeta_t  ! stability parameter at height zt 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbcblk_algo_ecmwf.F90

    r15548 r15551  
    184184      REAL(wp), DIMENSION(jpi,jpj) :: Linv  !: 1/L (inverse of Monin Obukhov length... 
    185185      REAL(wp), DIMENSION(jpi,jpj) :: z0, z0t, z0q 
    186       REAL(wp), DIMENSION(jpi,jpj) :: zrhoa, zpre, zta 
     186      REAL(wp), DIMENSION(jpi,jpj) :: zrhoa, zpre, zta ! air pressure [Pa], density [kg/m3] & absolute temperature [k] 
    187187      ! 
    188188      REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zsst  ! to back up the initial bulk SST 
     
    356356            !! Cool-skin contribution 
    357357 
    358  
    359358            CALL UPDATE_QNSOL_TAU( zu, T_s, q_s, t_zu, q_zu, u_star, t_star, q_star, U_zu, Ubzu, slp, rad_lw, zrhoa, & 
    360359               &                   ztmp1, ztmp0, Qlat=ztmp2)  ! Qnsol -> ztmp1 / Tau -> ztmp0 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/SBC/sbccpl.F90

    r15548 r15551  
    5454#endif 
    5555 
    56    USE sbc_phy, ONLY : pp_cldf 
     56   USE sbc_phy, ONLY : pp_cldf, rpref 
    5757 
    5858   IMPLICIT NONE 
     
    220220#endif 
    221221 
    222    REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure[N/m2] 
    223    REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rho0) 
    224  
    225222   INTEGER , ALLOCATABLE, SAVE, DIMENSION(:) ::   nrcvinfo           ! OASIS info argument 
    226223 
     
    11891186      REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient 
    11901187      REAL(wp) ::   zzx, zzy               ! temporary variables 
     1188      REAL(wp) ::   r1_grau                ! = 1.e0 / (grav * rho0) 
    11911189      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty, zmsk, zemp, zqns, zqsr, zcloud_fra 
    11921190      !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.