[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 |
---|
[4045] | 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 |
---|
[4345] | 26 | USE phycst ! physical constants |
---|
[888] | 27 | USE par_ice ! ice parameters |
---|
| 28 | USE dom_oce ! ocean domain |
---|
[4634] | 29 | USE dom_ice, ONLY : tms, area |
---|
[4345] | 30 | USE ice ! LIM sea-ice variables |
---|
[888] | 31 | USE sbc_ice ! Surface boundary condition: sea-ice fields |
---|
| 32 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
[4345] | 33 | USE sbccpl |
---|
| 34 | USE cpl_oasis3, ONLY : lk_cpl |
---|
| 35 | USE oce , ONLY : iatte, oatte, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n |
---|
[2528] | 36 | USE albedo ! albedo parameters |
---|
[4345] | 37 | USE lbclnk ! ocean lateral boundary condition - MPP exchanges |
---|
[2715] | 38 | USE lib_mpp ! MPP library |
---|
[3294] | 39 | USE wrk_nemo ! work arrays |
---|
[4345] | 40 | USE in_out_manager ! I/O manager |
---|
[888] | 41 | USE prtctl ! Print control |
---|
[4345] | 42 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[4045] | 43 | USE traqsr ! clem: add penetration of solar flux into the calculation of heat budget |
---|
[888] | 44 | |
---|
| 45 | IMPLICIT NONE |
---|
| 46 | PRIVATE |
---|
| 47 | |
---|
[2715] | 48 | PUBLIC lim_sbc_init ! called by ice_init |
---|
| 49 | PUBLIC lim_sbc_flx ! called by sbc_ice_lim |
---|
| 50 | PUBLIC lim_sbc_tau ! called by sbc_ice_lim |
---|
[888] | 51 | |
---|
[4634] | 52 | REAL(wp) :: epsi10 = 1.e-10 ! |
---|
| 53 | REAL(wp) :: epsi20 = 1.e-20 ! |
---|
[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 | !!---------------------------------------------------------------------- |
---|
[4045] | 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 | ! |
---|
[4634] | 104 | INTEGER :: ji, jj, jl, jk ! dummy loop indices |
---|
| 105 | REAL(wp) :: zinda, zemp ! local scalars |
---|
[3625] | 106 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zalb, zalbp ! 2D/3D workspace |
---|
[4634] | 107 | REAL(wp) :: ztmelts ! clem 2014: for HC diags |
---|
| 108 | |
---|
| 109 | REAL(wp) :: zf_mass ! Heat flux associated with mass exchange ice->ocean (W.m-2) |
---|
| 110 | REAL(wp) :: zfcm1 ! New solar flux received by the ocean |
---|
[888] | 111 | !!--------------------------------------------------------------------- |
---|
[3294] | 112 | |
---|
| 113 | IF( lk_cpl ) CALL wrk_alloc( jpi, jpj, jpl, zalb, zalbp ) |
---|
[921] | 114 | |
---|
[888] | 115 | ! pfrld is the lead fraction at the previous time step (actually between TRP and THD) |
---|
| 116 | DO jj = 1, jpj |
---|
| 117 | DO ji = 1, jpi |
---|
| 118 | |
---|
[4634] | 119 | !------------------------------------------! |
---|
| 120 | ! heat flux at the ocean surface ! |
---|
| 121 | !------------------------------------------! |
---|
| 122 | zinda = 1._wp - MAX( 0._wp , SIGN( 1._wp , - ( 1._wp - pfrld(ji,jj) ) ) ) ! 1 if ice |
---|
[888] | 123 | |
---|
[4634] | 124 | ! Solar heat flux reaching the ocean = zfcm1 (W.m-2) |
---|
| 125 | !--------------------------------------------------- |
---|
| 126 | IF( lk_cpl ) THEN ! be carfeful: not been tested yet |
---|
[4099] | 127 | ! original line |
---|
[4634] | 128 | zfcm1 = qsr_tot(ji,jj) |
---|
| 129 | !!!zfcm1 = qsr_tot(ji,jj) + ftr_ice(ji,jj) * ( 1._wp - pfrld(ji,jj) ) / ( 1._wp - zinda + zinda * iatte(ji,jj) ) |
---|
[4099] | 130 | DO jl = 1, jpl |
---|
[4634] | 131 | zfcm1 = zfcm1 - ( qsr_ice(ji,jj,jl) - ftr_ice(ji,jj,jl) ) * old_a_i(ji,jj,jl) |
---|
[4099] | 132 | END DO |
---|
| 133 | ELSE |
---|
[4634] | 134 | !!!zfcm1 = pfrld(ji,jj) * qsr(ji,jj) + & |
---|
| 135 | !!! & ( 1._wp - pfrld(ji,jj) ) * ftr_ice(ji,jj) / ( 1._wp - zinda + zinda * iatte(ji,jj) ) |
---|
| 136 | zfcm1 = pfrld(ji,jj) * qsr(ji,jj) |
---|
| 137 | DO jl = 1, jpl |
---|
| 138 | zfcm1 = zfcm1 + old_a_i(ji,jj,jl) * ftr_ice(ji,jj,jl) |
---|
| 139 | END DO |
---|
[4099] | 140 | ENDIF |
---|
[888] | 141 | |
---|
[4634] | 142 | ! Total heat flux reaching the ocean = hfx_out (W.m-2) |
---|
| 143 | !--------------------------------------------------- |
---|
| 144 | zf_mass = hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_res(ji,jj) ! heat flux from snow is 0 (T=0 degC) |
---|
| 145 | hfx_out(ji,jj) = hfx_out(ji,jj) + zf_mass + zfcm1 |
---|
[4045] | 146 | |
---|
[4634] | 147 | ! New qsr and qns used to compute the oceanic heat flux at the next time step |
---|
| 148 | !--------------------------------------------------- |
---|
| 149 | qsr(ji,jj) = zfcm1 |
---|
| 150 | qns(ji,jj) = hfx_out(ji,jj) - zfcm1 |
---|
[888] | 151 | |
---|
[4634] | 152 | !------------------------------------------! |
---|
| 153 | ! mass flux at the ocean surface ! |
---|
| 154 | !------------------------------------------! |
---|
[888] | 155 | ! case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED) |
---|
| 156 | ! ------------------------------------------------------------------------------------- |
---|
| 157 | ! The idea of this approach is that the system that we consider is the ICE-OCEAN system |
---|
| 158 | ! Thus FW flux = External ( E-P+snow melt) |
---|
| 159 | ! Salt flux = Exchanges in the ice-ocean system then converted into FW |
---|
| 160 | ! Associated to Ice formation AND Ice melting |
---|
| 161 | ! Even if i see Ice melting as a FW and SALT flux |
---|
| 162 | ! |
---|
| 163 | ! computing freshwater exchanges at the ice/ocean interface |
---|
[4634] | 164 | ! clem 2014/04: why not 1-pfrld instead of at_i here??? |
---|
| 165 | IF( lk_cpl ) THEN |
---|
[4099] | 166 | zemp = - emp_tot(ji,jj) + emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) ) & ! |
---|
[4634] | 167 | & - wfx_snw(ji,jj) |
---|
[4099] | 168 | ELSE |
---|
[4634] | 169 | zemp = emp(ji,jj) * pfrld(ji,jj) & ! evaporation over oceanic fraction |
---|
| 170 | & - tprecip(ji,jj) * ( 1._wp - pfrld(ji,jj) ) & ! all precipitation reach the ocean |
---|
| 171 | & + sprecip(ji,jj) * ( 1._wp - pfrld(ji,jj)**betas ) ! except solid precip intercepted by sea-ice |
---|
[4099] | 172 | ENDIF |
---|
[921] | 173 | |
---|
[4634] | 174 | ! mass flux from ice/ocean |
---|
| 175 | wfx_ice(ji,jj) = wfx_bog(ji,jj) + wfx_bom(ji,jj) + wfx_sum(ji,jj) + wfx_sni(ji,jj) + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj) |
---|
[2528] | 176 | |
---|
[4634] | 177 | ! mass flux at the ocean/ice interface |
---|
| 178 | fmmflx(ji,jj) = wfx_ice(ji,jj) * rdt_ice ! F/M mass flux save at least for biogeochemical model |
---|
| 179 | emp(ji,jj) = zemp + wfx_ice(ji,jj) + wfx_snw(ji,jj) ! mass flux + F/M mass flux (always ice/ocean mass exchange) |
---|
[3625] | 180 | |
---|
[888] | 181 | END DO |
---|
| 182 | END DO |
---|
| 183 | |
---|
[3625] | 184 | !------------------------------------------! |
---|
| 185 | ! salt flux at the ocean surface ! |
---|
| 186 | !------------------------------------------! |
---|
[4634] | 187 | sfx(:,:) = sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) + sfx_bri(:,:) |
---|
[3625] | 188 | |
---|
[4634] | 189 | !-------------------------------------------------------------! |
---|
| 190 | ! mass of snow and ice per unit area for embedded sea-ice ! |
---|
| 191 | !-------------------------------------------------------------! |
---|
| 192 | IF( nn_ice_embd /= 0 ) THEN |
---|
| 193 | ! save mass from the previous ice time step |
---|
| 194 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 195 | ! new mass per unit area |
---|
[3625] | 196 | snwice_mass (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
[4634] | 197 | ! time evolution of snow+ice mass |
---|
[3625] | 198 | snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice |
---|
| 199 | ENDIF |
---|
[921] | 200 | |
---|
[888] | 201 | !-----------------------------------------------! |
---|
| 202 | ! Storing the transmitted variables ! |
---|
| 203 | !-----------------------------------------------! |
---|
[1037] | 204 | fr_i (:,:) = at_i(:,:) ! Sea-ice fraction |
---|
[888] | 205 | tn_ice(:,:,:) = t_su(:,:,:) ! Ice surface temperature |
---|
| 206 | |
---|
| 207 | !------------------------------------------------! |
---|
| 208 | ! Computation of snow/ice and ocean albedo ! |
---|
| 209 | !------------------------------------------------! |
---|
[2715] | 210 | IF( lk_cpl ) THEN ! coupled case |
---|
| 211 | CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb ) ! snow/ice albedo |
---|
| 212 | alb_ice(:,:,:) = 0.5_wp * zalbp(:,:,:) + 0.5_wp * zalb (:,:,:) ! Ice albedo (mean clear and overcast skys) |
---|
| 213 | ENDIF |
---|
[888] | 214 | |
---|
[4634] | 215 | ! ------------------------------------------------- |
---|
| 216 | ! C. Rousset Begin Diagnostics for heat in W/m2 |
---|
| 217 | ! ------------------------------------------------- |
---|
| 218 | DO jj = 1, jpj |
---|
| 219 | DO ji = 1, jpi |
---|
| 220 | diag_heat_dhc1(ji,jj) = ( SUM( d_e_i_trp(ji,jj,1:nlay_i,:) + d_e_i_thd(ji,jj,1:nlay_i,:) ) + & |
---|
| 221 | & SUM( d_e_s_trp(ji,jj,1:nlay_s,:) + d_e_s_thd(ji,jj,1:nlay_s,:) ) ) * unit_fac * r1_rdtice / area(ji,jj) |
---|
| 222 | END DO |
---|
| 223 | END DO |
---|
| 224 | ! ------------------------------------------------- |
---|
| 225 | ! C. Rousset End Diagnostics |
---|
| 226 | ! ------------------------------------------------- |
---|
| 227 | |
---|
[888] | 228 | IF(ln_ctl) THEN |
---|
[918] | 229 | CALL prt_ctl( tab2d_1=qsr , clinfo1=' lim_sbc: qsr : ', tab2d_2=qns , clinfo2=' qns : ' ) |
---|
[3625] | 230 | CALL prt_ctl( tab2d_1=emp , clinfo1=' lim_sbc: emp : ', tab2d_2=sfx , clinfo2=' sfx : ' ) |
---|
[1037] | 231 | CALL prt_ctl( tab2d_1=fr_i , clinfo1=' lim_sbc: fr_i : ' ) |
---|
[918] | 232 | CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl ) |
---|
[921] | 233 | ENDIF |
---|
[2715] | 234 | ! |
---|
[3294] | 235 | IF( lk_cpl ) CALL wrk_dealloc( jpi, jpj, jpl, zalb, zalbp ) |
---|
[918] | 236 | ! |
---|
| 237 | END SUBROUTINE lim_sbc_flx |
---|
[888] | 238 | |
---|
[2528] | 239 | |
---|
| 240 | SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce ) |
---|
| 241 | !!------------------------------------------------------------------- |
---|
| 242 | !! *** ROUTINE lim_sbc_tau *** |
---|
| 243 | !! |
---|
| 244 | !! ** Purpose : Update the ocean surface stresses due to the ice |
---|
| 245 | !! |
---|
| 246 | !! ** Action : * at each ice time step (every nn_fsbc time step): |
---|
| 247 | !! - compute the modulus of ice-ocean relative velocity |
---|
| 248 | !! (*rho*Cd) at T-point (C-grid) or I-point (B-grid) |
---|
| 249 | !! tmod_io = rhoco * | U_ice-U_oce | |
---|
| 250 | !! - update the modulus of stress at ocean surface |
---|
| 251 | !! taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce | |
---|
| 252 | !! * at each ocean time step (every kt): |
---|
| 253 | !! compute linearized ice-ocean stresses as |
---|
| 254 | !! Utau = tmod_io * | U_ice - pU_oce | |
---|
| 255 | !! using instantaneous current ocean velocity (usually before) |
---|
| 256 | !! |
---|
| 257 | !! NB: - ice-ocean rotation angle no more allowed |
---|
| 258 | !! - here we make an approximation: taum is only computed every ice time step |
---|
| 259 | !! This avoids mutiple average to pass from T -> U,V grids and next from U,V grids |
---|
| 260 | !! to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton... |
---|
| 261 | !! |
---|
| 262 | !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes |
---|
| 263 | !! - taum : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes |
---|
| 264 | !!--------------------------------------------------------------------- |
---|
| 265 | INTEGER , INTENT(in) :: kt ! ocean time-step index |
---|
| 266 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pu_oce, pv_oce ! surface ocean currents |
---|
| 267 | !! |
---|
| 268 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 269 | REAL(wp) :: zat_u, zutau_ice, zu_t, zmodt ! local scalar |
---|
| 270 | REAL(wp) :: zat_v, zvtau_ice, zv_t ! - - |
---|
[2715] | 271 | !!--------------------------------------------------------------------- |
---|
| 272 | ! |
---|
[2528] | 273 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 274 | !CDIR NOVERRCHK |
---|
| 275 | DO jj = 2, jpjm1 !* update the modulus of stress at ocean surface (T-point) |
---|
| 276 | !CDIR NOVERRCHK |
---|
| 277 | DO ji = fs_2, fs_jpim1 |
---|
| 278 | ! ! 2*(U_ice-U_oce) at T-point |
---|
| 279 | zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj) |
---|
| 280 | zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) |
---|
| 281 | ! ! |U_ice-U_oce|^2 |
---|
| 282 | zmodt = 0.25_wp * ( zu_t * zu_t + zv_t * zv_t ) |
---|
| 283 | ! ! update the ocean stress modulus |
---|
| 284 | taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zmodt |
---|
| 285 | tmod_io(ji,jj) = rhoco * SQRT( zmodt ) ! rhoco * |U_ice-U_oce| at T-point |
---|
| 286 | END DO |
---|
| 287 | END DO |
---|
| 288 | CALL lbc_lnk( taum, 'T', 1. ) ; CALL lbc_lnk( tmod_io, 'T', 1. ) |
---|
| 289 | ! |
---|
| 290 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 291 | vtau_oce(:,:) = vtau(:,:) |
---|
| 292 | ! |
---|
| 293 | ENDIF |
---|
[2715] | 294 | ! |
---|
| 295 | ! !== every ocean time-step ==! |
---|
| 296 | ! |
---|
[2528] | 297 | DO jj = 2, jpjm1 !* update the stress WITHOUT a ice-ocean rotation angle |
---|
| 298 | DO ji = fs_2, fs_jpim1 ! Vect. Opt. |
---|
| 299 | zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp ! ice area at u and V-points |
---|
| 300 | zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp |
---|
| 301 | ! ! linearized quadratic drag formulation |
---|
| 302 | zutau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) ) |
---|
| 303 | zvtau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) ) |
---|
| 304 | ! ! stresses at the ocean surface |
---|
| 305 | utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice |
---|
| 306 | vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice |
---|
| 307 | END DO |
---|
| 308 | END DO |
---|
| 309 | CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition |
---|
| 310 | ! |
---|
| 311 | IF(ln_ctl) CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau : ', mask1=umask, & |
---|
| 312 | & tab2d_2=vtau, clinfo2=' vtau : ' , mask2=vmask ) |
---|
| 313 | ! |
---|
| 314 | END SUBROUTINE lim_sbc_tau |
---|
| 315 | |
---|
[2715] | 316 | |
---|
| 317 | SUBROUTINE lim_sbc_init |
---|
| 318 | !!------------------------------------------------------------------- |
---|
| 319 | !! *** ROUTINE lim_sbc_init *** |
---|
| 320 | !! |
---|
| 321 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
| 322 | !! the temporal evolution of key variables |
---|
| 323 | !! |
---|
| 324 | !! ** input : Namelist namicedia |
---|
| 325 | !!------------------------------------------------------------------- |
---|
[4045] | 326 | REAL(wp) :: zsum, zarea |
---|
[2715] | 327 | ! |
---|
[3625] | 328 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 329 | REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar |
---|
[2715] | 330 | IF(lwp) WRITE(numout,*) |
---|
| 331 | IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition' |
---|
| 332 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ ' |
---|
| 333 | |
---|
| 334 | ! ! allocate lim_sbc array |
---|
| 335 | IF( lim_sbc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' ) |
---|
| 336 | ! |
---|
| 337 | soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 338 | sice_0(:,:) = sice |
---|
| 339 | ! |
---|
| 340 | IF( cp_cfg == "orca" ) THEN ! decrease ocean & ice reference salinities in the Baltic sea |
---|
| 341 | WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & |
---|
| 342 | & 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) |
---|
| 343 | soce_0(:,:) = 4._wp |
---|
| 344 | sice_0(:,:) = 2._wp |
---|
| 345 | END WHERE |
---|
| 346 | ENDIF |
---|
[4045] | 347 | ! clem modif |
---|
[4220] | 348 | IF( .NOT. ln_rstart ) THEN |
---|
| 349 | iatte(:,:) = 1._wp |
---|
| 350 | oatte(:,:) = 1._wp |
---|
| 351 | ENDIF |
---|
[4045] | 352 | ! |
---|
[4220] | 353 | ! clem: snwice_mass in the restart file now |
---|
| 354 | IF( .NOT. ln_rstart ) THEN |
---|
| 355 | ! ! embedded sea ice |
---|
| 356 | IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass |
---|
| 357 | snwice_mass (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
| 358 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 359 | ELSE |
---|
| 360 | snwice_mass (:,:) = 0.0_wp ! no mass exchanges |
---|
| 361 | snwice_mass_b(:,:) = 0.0_wp ! no mass exchanges |
---|
| 362 | ENDIF |
---|
| 363 | IF( nn_ice_embd == 2 ) THEN ! full embedment (case 2) deplete the initial ssh below sea-ice area |
---|
| 364 | sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 365 | sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 366 | ! |
---|
| 367 | ! Note: Changed the initial values of sshb and sshn=> need to recompute ssh[u,v,f]_[b,n] |
---|
| 368 | ! which were previously set in domvvl |
---|
| 369 | IF ( lk_vvl ) THEN ! Is this necessary? embd 2 should be restricted to vvl only??? |
---|
| 370 | DO jj = 1, jpjm1 |
---|
| 371 | DO ji = 1, jpim1 ! caution: use of Vector Opt. not possible |
---|
| 372 | zcoefu = 0.5 * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) ) |
---|
| 373 | zcoefv = 0.5 * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) ) |
---|
| 374 | zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1) |
---|
| 375 | sshu_b(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshb(ji ,jj) & |
---|
| 376 | & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) ) |
---|
| 377 | sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshb(ji,jj ) & |
---|
| 378 | & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) ) |
---|
| 379 | sshu_n(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshn(ji ,jj) & |
---|
| 380 | & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) ) |
---|
| 381 | sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshn(ji,jj ) & |
---|
| 382 | & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) ) |
---|
| 383 | END DO |
---|
[3625] | 384 | END DO |
---|
[4220] | 385 | CALL lbc_lnk( sshu_b, 'U', 1. ) ; CALL lbc_lnk( sshu_n, 'U', 1. ) |
---|
| 386 | CALL lbc_lnk( sshv_b, 'V', 1. ) ; CALL lbc_lnk( sshv_n, 'V', 1. ) |
---|
| 387 | DO jj = 1, jpjm1 |
---|
| 388 | DO ji = 1, jpim1 ! NO Vector Opt. |
---|
| 389 | sshf_n(ji,jj) = 0.5 * umask(ji,jj,1) * umask(ji,jj+1,1) & |
---|
| 390 | & / ( e1f(ji,jj ) * e2f(ji,jj ) ) & |
---|
| 391 | & * ( e1u(ji,jj ) * e2u(ji,jj ) * sshu_n(ji,jj ) & |
---|
| 392 | & + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) ) |
---|
| 393 | END DO |
---|
[3625] | 394 | END DO |
---|
[4220] | 395 | CALL lbc_lnk( sshf_n, 'F', 1. ) |
---|
| 396 | ENDIF |
---|
| 397 | ENDIF |
---|
| 398 | ENDIF ! .NOT. ln_rstart |
---|
[2715] | 399 | ! |
---|
[4045] | 400 | |
---|
[2715] | 401 | END SUBROUTINE lim_sbc_init |
---|
| 402 | |
---|
[888] | 403 | #else |
---|
| 404 | !!---------------------------------------------------------------------- |
---|
| 405 | !! Default option : Dummy module NO LIM 3.0 sea-ice model |
---|
| 406 | !!---------------------------------------------------------------------- |
---|
| 407 | CONTAINS |
---|
| 408 | SUBROUTINE lim_sbc ! Dummy routine |
---|
| 409 | END SUBROUTINE lim_sbc |
---|
| 410 | #endif |
---|
| 411 | |
---|
| 412 | !!====================================================================== |
---|
| 413 | END MODULE limsbc |
---|