- Timestamp:
- 2019-12-14T14:57:23+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbccpl.F90
r12193 r12252 571 571 IF( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = nn_cats_cpl 572 572 573 #if defined key_si3 574 IF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN 575 IF( .NOT.srcv(jpr_ts_ice)%laction ) & 576 & CALL ctl_stop( 'sbc_cpl_init: srcv(jpr_ts_ice)%laction should be set to true when ln_cndflx=T' ) 577 ENDIF 578 #endif 573 579 ! ! ------------------------- ! 574 580 ! ! Wave breaking ! … … 860 866 ELSE IF( sn_snd_crt%clvgrd /= 'T' ) THEN 861 867 CALL ctl_stop( 'sn_snd_crt%clvgrd must be equal to T' ) 862 ssnd(jps_ocx1:jps_ivz1)%clgrid = 'T' ! all oce and ice components on the same unique grid863 868 ENDIF 864 869 ssnd(jps_ocx1:jps_ivz1)%laction = .TRUE. ! default: all are send … … 1038 1043 ENDIF 1039 1044 xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 1040 !1041 ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' )1042 IF( ln_dm2dc .AND. ln_cpl .AND. ncpl_qsr_freq /= 86400 ) &1043 & CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' )1044 IF( ln_dm2dc .AND. ln_cpl ) ncpl_qsr_freq = 86400 / ncpl_qsr_freq1045 1045 ! 1046 1046 END SUBROUTINE sbc_cpl_init … … 1109 1109 REAL(wp), DIMENSION(jpi,jpj) :: ztx, zty, zmsk, zemp, zqns, zqsr 1110 1110 !!---------------------------------------------------------------------- 1111 ! 1112 IF( kt == nit000 ) THEN 1113 ! cannot be done in the init phase when we use agrif as cpl_freq requires that oasis_enddef is done 1114 ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' ) 1115 IF( ln_dm2dc .AND. ncpl_qsr_freq /= 86400 ) & 1116 & CALL ctl_stop( 'sbc_cpl_rcv: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 1117 ncpl_qsr_freq = 86400 / ncpl_qsr_freq ! used by top 1118 ENDIF 1111 1119 ! 1112 1120 IF( ln_mixcpl ) zmsk(:,:) = 1. - xcplmask(:,:,0) … … 1242 1250 IF( srcv(jpr_co2)%laction ) atm_co2(:,:) = frcv(jpr_co2)%z3(:,:,1) 1243 1251 ! 1244 ! ! ================== !1245 ! ! ice skin temp. !1246 ! ! ================== !1247 #if defined key_si31248 ! needed by Met Office1249 IF( srcv(jpr_ts_ice)%laction ) THEN1250 WHERE ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0 ) ; tsfc_ice(:,:,:) = 0.01251 ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. ) ; tsfc_ice(:,:,:) = -60.1252 ELSEWHERE ; tsfc_ice(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:)1253 END WHERE1254 ENDIF1255 #endif1256 1252 ! ! ========================= ! 1257 1253 ! ! Mean Sea Level Pressure ! (taum) … … 1633 1629 !! sprecip solid precipitation over the ocean 1634 1630 !!---------------------------------------------------------------------- 1635 REAL(wp), INTENT(in) , DIMENSION(:,:) :: picefr ! ice fraction [0 to 1]1636 ! !! ! optional arguments, used only in 'mixed oce-ice' case1637 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: palbi ! all skies ice albedo1638 REAL(wp), INTENT(in) , DIMENSION(:,: ), OPTIONAL :: psst ! sea surface temperature [Celsius]1639 REAL(wp), INTENT(in ), DIMENSION(:,:,:), OPTIONAL :: pist ! ice surface temperature [Kelvin]1640 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phs ! snow depth [m]1641 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phi ! ice thickness [m]1631 REAL(wp), INTENT(in) , DIMENSION(:,:) :: picefr ! ice fraction [0 to 1] 1632 ! !! ! optional arguments, used only in 'mixed oce-ice' case or for Met-Office coupling 1633 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: palbi ! all skies ice albedo 1634 REAL(wp), INTENT(in) , DIMENSION(:,: ), OPTIONAL :: psst ! sea surface temperature [Celsius] 1635 REAL(wp), INTENT(inout), DIMENSION(:,:,:), OPTIONAL :: pist ! ice surface temperature [Kelvin] => inout for Met-Office 1636 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phs ! snow depth [m] 1637 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phi ! ice thickness [m] 1642 1638 ! 1643 1639 INTEGER :: ji, jj, jl ! dummy loop index … … 1646 1642 REAL(wp), DIMENSION(jpi,jpj) :: zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip , zevap_oce, zdevap_ice 1647 1643 REAL(wp), DIMENSION(jpi,jpj) :: zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 1648 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice !!gm , zfrqsr_tr_i1644 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice, zqtr_ice_top, ztsu 1649 1645 !!---------------------------------------------------------------------- 1650 1646 ! … … 1814 1810 ! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED ** 1815 1811 zqns_tot(:,: ) = frcv(jpr_qnsmix)%z3(:,:,1) 1816 zqns_ice(:,:,1) = frcv(jpr_qnsmix)%z3(:,:,1) & 1817 & + frcv(jpr_dqnsdt)%z3(:,:,1) * ( pist(:,:,1) - ( (rt0 + psst(:,: ) ) * ziceld(:,:) & 1818 & + pist(:,:,1) * picefr(:,:) ) ) 1812 IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1813 DO jl = 1, jpl 1814 zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:,jl) & 1815 & + frcv(jpr_dqnsdt)%z3(:,:,jl) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:) & 1816 & + pist(:,:,jl) * picefr(:,:) ) ) 1817 END DO 1818 ELSE 1819 DO jl = 1, jpl 1820 zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:, 1) & 1821 & + frcv(jpr_dqnsdt)%z3(:,:, 1) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:) & 1822 & + pist(:,:,jl) * picefr(:,:) ) ) 1823 END DO 1824 ENDIF 1819 1825 END SELECT 1820 1826 ! … … 1930 1936 END DO 1931 1937 ENDIF 1932 zqsr_tot(:,: ) = frcv(jpr_qsrmix)%z3(:,:,1)1933 zqsr_ice(:,:,1) = frcv(jpr_qsrice)%z3(:,:,1)1934 1938 CASE( 'oce and ice' ) 1935 1939 zqsr_tot(:,: ) = ziceld(:,:) * frcv(jpr_qsroce)%z3(:,:,1) … … 1951 1955 ! Create solar heat flux over ice using incoming solar heat flux and albedos 1952 1956 ! ( see OASIS3 user guide, 5th edition, p39 ) 1953 zqsr_ice(:,:,1) = frcv(jpr_qsrmix)%z3(:,:,1) * ( 1.- palbi(:,:,1) ) & 1954 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1955 & + palbi (:,:,1) * picefr(:,:) ) ) 1957 IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1958 DO jl = 1, jpl 1959 zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:,jl) * ( 1.- palbi(:,:,jl) ) & 1960 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1961 & + palbi (:,:,jl) * picefr(:,:) ) ) 1962 END DO 1963 ELSE 1964 DO jl = 1, jpl 1965 zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:, 1) * ( 1.- palbi(:,:,jl) ) & 1966 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1967 & + palbi (:,:,jl) * picefr(:,:) ) ) 1968 END DO 1969 ENDIF 1956 1970 CASE( 'none' ) ! Not available as for now: needs additional coding 1957 1971 ! ! since fields received, here zqsr_tot, are not defined with none option … … 2013 2027 ! ! ========================= ! 2014 2028 CASE ('coupled') 2015 qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 2016 qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 2029 IF( ln_mixcpl ) THEN 2030 DO jl=1,jpl 2031 qml_ice(:,:,jl) = qml_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_topm)%z3(:,:,jl) * zmsk(:,:) 2032 qcn_ice(:,:,jl) = qcn_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_botm)%z3(:,:,jl) * zmsk(:,:) 2033 ENDDO 2034 ELSE 2035 qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 2036 qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 2037 ENDIF 2017 2038 END SELECT 2018 !2019 2039 ! ! ========================= ! 2020 2040 ! ! Transmitted Qsr ! [W/m2] … … 2023 2043 ! 2024 2044 ! ! ===> used prescribed cloud fraction representative for polar oceans in summer (0.81) 2025 ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice ! surface transmission parameter(Grenfell Maykut 77)2045 ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice ! surface transmission when hi>10cm (Grenfell Maykut 77) 2026 2046 ! 2027 qtr_ice_top(:,:,:) = ztri * qsr_ice(:,:,:) 2028 WHERE( phs(:,:,:) >= 0.0_wp ) qtr_ice_top(:,:,:) = 0._wp ! snow fully opaque 2029 WHERE( phi(:,:,:) <= 0.1_wp ) qtr_ice_top(:,:,:) = qsr_ice(:,:,:) ! thin ice transmits all solar radiation 2047 WHERE ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 2048 zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( ztri + ( 1._wp - ztri ) * ( 1._wp - phi(:,:,:) * 10._wp ) ) 2049 ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp ) ! constant (ztri) when hi>10cm 2050 zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ztri 2051 ELSEWHERE ! zero when hs>0 2052 zqtr_ice_top(:,:,:) = 0._wp 2053 END WHERE 2030 2054 ! 2031 2055 ELSEIF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN !== conduction flux as surface forcing ==! … … 2033 2057 ! ! ===> here we must receive the qtr_ice_top array from the coupler 2034 2058 ! for now just assume zero (fully opaque ice) 2035 qtr_ice_top(:,:,:) = 0._wp 2059 zqtr_ice_top(:,:,:) = 0._wp 2060 ! 2061 ENDIF 2062 ! 2063 IF( ln_mixcpl ) THEN 2064 DO jl=1,jpl 2065 qtr_ice_top(:,:,jl) = qtr_ice_top(:,:,jl) * xcplmask(:,:,0) + zqtr_ice_top(:,:,jl) * zmsk(:,:) 2066 ENDDO 2067 ELSE 2068 qtr_ice_top(:,:,:) = zqtr_ice_top(:,:,:) 2069 ENDIF 2070 ! ! ================== ! 2071 ! ! ice skin temp. ! 2072 ! ! ================== ! 2073 ! needed by Met Office 2074 IF( srcv(jpr_ts_ice)%laction ) THEN 2075 WHERE ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0 ) ; ztsu(:,:,:) = 0. + rt0 2076 ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. ) ; ztsu(:,:,:) = -60. + rt0 2077 ELSEWHERE ; ztsu(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:) + rt0 2078 END WHERE 2079 ! 2080 IF( ln_mixcpl ) THEN 2081 DO jl=1,jpl 2082 pist(:,:,jl) = pist(:,:,jl) * xcplmask(:,:,0) + ztsu(:,:,jl) * zmsk(:,:) 2083 ENDDO 2084 ELSE 2085 pist(:,:,:) = ztsu(:,:,:) 2086 ENDIF 2036 2087 ! 2037 2088 ENDIF … … 2197 2248 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 2198 2249 END SELECT 2199 IF( ssnd(jps_fice)%laction )CALL cpl_snd( jps_fice, isec, ztmp3, info )2250 CALL cpl_snd( jps_fice, isec, ztmp3, info ) 2200 2251 ENDIF 2201 2252 … … 2257 2308 ! ! Ice melt ponds ! 2258 2309 ! ! ------------------------- ! 2259 ! needed by Met Office 2310 ! needed by Met Office: 1) fraction of ponded ice 2) local/actual pond depth 2260 2311 IF( ssnd(jps_a_p)%laction .OR. ssnd(jps_ht_p)%laction ) THEN 2261 2312 SELECT CASE( sn_snd_mpnd%cldes) … … 2263 2314 SELECT CASE( sn_snd_mpnd%clcat ) 2264 2315 CASE( 'yes' ) 2265 ztmp3(:,:,1:jpl) = a_ip (:,:,1:jpl)2266 ztmp4(:,:,1:jpl) = v_ip(:,:,1:jpl)2316 ztmp3(:,:,1:jpl) = a_ip_frac(:,:,1:jpl) 2317 ztmp4(:,:,1:jpl) = h_ip(:,:,1:jpl) 2267 2318 CASE( 'no' ) 2268 2319 ztmp3(:,:,:) = 0.0 2269 2320 ztmp4(:,:,:) = 0.0 2270 2321 DO jl=1,jpl 2271 ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip (:,:,jpl)2272 ztmp4(:,:,1) = ztmp4(:,:,1) + v_ip(:,:,jpl)2322 ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip_frac(:,:,jpl) 2323 ztmp4(:,:,1) = ztmp4(:,:,1) + h_ip(:,:,jpl) 2273 2324 ENDDO 2274 2325 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_mpnd%clcat' )
Note: See TracChangeset
for help on using the changeset viewer.