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/sbccpl.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/sbccpl.F90

    r12742 r12785  
    16541654      ! 
    16551655      INTEGER  ::   ji, jj, jl   ! dummy loop index 
    1656       REAL(wp) ::   ztri         ! local scalar 
    16571656      REAL(wp), DIMENSION(jpi,jpj)     ::   zcptn, zcptrain, zcptsnw, ziceld, zmsk, zsnw 
    16581657      REAL(wp), DIMENSION(jpi,jpj)     ::   zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip  , zevap_oce, zdevap_ice 
     
    16601659      REAL(wp), DIMENSION(jpi,jpj)     ::   zevap_ice_total 
    16611660      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice, zqtr_ice_top, ztsu 
     1661      REAL(wp), DIMENSION(jpi,jpj)     ::   ztri, zcloud_fra 
    16621662      !!---------------------------------------------------------------------- 
    16631663      ! 
     
    16941694      IF (ln_scale_ice_flux) THEN ! typically met-office requirements 
    16951695         IF (sn_rcv_emp%clcat == 'yes') THEN 
    1696             WHERE( a_i(:,:,:) > 1.e-10) ; zevap_ice(:,:,:) = frcv(jpr_ievp)%z3(:,:,:) * a_i_last_couple(:,:,:) / a_i(:,:,:) 
    1697             ELSEWHERE                   ; zevap_ice(:,:,:) = 0._wp 
     1696            WHERE( a_i(:,:,:) > 1.e-10 ) ; zevap_ice(:,:,:) = frcv(jpr_ievp)%z3(:,:,:) * a_i_last_couple(:,:,:) / a_i(:,:,:) 
     1697            ELSEWHERE                     ; zevap_ice(:,:,:) = 0._wp 
    16981698            END WHERE 
    1699             zevap_ice_total(:,:) = SUM( zevap_ice(:,:,:), dim=3 ) 
     1699            WHERE( picefr(:,:) > 1.e-10 ) ; zevap_ice_total(:,:) = SUM( zevap_ice(:,:,:) * a_i(:,:,:), dim=3 ) / picefr(:,:) 
     1700            ELSEWHERE                     ; zevap_ice_total(:,:) = 0._wp 
     1701            END WHERE 
    17001702         ELSE 
    1701             WHERE( picefr(:,:) > 1.e-10) ; zevap_ice(:,:,1) = frcv(jpr_ievp)%z3(:,:,1) * SUM( a_i_last_couple, dim=3 ) / picefr(:,:) 
    1702             ELSEWHERE                    ; zevap_ice(:,:,1) = 0._wp 
     1703            WHERE( picefr(:,:) > 1.e-10 ) ; zevap_ice(:,:,1) = frcv(jpr_ievp)%z3(:,:,1) * SUM( a_i_last_couple, dim=3 ) / picefr(:,:) 
     1704            ELSEWHERE                     ; zevap_ice(:,:,1) = 0._wp 
    17031705            END WHERE 
    17041706            zevap_ice_total(:,:) = zevap_ice(:,:,1) 
     1707            DO jl = 2, jpl 
     1708               zevap_ice(:,:,jl) = zevap_ice(:,:,1) 
     1709            ENDDO 
    17051710         ENDIF 
    17061711      ELSE 
    17071712         IF (sn_rcv_emp%clcat == 'yes') THEN 
    17081713            zevap_ice(:,:,1:jpl) = frcv(jpr_ievp)%z3(:,:,1:jpl) 
    1709             zevap_ice_total(:,:) = SUM( zevap_ice(:,:,:), dim=3 ) 
     1714            WHERE( picefr(:,:) > 1.e-10 ) ; zevap_ice_total(:,:) = SUM( zevap_ice(:,:,:) * a_i(:,:,:), dim=3 ) / picefr(:,:) 
     1715            ELSEWHERE                     ; zevap_ice_total(:,:) = 0._wp 
     1716            END WHERE 
    17101717         ELSE 
    17111718            zevap_ice(:,:,1) = frcv(jpr_ievp)%z3(:,:,1) 
    17121719            zevap_ice_total(:,:) = zevap_ice(:,:,1) 
     1720            DO jl = 2, jpl 
     1721               zevap_ice(:,:,jl) = zevap_ice(:,:,1) 
     1722            ENDDO 
    17131723         ENDIF 
    17141724      ENDIF 
     
    20852095         ENDIF 
    20862096      END SELECT 
     2097!!$      !                                                      ! ========================= ! 
     2098!!$      SELECT CASE( TRIM( sn_rcv_clouds%cldes ) )             !       cloud fraction      ! 
     2099!!$      !                                                      ! ========================= ! 
     2100!!$         cloud_fra(:,:) = frcv(jpr_clfra)*z3(:,:,1) 
     2101!!$      END SELECT 
     2102      zcloud_fra(:,:) = cldf_ice   ! should be real cloud fraction instead (as in the bulk) but needs to be read from atm. 
     2103      IF( ln_mixcpl ) THEN 
     2104         cloud_fra(:,:) = cloud_fra(:,:) * xcplmask(:,:,0) + zcloud_fra(:,:)* zmsk(:,:) 
     2105      ELSE 
     2106         cloud_fra(:,:) = zcloud_fra(:,:) 
     2107      ENDIF 
    20872108      !                                                      ! ========================= ! 
    20882109      !                                                      !      Transmitted Qsr      !   [W/m2] 
     
    20912112         ! 
    20922113         !                    ! ===> used prescribed cloud fraction representative for polar oceans in summer (0.81) 
    2093          ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice    ! surface transmission when hi>10cm (Grenfell Maykut 77) 
     2114         !                    !      should be real cloud fraction instead (as in the bulk) but needs to be read from atm. 
     2115         ztri(:,:) = 0.18 * ( 1.0 - zcloud_fra(:,:) ) + 0.35 * zcloud_fra(:,:)  ! surface transmission when hi>10cm (Grenfell Maykut 77) 
    20942116         ! 
    2095          WHERE    ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) <  0.1_wp )       ! linear decrease from hi=0 to 10cm   
    2096             zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( ztri + ( 1._wp - ztri ) * ( 1._wp - phi(:,:,:) * 10._wp ) ) 
    2097          ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp )       ! constant (ztri) when hi>10cm 
    2098             zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ztri 
    2099          ELSEWHERE                                                         ! zero when hs>0 
    2100             zqtr_ice_top(:,:,:) = 0._wp 
    2101          END WHERE 
     2117         DO jl = 1, jpl 
     2118            WHERE    ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) <  0.1_wp )     ! linear decrease from hi=0 to 10cm   
     2119               zqtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 
     2120            ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp )     ! constant (ztri) when hi>10cm 
     2121               zqtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 
     2122            ELSEWHERE                                                         ! zero when hs>0 
     2123               zqtr_ice_top(:,:,jl) = 0._wp 
     2124            END WHERE 
     2125         ENDDO 
    21022126         !      
    21032127      ELSEIF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN      !==  conduction flux as surface forcing  ==! 
Note: See TracChangeset for help on using the changeset viewer.