Changeset 14424 for NEMO/branches/UKMO/NEMO_4.0.4_ocean_mean_fluxes
- Timestamp:
- 2021-02-09T19:18:32+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_ocean_mean_fluxes/src/OCE/SBC/sbccpl.F90
r14423 r14424 213 213 #if defined key_si3 || defined key_cice 214 214 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_last_couple !: Ice fractional area at last coupling time 215 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: leads_last_couple !: Leads fractional area at last coupling time 215 216 #endif 216 217 … … 233 234 !! *** FUNCTION sbc_cpl_alloc *** 234 235 !!---------------------------------------------------------------------- 235 INTEGER :: ierr( 5)236 INTEGER :: ierr(6) 236 237 !!---------------------------------------------------------------------- 237 238 ierr(:) = 0 … … 245 246 #if defined key_si3 || defined key_cice 246 247 ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) ) 248 ALLOCATE( leads_last_couple(jpi,jpj) , STAT=ierr(5) ) 247 249 #endif 248 250 ! 249 IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr( 5) )251 IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(6) ) 250 252 251 253 sbc_cpl_alloc = MAXVAL( ierr ) … … 868 870 #if defined key_si3 || defined key_cice 869 871 a_i_last_couple(:,:,:) = 0._wp 872 leads_last_couple(:,:) = 1._wp 870 873 #endif 871 874 ! ! ------------------------- ! … … 1176 1179 IF( srcv(jn)%laction ) CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 1177 1180 END DO 1181 1182 ! Find out the leads fraction at the last coupling point 1183 leads_last_couple(:,:) = SUM(a_i_last_couple(:,:,:), dim=3) 1178 1184 1179 1185 ! ! ========================= ! … … 1443 1449 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) ! evaporation - precipitation 1444 1450 CASE( 'conservative' ) 1445 zemp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ( frcv(jpr_rain)%z3(:,:,1) + frcv(jpr_snow)%z3(:,:,1) )1451 zemp(:,:) = frcv(jpr_tevp)%z3(:,:,1) * leads_last_couple(:,:) - ( frcv(jpr_rain)%z3(:,:,1) + frcv(jpr_snow)%z3(:,:,1) ) 1446 1452 CASE( 'oce only', 'oce and ice' ) 1447 1453 zemp(:,:) = frcv(jpr_oemp)%z3(:,:,1) … … 1468 1474 ! 1469 1475 ! ! non solar heat flux over the ocean (qns) 1470 IF( srcv(jpr_qnsoce)%laction ) THEN ; zqns(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) 1476 IF( srcv(jpr_qnsoce)%laction ) THEN ; zqns(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) * leads_last_couple(:,:) 1471 1477 ELSE IF( srcv(jpr_qnsmix)%laction ) THEN ; zqns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1472 1478 ELSE ; zqns(:,:) = 0._wp … … 1487 1493 1488 1494 ! ! solar flux over the ocean (qsr) 1489 IF ( srcv(jpr_qsroce)%laction ) THEN ; zqsr(:,:) = frcv(jpr_qsroce)%z3(:,:,1) 1495 IF ( srcv(jpr_qsroce)%laction ) THEN ; zqsr(:,:) = frcv(jpr_qsroce)%z3(:,:,1) * leads_last_couple(:,:) 1490 1496 ELSE IF( srcv(jpr_qsrmix)%laction ) then ; zqsr(:,:) = frcv(jpr_qsrmix)%z3(:,:,1) 1491 1497 ELSE ; zqsr(:,:) = 0._wp … … 1728 1734 zsprecip(:,:) = frcv(jpr_snow)%z3(:,:,1) ! May need to ensure positive here 1729 1735 ztprecip(:,:) = frcv(jpr_rain)%z3(:,:,1) + zsprecip(:,:) ! May need to ensure positive here 1730 zemp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ztprecip(:,:)1736 zemp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) * leads_last_couple(:,:) - ztprecip(:,:) 1731 1737 CASE( 'oce and ice' ) ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp 1732 1738 zemp_tot(:,:) = ziceld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + picefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1) … … 1787 1793 1788 1794 ! --- evaporation over ocean (used later for qemp) --- ! 1789 zevap_oce(:,:) = frcv(jpr_tevp)%z3(:,:,1) - zevap_ice_total(:,:) * picefr(:,:)1795 zevap_oce(:,:) = frcv(jpr_tevp)%z3(:,:,1) * leads_last_couple(:,:) - zevap_ice_total(:,:) * picefr(:,:) 1790 1796 1791 1797 ! since the sensitivity of evap to temperature (devap/dT) is not prescribed by the atmosphere, we set it to 0 … … 1874 1880 IF( iom_use('rain_ao_cea') ) CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * picefr(:,:) ) ! liquid precipitation over ocean (cell average) 1875 1881 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea' , frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) * tmask(:,:,1) ) ! Sublimation over sea-ice (cell average) 1876 IF( iom_use('evap_ao_cea') ) CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1) &1882 IF( iom_use('evap_ao_cea') ) CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1) * leads_last_couple(:,:) & 1877 1883 & - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) ) * tmask(:,:,1) ) ! ice-free oce evap (cell average) 1878 1884 ! note: runoff output is done in sbcrnf (which includes icebergs too) and iceshelf output is done in sbcisf … … 1892 1898 ! Calculate the total non solar heat flux. The ocean only non solar heat flux (zqns_oce) will be recalculated after this CASE 1893 1899 ! statement to be consistent with other coupling methods even though .zqns_oce = frcv(jpr_qnsoce)%z3(:,:,1) 1894 zqns_tot(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) * ziceld(:,:) + SUM( zqns_ice(:,:,:) * a_i(:,:,:), dim=3 )1900 zqns_tot(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) * leads_last_couple(:,:) + SUM( zqns_ice(:,:,:) * a_i_last_couple(:,:,:), dim=3 ) 1895 1901 1896 1902 CASE( 'conservative' ) ! the required fields are directly provided … … 2019 2025 IF ( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * rLfus ) ! latent heat from icebergs melting 2020 2026 IF ( iom_use( 'hflx_rain_cea') ) CALL iom_put('hflx_rain_cea' , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) ! heat flux from rain (cell average) 2021 IF ( iom_use( 'hflx_evap_cea') ) CALL iom_put('hflx_evap_cea' , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) ) &2027 IF ( iom_use( 'hflx_evap_cea') ) CALL iom_put('hflx_evap_cea' , ( frcv(jpr_tevp)%z3(:,:,1) * leads_last_couple(:,:) - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) ) & 2022 2028 & * zcptn(:,:) * tmask(:,:,1) ) ! heat flux from evap (cell average) 2023 2029 IF ( iom_use( 'hflx_prec_cea') ) CALL iom_put('hflx_prec_cea' , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & ! heat flux from all precip (cell avg) … … 2032 2038 ! ! ========================= ! 2033 2039 CASE( 'oce only' ) 2034 zqsr_tot(:,: ) = MAX( 0._wp , frcv(jpr_qsroce)%z3(:,:,1) ) * ziceld(:,:)2040 zqsr_tot(:,: ) = MAX( 0._wp , frcv(jpr_qsroce)%z3(:,:,1) ) * leads_last_couple(:,:) 2035 2041 2036 2042 ! For the Met Office the only sea ice solar flux is the transmitted qsr which is added onto zqsr_ice … … 2134 2140 ! Add retrieved transmitted solar radiation onto the ice and total solar radiation 2135 2141 zqsr_ice(:,:,:) = zqsr_ice(:,:,:) + zqtr_ice_top(:,:,:) 2136 zqsr_tot(:,:) = zqsr_tot(:,:) + SUM( zqtr_ice_top(:,:,:) * a_i (:,:,:), dim=3 )2142 zqsr_tot(:,:) = zqsr_tot(:,:) + SUM( zqtr_ice_top(:,:,:) * a_i_last_couple(:,:,:), dim=3 ) 2137 2143 2138 2144 ! if we are not getting this data from the coupler then assume zero (fully opaque ice)
Note: See TracChangeset
for help on using the changeset viewer.