[8414] | 1 | MODULE iceupdate |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE iceupdate *** |
---|
| 4 | !! computation of the flux at the sea ice/ocean interface |
---|
| 5 | !!====================================================================== |
---|
| 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 |
---|
| 11 | !! 3.4 ! 2011-02 (G. Madec) dynamical allocation |
---|
| 12 | !! - ! 2012 (D. Iovino) salt flux change |
---|
| 13 | !! - ! 2012-05 (C. Rousset) add penetration solar flux |
---|
| 14 | !! 3.5 ! 2012-10 (A. Coward, G. Madec) salt fluxes ; ice+snow mass |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | #if defined key_lim3 |
---|
| 17 | !!---------------------------------------------------------------------- |
---|
| 18 | !! 'key_lim3' LIM 3.0 sea-ice model |
---|
| 19 | !!---------------------------------------------------------------------- |
---|
| 20 | !! ice_update_alloc : allocate the iceupdate arrays |
---|
| 21 | !! ice_update_init : initialisation |
---|
| 22 | !! ice_update_flx : updates mass, heat and salt fluxes at the ocean surface |
---|
| 23 | !! ice_update_tau : update i- and j-stresses, and its modulus at the ocean surface |
---|
| 24 | !!---------------------------------------------------------------------- |
---|
| 25 | USE par_oce ! ocean parameters |
---|
| 26 | USE oce , ONLY : sshn, sshb |
---|
| 27 | USE phycst ! physical constants |
---|
| 28 | USE dom_oce ! ocean domain |
---|
| 29 | USE ice ! LIM sea-ice variables |
---|
| 30 | USE sbc_ice , ONLY : emp_oce, qns_oce, qsr_oce, qemp_oce, emp_ice, qsr_ice, qemp_ice, qevap_ice, alb_ice, tn_ice, cldf_ice, & |
---|
| 31 | & snwice_mass, snwice_mass_b, snwice_fmass |
---|
| 32 | USE sbc_oce , ONLY : nn_fsbc, ln_ice_embd, sfx, fr_i, qsr_tot, qns, qsr, fmmflx, emp, taum, utau, vtau |
---|
| 33 | USE sbccpl ! Surface boundary condition: coupled interface |
---|
| 34 | USE icealbedo ! albedo parameters |
---|
| 35 | USE traqsr ! add penetration of solar flux in the calculation of heat budget |
---|
| 36 | USE domvvl ! Variable volume |
---|
| 37 | USE icectl ! |
---|
| 38 | USE icecons ! |
---|
| 39 | USE bdy_oce , ONLY: ln_bdy |
---|
| 40 | ! |
---|
| 41 | USE in_out_manager ! I/O manager |
---|
| 42 | USE iom ! xIO server |
---|
| 43 | USE lbclnk ! ocean lateral boundary condition - MPP exchanges |
---|
| 44 | USE lib_mpp ! MPP library |
---|
| 45 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
| 46 | |
---|
| 47 | IMPLICIT NONE |
---|
| 48 | PRIVATE |
---|
| 49 | |
---|
| 50 | PUBLIC ice_update_init ! called by ice_init |
---|
| 51 | PUBLIC ice_update_flx ! called by ice_stp |
---|
| 52 | PUBLIC ice_update_tau ! called by ice_stp |
---|
| 53 | |
---|
| 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) |
---|
| 57 | |
---|
| 58 | !! * Substitutions |
---|
| 59 | # include "vectopt_loop_substitute.h90" |
---|
| 60 | !!---------------------------------------------------------------------- |
---|
| 61 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
| 62 | !! $Id: iceupdate.F90 8411 2017-08-07 16:09:12Z clem $ |
---|
| 63 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 64 | !!---------------------------------------------------------------------- |
---|
| 65 | CONTAINS |
---|
| 66 | |
---|
| 67 | INTEGER FUNCTION ice_update_alloc() |
---|
| 68 | !!------------------------------------------------------------------- |
---|
| 69 | !! *** ROUTINE ice_update_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=ice_update_alloc) |
---|
| 73 | ! |
---|
| 74 | IF( lk_mpp ) CALL mpp_sum( ice_update_alloc ) |
---|
| 75 | IF( ice_update_alloc /= 0 ) CALL ctl_warn('ice_update_alloc: failed to allocate arrays') |
---|
| 76 | END FUNCTION ice_update_alloc |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | SUBROUTINE ice_update_flx( kt ) |
---|
| 80 | !!------------------------------------------------------------------- |
---|
| 81 | !! *** ROUTINE ice_update_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 | !! |
---|
| 90 | !! ** Outputs : - qsr : sea heat flux: solar |
---|
| 91 | !! - qns : sea heat flux: non solar |
---|
| 92 | !! - emp : freshwater budget: volume flux |
---|
| 93 | !! - sfx : salt flux |
---|
| 94 | !! - fr_i : ice fraction |
---|
| 95 | !! - tn_ice : sea-ice surface temperature |
---|
| 96 | !! - alb_ice : sea-ice albedo (recomputed only for coupled mode) |
---|
| 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. |
---|
| 100 | !! These refs are now obsolete since everything has been revised |
---|
| 101 | !! The ref should be Rousset et al., 2015 |
---|
| 102 | !!--------------------------------------------------------------------- |
---|
| 103 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
| 104 | ! |
---|
| 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), DIMENSION(jpi,jpj,jpl) :: zalb_cs, zalb_os ! 3D workspace |
---|
| 109 | !!--------------------------------------------------------------------- |
---|
| 110 | |
---|
| 111 | ! --- case we bypass ice thermodynamics --- ! |
---|
| 112 | IF( .NOT. ln_limthd ) THEN ! we suppose ice is impermeable => ocean is isolated from atmosphere |
---|
| 113 | hfx_in (:,:) = ( 1._wp - at_i_b(:,:) ) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) |
---|
| 114 | hfx_out (:,:) = ( 1._wp - at_i_b(:,:) ) * qns_oce(:,:) + qemp_oce(:,:) |
---|
| 115 | ftr_ice (:,:,:) = 0._wp |
---|
| 116 | emp_ice (:,:) = 0._wp |
---|
| 117 | qemp_ice (:,:) = 0._wp |
---|
| 118 | qevap_ice(:,:,:) = 0._wp |
---|
| 119 | ENDIF |
---|
| 120 | |
---|
| 121 | DO jj = 1, jpj |
---|
| 122 | DO ji = 1, jpi |
---|
| 123 | |
---|
| 124 | !------------------------------------------! |
---|
| 125 | ! heat flux at the ocean surface ! |
---|
| 126 | !------------------------------------------! |
---|
| 127 | ! Solar heat flux reaching the ocean = zqsr (W.m-2) |
---|
| 128 | !--------------------------------------------------- |
---|
| 129 | zqsr = qsr_tot(ji,jj) |
---|
| 130 | DO jl = 1, jpl |
---|
| 131 | zqsr = zqsr - a_i_b(ji,jj,jl) * ( qsr_ice(ji,jj,jl) - ftr_ice(ji,jj,jl) ) |
---|
| 132 | END DO |
---|
| 133 | |
---|
| 134 | ! Total heat flux reaching the ocean = hfx_out (W.m-2) |
---|
| 135 | !--------------------------------------------------- |
---|
| 136 | zqmass = hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_res(ji,jj) ! heat flux from snow is 0 (T=0 degC) |
---|
| 137 | hfx_out(ji,jj) = hfx_out(ji,jj) + zqmass + zqsr |
---|
| 138 | |
---|
| 139 | ! Add the residual from heat diffusion equation and sublimation (W.m-2) |
---|
| 140 | !---------------------------------------------------------------------- |
---|
| 141 | hfx_out(ji,jj) = hfx_out(ji,jj) + hfx_err_dif(ji,jj) + & |
---|
| 142 | & ( hfx_sub(ji,jj) - SUM( qevap_ice(ji,jj,:) * a_i_b(ji,jj,:) ) ) |
---|
| 143 | |
---|
| 144 | ! New qsr and qns used to compute the oceanic heat flux at the next time step |
---|
| 145 | !---------------------------------------------------------------------------- |
---|
| 146 | qsr(ji,jj) = zqsr |
---|
| 147 | qns(ji,jj) = hfx_out(ji,jj) - zqsr |
---|
| 148 | |
---|
| 149 | ! Mass flux at the atm. surface |
---|
| 150 | !----------------------------------- |
---|
| 151 | wfx_sub(ji,jj) = wfx_snw_sub(ji,jj) + wfx_ice_sub(ji,jj) |
---|
| 152 | |
---|
| 153 | ! Mass flux at the ocean surface |
---|
| 154 | !------------------------------------ |
---|
| 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 | ! mass flux from ice/ocean |
---|
| 164 | wfx_ice(ji,jj) = wfx_bog(ji,jj) + wfx_bom(ji,jj) + wfx_sum(ji,jj) + wfx_sni(ji,jj) & |
---|
| 165 | + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj) + wfx_lam(ji,jj) |
---|
| 166 | |
---|
| 167 | IF ( ln_pnd_fw ) wfx_ice(ji,jj) = wfx_ice(ji,jj) + wfx_pnd(ji,jj) |
---|
| 168 | |
---|
| 169 | ! add the snow melt water to snow mass flux to the ocean |
---|
| 170 | wfx_snw(ji,jj) = wfx_snw_sni(ji,jj) + wfx_snw_dyn(ji,jj) + wfx_snw_sum(ji,jj) |
---|
| 171 | |
---|
| 172 | ! mass flux at the ocean/ice interface |
---|
| 173 | 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 |
---|
| 174 | 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) |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | ! Salt flux at the ocean surface |
---|
| 178 | !------------------------------------------ |
---|
| 179 | sfx(ji,jj) = sfx_bog(ji,jj) + sfx_bom(ji,jj) + sfx_sum(ji,jj) + sfx_sni(ji,jj) + sfx_opw(ji,jj) & |
---|
| 180 | & + sfx_res(ji,jj) + sfx_dyn(ji,jj) + sfx_bri(ji,jj) + sfx_sub(ji,jj) + sfx_lam(ji,jj) |
---|
| 181 | |
---|
| 182 | ! Mass of snow and ice per unit area |
---|
| 183 | !---------------------------------------- |
---|
| 184 | ! save mass from the previous ice time step |
---|
| 185 | snwice_mass_b(ji,jj) = snwice_mass(ji,jj) |
---|
| 186 | ! new mass per unit area |
---|
| 187 | snwice_mass (ji,jj) = tmask(ji,jj,1) * ( rhosn * vt_s(ji,jj) + rhoic * vt_i(ji,jj) ) |
---|
| 188 | ! time evolution of snow+ice mass |
---|
| 189 | snwice_fmass (ji,jj) = ( snwice_mass(ji,jj) - snwice_mass_b(ji,jj) ) * r1_rdtice |
---|
| 190 | |
---|
| 191 | END DO |
---|
| 192 | END DO |
---|
| 193 | |
---|
| 194 | !-----------------------------------------------! |
---|
| 195 | ! Storing the transmitted variables ! |
---|
| 196 | !-----------------------------------------------! |
---|
| 197 | fr_i (:,:) = at_i(:,:) ! Sea-ice fraction |
---|
| 198 | tn_ice(:,:,:) = t_su(:,:,:) ! Ice surface temperature |
---|
| 199 | |
---|
| 200 | !------------------------------------------------------------------------! |
---|
| 201 | ! Snow/ice albedo (only if sent to coupler, useless in forced mode) ! |
---|
| 202 | !------------------------------------------------------------------------! |
---|
| 203 | CALL ice_albedo( t_su, ht_i, ht_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os ) ! cloud-sky and overcast-sky ice albedos |
---|
| 204 | |
---|
| 205 | alb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) |
---|
| 206 | |
---|
| 207 | ! conservation test |
---|
| 208 | IF( ln_limdiachk .AND. .NOT. ln_bdy) CALL ice_cons_final( 'iceupdate' ) |
---|
| 209 | |
---|
| 210 | ! control prints |
---|
| 211 | IF( ln_limctl ) CALL ice_prt( kt, iiceprt, jiceprt, 3, ' - Final state ice_update - ' ) |
---|
| 212 | IF( ln_ctl ) CALL ice_prt3D( 'iceupdate' ) |
---|
| 213 | |
---|
| 214 | END SUBROUTINE ice_update_flx |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | SUBROUTINE ice_update_tau( kt , pu_oce, pv_oce ) |
---|
| 218 | !!------------------------------------------------------------------- |
---|
| 219 | !! *** ROUTINE ice_update_tau *** |
---|
| 220 | !! |
---|
| 221 | !! ** Purpose : Update the ocean surface stresses due to the ice |
---|
| 222 | !! |
---|
| 223 | !! ** Action : * at each ice time step (every nn_fsbc time step): |
---|
| 224 | !! - compute the modulus of ice-ocean relative velocity |
---|
| 225 | !! (*rho*Cd) at T-point (C-grid) or I-point (B-grid) |
---|
| 226 | !! tmod_io = rhoco * | U_ice-U_oce | |
---|
| 227 | !! - update the modulus of stress at ocean surface |
---|
| 228 | !! taum = (1-a) * taum + a * tmod_io * | U_ice-U_oce | |
---|
| 229 | !! * at each ocean time step (every kt): |
---|
| 230 | !! compute linearized ice-ocean stresses as |
---|
| 231 | !! Utau = tmod_io * | U_ice - pU_oce | |
---|
| 232 | !! using instantaneous current ocean velocity (usually before) |
---|
| 233 | !! |
---|
| 234 | !! NB: - ice-ocean rotation angle no more allowed |
---|
| 235 | !! - here we make an approximation: taum is only computed every ice time step |
---|
| 236 | !! This avoids mutiple average to pass from T -> U,V grids and next from U,V grids |
---|
| 237 | !! to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton... |
---|
| 238 | !! |
---|
| 239 | !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes |
---|
| 240 | !! - taum : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes |
---|
| 241 | !!--------------------------------------------------------------------- |
---|
| 242 | INTEGER , INTENT(in) :: kt ! ocean time-step index |
---|
| 243 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pu_oce, pv_oce ! surface ocean currents |
---|
| 244 | ! |
---|
| 245 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 246 | REAL(wp) :: zat_u, zutau_ice, zu_t, zmodt ! local scalar |
---|
| 247 | REAL(wp) :: zat_v, zvtau_ice, zv_t, zrhoco ! - - |
---|
| 248 | !!--------------------------------------------------------------------- |
---|
| 249 | zrhoco = rau0 * rn_cio |
---|
| 250 | ! |
---|
| 251 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 252 | DO jj = 2, jpjm1 !* update the modulus of stress at ocean surface (T-point) |
---|
| 253 | DO ji = fs_2, fs_jpim1 |
---|
| 254 | ! ! 2*(U_ice-U_oce) at T-point |
---|
| 255 | zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj) |
---|
| 256 | zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) |
---|
| 257 | ! ! |U_ice-U_oce|^2 |
---|
| 258 | zmodt = 0.25_wp * ( zu_t * zu_t + zv_t * zv_t ) |
---|
| 259 | ! ! update the ocean stress modulus |
---|
| 260 | taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * zrhoco * zmodt |
---|
| 261 | tmod_io(ji,jj) = zrhoco * SQRT( zmodt ) ! rhoco * |U_ice-U_oce| at T-point |
---|
| 262 | END DO |
---|
| 263 | END DO |
---|
| 264 | CALL lbc_lnk_multi( taum, 'T', 1., tmod_io, 'T', 1. ) |
---|
| 265 | ! |
---|
| 266 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 267 | vtau_oce(:,:) = vtau(:,:) |
---|
| 268 | ! |
---|
| 269 | ENDIF |
---|
| 270 | ! |
---|
| 271 | ! !== every ocean time-step ==! |
---|
| 272 | ! |
---|
| 273 | DO jj = 2, jpjm1 !* update the stress WITHOUT a ice-ocean rotation angle |
---|
| 274 | DO ji = fs_2, fs_jpim1 ! Vect. Opt. |
---|
| 275 | zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp ! ice area at u and V-points |
---|
| 276 | zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp |
---|
| 277 | ! ! linearized quadratic drag formulation |
---|
| 278 | zutau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) ) |
---|
| 279 | zvtau_ice = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) ) |
---|
| 280 | ! ! stresses at the ocean surface |
---|
| 281 | utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice |
---|
| 282 | vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice |
---|
| 283 | END DO |
---|
| 284 | END DO |
---|
| 285 | CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. ) ! lateral boundary condition |
---|
| 286 | ! |
---|
| 287 | ! |
---|
| 288 | END SUBROUTINE ice_update_tau |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | SUBROUTINE ice_update_init |
---|
| 292 | !!------------------------------------------------------------------- |
---|
| 293 | !! *** ROUTINE ice_update_init *** |
---|
| 294 | !! |
---|
| 295 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
| 296 | !! the temporal evolution of key variables |
---|
| 297 | !! |
---|
| 298 | !! ** input : Namelist namicedia |
---|
| 299 | !!------------------------------------------------------------------- |
---|
| 300 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 301 | REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar |
---|
| 302 | !!------------------------------------------------------------------- |
---|
| 303 | ! |
---|
| 304 | IF(lwp) WRITE(numout,*) |
---|
| 305 | IF(lwp) WRITE(numout,*) 'ice_update_init : LIM-3 sea-ice - surface boundary condition' |
---|
| 306 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ ' |
---|
| 307 | |
---|
| 308 | ! ! allocate ice_update array |
---|
| 309 | IF( ice_update_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'ice_update_init : unable to allocate standard arrays' ) |
---|
| 310 | ! |
---|
| 311 | soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 312 | sice_0(:,:) = sice |
---|
| 313 | ! ! decrease ocean & ice reference salinities in the Baltic Sea area |
---|
| 314 | WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & |
---|
| 315 | & 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) |
---|
| 316 | soce_0(:,:) = 4._wp |
---|
| 317 | sice_0(:,:) = 2._wp |
---|
| 318 | END WHERE |
---|
| 319 | ! |
---|
| 320 | IF( .NOT. ln_rstart ) THEN |
---|
| 321 | ! |
---|
| 322 | snwice_mass (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) ! snow+ice mass |
---|
| 323 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 324 | ! |
---|
| 325 | IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area |
---|
| 326 | sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 327 | sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 328 | |
---|
| 329 | !!gm I really don't like this stuff here... Find a way to put that elsewhere or differently |
---|
| 330 | !!gm |
---|
| 331 | IF( .NOT.ln_linssh ) THEN |
---|
| 332 | DO jk = 1,jpkm1 ! adjust initial vertical scale factors |
---|
| 333 | e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) |
---|
| 334 | e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) |
---|
| 335 | END DO |
---|
| 336 | e3t_a(:,:,:) = e3t_b(:,:,:) |
---|
| 337 | ! Reconstruction of all vertical scale factors at now and before time-steps |
---|
| 338 | ! ========================================================================= |
---|
| 339 | ! Horizontal scale factor interpolations |
---|
| 340 | ! -------------------------------------- |
---|
| 341 | CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) |
---|
| 342 | CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) |
---|
| 343 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) |
---|
| 344 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) |
---|
| 345 | CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) |
---|
| 346 | ! Vertical scale factor interpolations |
---|
| 347 | ! ------------------------------------ |
---|
| 348 | CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W' ) |
---|
| 349 | CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) |
---|
| 350 | CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) |
---|
| 351 | CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) |
---|
| 352 | CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) |
---|
| 353 | ! t- and w- points depth |
---|
| 354 | ! ---------------------- |
---|
| 355 | !!gm not sure of that.... |
---|
| 356 | gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) |
---|
| 357 | gdepw_n(:,:,1) = 0.0_wp |
---|
| 358 | gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) |
---|
| 359 | DO jk = 2, jpk |
---|
| 360 | gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) |
---|
| 361 | gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) |
---|
| 362 | gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) |
---|
| 363 | END DO |
---|
| 364 | ENDIF |
---|
| 365 | ENDIF |
---|
| 366 | ENDIF ! .NOT. ln_rstart |
---|
| 367 | ! |
---|
| 368 | END SUBROUTINE ice_update_init |
---|
| 369 | |
---|
| 370 | #else |
---|
| 371 | !!---------------------------------------------------------------------- |
---|
| 372 | !! Default option : Dummy module NO LIM 3.0 sea-ice model |
---|
| 373 | !!---------------------------------------------------------------------- |
---|
| 374 | CONTAINS |
---|
| 375 | SUBROUTINE ice_update ! Dummy routine |
---|
| 376 | END SUBROUTINE ice_update |
---|
| 377 | #endif |
---|
| 378 | |
---|
| 379 | !!====================================================================== |
---|
| 380 | END MODULE iceupdate |
---|