[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 | !!---------------------------------------------------------------------- |
---|
[6140] | 25 | USE par_oce ! ocean parameters |
---|
| 26 | USE oce , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass |
---|
| 27 | USE phycst ! physical constants |
---|
| 28 | USE dom_oce ! ocean domain |
---|
| 29 | USE ice ! LIM sea-ice variables |
---|
| 30 | USE sbc_ice ! Surface boundary condition: sea-ice fields |
---|
| 31 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 32 | USE sbccpl ! Surface boundary condition: coupled interface |
---|
| 33 | USE albedo ! albedo parameters |
---|
| 34 | USE traqsr ! add penetration of solar flux in the calculation of heat budget |
---|
| 35 | USE domvvl ! Variable volume |
---|
[7646] | 36 | USE limctl ! |
---|
| 37 | USE limcons ! |
---|
| 38 | USE bdy_oce , ONLY: ln_bdy |
---|
[6140] | 39 | ! |
---|
| 40 | USE in_out_manager ! I/O manager |
---|
| 41 | USE iom ! xIO server |
---|
| 42 | USE lbclnk ! ocean lateral boundary condition - MPP exchanges |
---|
| 43 | USE lib_mpp ! MPP library |
---|
| 44 | USE wrk_nemo ! work arrays |
---|
| 45 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[888] | 46 | |
---|
| 47 | IMPLICIT NONE |
---|
| 48 | PRIVATE |
---|
| 49 | |
---|
[7646] | 50 | PUBLIC lim_sbc_init ! called by sbc_lim_init |
---|
[2715] | 51 | PUBLIC lim_sbc_flx ! called by sbc_ice_lim |
---|
| 52 | PUBLIC lim_sbc_tau ! called by sbc_ice_lim |
---|
[888] | 53 | |
---|
[2715] | 54 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau_oce, vtau_oce ! air-ocean surface i- & j-stress [N/m2] |
---|
| 55 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmod_io ! modulus of the ice-ocean velocity [m/s] |
---|
| 56 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: soce_0 , sice_0 ! cst SSS and ice salinity (levitating sea-ice) |
---|
[1526] | 57 | |
---|
[888] | 58 | !! * Substitutions |
---|
| 59 | # include "vectopt_loop_substitute.h90" |
---|
| 60 | !!---------------------------------------------------------------------- |
---|
[4161] | 61 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[1146] | 62 | !! $Id$ |
---|
[2528] | 63 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[888] | 64 | !!---------------------------------------------------------------------- |
---|
| 65 | CONTAINS |
---|
| 66 | |
---|
[2715] | 67 | INTEGER FUNCTION lim_sbc_alloc() |
---|
| 68 | !!------------------------------------------------------------------- |
---|
| 69 | !! *** ROUTINE lim_sbc_alloc *** |
---|
| 70 | !!------------------------------------------------------------------- |
---|
| 71 | ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) , & |
---|
| 72 | & sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc) |
---|
| 73 | ! |
---|
| 74 | IF( lk_mpp ) CALL mpp_sum( lim_sbc_alloc ) |
---|
| 75 | IF( lim_sbc_alloc /= 0 ) CALL ctl_warn('lim_sbc_alloc: failed to allocate arrays') |
---|
| 76 | END FUNCTION lim_sbc_alloc |
---|
| 77 | |
---|
| 78 | |
---|
[918] | 79 | SUBROUTINE lim_sbc_flx( kt ) |
---|
| 80 | !!------------------------------------------------------------------- |
---|
| 81 | !! *** ROUTINE lim_sbc_flx *** |
---|
| 82 | !! |
---|
| 83 | !! ** Purpose : Update the surface ocean boundary condition for heat |
---|
| 84 | !! salt and mass over areas where sea-ice is non-zero |
---|
| 85 | !! |
---|
| 86 | !! ** Action : - computes the heat and freshwater/salt fluxes |
---|
| 87 | !! at the ice-ocean interface. |
---|
| 88 | !! - Update the ocean sbc |
---|
| 89 | !! |
---|
[1037] | 90 | !! ** Outputs : - qsr : sea heat flux: solar |
---|
| 91 | !! - qns : sea heat flux: non solar |
---|
| 92 | !! - emp : freshwater budget: volume flux |
---|
[3625] | 93 | !! - sfx : salt flux |
---|
[1037] | 94 | !! - fr_i : ice fraction |
---|
| 95 | !! - tn_ice : sea-ice surface temperature |
---|
[7646] | 96 | !! - alb_ice : sea-ice albedo (recomputed only for coupled mode) |
---|
[888] | 97 | !! |
---|
| 98 | !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90. |
---|
| 99 | !! Tartinville et al. 2001 Ocean Modelling, 3, 95-108. |
---|
[4990] | 100 | !! These refs are now obsolete since everything has been revised |
---|
[5123] | 101 | !! The ref should be Rousset et al., 2015 |
---|
[888] | 102 | !!--------------------------------------------------------------------- |
---|
[6140] | 103 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
[4990] | 104 | ! |
---|
[6140] | 105 | INTEGER :: ji, jj, jl, jk ! dummy loop indices |
---|
| 106 | REAL(wp) :: zqmass ! Heat flux associated with mass exchange ice->ocean (W.m-2) |
---|
| 107 | REAL(wp) :: zqsr ! New solar flux received by the ocean |
---|
| 108 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zalb_cs, zalb_os ! 3D workspace |
---|
[6416] | 109 | REAL(wp), POINTER, DIMENSION(:,:) :: zalb ! 2D workspace |
---|
[888] | 110 | !!--------------------------------------------------------------------- |
---|
[4688] | 111 | |
---|
[7646] | 112 | ! --- case we bypass ice thermodynamics --- ! |
---|
| 113 | IF( .NOT. ln_limthd ) THEN ! we suppose ice is impermeable => ocean is isolated from atmosphere |
---|
[7753] | 114 | hfx_in (:,:) = pfrld(:,:) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) |
---|
| 115 | hfx_out (:,:) = pfrld(:,:) * qns_oce(:,:) + qemp_oce(:,:) |
---|
| 116 | ftr_ice (:,:,:) = 0._wp |
---|
| 117 | emp_ice (:,:) = 0._wp |
---|
| 118 | qemp_ice (:,:) = 0._wp |
---|
| 119 | qevap_ice(:,:,:) = 0._wp |
---|
[7646] | 120 | ENDIF |
---|
| 121 | |
---|
[6416] | 122 | ! albedo output |
---|
| 123 | CALL wrk_alloc( jpi,jpj, zalb ) |
---|
| 124 | |
---|
[7753] | 125 | zalb(:,:) = 0._wp |
---|
| 126 | WHERE ( at_i_b <= epsi06 ) ; zalb(:,:) = 0.066_wp |
---|
| 127 | ELSEWHERE ; zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b |
---|
| 128 | END WHERE |
---|
[6416] | 129 | IF( iom_use('alb_ice' ) ) CALL iom_put( "alb_ice" , zalb(:,:) ) ! ice albedo output |
---|
| 130 | |
---|
[7753] | 131 | zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + 0.066_wp * ( 1._wp - at_i_b ) |
---|
[6416] | 132 | IF( iom_use('albedo' ) ) CALL iom_put( "albedo" , zalb(:,:) ) ! ice albedo output |
---|
| 133 | |
---|
| 134 | CALL wrk_dealloc( jpi,jpj, zalb ) |
---|
| 135 | |
---|
[888] | 136 | DO jj = 1, jpj |
---|
| 137 | DO ji = 1, jpi |
---|
| 138 | |
---|
[4688] | 139 | !------------------------------------------! |
---|
| 140 | ! heat flux at the ocean surface ! |
---|
| 141 | !------------------------------------------! |
---|
[5407] | 142 | ! Solar heat flux reaching the ocean = zqsr (W.m-2) |
---|
[4688] | 143 | !--------------------------------------------------- |
---|
[5407] | 144 | zqsr = qsr_tot(ji,jj) |
---|
| 145 | DO jl = 1, jpl |
---|
| 146 | zqsr = zqsr - a_i_b(ji,jj,jl) * ( qsr_ice(ji,jj,jl) - ftr_ice(ji,jj,jl) ) |
---|
| 147 | END DO |
---|
[888] | 148 | |
---|
[4688] | 149 | ! Total heat flux reaching the ocean = hfx_out (W.m-2) |
---|
| 150 | !--------------------------------------------------- |
---|
[5407] | 151 | zqmass = hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_res(ji,jj) ! heat flux from snow is 0 (T=0 degC) |
---|
| 152 | hfx_out(ji,jj) = hfx_out(ji,jj) + zqmass + zqsr |
---|
[4161] | 153 | |
---|
[6416] | 154 | ! Add the residual from heat diffusion equation and sublimation (W.m-2) |
---|
| 155 | !---------------------------------------------------------------------- |
---|
| 156 | hfx_out(ji,jj) = hfx_out(ji,jj) + hfx_err_dif(ji,jj) + & |
---|
| 157 | & ( hfx_sub(ji,jj) - SUM( qevap_ice(ji,jj,:) * a_i_b(ji,jj,:) ) ) |
---|
[5146] | 158 | |
---|
[4688] | 159 | ! New qsr and qns used to compute the oceanic heat flux at the next time step |
---|
[6416] | 160 | !---------------------------------------------------------------------------- |
---|
[5407] | 161 | qsr(ji,jj) = zqsr |
---|
| 162 | qns(ji,jj) = hfx_out(ji,jj) - zqsr |
---|
[888] | 163 | |
---|
[4688] | 164 | !------------------------------------------! |
---|
| 165 | ! mass flux at the ocean surface ! |
---|
| 166 | !------------------------------------------! |
---|
[888] | 167 | ! case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED) |
---|
| 168 | ! ------------------------------------------------------------------------------------- |
---|
| 169 | ! The idea of this approach is that the system that we consider is the ICE-OCEAN system |
---|
| 170 | ! Thus FW flux = External ( E-P+snow melt) |
---|
| 171 | ! Salt flux = Exchanges in the ice-ocean system then converted into FW |
---|
| 172 | ! Associated to Ice formation AND Ice melting |
---|
| 173 | ! Even if i see Ice melting as a FW and SALT flux |
---|
| 174 | ! |
---|
[4688] | 175 | ! mass flux from ice/ocean |
---|
[4765] | 176 | wfx_ice(ji,jj) = wfx_bog(ji,jj) + wfx_bom(ji,jj) + wfx_sum(ji,jj) + wfx_sni(ji,jj) & |
---|
[7646] | 177 | + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj) + wfx_lam(ji,jj) |
---|
[2528] | 178 | |
---|
[4688] | 179 | ! mass flux at the ocean/ice interface |
---|
[6416] | 180 | fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) + wfx_err_sub(ji,jj) ) ! F/M mass flux save at least for biogeochemical model |
---|
[7646] | 181 | emp(ji,jj) = emp_oce(ji,jj) - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_err_sub(ji,jj) ! mass flux + F/M mass flux (always ice/ocean mass exchange) |
---|
[888] | 182 | END DO |
---|
| 183 | END DO |
---|
| 184 | |
---|
[3625] | 185 | !------------------------------------------! |
---|
| 186 | ! salt flux at the ocean surface ! |
---|
| 187 | !------------------------------------------! |
---|
[7753] | 188 | sfx(:,:) = sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + sfx_opw(:,:) & |
---|
| 189 | & + sfx_res(:,:) + sfx_dyn(:,:) + sfx_bri(:,:) + sfx_sub(:,:) + sfx_lam(:,:) |
---|
[3625] | 190 | |
---|
[4688] | 191 | !-------------------------------------------------------------! |
---|
| 192 | ! mass of snow and ice per unit area for embedded sea-ice ! |
---|
| 193 | !-------------------------------------------------------------! |
---|
| 194 | IF( nn_ice_embd /= 0 ) THEN |
---|
[7753] | 195 | ! save mass from the previous ice time step |
---|
| 196 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 197 | ! new mass per unit area |
---|
| 198 | snwice_mass (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
| 199 | ! time evolution of snow+ice mass |
---|
| 200 | snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice |
---|
[3625] | 201 | ENDIF |
---|
[921] | 202 | |
---|
[888] | 203 | !-----------------------------------------------! |
---|
| 204 | ! Storing the transmitted variables ! |
---|
| 205 | !-----------------------------------------------! |
---|
[7753] | 206 | fr_i (:,:) = at_i(:,:) ! Sea-ice fraction |
---|
| 207 | tn_ice(:,:,:) = t_su(:,:,:) ! Ice surface temperature |
---|
[888] | 208 | |
---|
[5407] | 209 | !------------------------------------------------------------------------! |
---|
| 210 | ! Snow/ice albedo (only if sent to coupler, useless in forced mode) ! |
---|
| 211 | !------------------------------------------------------------------------! |
---|
[6140] | 212 | CALL wrk_alloc( jpi,jpj,jpl, zalb_cs, zalb_os ) |
---|
[5407] | 213 | CALL albedo_ice( t_su, ht_i, ht_s, zalb_cs, zalb_os ) ! cloud-sky and overcast-sky ice albedos |
---|
[7753] | 214 | alb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) |
---|
[6140] | 215 | CALL wrk_dealloc( jpi,jpj,jpl, zalb_cs, zalb_os ) |
---|
[4990] | 216 | |
---|
[5167] | 217 | ! conservation test |
---|
[7646] | 218 | IF( ln_limdiachk .AND. .NOT. ln_bdy) CALL lim_cons_final( 'limsbc' ) |
---|
[4688] | 219 | |
---|
[5167] | 220 | ! control prints |
---|
[7646] | 221 | IF( ln_limctl ) CALL lim_prt( kt, iiceprt, jiceprt, 3, ' - Final state lim_sbc - ' ) |
---|
| 222 | IF( ln_ctl ) CALL lim_prt3D( 'limsbc' ) |
---|
| 223 | |
---|
[918] | 224 | END SUBROUTINE lim_sbc_flx |
---|
[888] | 225 | |
---|
[2528] | 226 | |
---|
| 227 | SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce ) |
---|
| 228 | !!------------------------------------------------------------------- |
---|
| 229 | !! *** ROUTINE lim_sbc_tau *** |
---|
| 230 | !! |
---|
| 231 | !! ** Purpose : Update the ocean surface stresses due to the ice |
---|
| 232 | !! |
---|
| 233 | !! ** Action : * at each ice time step (every nn_fsbc time step): |
---|
| 234 | !! - compute the modulus of ice-ocean relative velocity |
---|
| 235 | !! (*rho*Cd) at T-point (C-grid) or I-point (B-grid) |
---|
| 236 | !! tmod_io = rhoco * | U_ice-U_oce | |
---|
| 237 | !! - update the modulus of stress at ocean surface |
---|
| 238 | !! taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce | |
---|
| 239 | !! * at each ocean time step (every kt): |
---|
| 240 | !! compute linearized ice-ocean stresses as |
---|
| 241 | !! Utau = tmod_io * | U_ice - pU_oce | |
---|
| 242 | !! using instantaneous current ocean velocity (usually before) |
---|
| 243 | !! |
---|
| 244 | !! NB: - ice-ocean rotation angle no more allowed |
---|
| 245 | !! - here we make an approximation: taum is only computed every ice time step |
---|
| 246 | !! This avoids mutiple average to pass from T -> U,V grids and next from U,V grids |
---|
| 247 | !! to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton... |
---|
| 248 | !! |
---|
| 249 | !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes |
---|
| 250 | !! - taum : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes |
---|
| 251 | !!--------------------------------------------------------------------- |
---|
| 252 | INTEGER , INTENT(in) :: kt ! ocean time-step index |
---|
| 253 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pu_oce, pv_oce ! surface ocean currents |
---|
[6140] | 254 | ! |
---|
[2528] | 255 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 256 | REAL(wp) :: zat_u, zutau_ice, zu_t, zmodt ! local scalar |
---|
[7646] | 257 | REAL(wp) :: zat_v, zvtau_ice, zv_t, zrhoco ! - - |
---|
[2715] | 258 | !!--------------------------------------------------------------------- |
---|
[7646] | 259 | zrhoco = rau0 * rn_cio |
---|
[2715] | 260 | ! |
---|
[2528] | 261 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 262 | DO jj = 2, jpjm1 !* update the modulus of stress at ocean surface (T-point) |
---|
| 263 | DO ji = fs_2, fs_jpim1 |
---|
| 264 | ! ! 2*(U_ice-U_oce) at T-point |
---|
| 265 | zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj) |
---|
| 266 | zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) |
---|
| 267 | ! ! |U_ice-U_oce|^2 |
---|
| 268 | zmodt = 0.25_wp * ( zu_t * zu_t + zv_t * zv_t ) |
---|
| 269 | ! ! update the ocean stress modulus |
---|
[7646] | 270 | taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * zrhoco * zmodt |
---|
| 271 | tmod_io(ji,jj) = zrhoco * SQRT( zmodt ) ! rhoco * |U_ice-U_oce| at T-point |
---|
[2528] | 272 | END DO |
---|
| 273 | END DO |
---|
[7646] | 274 | CALL lbc_lnk_multi( taum, 'T', 1., tmod_io, 'T', 1. ) |
---|
[2528] | 275 | ! |
---|
[7753] | 276 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 277 | vtau_oce(:,:) = vtau(:,:) |
---|
[2528] | 278 | ! |
---|
| 279 | ENDIF |
---|
[2715] | 280 | ! |
---|
| 281 | ! !== every ocean time-step ==! |
---|
| 282 | ! |
---|
[2528] | 283 | DO jj = 2, jpjm1 !* update the stress WITHOUT a ice-ocean rotation angle |
---|
| 284 | DO ji = fs_2, fs_jpim1 ! Vect. Opt. |
---|
| 285 | zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp ! ice area at u and V-points |
---|
| 286 | zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp |
---|
| 287 | ! ! linearized quadratic drag formulation |
---|
| 288 | zutau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) ) |
---|
| 289 | zvtau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) ) |
---|
| 290 | ! ! stresses at the ocean surface |
---|
| 291 | utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice |
---|
| 292 | vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice |
---|
| 293 | END DO |
---|
| 294 | END DO |
---|
[7646] | 295 | CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. ) ! lateral boundary condition |
---|
[2528] | 296 | ! |
---|
| 297 | ! |
---|
| 298 | END SUBROUTINE lim_sbc_tau |
---|
| 299 | |
---|
[2715] | 300 | |
---|
| 301 | SUBROUTINE lim_sbc_init |
---|
| 302 | !!------------------------------------------------------------------- |
---|
| 303 | !! *** ROUTINE lim_sbc_init *** |
---|
| 304 | !! |
---|
| 305 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
| 306 | !! the temporal evolution of key variables |
---|
| 307 | !! |
---|
| 308 | !! ** input : Namelist namicedia |
---|
| 309 | !!------------------------------------------------------------------- |
---|
[6140] | 310 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 311 | REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar |
---|
| 312 | !!------------------------------------------------------------------- |
---|
| 313 | ! |
---|
[2715] | 314 | IF(lwp) WRITE(numout,*) |
---|
| 315 | IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition' |
---|
| 316 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ ' |
---|
| 317 | |
---|
| 318 | ! ! allocate lim_sbc array |
---|
| 319 | IF( lim_sbc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' ) |
---|
| 320 | ! |
---|
[7753] | 321 | soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 322 | sice_0(:,:) = sice |
---|
[7646] | 323 | ! ! decrease ocean & ice reference salinities in the Baltic Sea area |
---|
[7753] | 324 | WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & |
---|
| 325 | & 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) |
---|
| 326 | soce_0(:,:) = 4._wp |
---|
| 327 | sice_0(:,:) = 2._wp |
---|
| 328 | END WHERE |
---|
[2715] | 329 | ! |
---|
[4205] | 330 | IF( .NOT. ln_rstart ) THEN |
---|
| 331 | ! ! embedded sea ice |
---|
| 332 | IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass |
---|
[7753] | 333 | snwice_mass (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) |
---|
| 334 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
[4205] | 335 | ELSE |
---|
[7753] | 336 | snwice_mass (:,:) = 0._wp ! no mass exchanges |
---|
| 337 | snwice_mass_b(:,:) = 0._wp ! no mass exchanges |
---|
[4205] | 338 | ENDIF |
---|
| 339 | IF( nn_ice_embd == 2 ) THEN ! full embedment (case 2) deplete the initial ssh below sea-ice area |
---|
[7753] | 340 | sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 341 | sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
[6140] | 342 | |
---|
[7646] | 343 | !!gm I really don't like this stuff here... Find a way to put that elsewhere or differently |
---|
[6140] | 344 | !!gm |
---|
| 345 | IF( .NOT.ln_linssh ) THEN |
---|
| 346 | DO jk = 1,jpkm1 ! adjust initial vertical scale factors |
---|
[7753] | 347 | e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) |
---|
| 348 | e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) |
---|
[6140] | 349 | END DO |
---|
[7753] | 350 | e3t_a(:,:,:) = e3t_b(:,:,:) |
---|
[6140] | 351 | ! Reconstruction of all vertical scale factors at now and before time-steps |
---|
| 352 | ! ========================================================================= |
---|
| 353 | ! Horizontal scale factor interpolations |
---|
| 354 | ! -------------------------------------- |
---|
| 355 | CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) |
---|
| 356 | CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) |
---|
| 357 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) |
---|
| 358 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) |
---|
| 359 | CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) |
---|
| 360 | ! Vertical scale factor interpolations |
---|
| 361 | ! ------------------------------------ |
---|
| 362 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W' ) |
---|
| 363 | CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) |
---|
| 364 | CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) |
---|
| 365 | CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) |
---|
| 366 | CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) |
---|
| 367 | ! t- and w- points depth |
---|
| 368 | ! ---------------------- |
---|
| 369 | !!gm not sure of that.... |
---|
[7753] | 370 | gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) |
---|
| 371 | gdepw_n(:,:,1) = 0.0_wp |
---|
| 372 | gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) |
---|
[6140] | 373 | DO jk = 2, jpk |
---|
[7753] | 374 | gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) |
---|
| 375 | gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) |
---|
| 376 | gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) |
---|
[6140] | 377 | END DO |
---|
| 378 | ENDIF |
---|
[4205] | 379 | ENDIF |
---|
| 380 | ENDIF ! .NOT. ln_rstart |
---|
[2715] | 381 | ! |
---|
| 382 | END SUBROUTINE lim_sbc_init |
---|
| 383 | |
---|
[888] | 384 | #else |
---|
| 385 | !!---------------------------------------------------------------------- |
---|
| 386 | !! Default option : Dummy module NO LIM 3.0 sea-ice model |
---|
| 387 | !!---------------------------------------------------------------------- |
---|
| 388 | CONTAINS |
---|
| 389 | SUBROUTINE lim_sbc ! Dummy routine |
---|
| 390 | END SUBROUTINE lim_sbc |
---|
| 391 | #endif |
---|
| 392 | |
---|
| 393 | !!====================================================================== |
---|
| 394 | END MODULE limsbc |
---|