[888] | 1 | MODULE limsbc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limsbc *** |
---|
| 4 | !! computation of the flux at the sea ice/ocean interface |
---|
| 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : - ! 2006-07 (M. Vancoppelle) LIM3 original code |
---|
| 7 | !! 3.0 ! 2008-03 (C. Tallandier) surface module |
---|
| 8 | !! - ! 2008-04 (C. Tallandier) split in 2 + new ice-ocean coupling |
---|
| 9 | !! 3.3 ! 2010-05 (G. Madec) decrease ocean & ice reference salinities in the Baltic sea |
---|
| 10 | !! ! + simplification of the ice-ocean stress calculation |
---|
[3625] | 11 | !! 3.4 ! 2011-02 (G. Madec) dynamical allocation |
---|
[4161] | 12 | !! - ! 2012 (D. Iovino) salt flux change |
---|
| 13 | !! - ! 2012-05 (C. Rousset) add penetration solar flux |
---|
[3625] | 14 | !! 3.5 ! 2012-10 (A. Coward, G. Madec) salt fluxes ; ice+snow mass |
---|
[888] | 15 | !!---------------------------------------------------------------------- |
---|
| 16 | #if defined key_lim3 |
---|
| 17 | !!---------------------------------------------------------------------- |
---|
| 18 | !! 'key_lim3' LIM 3.0 sea-ice model |
---|
| 19 | !!---------------------------------------------------------------------- |
---|
[2715] | 20 | !! lim_sbc_alloc : allocate the limsbc arrays |
---|
| 21 | !! lim_sbc_init : initialisation |
---|
| 22 | !! lim_sbc_flx : updates mass, heat and salt fluxes at the ocean surface |
---|
| 23 | !! lim_sbc_tau : update i- and j-stresses, and its modulus at the ocean surface |
---|
[888] | 24 | !!---------------------------------------------------------------------- |
---|
| 25 | USE par_oce ! ocean parameters |
---|
| 26 | USE par_ice ! ice parameters |
---|
| 27 | USE dom_oce ! ocean domain |
---|
| 28 | USE sbc_ice ! Surface boundary condition: sea-ice fields |
---|
| 29 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 30 | USE phycst ! physical constants |
---|
[2528] | 31 | USE albedo ! albedo parameters |
---|
[888] | 32 | USE ice ! LIM sea-ice variables |
---|
| 33 | USE lbclnk ! ocean lateral boundary condition |
---|
| 34 | USE in_out_manager ! I/O manager |
---|
[2715] | 35 | USE lib_mpp ! MPP library |
---|
[3294] | 36 | USE wrk_nemo ! work arrays |
---|
[888] | 37 | USE prtctl ! Print control |
---|
[2715] | 38 | USE cpl_oasis3, ONLY : lk_cpl |
---|
[4161] | 39 | USE traqsr ! clem: add penetration of solar flux into the calculation of heat budget |
---|
[4205] | 40 | USE oce, ONLY : iatte, oatte, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n |
---|
[3625] | 41 | USE dom_ice, ONLY : tms |
---|
| 42 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[888] | 43 | |
---|
| 44 | IMPLICIT NONE |
---|
| 45 | PRIVATE |
---|
| 46 | |
---|
[2715] | 47 | PUBLIC lim_sbc_init ! called by ice_init |
---|
| 48 | PUBLIC lim_sbc_flx ! called by sbc_ice_lim |
---|
| 49 | PUBLIC lim_sbc_tau ! called by sbc_ice_lim |
---|
[888] | 50 | |
---|
[2528] | 51 | REAL(wp) :: epsi16 = 1.e-16_wp ! constant values |
---|
| 52 | REAL(wp) :: rzero = 0._wp |
---|
| 53 | REAL(wp) :: rone = 1._wp |
---|
[888] | 54 | |
---|
[2715] | 55 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau_oce, vtau_oce ! air-ocean surface i- & j-stress [N/m2] |
---|
| 56 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmod_io ! modulus of the ice-ocean velocity [m/s] |
---|
| 57 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: soce_0 , sice_0 ! cst SSS and ice salinity (levitating sea-ice) |
---|
[1526] | 58 | |
---|
[888] | 59 | !! * Substitutions |
---|
| 60 | # include "vectopt_loop_substitute.h90" |
---|
| 61 | !!---------------------------------------------------------------------- |
---|
[4161] | 62 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[1146] | 63 | !! $Id$ |
---|
[2528] | 64 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[888] | 65 | !!---------------------------------------------------------------------- |
---|
| 66 | CONTAINS |
---|
| 67 | |
---|
[2715] | 68 | INTEGER FUNCTION lim_sbc_alloc() |
---|
| 69 | !!------------------------------------------------------------------- |
---|
| 70 | !! *** ROUTINE lim_sbc_alloc *** |
---|
| 71 | !!------------------------------------------------------------------- |
---|
| 72 | ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) , & |
---|
| 73 | & sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc) |
---|
| 74 | ! |
---|
| 75 | IF( lk_mpp ) CALL mpp_sum( lim_sbc_alloc ) |
---|
| 76 | IF( lim_sbc_alloc /= 0 ) CALL ctl_warn('lim_sbc_alloc: failed to allocate arrays') |
---|
| 77 | END FUNCTION lim_sbc_alloc |
---|
| 78 | |
---|
| 79 | |
---|
[918] | 80 | SUBROUTINE lim_sbc_flx( kt ) |
---|
| 81 | !!------------------------------------------------------------------- |
---|
| 82 | !! *** ROUTINE lim_sbc_flx *** |
---|
| 83 | !! |
---|
| 84 | !! ** Purpose : Update the surface ocean boundary condition for heat |
---|
| 85 | !! salt and mass over areas where sea-ice is non-zero |
---|
| 86 | !! |
---|
| 87 | !! ** Action : - computes the heat and freshwater/salt fluxes |
---|
| 88 | !! at the ice-ocean interface. |
---|
| 89 | !! - Update the ocean sbc |
---|
| 90 | !! |
---|
[1037] | 91 | !! ** Outputs : - qsr : sea heat flux: solar |
---|
| 92 | !! - qns : sea heat flux: non solar |
---|
| 93 | !! - emp : freshwater budget: volume flux |
---|
[3625] | 94 | !! - sfx : salt flux |
---|
[1037] | 95 | !! - fr_i : ice fraction |
---|
| 96 | !! - tn_ice : sea-ice surface temperature |
---|
| 97 | !! - alb_ice : sea-ice alberdo (lk_cpl=T) |
---|
[888] | 98 | !! |
---|
| 99 | !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90. |
---|
| 100 | !! Tartinville et al. 2001 Ocean Modelling, 3, 95-108. |
---|
| 101 | !!--------------------------------------------------------------------- |
---|
[2528] | 102 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
[2715] | 103 | ! |
---|
[4161] | 104 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
[3625] | 105 | INTEGER :: ierr, ifvt, i1mfr, idfr ! local integer |
---|
| 106 | INTEGER :: iflt, ial , iadv , ifral, ifrdv ! - - |
---|
| 107 | REAL(wp) :: zinda, zemp, zemp_snow, zfmm ! local scalars |
---|
| 108 | REAL(wp) :: zemp_snw ! - - |
---|
| 109 | REAL(wp) :: zfcm1 , zfcm2 ! - - |
---|
| 110 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zalb, zalbp ! 2D/3D workspace |
---|
[4161] | 111 | REAL(wp) :: zzfcm1, zfscmbq ! clem: for light penetration |
---|
[888] | 112 | !!--------------------------------------------------------------------- |
---|
[3294] | 113 | |
---|
| 114 | IF( lk_cpl ) CALL wrk_alloc( jpi, jpj, jpl, zalb, zalbp ) |
---|
[921] | 115 | |
---|
[888] | 116 | !------------------------------------------! |
---|
| 117 | ! heat flux at the ocean surface ! |
---|
| 118 | !------------------------------------------! |
---|
| 119 | ! pfrld is the lead fraction at the previous time step (actually between TRP and THD) |
---|
| 120 | ! changed to old_frld and old ht_i |
---|
[921] | 121 | |
---|
[888] | 122 | DO jj = 1, jpj |
---|
| 123 | DO ji = 1, jpi |
---|
| 124 | zinda = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) ) |
---|
[4161] | 125 | ifvt = zinda * MAX( rzero , SIGN( rone, - phicif(ji,jj) ) ) !subscripts are bad here |
---|
| 126 | i1mfr = 1.0 - MAX( rzero , SIGN( rone , - at_i(ji,jj) ) ) |
---|
[888] | 127 | idfr = 1.0 - MAX( rzero , SIGN( rone , ( 1.0 - at_i(ji,jj) ) - pfrld(ji,jj) ) ) |
---|
| 128 | iflt = zinda * (1 - i1mfr) * (1 - ifvt ) |
---|
| 129 | ial = ifvt * i1mfr + ( 1 - ifvt ) * idfr |
---|
| 130 | iadv = ( 1 - i1mfr ) * zinda |
---|
| 131 | ifral = ( 1 - i1mfr * ( 1 - ial ) ) |
---|
| 132 | ifrdv = ( 1 - ifral * ( 1 - ial ) ) * iadv |
---|
| 133 | |
---|
| 134 | ! switch --- 1.0 ---------------- 0.0 -------------------- |
---|
| 135 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 136 | ! zinda | if pfrld = 1 | if pfrld < 1 | |
---|
| 137 | ! -> ifvt| if pfrld old_ht_i |
---|
| 138 | ! i1mfr | if frld = 1 | if frld < 1 | |
---|
| 139 | ! idfr | if frld <= pfrld | if frld > pfrld | |
---|
| 140 | ! iflt | |
---|
| 141 | ! ial | |
---|
| 142 | ! iadv | |
---|
| 143 | ! ifral |
---|
| 144 | ! ifrdv |
---|
| 145 | |
---|
| 146 | ! computation the solar flux at ocean surface |
---|
[4161] | 147 | IF (lk_cpl) THEN ! be carfeful: not being tested yet |
---|
| 148 | ! original line |
---|
| 149 | !zfcm1 = qsr_tot(ji,jj) + fstric(ji,jj) * at_i(ji,jj) |
---|
| 150 | ! new line to include solar penetration (not tested) |
---|
| 151 | zfcm1 = qsr_tot(ji,jj) + fstric(ji,jj) * at_i(ji,jj) / ( 1.0 - zinda + zinda * iatte(ji,jj) ) |
---|
| 152 | DO jl = 1, jpl |
---|
| 153 | zfcm1 = zfcm1 - qsr_ice(ji,jj,jl) * a_i(ji,jj,jl) |
---|
| 154 | END DO |
---|
| 155 | ELSE |
---|
| 156 | zfcm1 = pfrld(ji,jj) * qsr(ji,jj) + & |
---|
| 157 | & ( 1._wp - pfrld(ji,jj) ) * fstric(ji,jj) / ( 1.0 - zinda + zinda * iatte(ji,jj) ) |
---|
| 158 | ENDIF |
---|
[921] | 159 | ! fstric Solar flux transmitted trough the ice |
---|
| 160 | ! qsr Net short wave heat flux on free ocean |
---|
| 161 | ! new line |
---|
[4161] | 162 | fscmbq(ji,jj) = ( 1.0 - pfrld(ji,jj) ) * fstric(ji,jj) / ( 1.0 - zinda + zinda * iatte(ji,jj) ) |
---|
[888] | 163 | |
---|
[4161] | 164 | ! solar flux and fscmbq with light penetration (clem) |
---|
| 165 | zzfcm1 = pfrld(ji,jj) * qsr(ji,jj) * oatte(ji,jj) + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj) |
---|
| 166 | zfscmbq = ( 1.0 - pfrld(ji,jj) ) * fstric(ji,jj) |
---|
| 167 | |
---|
[888] | 168 | ! computation the non solar heat flux at ocean surface |
---|
[4161] | 169 | zfcm2 = - zzfcm1 & ! |
---|
| 170 | & + iflt * zfscmbq & ! total ablation: heat given to the ocean |
---|
[3625] | 171 | & + ifral * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) * r1_rdtice & |
---|
| 172 | & + ifrdv * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) * r1_rdtice & |
---|
| 173 | & + fhmec(ji,jj) & ! snow melt when ridging |
---|
| 174 | & + fheat_mec(ji,jj) & ! ridge formation |
---|
| 175 | & + fheat_res(ji,jj) ! residual heat flux |
---|
[921] | 176 | ! qcmif Energy needed to bring the ocean surface layer until its freezing (ok) |
---|
| 177 | ! qldif heat balance of the lead (or of the open ocean) |
---|
[3625] | 178 | ! qfvbq latent heat uptake/release after accretion/ablation |
---|
| 179 | ! qdtcn Energy from the turbulent oceanic heat flux heat flux coming in the lead |
---|
[888] | 180 | |
---|
[3625] | 181 | IF( num_sal == 2 ) zfcm2 = zfcm2 + fhbri(ji,jj) ! add contribution due to brine drainage |
---|
[888] | 182 | |
---|
[3625] | 183 | ! bottom radiative component is sent to the computation of the oceanic heat flux |
---|
| 184 | fsbbq(ji,jj) = ( 1._wp - ( ifvt + iflt ) ) * fscmbq(ji,jj) |
---|
[888] | 185 | |
---|
| 186 | ! used to compute the oceanic heat flux at the next time step |
---|
[3625] | 187 | qsr(ji,jj) = zfcm1 ! solar heat flux |
---|
| 188 | qns(ji,jj) = zfcm2 - fdtcn(ji,jj) ! non solar heat flux |
---|
[921] | 189 | ! ! fdtcn : turbulent oceanic heat flux |
---|
[888] | 190 | |
---|
[4161] | 191 | !!gm this IF prevents the vertorisation of the whole loop |
---|
| 192 | ! IF ( ( ji == jiindx ) .AND. ( jj == jjindx) ) THEN |
---|
| 193 | ! WRITE(numout,*) ' lim_sbc : heat fluxes ' |
---|
| 194 | ! WRITE(numout,*) ' qsr : ', qsr(jiindx,jjindx) |
---|
| 195 | ! WRITE(numout,*) ' pfrld : ', pfrld(jiindx,jjindx) |
---|
| 196 | ! WRITE(numout,*) ' fstric : ', fstric (jiindx,jjindx) |
---|
| 197 | ! WRITE(numout,*) |
---|
| 198 | ! WRITE(numout,*) ' qns : ', qns(jiindx,jjindx) |
---|
| 199 | ! WRITE(numout,*) ' fdtcn : ', fdtcn(jiindx,jjindx) |
---|
| 200 | ! WRITE(numout,*) ' ifral : ', ifral |
---|
| 201 | ! WRITE(numout,*) ' ial : ', ial |
---|
| 202 | ! WRITE(numout,*) ' qcmif : ', qcmif(jiindx,jjindx) |
---|
| 203 | ! WRITE(numout,*) ' qldif : ', qldif(jiindx,jjindx) |
---|
| 204 | ! !WRITE(numout,*) ' qcmif / dt: ', qcmif(jiindx,jjindx) * r1_rdtice |
---|
| 205 | ! !WRITE(numout,*) ' qldif / dt: ', qldif(jiindx,jjindx) * r1_rdtice |
---|
| 206 | ! WRITE(numout,*) ' ifrdv : ', ifrdv |
---|
| 207 | ! WRITE(numout,*) ' qfvbq : ', qfvbq(jiindx,jjindx) |
---|
| 208 | ! WRITE(numout,*) ' qdtcn : ', qdtcn(jiindx,jjindx) |
---|
| 209 | ! !WRITE(numout,*) ' qfvbq / dt: ', qfvbq(jiindx,jjindx) * r1_rdtice |
---|
| 210 | ! !WRITE(numout,*) ' qdtcn / dt: ', qdtcn(jiindx,jjindx) * r1_rdtice |
---|
| 211 | ! WRITE(numout,*) ' ' |
---|
| 212 | ! WRITE(numout,*) ' fdtcn : ', fdtcn(jiindx,jjindx) |
---|
| 213 | ! WRITE(numout,*) ' fhmec : ', fhmec(jiindx,jjindx) |
---|
| 214 | ! WRITE(numout,*) ' fheat_mec : ', fheat_mec(jiindx,jjindx) |
---|
| 215 | ! WRITE(numout,*) ' fhbri : ', fhbri(jiindx,jjindx) |
---|
| 216 | ! WRITE(numout,*) ' fheat_res : ', fheat_res(jiindx,jjindx) |
---|
| 217 | ! ENDIF |
---|
| 218 | !!gm end |
---|
[888] | 219 | END DO |
---|
| 220 | END DO |
---|
[921] | 221 | |
---|
[888] | 222 | !------------------------------------------! |
---|
| 223 | ! mass flux at the ocean surface ! |
---|
| 224 | !------------------------------------------! |
---|
| 225 | |
---|
[1526] | 226 | !!gm optimisation: this loop have to be merged with the previous one |
---|
[888] | 227 | DO jj = 1, jpj |
---|
| 228 | DO ji = 1, jpi |
---|
| 229 | ! case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED) |
---|
| 230 | ! ------------------------------------------------------------------------------------- |
---|
| 231 | ! The idea of this approach is that the system that we consider is the ICE-OCEAN system |
---|
| 232 | ! Thus FW flux = External ( E-P+snow melt) |
---|
| 233 | ! Salt flux = Exchanges in the ice-ocean system then converted into FW |
---|
| 234 | ! Associated to Ice formation AND Ice melting |
---|
| 235 | ! Even if i see Ice melting as a FW and SALT flux |
---|
| 236 | ! |
---|
| 237 | |
---|
| 238 | ! computing freshwater exchanges at the ice/ocean interface |
---|
[4161] | 239 | IF (lk_cpl) THEN |
---|
| 240 | zemp = - emp_tot(ji,jj) + emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) ) & ! |
---|
| 241 | & - rdm_snw(ji,jj) / rdt_ice |
---|
| 242 | ELSE |
---|
| 243 | zemp = emp(ji,jj) * ( 1.0 - at_i(ji,jj) ) & ! evaporation over oceanic fraction |
---|
| 244 | & - tprecip(ji,jj) * at_i(ji,jj) & ! all precipitation reach the ocean |
---|
| 245 | & + sprecip(ji,jj) * ( 1. - (pfrld(ji,jj)**betas) ) & ! except solid precip intercepted by sea-ice |
---|
| 246 | & - fmmec(ji,jj) ! snow falling when ridging |
---|
| 247 | ENDIF |
---|
[921] | 248 | |
---|
[3625] | 249 | ! mass flux at the ocean/ice interface (sea ice fraction) |
---|
| 250 | zemp_snw = rdm_snw(ji,jj) * r1_rdtice ! snow melting = pure water that enters the ocean |
---|
[4205] | 251 | zfmm = rdm_ice(ji,jj) * r1_rdtice ! Freezing minus melting |
---|
[2528] | 252 | |
---|
[4148] | 253 | fmmflx(ji,jj) = zfmm ! F/M mass flux save at least for biogeochemical model |
---|
| 254 | |
---|
[3625] | 255 | emp(ji,jj) = zemp + zemp_snw + zfmm ! mass flux + F/M mass flux (always ice/ocean mass exchange) |
---|
| 256 | |
---|
| 257 | ! correcting brine salt fluxes (zinda = 1 if pfrld=1 , =0 otherwise) |
---|
| 258 | zinda = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) ) |
---|
| 259 | sfx_bri(ji,jj) = zinda * sfx_bri(ji,jj) |
---|
[888] | 260 | END DO |
---|
| 261 | END DO |
---|
| 262 | |
---|
[3625] | 263 | !------------------------------------------! |
---|
| 264 | ! salt flux at the ocean surface ! |
---|
| 265 | !------------------------------------------! |
---|
| 266 | |
---|
[918] | 267 | IF( num_sal == 2 ) THEN ! variable ice salinity: brine drainage included in the salt flux |
---|
[3625] | 268 | sfx(:,:) = sfx_thd(:,:) + sfx_res(:,:) + sfx_mec(:,:) + sfx_bri(:,:) |
---|
[918] | 269 | ELSE ! constant ice salinity: |
---|
[3625] | 270 | sfx(:,:) = sfx_thd(:,:) + sfx_res(:,:) + sfx_mec(:,:) |
---|
[888] | 271 | ENDIF |
---|
[3625] | 272 | !-----------------------------------------------! |
---|
| 273 | ! mass of snow and ice per unit area ! |
---|
| 274 | !-----------------------------------------------! |
---|
| 275 | IF( nn_ice_embd /= 0 ) THEN ! embedded sea-ice (mass required) |
---|
| 276 | snwice_mass_b(:,:) = snwice_mass(:,:) ! save mass from the previous ice time step |
---|
| 277 | ! ! new mass per unit area |
---|
| 278 | snwice_mass (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
| 279 | ! ! time evolution of snow+ice mass |
---|
| 280 | snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice |
---|
| 281 | ENDIF |
---|
[921] | 282 | |
---|
[888] | 283 | !-----------------------------------------------! |
---|
| 284 | ! Storing the transmitted variables ! |
---|
| 285 | !-----------------------------------------------! |
---|
[1037] | 286 | fr_i (:,:) = at_i(:,:) ! Sea-ice fraction |
---|
[888] | 287 | tn_ice(:,:,:) = t_su(:,:,:) ! Ice surface temperature |
---|
| 288 | |
---|
| 289 | !------------------------------------------------! |
---|
| 290 | ! Computation of snow/ice and ocean albedo ! |
---|
| 291 | !------------------------------------------------! |
---|
[2715] | 292 | IF( lk_cpl ) THEN ! coupled case |
---|
| 293 | CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb ) ! snow/ice albedo |
---|
| 294 | ! |
---|
| 295 | alb_ice(:,:,:) = 0.5_wp * zalbp(:,:,:) + 0.5_wp * zalb (:,:,:) ! Ice albedo (mean clear and overcast skys) |
---|
| 296 | ENDIF |
---|
[888] | 297 | |
---|
| 298 | IF(ln_ctl) THEN |
---|
[918] | 299 | CALL prt_ctl( tab2d_1=qsr , clinfo1=' lim_sbc: qsr : ', tab2d_2=qns , clinfo2=' qns : ' ) |
---|
[3625] | 300 | CALL prt_ctl( tab2d_1=emp , clinfo1=' lim_sbc: emp : ', tab2d_2=sfx , clinfo2=' sfx : ' ) |
---|
[1037] | 301 | CALL prt_ctl( tab2d_1=fr_i , clinfo1=' lim_sbc: fr_i : ' ) |
---|
[918] | 302 | CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl ) |
---|
[921] | 303 | ENDIF |
---|
[2715] | 304 | ! |
---|
[3294] | 305 | IF( lk_cpl ) CALL wrk_dealloc( jpi, jpj, jpl, zalb, zalbp ) |
---|
[918] | 306 | ! |
---|
| 307 | END SUBROUTINE lim_sbc_flx |
---|
[888] | 308 | |
---|
[2528] | 309 | |
---|
| 310 | SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce ) |
---|
| 311 | !!------------------------------------------------------------------- |
---|
| 312 | !! *** ROUTINE lim_sbc_tau *** |
---|
| 313 | !! |
---|
| 314 | !! ** Purpose : Update the ocean surface stresses due to the ice |
---|
| 315 | !! |
---|
| 316 | !! ** Action : * at each ice time step (every nn_fsbc time step): |
---|
| 317 | !! - compute the modulus of ice-ocean relative velocity |
---|
| 318 | !! (*rho*Cd) at T-point (C-grid) or I-point (B-grid) |
---|
| 319 | !! tmod_io = rhoco * | U_ice-U_oce | |
---|
| 320 | !! - update the modulus of stress at ocean surface |
---|
| 321 | !! taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce | |
---|
| 322 | !! * at each ocean time step (every kt): |
---|
| 323 | !! compute linearized ice-ocean stresses as |
---|
| 324 | !! Utau = tmod_io * | U_ice - pU_oce | |
---|
| 325 | !! using instantaneous current ocean velocity (usually before) |
---|
| 326 | !! |
---|
| 327 | !! NB: - ice-ocean rotation angle no more allowed |
---|
| 328 | !! - here we make an approximation: taum is only computed every ice time step |
---|
| 329 | !! This avoids mutiple average to pass from T -> U,V grids and next from U,V grids |
---|
| 330 | !! to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton... |
---|
| 331 | !! |
---|
| 332 | !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes |
---|
| 333 | !! - taum : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes |
---|
| 334 | !!--------------------------------------------------------------------- |
---|
| 335 | INTEGER , INTENT(in) :: kt ! ocean time-step index |
---|
| 336 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pu_oce, pv_oce ! surface ocean currents |
---|
| 337 | !! |
---|
| 338 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 339 | REAL(wp) :: zat_u, zutau_ice, zu_t, zmodt ! local scalar |
---|
| 340 | REAL(wp) :: zat_v, zvtau_ice, zv_t ! - - |
---|
[2715] | 341 | !!--------------------------------------------------------------------- |
---|
| 342 | ! |
---|
[2528] | 343 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 344 | !CDIR NOVERRCHK |
---|
| 345 | DO jj = 2, jpjm1 !* update the modulus of stress at ocean surface (T-point) |
---|
| 346 | !CDIR NOVERRCHK |
---|
| 347 | DO ji = fs_2, fs_jpim1 |
---|
| 348 | ! ! 2*(U_ice-U_oce) at T-point |
---|
| 349 | zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj) |
---|
| 350 | zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) |
---|
| 351 | ! ! |U_ice-U_oce|^2 |
---|
| 352 | zmodt = 0.25_wp * ( zu_t * zu_t + zv_t * zv_t ) |
---|
| 353 | ! ! update the ocean stress modulus |
---|
| 354 | taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zmodt |
---|
| 355 | tmod_io(ji,jj) = rhoco * SQRT( zmodt ) ! rhoco * |U_ice-U_oce| at T-point |
---|
| 356 | END DO |
---|
| 357 | END DO |
---|
| 358 | CALL lbc_lnk( taum, 'T', 1. ) ; CALL lbc_lnk( tmod_io, 'T', 1. ) |
---|
| 359 | ! |
---|
| 360 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 361 | vtau_oce(:,:) = vtau(:,:) |
---|
| 362 | ! |
---|
| 363 | ENDIF |
---|
[2715] | 364 | ! |
---|
| 365 | ! !== every ocean time-step ==! |
---|
| 366 | ! |
---|
[2528] | 367 | DO jj = 2, jpjm1 !* update the stress WITHOUT a ice-ocean rotation angle |
---|
| 368 | DO ji = fs_2, fs_jpim1 ! Vect. Opt. |
---|
| 369 | zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp ! ice area at u and V-points |
---|
| 370 | zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp |
---|
| 371 | ! ! linearized quadratic drag formulation |
---|
| 372 | zutau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) ) |
---|
| 373 | zvtau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) ) |
---|
| 374 | ! ! stresses at the ocean surface |
---|
| 375 | utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice |
---|
| 376 | vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice |
---|
| 377 | END DO |
---|
| 378 | END DO |
---|
| 379 | CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition |
---|
| 380 | ! |
---|
| 381 | IF(ln_ctl) CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau : ', mask1=umask, & |
---|
| 382 | & tab2d_2=vtau, clinfo2=' vtau : ' , mask2=vmask ) |
---|
| 383 | ! |
---|
| 384 | END SUBROUTINE lim_sbc_tau |
---|
| 385 | |
---|
[2715] | 386 | |
---|
| 387 | SUBROUTINE lim_sbc_init |
---|
| 388 | !!------------------------------------------------------------------- |
---|
| 389 | !! *** ROUTINE lim_sbc_init *** |
---|
| 390 | !! |
---|
| 391 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
| 392 | !! the temporal evolution of key variables |
---|
| 393 | !! |
---|
| 394 | !! ** input : Namelist namicedia |
---|
| 395 | !!------------------------------------------------------------------- |
---|
[4161] | 396 | REAL(wp) :: zsum, zarea |
---|
[2715] | 397 | ! |
---|
[3625] | 398 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 399 | REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar |
---|
[2715] | 400 | IF(lwp) WRITE(numout,*) |
---|
| 401 | IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition' |
---|
| 402 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ ' |
---|
| 403 | |
---|
| 404 | ! ! allocate lim_sbc array |
---|
| 405 | IF( lim_sbc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' ) |
---|
| 406 | ! |
---|
| 407 | soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 408 | sice_0(:,:) = sice |
---|
| 409 | ! |
---|
| 410 | IF( cp_cfg == "orca" ) THEN ! decrease ocean & ice reference salinities in the Baltic sea |
---|
| 411 | WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & |
---|
| 412 | & 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) |
---|
| 413 | soce_0(:,:) = 4._wp |
---|
| 414 | sice_0(:,:) = 2._wp |
---|
| 415 | END WHERE |
---|
| 416 | ENDIF |
---|
[4161] | 417 | ! clem modif |
---|
[4205] | 418 | IF( .NOT. ln_rstart ) THEN |
---|
| 419 | iatte(:,:) = 1._wp |
---|
| 420 | oatte(:,:) = 1._wp |
---|
| 421 | ENDIF |
---|
[4161] | 422 | ! |
---|
[4205] | 423 | ! clem: snwice_mass in the restart file now |
---|
| 424 | IF( .NOT. ln_rstart ) THEN |
---|
| 425 | ! ! embedded sea ice |
---|
| 426 | IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass |
---|
| 427 | snwice_mass (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
| 428 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 429 | ELSE |
---|
| 430 | snwice_mass (:,:) = 0.0_wp ! no mass exchanges |
---|
| 431 | snwice_mass_b(:,:) = 0.0_wp ! no mass exchanges |
---|
| 432 | ENDIF |
---|
| 433 | IF( nn_ice_embd == 2 ) THEN ! full embedment (case 2) deplete the initial ssh below sea-ice area |
---|
| 434 | sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 435 | sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 436 | ! |
---|
| 437 | ! Note: Changed the initial values of sshb and sshn=> need to recompute ssh[u,v,f]_[b,n] |
---|
| 438 | ! which were previously set in domvvl |
---|
| 439 | IF ( lk_vvl ) THEN ! Is this necessary? embd 2 should be restricted to vvl only??? |
---|
| 440 | DO jj = 1, jpjm1 |
---|
| 441 | DO ji = 1, jpim1 ! caution: use of Vector Opt. not possible |
---|
| 442 | zcoefu = 0.5 * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) ) |
---|
| 443 | zcoefv = 0.5 * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) ) |
---|
| 444 | zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1) |
---|
| 445 | sshu_b(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshb(ji ,jj) & |
---|
| 446 | & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) ) |
---|
| 447 | sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshb(ji,jj ) & |
---|
| 448 | & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) ) |
---|
| 449 | sshu_n(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshn(ji ,jj) & |
---|
| 450 | & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) ) |
---|
| 451 | sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshn(ji,jj ) & |
---|
| 452 | & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) ) |
---|
| 453 | END DO |
---|
[3625] | 454 | END DO |
---|
[4205] | 455 | CALL lbc_lnk( sshu_b, 'U', 1. ) ; CALL lbc_lnk( sshu_n, 'U', 1. ) |
---|
| 456 | CALL lbc_lnk( sshv_b, 'V', 1. ) ; CALL lbc_lnk( sshv_n, 'V', 1. ) |
---|
| 457 | DO jj = 1, jpjm1 |
---|
| 458 | DO ji = 1, jpim1 ! NO Vector Opt. |
---|
| 459 | sshf_n(ji,jj) = 0.5 * umask(ji,jj,1) * umask(ji,jj+1,1) & |
---|
| 460 | & / ( e1f(ji,jj ) * e2f(ji,jj ) ) & |
---|
| 461 | & * ( e1u(ji,jj ) * e2u(ji,jj ) * sshu_n(ji,jj ) & |
---|
| 462 | & + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) ) |
---|
| 463 | END DO |
---|
[3625] | 464 | END DO |
---|
[4205] | 465 | CALL lbc_lnk( sshf_n, 'F', 1. ) |
---|
| 466 | ENDIF |
---|
| 467 | ENDIF |
---|
| 468 | ENDIF ! .NOT. ln_rstart |
---|
[2715] | 469 | ! |
---|
[4161] | 470 | !!? IF( .NOT. ln_rstart ) THEN ! delete the initial ssh below sea-ice area |
---|
| 471 | !!? ! |
---|
| 472 | !!? zarea = glob_sum( e1e2t(:,:) ) ! interior global domain surface |
---|
| 473 | !!? zsum = glob_sum( e1e2t(:,:) * ( snwice_mass(:,:) ) ) / zarea * r1_rau0 |
---|
| 474 | !!? sshn(:,:) = sshn(:,:) - zsum |
---|
| 475 | !!? sshb(:,:) = sshb(:,:) - zsum |
---|
| 476 | !!? ENDIF |
---|
| 477 | ! |
---|
| 478 | |
---|
[2715] | 479 | END SUBROUTINE lim_sbc_init |
---|
| 480 | |
---|
[888] | 481 | #else |
---|
| 482 | !!---------------------------------------------------------------------- |
---|
| 483 | !! Default option : Dummy module NO LIM 3.0 sea-ice model |
---|
| 484 | !!---------------------------------------------------------------------- |
---|
| 485 | CONTAINS |
---|
| 486 | SUBROUTINE lim_sbc ! Dummy routine |
---|
| 487 | END SUBROUTINE lim_sbc |
---|
| 488 | #endif |
---|
| 489 | |
---|
| 490 | !!====================================================================== |
---|
| 491 | END MODULE limsbc |
---|