MODULE limflx !!====================================================================== !! *** MODULE limflx *** !! computation of the flux at the sea ice/ocean interface !!====================================================================== #if defined key_lim3 !!---------------------------------------------------------------------- !! 'key_lim3' LIM3 sea-ice model !!---------------------------------------------------------------------- !! lim_flx : flux at the ice / ocean interface !! * Modules used USE par_oce USE phycst USE ocfzpt USE ice_oce USE flx_oce USE dom_oce USE ice USE flxblk USE lbclnk USE in_out_manager USE albedo USE par_ice USE prtctl ! Print control IMPLICIT NONE PRIVATE !! * Routine accessibility PUBLIC lim_flx ! called by lim_step !! * Module variables REAL(wp) :: & ! constant values epsi16 = 1e-16 , & rzero = 0.0 , & rone = 1.0 !! * Substitutions # include "vectopt_loop_substitute.h90" !!---------------------------------------------------------------------- !! LIM 2.0, UCL-LOCEAN-IPSL (2005) !! $Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limflx.F90,v 1.6 2005/03/27 18:34:41 opalod Exp $ !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_flx !!------------------------------------------------------------------- !! *** ROUTINE lim_flx *** !! !! !! ** Purpose : Computes the mass and heat fluxes to the ocean !! !! ** Action : - Initialisation of some variables !! - comput. of the fluxes at the sea ice/ocean interface !! !! ** Outputs : - fsolar : solar heat flux at sea ice/ocean interface !! - fnsolar : non solar heat flux !! - fsalt : salt flux at sea ice/ocean interface !! - fmass : freshwater flux at sea ice/ocean interface !! !! !! ** References : !! H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90 !! original : 00-01 (LIM) !! addition : 02-07 (C. Ethe, G. Madec) !!--------------------------------------------------------------------- !! * Modules used !! * Local variables INTEGER :: ji, jj ! dummy loop indices INTEGER :: & ifvt, i1mfr, idfr , & ! some switches iflt, ial, iadv, ifral, ifrdv REAL(wp) :: & zinda , & ! switch for testing the values of ice concentration !! zfcm1 , & ! solar heat fluxes !! zfcm2 , & ! non solar heat fluxes zfold , & #if defined key_lim_fdd zfons, & ! salt exchanges at the ice/ocean interface zpme ! freshwater exchanges at the ice/ocean interface #else zprs , zfons, & ! salt exchanges at the ice/ocean interface zpmess ! freshwater exchanges at the ice/ocean interface #endif REAL(wp), DIMENSION(jpi,jpj) :: & zfcm1 , & ! solar heat fluxes zfcm2 ! non solar heat fluxes #if defined key_coupled REAL(wp), DIMENSION(jpi,jpj) :: & zalb , & ! albedo of ice under overcast sky zalcn , & ! albedo of ocean under overcast sky zalbp , & ! albedo of ice under clear sky zaldum ! albedo of ocean under clear sky #endif !!--------------------------------------------------------------------- !---------------------------------! ! Sea ice/ocean interface ! !---------------------------------! ! 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_oce(ji,jj) + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj) ! fstric Solar flux transmitted trough the ice ! qsr_oce 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 fsolar (ji,jj) = zfcm1(ji,jj) ! solar heat flux fnsolar(ji,jj) = zfcm2(ji,jj) - fdtcn(ji,jj) ! non solar heat flux ! ! fdtcn : turbulent oceanic heat flux IF ( ( ji .EQ. jiindex ) .AND. ( jj .EQ. jjindex) ) THEN WRITE(numout,*) ' lim_flx : heat fluxes ' WRITE(numout,*) ' fsolar : ', fsolar(jiindex,jjindex) WRITE(numout,*) ' zfcm1 : ', zfcm1(jiindex,jjindex) WRITE(numout,*) ' pfrld : ', pfrld(jiindex,jjindex) WRITE(numout,*) ' qsr_oce : ', qsr_oce(jiindex,jjindex) WRITE(numout,*) ' fstric : ', fstric (jiindex,jjindex) WRITE(numout,*) WRITE(numout,*) ' fnsolar : ', fnsolar(jiindex,jjindex) WRITE(numout,*) ' zfcm2 : ', zfcm2(jiindex,jjindex) WRITE(numout,*) ' zfcm1 : ', zfcm1(jiindex,jjindex) WRITE(numout,*) ' ifral : ', ifral WRITE(numout,*) ' ial : ', ial WRITE(numout,*) ' qcmif : ', qcmif(jiindex,jjindex) WRITE(numout,*) ' qldif : ', qldif(jiindex,jjindex) WRITE(numout,*) ' qcmif / dt: ', qcmif(jiindex,jjindex) / rdt_ice WRITE(numout,*) ' qldif / dt: ', qldif(jiindex,jjindex) / rdt_ice WRITE(numout,*) ' ifrdv : ', ifrdv WRITE(numout,*) ' qfvbq : ', qfvbq(jiindex,jjindex) WRITE(numout,*) ' qdtcn : ', qdtcn(jiindex,jjindex) WRITE(numout,*) ' qfvbq / dt: ', qfvbq(jiindex,jjindex) / rdt_ice WRITE(numout,*) ' qdtcn / dt: ', qdtcn(jiindex,jjindex) / rdt_ice WRITE(numout,*) ' ' WRITE(numout,*) ' fdtcn : ', fdtcn(jiindex,jjindex) WRITE(numout,*) ' fhmec : ', fhmec(jiindex,jjindex) WRITE(numout,*) ' fheat_rpo : ', fheat_rpo(jiindex,jjindex) WRITE(numout,*) ' fhbri : ', fhbri(jiindex,jjindex) WRITE(numout,*) ' fheat_res : ', fheat_res(jiindex,jjindex) ENDIF END DO END DO ! mass flux at the ocean surface !------------------------------------------------------- ! DO jl = 1, jpl ! DO jj = 1, jpj ! DO ji = 1, jpi ! ! this is probably wrong since rdmicif has already been computed ! rdmicif(ji,jj) = rdmicif(ji,jj) + rhoic*d_v_i_thd(ji,jj,jl) ! END DO ! END DO ! END DO DO jj = 1, jpj DO ji = 1, jpi #if defined key_lim_fdd ! 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 = - evap(ji,jj) * ( 1.0 - at_i(ji,jj) ) & ! evaporation over oceanic fraction & + tprecip(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_io(ji,jj) - sice ) * ( rdmicif(ji,jj) / rdt_ice ) ! salt flux for constant salinity fsalt(ji,jj) = zfons / ( sss_io(ji,jj) + epsi16 ) + fsalt_res(ji,jj) zfold = fsalt(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_io(ji,jj) + epsi16 ) fseqv(ji,jj) = fseqv(ji,jj) / ( sss_io(ji,jj) + epsi16 ) fsbri(ji,jj) = fsbri(ji,jj) / ( sss_io(ji,jj) + epsi16 ) fsalt_rpo(ji,jj) = fsalt_rpo(ji,jj) / ( sss_io(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] fmass(ji,jj) = - zpme #else !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! ON S'EN TAPE hhhhhhaaaaaaaaaaaaaaaaaahahahahahahahahahahahaha !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! case of freshwater flux equivalent as salt flux ! dilution effect due to evaporation and precipitation zprs = ( tprecip(ji,jj) - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) ) ) * soce !SOCE zprs = ( tprecip(ji,jj) - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) ) ) * sss_io(ji,jj) ! freshwater flux zfons = rdmicif(ji,jj) * ( soce - sice ) & ! fwf : ice formation and melting & - dmgwi(ji,jj) * sice & ! fwf : salt flx needed to bring the fresh snow to sea/ice salinity & + rdmsnif(ji,jj) * soce ! fwf to ocean due to snow melting !SOCE zfons = rdmicif(ji,jj) * ( sss_io(ji,jj) - sice ) & ! fwf : ice formation and melting & - dmgwi(ji,jj) * sice & ! fwf : salt flx needed to bring the fresh snow to sea/ice salinity & + rdmsnif(ji,jj) * sss_io(ji,jj) ! fwf to ocean due to snow melting ! salt exchanges at the ice/ocean interface zpmess = zprs - zfons / rdt_ice - evap(ji,jj) * soce * ( 1.0 - at_i(ji,jj) ) !SOCE zpmess = zprs - zfons / rdt_ice - evap(ji,jj) * sss_io(ji,jj) * ( 1.0 - at_i(ji,jj) ) fsalt(ji,jj) = - zpmess #endif !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ END DO END DO fsalt(:,:) = fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) IF (num_sal.eq.2) THEN !In case of variable salinity the salt flux has to be accounted for differently ! Brine drainage has to be added fsalt(:,:) = fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) ENDIF !-------------------------------------------------------------------! ! computation of others transmitting variables from ice to ocean ! !------------------------------------------ ------------------------! !-----------------------------------------------! ! Storing the transmitted variables ! !-----------------------------------------------! ftaux (:,:) = - tio_u(:,:) * rau0 ! taux ( ice: N/m2/rau0, ocean: N/m2 ) ftauy (:,:) = - tio_v(:,:) * rau0 ! tauy ( ice: N/m2/rau0, ocean: N/m2 ) freeze(:,:) = at_i(:,:) ! Sea ice cover tn_ice(:,:,:) = t_su(:,:,:) #if defined key_coupled zalb (:,:) = 0.e0 zalcn (:,:) = 0.e0 zalbp (:,:) = 0.e0 zaldum(:,:) = 0.e0 !------------------------------------------------! ! 2) Computation of snow/ice and ocean albedo ! !------------------------------------------------! CALL flx_blk_albedo( zalb, zalcn, zalbp, zaldum ) alb_ice(:,:) = 0.5 * zalbp(:,:) + 0.5 * zalb (:,:) ! Ice albedo #endif IF(ln_ctl) THEN CALL prt_ctl(tab2d_1=fsolar, clinfo1=' lim_flx: fsolar : ', tab2d_2=fnsolar, clinfo2=' fnsolar : ') CALL prt_ctl(tab2d_1=fmass , clinfo1=' lim_flx: fmass : ', tab2d_2=fsalt , clinfo2=' fsalt : ') CALL prt_ctl(tab2d_1=ftaux , clinfo1=' lim_flx: ftaux : ', tab2d_2=ftauy , clinfo2=' ftauy : ') CALL prt_ctl(tab2d_1=freeze, clinfo1=' lim_flx: freeze : ') CALL prt_ctl(tab3d_1=tn_ice, clinfo1=' lim_flx: tn_ice : ', kdim=jpl) ENDIF END SUBROUTINE lim_flx #else !!---------------------------------------------------------------------- !! Default option : Empty module NO LIM sea-ice model !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_flx ! Empty routine END SUBROUTINE lim_flx #endif END MODULE limflx