MODULE limsbc !!====================================================================== !! *** MODULE limsbc *** !! computation of the flux at the sea ice/ocean interface !!====================================================================== !! History : - ! 2006-07 (M. Vancoppelle) LIM3 original code !! 3.0 ! 2008-03 (C. Tallandier) surface module !! - ! 2008-04 (C. Tallandier) split in 2 + new ice-ocean coupling !!---------------------------------------------------------------------- #if defined key_lim3 !!---------------------------------------------------------------------- !! 'key_lim3' LIM 3.0 sea-ice model !!---------------------------------------------------------------------- !! lim_sbc : flux at the ice / ocean interface !!---------------------------------------------------------------------- USE oce USE par_oce ! ocean parameters USE par_ice ! ice parameters USE dom_oce ! ocean domain USE sbc_ice ! Surface boundary condition: sea-ice fields USE sbc_oce ! Surface boundary condition: ocean fields USE phycst ! physical constants USE ocfzpt ! surface ocean freezing point USE ice_oce ! sea-ice variable USE ice ! LIM sea-ice variables USE iceini ! ??? USE dynspg_oce ! choice of the surface pressure gradient scheme USE lbclnk ! ocean lateral boundary condition USE in_out_manager ! I/O manager USE albedo ! albedo parameters USE prtctl ! Print control IMPLICIT NONE PRIVATE PUBLIC lim_sbc_flx ! called by sbc_ice_lim PUBLIC lim_sbc_tau ! called by sbc_ice_lim REAL(wp) :: epsi16 = 1.e-16 ! constant values REAL(wp) :: rzero = 0.e0 REAL(wp) :: rone = 1.e0 REAL(wp), DIMENSION(jpi,jpj) :: utau_oce !: atm.-ocean surface i-stress (ocean referential) [N/m2] REAL(wp), DIMENSION(jpi,jpj) :: vtau_oce !: atm.-ocean surface j-stress (ocean referential) [N/m2] !! * Substitutions # include "vectopt_loop_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/LIM 3.0 , UCL-LOCEAN-IPSL (2008) !! $Id: $ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_sbc_tau( kt, kcpl ) !!------------------------------------------------------------------- !! *** ROUTINE lim_sbc_tau *** !! !! ** Purpose : Update the ocean surface stresses due to the ice !! !! ** Action : - compute the ice-ocean stress depending on kcpl: !! fluxes at the ice-ocean interface. !! Case 0 : old LIM-3 way, computed at ice time-step only !! Case 1 : at each ocean time step the stresses are computed !! using the current ocean velocity (now) !! Case 2 : combination of half case 0 + half case 1 !! !! ** Outputs : - utau : sea surface i-stress (ocean referential) !! - vtau : sea surface j-stress (ocean referential) !! !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90. !! Tartinville et al. 2001 Ocean Modelling, 3, 95-108. !!--------------------------------------------------------------------- INTEGER :: kt ! number of ocean iteration INTEGER :: kcpl ! ice-ocean coupling indicator: =0 LIM-3 old case ! ! =1 stresses computed using now ocean velocity ! ! =2 combination of 0 and 1 cases !! INTEGER :: ji, jj ! dummy loop indices REAL(wp) :: zfrldu, zfrldv ! lead fraction at U- & V-points REAL(wp) :: ztglx , ztgly REAL(wp) :: zat_u, zu_ico, zutaui, zu_u, zv_u, zmodu, zmod REAL(wp) :: zat_v, zv_ico, zvtaui, zu_v, zv_v, zmodv, zsang #if defined key_coupled REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb ! albedo of ice under overcast sky REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalbp ! albedo of ice under clear sky #endif REAL(wp), DIMENSION(jpi,jpj) :: ztio_u, ztio_v ! ocean stress below sea-ice !!--------------------------------------------------------------------- IF( kt == nit000 ) THEN IF(lwp) WRITE(numout,*) IF(lwp) WRITE(numout,*) 'lim_sbc_tau : LIM 3.0 sea-ice - surface ocean momentum fluxes' IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' ENDIF SELECT CASE( kcpl ) ! !--------------------------------! CASE( 0 ) ! LIM 3 old stress computation ! (at ice timestep only) ! !--------------------------------! ! ... ice stress over ocean with a ice-ocean rotation angle DO jj = 1, jpj ! ... change the sinus angle sign in the south hemisphere zsang = SIGN(1.e0, gphif(1,jj) ) * sangvg DO ji = 1, jpi ! ... ice velocity relative to the ocean zu_ico = u_ice(ji,jj) - u_oce(ji,jj) zv_ico = v_ice(ji,jj) - v_oce(ji,jj) zmod = SQRT( zu_ico * zu_ico + zv_ico * zv_ico ) ! quadratic drag formulation ztglx = rhoco * zmod * ( cangvg * zu_ico - zsang * zv_ico ) ztgly = rhoco * zmod * ( cangvg * zv_ico + zsang * zu_ico ) ! IMPORTANT ! these lines are bound to prevent numerical oscillations ! in the ice-ocean stress ! They are physically ill-based. There is a cleaner solution ! to try (remember discussion in Paris Gurvan) ztio_u(ji,jj) = ztglx * exp( - zmod / 0.5 ) ztio_v(ji,jj) = ztgly * exp( - zmod / 0.5 ) ! END DO END DO DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1 ! vertor opt. ! ... open-ocean (lead) fraction at U- & V-points (from T-point values) zfrldu = 0.5 * ( ato_i(ji,jj) + ato_i(ji+1,jj ) ) zfrldv = 0.5 * ( ato_i(ji,jj) + ato_i(ji ,jj+1) ) ! update surface ocean stress utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * ztio_u(ji,jj) vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * ztio_v(ji,jj) ! END DO END DO ! boundary condition on the stress (utau,vtau) CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! ! !--------------------------------! CASE( 1 ) ! Use the now velocity ! (at each ocean timestep) ! !--------------------------------! ! ... save the air-ocean stresses at ice time-step IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN utau_oce(:,:) = utau(:,:) vtau_oce(:,:) = vtau(:,:) ENDIF ! ... ice stress over ocean with a ice-ocean rotation angle DO jj = 2, jpjm1 zsang = SIGN(1.e0, gphif(1,jj-1) ) * sangvg DO ji = fs_2, fs_jpim1 ! computation of wind stress over ocean in X and Y direction zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5 ! ice area at u and V-points zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5 zu_u = u_ice(ji,jj) - un(ji,jj,1) ! u ice-ocean velocity at U-point zv_v = v_ice(ji,jj) - vn(ji,jj,1) ! v ice-ocean velocity at V-point ! ! u ice-ocean velocity at V-point zu_v = 0.25 * ( u_ice(ji,jj ) - un(ji,jj ,1) + u_ice(ji+1,jj ) - un(ji+1,jj ,1) & & + u_ice(ji,jj-1) - un(ji,jj-1,1) + u_ice(ji+1,jj-1) - un(ji+1,jj-1,1) ) ! ! v ice-ocean velocity at U-point zv_u = 0.25 * ( v_ice(ji-1,jj+1) - vn(ji-1,jj+1,1) + v_ice(ji,jj+1) - vn(ji,jj+1,1) & & + v_ice(ji-1,jj ) - vn(ji-1,jj ,1) + v_ice(ji,jj ) - vn(ji,jj ,1) ) zmodu = SQRT( zu_u * zu_u + zv_u * zv_u ) ! module of the ice-ocean velocity at U-point zmodv = SQRT( zu_v * zu_v + zv_v * zv_v ) ! module of the ice-ocean velocity at V-point zutaui = rhoco * zmodu * ( cangvg * zu_u - zsang * zv_u ) zvtaui = rhoco * zmodv * ( cangvg * zv_v + zsang * zu_v ) utau(ji,jj) = ( 1.-zat_u ) * utau_oce(ji,jj) + zat_u * zutaui ! stress at the ocean surface vtau(ji,jj) = ( 1.-zat_v ) * vtau_oce(ji,jj) + zat_v * zvtaui END DO END DO ! boundary condition on the stress (utau,vtau) CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! ! !--------------------------------! CASE( 2 ) ! mixed 0 and 2 cases ! (at each ocean timestep) ! !--------------------------------! ! ... save the air-ocean stresses at ice time-step IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN utau_oce(:,:) = utau(:,:) vtau_oce(:,:) = vtau(:,:) ENDIF ! ... ice stress over ocean with a ice-ocean rotation angle DO jj = 2, jpjm1 zsang = SIGN(1.e0, gphif(1,jj-1) ) * sangvg DO ji = fs_2, fs_jpim1 ! computation of wind stress over ocean in X and Y direction zat_u = at_i(ji,jj) + at_i(ji+1,jj) * 0.5 ! ice area at u and V-points zat_v = at_i(ji,jj) + at_i(ji,jj+1) * 0.5 !!gm bug mixing U and V points value below ====>>> to be corrected zu_ico = u_ice(ji,jj) - 0.5 * ( un(ji,jj,1) - ssu_m(ji,jj) ) ! ice-oce velocity using un and ssu_m zv_ico = v_ice(ji,jj) - 0.5 * ( vn(ji,jj,1) - ssu_m(ji,jj) ) ! ! module of the ice-ocean velocity zmod = SQRT( zu_ico * zu_ico + zv_ico * zv_ico ) ! ! quadratic drag formulation with rotation zutaui = rhoco * zmod * ( cangvg * zu_ico - zsang * zv_ico ) zvtaui = rhoco * zmod * ( cangvg * zv_ico + zsang * zu_ico ) ! utau(ji,jj) = ( 1.-zat_u ) * utau_oce(ji,jj) + zat_u * zutaui ! stress at the ocean surface vtau(ji,jj) = ( 1.-zat_v ) * vtau_oce(ji,jj) + zat_v * zvtaui END DO END DO ! boundary condition on the stress (utau,vtau) CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! END SELECT IF(ln_ctl) CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau : ', mask1=umask, & & tab2d_2=vtau, clinfo2=' vtau : ' , mask2=vmask ) ! END SUBROUTINE lim_sbc_tau SUBROUTINE lim_sbc_flx( kt ) !!------------------------------------------------------------------- !! *** ROUTINE lim_sbc_flx *** !! !! ** Purpose : Update the surface ocean boundary condition for heat !! salt and mass over areas where sea-ice is non-zero !! !! ** Action : - computes the heat and freshwater/salt fluxes !! at the ice-ocean interface. !! - Update the ocean sbc !! !! ** Outputs : - qsr : sea heat flux: solar !! - qns : sea heat flux: non solar !! - emp : freshwater budget: volume flux !! - emps : freshwater budget: concentration/dillution !! !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90. !! Tartinville et al. 2001 Ocean Modelling, 3, 95-108. !!--------------------------------------------------------------------- INTEGER :: kt ! number of iteration !! INTEGER :: ji, jj ! dummy loop indices INTEGER :: ifvt, i1mfr, idfr ! some switches INTEGER :: iflt, ial, iadv, ifral, ifrdv REAL(wp) :: zinda ! switch for testing the values of ice concentration REAL(wp) :: zfons ! salt exchanges at the ice/ocean interface REAL(wp) :: zpme ! freshwater exchanges at the ice/ocean interface REAL(wp), DIMENSION(jpi,jpj) :: zfcm1 , zfcm2 ! solar/non solar heat fluxes #if defined key_coupled REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb ! albedo of ice under overcast sky REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalbp ! albedo of ice under clear sky #endif !!--------------------------------------------------------------------- IF( kt == nit000 ) THEN IF(lwp) WRITE(numout,*) IF(lwp) WRITE(numout,*) 'lim_sbc_flx : LIM 3.0 sea-ice - heat salt and mass ocean surface fluxes' IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' ENDIF !------------------------------------------! ! heat flux at the ocean surface ! !------------------------------------------! ! pfrld is the lead fraction at the previous time step (actually between TRP and THD) ! changed to old_frld and old ht_i DO jj = 1, jpj DO ji = 1, jpi zinda = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) ) ifvt = zinda * MAX( rzero , SIGN( rone, -phicif (ji,jj) ) ) !subscripts are bad here i1mfr = 1.0 - MAX( rzero , SIGN( rone , - ( at_i(ji,jj) ) ) ) idfr = 1.0 - MAX( rzero , SIGN( rone , ( 1.0 - at_i(ji,jj) ) - pfrld(ji,jj) ) ) iflt = zinda * (1 - i1mfr) * (1 - ifvt ) ial = ifvt * i1mfr + ( 1 - ifvt ) * idfr iadv = ( 1 - i1mfr ) * zinda ifral = ( 1 - i1mfr * ( 1 - ial ) ) ifrdv = ( 1 - ifral * ( 1 - ial ) ) * iadv ! switch --- 1.0 ---------------- 0.0 -------------------- ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! zinda | if pfrld = 1 | if pfrld < 1 | ! -> ifvt| if pfrld old_ht_i ! i1mfr | if frld = 1 | if frld < 1 | ! idfr | if frld <= pfrld | if frld > pfrld | ! iflt | ! ial | ! iadv | ! ifral ! ifrdv ! computation the solar flux at ocean surface zfcm1(ji,jj) = pfrld(ji,jj) * qsr(ji,jj) + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj) ! fstric Solar flux transmitted trough the ice ! qsr Net short wave heat flux on free ocean ! new line fscmbq(ji,jj) = ( 1.0 - pfrld(ji,jj) ) * fstric(ji,jj) ! computation the non solar heat flux at ocean surface zfcm2(ji,jj) = - zfcm1(ji,jj) & & + iflt * ( fscmbq(ji,jj) ) & ! total abl -> fscmbq is given to the ocean ! fscmbq and ffltbif are obsolete ! & + iflt * ffltbif(ji,jj) !!! only if one category is used & + ifral * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) / rdt_ice & & + ifrdv * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) / rdt_ice & & + fhmec(ji,jj) & ! new contribution due to snow melt in ridging!! & + fheat_rpo(ji,jj) & ! contribution from ridge formation & + fheat_res(ji,jj) ! fscmbq Part of the solar radiation transmitted through the ice and going to the ocean ! computed in limthd_zdf.F90 ! ffltbif Total heat content of the ice (brine pockets+ice) / delta_t ! qcmif Energy needed to bring the ocean surface layer until its freezing (ok) ! qldif heat balance of the lead (or of the open ocean) ! qfvbq i think this is wrong! ! ---> Array used to store energy in case of total lateral ablation ! qfvbq latent heat uptake/release after accretion/ablation ! qdtcn Energy from the turbulent oceanic heat flux heat flux coming in the lead IF ( num_sal .EQ. 2 ) zfcm2(ji,jj) = zfcm2(ji,jj) + & fhbri(ji,jj) ! new contribution due to brine drainage ! bottom radiative component is sent to the computation of the ! oceanic heat flux fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj) ! used to compute the oceanic heat flux at the next time step qsr(ji,jj) = zfcm1(ji,jj) ! solar heat flux qns(ji,jj) = zfcm2(ji,jj) - fdtcn(ji,jj) ! non solar heat flux ! ! fdtcn : turbulent oceanic heat flux !!gm this IF prevents the vertorisation of the whole loop IF ( ( ji .EQ. jiindx ) .AND. ( jj .EQ. jjindx) ) THEN WRITE(numout,*) ' lim_sbc : heat fluxes ' WRITE(numout,*) ' qsr : ', qsr(jiindx,jjindx) WRITE(numout,*) ' zfcm1 : ', zfcm1(jiindx,jjindx) WRITE(numout,*) ' pfrld : ', pfrld(jiindx,jjindx) WRITE(numout,*) ' fstric : ', fstric (jiindx,jjindx) WRITE(numout,*) WRITE(numout,*) ' qns : ', qns(jiindx,jjindx) WRITE(numout,*) ' zfcm2 : ', zfcm2(jiindx,jjindx) WRITE(numout,*) ' zfcm1 : ', zfcm1(jiindx,jjindx) WRITE(numout,*) ' ifral : ', ifral WRITE(numout,*) ' ial : ', ial WRITE(numout,*) ' qcmif : ', qcmif(jiindx,jjindx) WRITE(numout,*) ' qldif : ', qldif(jiindx,jjindx) WRITE(numout,*) ' qcmif / dt: ', qcmif(jiindx,jjindx) / rdt_ice WRITE(numout,*) ' qldif / dt: ', qldif(jiindx,jjindx) / rdt_ice WRITE(numout,*) ' ifrdv : ', ifrdv WRITE(numout,*) ' qfvbq : ', qfvbq(jiindx,jjindx) WRITE(numout,*) ' qdtcn : ', qdtcn(jiindx,jjindx) WRITE(numout,*) ' qfvbq / dt: ', qfvbq(jiindx,jjindx) / rdt_ice WRITE(numout,*) ' qdtcn / dt: ', qdtcn(jiindx,jjindx) / rdt_ice WRITE(numout,*) ' ' WRITE(numout,*) ' fdtcn : ', fdtcn(jiindx,jjindx) WRITE(numout,*) ' fhmec : ', fhmec(jiindx,jjindx) WRITE(numout,*) ' fheat_rpo : ', fheat_rpo(jiindx,jjindx) WRITE(numout,*) ' fhbri : ', fhbri(jiindx,jjindx) WRITE(numout,*) ' fheat_res : ', fheat_res(jiindx,jjindx) ENDIF !!gm end END DO END DO !------------------------------------------! ! mass flux at the ocean surface ! !------------------------------------------! !!gm optimisation: this loop have to be merged with the previous one DO jj = 1, jpj DO ji = 1, jpi ! case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED) ! ------------------------------------------------------------------------------------- ! The idea of this approach is that the system that we consider is the ICE-OCEAN system ! Thus FW flux = External ( E-P+snow melt) ! Salt flux = Exchanges in the ice-ocean system then converted into FW ! Associated to Ice formation AND Ice melting ! Even if i see Ice melting as a FW and SALT flux ! ! computing freshwater exchanges at the ice/ocean interface zpme = - emp(ji,jj) * ( 1.0 - at_i(ji,jj) ) & ! evaporation over oceanic fraction & + tprecip(ji,jj) * at_i(ji,jj) & ! total precipitation ! old fashioned way ! & - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) ) & ! remov. snow precip over ice & - sprecip(ji,jj) * ( 1. - (pfrld(ji,jj)**betas) ) & ! remov. snow precip over ice & - rdmsnif(ji,jj) / rdt_ice & ! freshwaterflux due to snow melting ! new contribution from snow falling when ridging & + fmmec(ji,jj) ! computing salt exchanges at the ice/ocean interface ! sice should be the same as computed with the ice model zfons = ( soce - sice ) * ( rdmicif(ji,jj) / rdt_ice ) ! SOCE zfons = ( sss_m(ji,jj) - sice ) * ( rdmicif(ji,jj) / rdt_ice ) !CT useless ! salt flux for constant salinity !CT useless fsalt(ji,jj) = zfons / ( sss_m(ji,jj) + epsi16 ) + fsalt_res(ji,jj) ! salt flux for variable salinity zinda = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) ) ! correcting brine and salt fluxes fsbri(ji,jj) = zinda*fsbri(ji,jj) ! converting the salt fluxes from ice to a freshwater flux from ocean fsalt_res(ji,jj) = fsalt_res(ji,jj) / ( sss_m(ji,jj) + epsi16 ) fseqv(ji,jj) = fseqv(ji,jj) / ( sss_m(ji,jj) + epsi16 ) fsbri(ji,jj) = fsbri(ji,jj) / ( sss_m(ji,jj) + epsi16 ) fsalt_rpo(ji,jj) = fsalt_rpo(ji,jj) / ( sss_m(ji,jj) + epsi16 ) ! freshwater mass exchange (positive to the ice, negative for the ocean ?) ! actually it's a salt flux (so it's minus freshwater flux) ! if sea ice grows, zfons is positive, fsalt also ! POSITIVE SALT FLUX FROM THE ICE TO THE OCEAN ! POSITIVE FRESHWATER FLUX FROM THE OCEAN TO THE ICE [kg.m-2.s-1] emp(ji,jj) = - zpme END DO END DO IF( num_sal == 2 ) THEN ! variable ice salinity: brine drainage included in the salt flux emps(:,:) = fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) ELSE ! constant ice salinity: emps(:,:) = fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) ENDIF IF( lk_dynspg_rl ) emp (:,:) = emps(:,:) ! rigid-lid formulation : emp = emps !-----------------------------------------------! ! Storing the transmitted variables ! !-----------------------------------------------! freeze(:,:) = at_i(:,:) ! Sea ice cover tn_ice(:,:,:) = t_su(:,:,:) ! Ice surface temperature #if defined key_coupled !------------------------------------------------! ! Computation of snow/ice and ocean albedo ! !------------------------------------------------! zalb (:,:,:) = 0.e0 zalbp (:,:,:) = 0.e0 CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb ) alb_ice(:,:,:) = 0.5 * zalbp(:,:,:) + 0.5 * zalb (:,:,:) ! Ice albedo (mean clear and overcast skys) #endif IF(ln_ctl) THEN CALL prt_ctl( tab2d_1=qsr , clinfo1=' lim_sbc: qsr : ', tab2d_2=qns , clinfo2=' qns : ' ) CALL prt_ctl( tab2d_1=emp , clinfo1=' lim_sbc: emp : ', tab2d_2=emps, clinfo2=' emps : ' ) CALL prt_ctl( tab2d_1=freeze, clinfo1=' lim_sbc: freeze : ' ) CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl ) ENDIF ! END SUBROUTINE lim_sbc_flx #else !!---------------------------------------------------------------------- !! Default option : Dummy module NO LIM 3.0 sea-ice model !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_sbc ! Dummy routine END SUBROUTINE lim_sbc #endif !!====================================================================== END MODULE limsbc