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 12785 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/SBC/sbcblk.F90 – NEMO

Ignore:
Timestamp:
2020-04-20T20:48:56+02:00 (4 years ago)
Author:
clem
Message:

debug ice evap for the coupling in sbccpl and implement the possibility to read the cloud cover for a more accurate calculation of ice albedo. This functionality is only implemented in the bulk, I leave the task for the coupling to the people who know better (though I put the first bricks already)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/SBC/sbcblk.F90

    r12276 r12785  
    8080   REAL(wp), PARAMETER ::   rctv0 = R_vap/R_dry   !: for virtual temperature (== (1-eps)/eps) => ~ 0.608 
    8181 
    82    INTEGER , PARAMETER ::   jpfld   =10           ! maximum number of files to read 
     82   INTEGER , PARAMETER ::   jpfld   =11           ! maximum number of files to read 
    8383   INTEGER , PARAMETER ::   jp_wndi = 1           ! index of 10m wind velocity (i-component) (m/s)    at T-point 
    8484   INTEGER , PARAMETER ::   jp_wndj = 2           ! index of 10m wind velocity (j-component) (m/s)    at T-point 
     
    9090   INTEGER , PARAMETER ::   jp_snow = 8           ! index of snow (solid prcipitation)       (kg/m2/s) 
    9191   INTEGER , PARAMETER ::   jp_slp  = 9           ! index of sea level pressure              (Pa) 
    92    INTEGER , PARAMETER ::   jp_tdif =10           ! index of tau diff associated to HF tau   (N/m2)   at T-point 
     92   INTEGER , PARAMETER ::   jp_cc   =10           ! index of cloud cover                     (-)      range:0-1 
     93   INTEGER , PARAMETER ::   jp_tdif =11           ! index of tau diff associated to HF tau   (N/m2)   at T-point 
    9394 
    9495   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf   ! structure of input fields (file informations, fields read) 
     
    161162      !! 
    162163      !!---------------------------------------------------------------------- 
    163       INTEGER  ::   ifpr, jfld            ! dummy loop indice and argument 
     164      INTEGER  ::   jfpr, jfld            ! dummy loop indice and argument 
    164165      INTEGER  ::   ios, ierror, ioptio   ! Local integer 
    165166      !! 
     
    168169      TYPE(FLD_N) ::   sn_wndi, sn_wndj, sn_humi, sn_qsr       ! informations about the fields to be read 
    169170      TYPE(FLD_N) ::   sn_qlw , sn_tair, sn_prec, sn_snow      !       "                        " 
    170       TYPE(FLD_N) ::   sn_slp , sn_tdif                        !       "                        " 
     171      TYPE(FLD_N) ::   sn_slp , sn_tdif, sn_cc                 !       "                        " 
    171172      NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw ,                &   ! input fields 
    172          &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_tdif,                & 
     173         &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_tdif, sn_cc,         & 
    173174         &                 ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF,             &   ! bulk algorithm 
    174175         &                 cn_dir , ln_taudif, rn_zqt, rn_zu,                         &  
     
    214215      slf_i(jp_tair) = sn_tair   ;   slf_i(jp_humi) = sn_humi 
    215216      slf_i(jp_prec) = sn_prec   ;   slf_i(jp_snow) = sn_snow 
    216       slf_i(jp_slp)  = sn_slp    ;   slf_i(jp_tdif) = sn_tdif 
     217      slf_i(jp_slp)  = sn_slp    ;   slf_i(jp_cc)   = sn_cc 
     218      slf_i(jp_tdif) = sn_tdif 
    217219      ! 
    218220      lhftau = ln_taudif                     !- add an extra field if HF stress is used 
     
    222224      ALLOCATE( sf(jfld), STAT=ierror ) 
    223225      IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_blk_init: unable to allocate sf structure' ) 
    224       DO ifpr= 1, jfld 
    225          ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) ) 
    226          IF( slf_i(ifpr)%ln_tint )   ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 
    227          IF( slf_i(ifpr)%freqh > 0. .AND. MOD( NINT(3600. * slf_i(ifpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 )   & 
    228             &  CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rdt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.',   & 
    229             &                 '               This is not ideal. You should consider changing either rdt or nn_fsbc value...' ) 
    230  
    231       END DO 
     226 
    232227      !                                      !- fill the bulk structure with namelist informations 
    233228      CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_init', 'surface boundary condition -- bulk formulae', 'namsbc_blk' ) 
    234229      ! 
     230      DO jfpr = 1, jfld 
     231         ! 
     232         IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN    !--  not used field  --!   (only now allocated and set to zero) 
     233            ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 
     234            sf(jfpr)%fnow(:,:,1) = 0._wp 
     235         ELSE                                                  !-- used field --! 
     236            ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 
     237            IF( slf_i(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 
     238            IF( slf_i(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * slf_i(jfpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 )                      & 
     239               &  CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rdt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.', & 
     240               &                 '               This is not ideal. You should consider changing either rdt or nn_fsbc value...' ) 
     241         ENDIF 
     242      ENDDO 
     243      ! fill cloud cover array with constant value if "not used" 
     244      IF( TRIM(sf(jp_cc)%clrootname) == 'NOT USED' )   sf(jp_cc)%fnow(:,:,1) = cldf_ice 
     245          
    235246      IF ( ln_wave ) THEN 
    236247      !Activated wave module but neither drag nor stokes drift activated 
     
    792803      REAL(wp) ::   zst3                     ! local variable 
    793804      REAL(wp) ::   zcoef_dqlw, zcoef_dqla   !   -      - 
    794       REAL(wp) ::   zztmp, z1_rLsub           !   -      - 
    795       REAL(wp) ::   zfr1, zfr2               ! local variables 
     805      REAL(wp) ::   zztmp, z1_rLsub          !   -      - 
    796806      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z1_st         ! inverse of surface temperature 
    797807      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_qlw         ! long wave heat flux over ice 
     
    802812      REAL(wp), DIMENSION(jpi,jpj)     ::   zrhoa 
    803813      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2 
     814      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri 
    804815      !!--------------------------------------------------------------------- 
    805816      ! 
     
    903914      END DO 
    904915 
     916      ! --- cloud cover --- ! 
     917      cloud_fra(:,:) = sf(jp_cc)%fnow(:,:,1) 
     918       
    905919      ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 
    906       zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice )            ! transmission when hi>10cm 
    907       zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )            ! zfr2 such that zfr1 + zfr2 to equal 1 
    908       ! 
    909       WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    910          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    911       ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (zfr1) when hi>10cm 
    912          qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 
    913       ELSEWHERE                                                         ! zero when hs>0 
    914          qtr_ice_top(:,:,:) = 0._wp  
    915       END WHERE 
     920      ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:)  ! surface transmission when hi>10cm 
     921      ! 
     922      DO jl = 1, jpl 
     923         WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     924            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     925         ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     926            qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     927         ELSEWHERE                                                         ! zero when hs>0 
     928            qtr_ice_top(:,:,jl) = 0._wp  
     929         END WHERE 
     930      ENDDO 
    916931      ! 
    917932 
Note: See TracChangeset for help on using the changeset viewer.