Changeset 12132
- Timestamp:
- 2019-12-10T11:38:28+01:00 (5 years ago)
- Location:
- NEMO/trunk/src/OCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/IOM/iom.F90
r11993 r12132 806 806 CHARACTER(LEN=100) :: clinfo ! info character 807 807 !--------------------------------------------------------------------- 808 ! 809 IF( iom_open_init == 0 ) RETURN ! avoid to use iom_file(jf)%nfid that us not yet initialized 808 810 ! 809 811 clinfo = ' iom_close ~~~ ' -
NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90
r10582 r12132 306 306 ! End of definition phase 307 307 !------------------------------------------------------------------ 308 308 ! 309 #if defined key_agrif 310 IF( agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN 311 #endif 309 312 CALL oasis_enddef(nerror) 310 313 IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 314 #if defined key_agrif 315 ENDIF 316 #endif 311 317 ! 312 318 IF ( ltmp_wapatch ) THEN … … 357 363 WRITE(numout,*) 'oasis_put: kstep ', kstep 358 364 WRITE(numout,*) 'oasis_put: info ', kinfo 359 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata( :,:,jc))360 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata( :,:,jc))361 WRITE(numout,*) ' - Sum value is ', SUM(pdata( :,:,jc))365 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata(nldi:nlei,nldj:nlej,jc)) 366 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata(nldi:nlei,nldj:nlej,jc)) 367 WRITE(numout,*) ' - Sum value is ', SUM(pdata(nldi:nlei,nldj:nlej,jc)) 362 368 WRITE(numout,*) '****************' 363 369 ENDIF -
NEMO/trunk/src/OCE/SBC/sbc_oce.F90
r10882 r12132 105 105 !! Ocean Surface Boundary Condition fields 106 106 !!---------------------------------------------------------------------- 107 INTEGER , PUBLIC :: ncpl_qsr_freq !: qsr coupling frequency per days from atmosphere107 INTEGER , PUBLIC :: ncpl_qsr_freq = 0 !: qsr coupling frequency per days from atmosphere (used by top) 108 108 ! 109 109 LOGICAL , PUBLIC :: lhftau = .FALSE. !: HF tau used in TKE: mean(stress module) - module(mean stress) -
NEMO/trunk/src/OCE/SBC/sbccpl.F90
r11993 r12132 573 573 IF ( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = nn_cats_cpl 574 574 575 IF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN 576 IF( .NOT.srcv(jpr_ts_ice)%laction ) & 577 & CALL ctl_stop( 'sbc_cpl_init: srcv(jpr_ts_ice)%laction should be set to true when ln_cndflx=T' ) 578 ENDIF 575 579 ! ! ------------------------- ! 576 580 ! ! Wave breaking ! … … 1040 1044 ENDIF 1041 1045 xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 1042 !1043 ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' )1044 IF( ln_dm2dc .AND. ln_cpl .AND. ncpl_qsr_freq /= 86400 ) &1045 & CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' )1046 IF( ln_dm2dc .AND. ln_cpl ) ncpl_qsr_freq = 86400 / ncpl_qsr_freq1047 1046 ! 1048 1047 END SUBROUTINE sbc_cpl_init … … 1110 1109 REAL(wp), DIMENSION(jpi,jpj) :: ztx, zty, zmsk, zemp, zqns, zqsr 1111 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 1112 1119 ! 1113 1120 IF( ln_mixcpl ) zmsk(:,:) = 1. - xcplmask(:,:,0) … … 1243 1250 IF( srcv(jpr_co2)%laction ) atm_co2(:,:) = frcv(jpr_co2)%z3(:,:,1) 1244 1251 ! 1245 ! ! ================== !1246 ! ! ice skin temp. !1247 ! ! ================== !1248 #if defined key_si31249 ! needed by Met Office1250 IF( srcv(jpr_ts_ice)%laction ) THEN1251 WHERE ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0 ) ; tsfc_ice(:,:,:) = 0.01252 ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. ) ; tsfc_ice(:,:,:) = -60.1253 ELSEWHERE ; tsfc_ice(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:)1254 END WHERE1255 ENDIF1256 #endif1257 1252 ! ! ========================= ! 1258 1253 ! ! Mean Sea Level Pressure ! (taum) … … 1630 1625 !! sprecip solid precipitation over the ocean 1631 1626 !!---------------------------------------------------------------------- 1632 REAL(wp), INTENT(in) , DIMENSION(:,:) :: picefr ! ice fraction [0 to 1]1633 ! !! ! optional arguments, used only in 'mixed oce-ice' case1634 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: palbi ! all skies ice albedo1635 REAL(wp), INTENT(in) , DIMENSION(:,: ), OPTIONAL :: psst ! sea surface temperature [Celsius]1636 REAL(wp), INTENT(in ), DIMENSION(:,:,:), OPTIONAL :: pist ! ice surface temperature [Kelvin]1637 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phs ! snow depth [m]1638 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phi ! ice thickness [m]1627 REAL(wp), INTENT(in) , DIMENSION(:,:) :: picefr ! ice fraction [0 to 1] 1628 ! !! ! optional arguments, used only in 'mixed oce-ice' case or for Met-Office coupling 1629 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: palbi ! all skies ice albedo 1630 REAL(wp), INTENT(in) , DIMENSION(:,: ), OPTIONAL :: psst ! sea surface temperature [Celsius] 1631 REAL(wp), INTENT(inout), DIMENSION(:,:,:), OPTIONAL :: pist ! ice surface temperature [Kelvin] => inout for Met-Office 1632 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phs ! snow depth [m] 1633 REAL(wp), INTENT(in) , DIMENSION(:,:,:), OPTIONAL :: phi ! ice thickness [m] 1639 1634 ! 1640 1635 INTEGER :: ji, jj, jl ! dummy loop index … … 1643 1638 REAL(wp), DIMENSION(jpi,jpj) :: zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip , zevap_oce, zdevap_ice 1644 1639 REAL(wp), DIMENSION(jpi,jpj) :: zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 1645 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice !!gm , zfrqsr_tr_i1640 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice, zqtr_ice_top, ztsu 1646 1641 !!---------------------------------------------------------------------- 1647 1642 ! … … 1810 1805 ! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED ** 1811 1806 zqns_tot(:,: ) = frcv(jpr_qnsmix)%z3(:,:,1) 1812 zqns_ice(:,:,1) = frcv(jpr_qnsmix)%z3(:,:,1) & 1813 & + frcv(jpr_dqnsdt)%z3(:,:,1) * ( pist(:,:,1) - ( (rt0 + psst(:,: ) ) * ziceld(:,:) & 1814 & + pist(:,:,1) * picefr(:,:) ) ) 1807 IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1808 DO jl = 1, jpl 1809 zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:,jl) & 1810 & + frcv(jpr_dqnsdt)%z3(:,:,jl) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:) & 1811 & + pist(:,:,jl) * picefr(:,:) ) ) 1812 END DO 1813 ELSE 1814 DO jl = 1, jpl 1815 zqns_ice(:,:,jl) = frcv(jpr_qnsmix)%z3(:,:, 1) & 1816 & + frcv(jpr_dqnsdt)%z3(:,:, 1) * ( pist(:,:,jl) - ( ( rt0 + psst(:,:) ) * ziceld(:,:) & 1817 & + pist(:,:,jl) * picefr(:,:) ) ) 1818 END DO 1819 ENDIF 1815 1820 END SELECT 1816 1821 ! … … 1924 1929 END DO 1925 1930 ENDIF 1926 zqsr_tot(:,: ) = frcv(jpr_qsrmix)%z3(:,:,1)1927 zqsr_ice(:,:,1) = frcv(jpr_qsrice)%z3(:,:,1)1928 1931 CASE( 'oce and ice' ) 1929 1932 zqsr_tot(:,: ) = ziceld(:,:) * frcv(jpr_qsroce)%z3(:,:,1) … … 1945 1948 ! Create solar heat flux over ice using incoming solar heat flux and albedos 1946 1949 ! ( see OASIS3 user guide, 5th edition, p39 ) 1947 zqsr_ice(:,:,1) = frcv(jpr_qsrmix)%z3(:,:,1) * ( 1.- palbi(:,:,1) ) & 1948 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1949 & + palbi (:,:,1) * picefr(:,:) ) ) 1950 IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1951 DO jl = 1, jpl 1952 zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:,jl) * ( 1.- palbi(:,:,jl) ) & 1953 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1954 & + palbi (:,:,jl) * picefr(:,:) ) ) 1955 END DO 1956 ELSE 1957 DO jl = 1, jpl 1958 zqsr_ice(:,:,jl) = frcv(jpr_qsrmix)%z3(:,:, 1) * ( 1.- palbi(:,:,jl) ) & 1959 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1960 & + palbi (:,:,jl) * picefr(:,:) ) ) 1961 END DO 1962 ENDIF 1950 1963 CASE( 'none' ) ! Not available as for now: needs additional coding 1951 1964 ! ! since fields received, here zqsr_tot, are not defined with none option … … 2007 2020 ! ! ========================= ! 2008 2021 CASE ('coupled') 2009 qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 2010 qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 2022 IF( ln_mixcpl ) THEN 2023 DO jl=1,jpl 2024 qml_ice(:,:,jl) = qml_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_topm)%z3(:,:,jl) * zmsk(:,:) 2025 qcn_ice(:,:,jl) = qcn_ice(:,:,jl) * xcplmask(:,:,0) + frcv(jpr_botm)%z3(:,:,jl) * zmsk(:,:) 2026 ENDDO 2027 ELSE 2028 qml_ice(:,:,:) = frcv(jpr_topm)%z3(:,:,:) 2029 qcn_ice(:,:,:) = frcv(jpr_botm)%z3(:,:,:) 2030 ENDIF 2011 2031 END SELECT 2012 !2013 2032 ! ! ========================= ! 2014 2033 ! ! Transmitted Qsr ! [W/m2] … … 2017 2036 ! 2018 2037 ! ! ===> used prescribed cloud fraction representative for polar oceans in summer (0.81) 2019 ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice ! surface transmission parameter(Grenfell Maykut 77)2038 ztri = 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice ! surface transmission when hi>10cm (Grenfell Maykut 77) 2020 2039 ! 2021 qtr_ice_top(:,:,:) = ztri * qsr_ice(:,:,:) 2022 WHERE( phs(:,:,:) >= 0.0_wp ) qtr_ice_top(:,:,:) = 0._wp ! snow fully opaque 2023 WHERE( phi(:,:,:) <= 0.1_wp ) qtr_ice_top(:,:,:) = qsr_ice(:,:,:) ! thin ice transmits all solar radiation 2040 WHERE ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 2041 zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( ztri + ( 1._wp - ztri ) * ( 1._wp - phi(:,:,:) * 10._wp ) ) 2042 ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp ) ! constant (ztri) when hi>10cm 2043 zqtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ztri 2044 ELSEWHERE ! zero when hs>0 2045 zqtr_ice_top(:,:,:) = 0._wp 2046 END WHERE 2024 2047 ! 2025 2048 ELSEIF( ln_cndflx .AND. .NOT.ln_cndemulate ) THEN !== conduction flux as surface forcing ==! … … 2027 2050 ! ! ===> here we must receive the qtr_ice_top array from the coupler 2028 2051 ! for now just assume zero (fully opaque ice) 2029 qtr_ice_top(:,:,:) = 0._wp 2052 zqtr_ice_top(:,:,:) = 0._wp 2053 ! 2054 ENDIF 2055 ! 2056 IF( ln_mixcpl ) THEN 2057 DO jl=1,jpl 2058 qtr_ice_top(:,:,jl) = qtr_ice_top(:,:,jl) * xcplmask(:,:,0) + zqtr_ice_top(:,:,jl) * zmsk(:,:) 2059 ENDDO 2060 ELSE 2061 qtr_ice_top(:,:,:) = zqtr_ice_top(:,:,:) 2062 ENDIF 2063 ! ! ================== ! 2064 ! ! ice skin temp. ! 2065 ! ! ================== ! 2066 ! needed by Met Office 2067 IF( srcv(jpr_ts_ice)%laction ) THEN 2068 WHERE ( frcv(jpr_ts_ice)%z3(:,:,:) > 0.0 ) ; ztsu(:,:,:) = 0. + rt0 2069 ELSEWHERE( frcv(jpr_ts_ice)%z3(:,:,:) < -60. ) ; ztsu(:,:,:) = -60. + rt0 2070 ELSEWHERE ; ztsu(:,:,:) = frcv(jpr_ts_ice)%z3(:,:,:) + rt0 2071 END WHERE 2072 ! 2073 IF( ln_mixcpl ) THEN 2074 DO jl=1,jpl 2075 pist(:,:,jl) = pist(:,:,jl) * xcplmask(:,:,0) + ztsu(:,:,jl) * zmsk(:,:) 2076 ENDDO 2077 ELSE 2078 pist(:,:,:) = ztsu(:,:,:) 2079 ENDIF 2030 2080 ! 2031 2081 ENDIF … … 2190 2240 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 2191 2241 END SELECT 2192 IF( ssnd(jps_fice)%laction )CALL cpl_snd( jps_fice, isec, ztmp3, info )2242 CALL cpl_snd( jps_fice, isec, ztmp3, info ) 2193 2243 ENDIF 2194 2244 … … 2250 2300 ! ! Ice melt ponds ! 2251 2301 ! ! ------------------------- ! 2252 ! needed by Met Office 2302 ! needed by Met Office: 1) fraction of ponded ice 2) local/actual pond depth 2253 2303 IF( ssnd(jps_a_p)%laction .OR. ssnd(jps_ht_p)%laction ) THEN 2254 2304 SELECT CASE( sn_snd_mpnd%cldes) … … 2256 2306 SELECT CASE( sn_snd_mpnd%clcat ) 2257 2307 CASE( 'yes' ) 2258 ztmp3(:,:,1:jpl) = a_ip (:,:,1:jpl)2259 ztmp4(:,:,1:jpl) = v_ip(:,:,1:jpl)2308 ztmp3(:,:,1:jpl) = a_ip_frac(:,:,1:jpl) 2309 ztmp4(:,:,1:jpl) = h_ip(:,:,1:jpl) 2260 2310 CASE( 'no' ) 2261 2311 ztmp3(:,:,:) = 0.0 2262 2312 ztmp4(:,:,:) = 0.0 2263 2313 DO jl=1,jpl 2264 ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip (:,:,jpl)2265 ztmp4(:,:,1) = ztmp4(:,:,1) + v_ip(:,:,jpl)2314 ztmp3(:,:,1) = ztmp3(:,:,1) + a_ip_frac(:,:,jpl) 2315 ztmp4(:,:,1) = ztmp4(:,:,1) + h_ip(:,:,jpl) 2266 2316 ENDDO 2267 2317 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.