[888] | 1 | MODULE limsbc_2 |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limsbc_2 *** |
---|
[2528] | 4 | !! LIM-2 : updates the fluxes at the ocean surface with ice-ocean fluxes |
---|
[888] | 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : LIM ! 2000-01 (H. Goosse) Original code |
---|
| 7 | !! 1.0 ! 2002-07 (C. Ethe, G. Madec) re-writing F90 |
---|
| 8 | !! 3.0 ! 2006-07 (G. Madec) surface module |
---|
| 9 | !! 3.3 ! 2009-05 (G. Garric, C. Bricaud) addition of the lim2_evp case |
---|
| 10 | !! - ! 2010-11 (G. Madec) ice-ocean stress computed at each ocean time-step |
---|
[3625] | 11 | !! 3.3.1 ! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation |
---|
| 12 | !! 3.5 ! 2012-11 ((G. Madec, Y. Aksenov, A. Coward) salt and heat fluxes associated with e-p |
---|
[888] | 13 | !!---------------------------------------------------------------------- |
---|
| 14 | #if defined key_lim2 |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | !! 'key_lim2' LIM 2.0 sea-ice model |
---|
| 17 | !!---------------------------------------------------------------------- |
---|
[2715] | 18 | !! lim_sbc_alloc_2 : allocate the limsbc arrays |
---|
| 19 | !! lim_sbc_init : initialisation |
---|
| 20 | !! lim_sbc_flx_2 : update mass, heat and salt fluxes at the ocean surface |
---|
| 21 | !! lim_sbc_tau_2 : update i- and j-stresses, and its modulus at the ocean surface |
---|
[888] | 22 | !!---------------------------------------------------------------------- |
---|
| 23 | USE par_oce ! ocean parameters |
---|
[2528] | 24 | USE phycst ! physical constants |
---|
[888] | 25 | USE dom_oce ! ocean domain |
---|
[2528] | 26 | USE dom_ice_2 ! LIM-2: ice domain |
---|
| 27 | USE ice_2 ! LIM-2: ice variables |
---|
| 28 | USE sbc_ice ! surface boundary condition: ice |
---|
| 29 | USE sbc_oce ! surface boundary condition: ocean |
---|
[3294] | 30 | USE sbccpl |
---|
[3625] | 31 | USE cpl_oasis3, ONLY : lk_cpl |
---|
| 32 | USE oce , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass |
---|
[2566] | 33 | USE albedo ! albedo parameters |
---|
[2528] | 34 | USE lbclnk ! ocean lateral boundary condition - MPP exchanges |
---|
[2715] | 35 | USE lib_mpp ! MPP library |
---|
[3294] | 36 | USE wrk_nemo ! work arrays |
---|
[888] | 37 | USE in_out_manager ! I/O manager |
---|
[1756] | 38 | USE diaar5, ONLY : lk_diaar5 |
---|
[2528] | 39 | USE iom ! I/O library |
---|
[888] | 40 | USE prtctl ! Print control |
---|
[3625] | 41 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[888] | 42 | |
---|
| 43 | IMPLICIT NONE |
---|
| 44 | PRIVATE |
---|
| 45 | |
---|
[2715] | 46 | PUBLIC lim_sbc_init_2 ! called by ice_init_2 |
---|
| 47 | PUBLIC lim_sbc_flx_2 ! called by sbc_ice_lim_2 |
---|
| 48 | PUBLIC lim_sbc_tau_2 ! called by sbc_ice_lim_2 |
---|
[3858] | 49 | PUBLIC lim_bio_meanqsr_2 ! called by sbc_ice_lim_2 |
---|
[888] | 50 | |
---|
[2528] | 51 | REAL(wp) :: r1_rdtice ! = 1. / rdt_ice |
---|
| 52 | REAL(wp) :: epsi16 = 1.e-16_wp ! constant values |
---|
| 53 | REAL(wp) :: rzero = 0._wp ! - - |
---|
| 54 | REAL(wp) :: rone = 1._wp ! - - |
---|
| 55 | ! |
---|
[2715] | 56 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: soce_0, sice_0 ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 57 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau_oce, vtau_oce ! air-ocean surface i- & j-stress [N/m2] |
---|
| 58 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmod_io ! modulus of the ice-ocean relative velocity [m/s] |
---|
[2528] | 59 | |
---|
[888] | 60 | !! * Substitutions |
---|
| 61 | # include "vectopt_loop_substitute.h90" |
---|
| 62 | !!---------------------------------------------------------------------- |
---|
[2715] | 63 | !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) |
---|
[1156] | 64 | !! $Id$ |
---|
[2528] | 65 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[888] | 66 | !!---------------------------------------------------------------------- |
---|
| 67 | CONTAINS |
---|
| 68 | |
---|
[2715] | 69 | INTEGER FUNCTION lim_sbc_alloc_2() |
---|
| 70 | !!------------------------------------------------------------------- |
---|
| 71 | !! *** ROUTINE lim_sbc_alloc_2 *** |
---|
| 72 | !!------------------------------------------------------------------- |
---|
| 73 | ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) , & |
---|
| 74 | & sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc_2) |
---|
| 75 | ! |
---|
| 76 | IF( lk_mpp ) CALL mpp_sum( lim_sbc_alloc_2 ) |
---|
| 77 | IF( lim_sbc_alloc_2 /= 0 ) CALL ctl_warn('lim_sbc_alloc_2: failed to allocate arrays.') |
---|
| 78 | ! |
---|
| 79 | END FUNCTION lim_sbc_alloc_2 |
---|
| 80 | |
---|
| 81 | |
---|
[2528] | 82 | SUBROUTINE lim_sbc_flx_2( kt ) |
---|
[888] | 83 | !!------------------------------------------------------------------- |
---|
| 84 | !! *** ROUTINE lim_sbc_2 *** |
---|
| 85 | !! |
---|
[2566] | 86 | !! ** Purpose : Update surface ocean boundary condition over areas |
---|
| 87 | !! that are at least partially covered by sea-ice |
---|
[888] | 88 | !! |
---|
| 89 | !! ** Action : - comput. of the momentum, heat and freshwater/salt |
---|
[2566] | 90 | !! fluxes at the ice-ocean interface. |
---|
| 91 | !! - Update the fluxes provided to the ocean |
---|
[888] | 92 | !! |
---|
[3625] | 93 | !! ** Outputs : - qsr : sea heat flux : solar |
---|
| 94 | !! - qns : sea heat flux : non solar (including heat content of the mass flux) |
---|
| 95 | !! - emp : freshwater budget: mass flux |
---|
| 96 | !! - sfx : freshwater budget: salt flux due to Freezing/Melting |
---|
[1037] | 97 | !! - utau : sea surface i-stress (ocean referential) |
---|
| 98 | !! - vtau : sea surface j-stress (ocean referential) |
---|
| 99 | !! - fr_i : ice fraction |
---|
| 100 | !! - tn_ice : sea-ice surface temperature |
---|
| 101 | !! - alb_ice : sea-ice alberdo (lk_cpl=T) |
---|
[888] | 102 | !! |
---|
| 103 | !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90. |
---|
| 104 | !! Tartinville et al. 2001 Ocean Modelling, 3, 95-108. |
---|
| 105 | !!--------------------------------------------------------------------- |
---|
[2528] | 106 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
[888] | 107 | !! |
---|
[2528] | 108 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 109 | INTEGER :: ii0, ii1, ij0, ij1 ! local integers |
---|
| 110 | INTEGER :: ifvt, i1mfr, idfr, iflt ! - - |
---|
| 111 | INTEGER :: ial, iadv, ifral, ifrdv ! - - |
---|
[3625] | 112 | REAL(wp) :: zqsr, zqns, zfmm ! local scalars |
---|
| 113 | REAL(wp) :: zinda, zfsalt, zemp ! - - |
---|
| 114 | REAL(wp) :: zemp_snw, zqhc, zcd ! - - |
---|
| 115 | REAL(wp) :: zswitch ! - - |
---|
[3294] | 116 | REAL(wp), POINTER, DIMENSION(:,:) :: zqnsoce ! 2D workspace |
---|
[2715] | 117 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zalb, zalbp ! 2D/3D workspace |
---|
[888] | 118 | !!--------------------------------------------------------------------- |
---|
| 119 | |
---|
[3294] | 120 | CALL wrk_alloc( jpi, jpj, zqnsoce ) |
---|
| 121 | CALL wrk_alloc( jpi, jpj, 1, zalb, zalbp ) |
---|
[888] | 122 | |
---|
[3625] | 123 | SELECT CASE( nn_ice_embd ) ! levitating or embedded sea-ice option |
---|
| 124 | CASE( 0 ) ; zswitch = 1 ! (0) standard levitating sea-ice : salt exchange only |
---|
| 125 | CASE( 1, 2 ) ; zswitch = 0 ! (1) levitating sea-ice: salt and volume exchange but no pressure effect |
---|
| 126 | ! (2) embedded sea-ice : salt and volume fluxes and pressure |
---|
| 127 | END SELECT ! |
---|
| 128 | |
---|
[888] | 129 | !------------------------------------------! |
---|
| 130 | ! heat flux at the ocean surface ! |
---|
| 131 | !------------------------------------------! |
---|
| 132 | |
---|
[1482] | 133 | zqnsoce(:,:) = qns(:,:) |
---|
[888] | 134 | DO jj = 1, jpj |
---|
| 135 | DO ji = 1, jpi |
---|
| 136 | zinda = 1.0 - MAX( rzero , SIGN( rone, - ( 1.0 - pfrld(ji,jj) ) ) ) |
---|
| 137 | ifvt = zinda * MAX( rzero , SIGN( rone, - phicif(ji,jj) ) ) |
---|
| 138 | i1mfr = 1.0 - MAX( rzero , SIGN( rone, - ( 1.0 - frld(ji,jj) ) ) ) |
---|
| 139 | idfr = 1.0 - MAX( rzero , SIGN( rone, frld(ji,jj) - pfrld(ji,jj) ) ) |
---|
| 140 | iflt = zinda * (1 - i1mfr) * (1 - ifvt ) |
---|
| 141 | ial = ifvt * i1mfr + ( 1 - ifvt ) * idfr |
---|
| 142 | iadv = ( 1 - i1mfr ) * zinda |
---|
| 143 | ifral = ( 1 - i1mfr * ( 1 - ial ) ) |
---|
| 144 | ifrdv = ( 1 - ifral * ( 1 - ial ) ) * iadv |
---|
[1218] | 145 | |
---|
[3625] | 146 | !!$ attempt to explain the tricky flags set above.... |
---|
| 147 | !!$ zinda = 1.0 - AINT( pfrld(ji,jj) ) ! = 0. if ice-free ocean else 1. (after ice adv, but before ice thermo) |
---|
| 148 | !!$ i1mfr = 1.0 - AINT( frld(ji,jj) ) ! = 0. if ice-free ocean else 1. (after ice thermo) |
---|
[1218] | 149 | !!$ |
---|
[3625] | 150 | !!$ IF( phicif(ji,jj) <= 0. ) THEN ; ifvt = zinda ! = zinda if previous thermodynamic step overmelted the ice??? |
---|
| 151 | !!$ ELSE ; ifvt = 0. ! |
---|
[1218] | 152 | !!$ ENDIF |
---|
| 153 | !!$ |
---|
[3625] | 154 | !!$ IF( frld(ji,jj) >= pfrld(ji,jj) ) THEN ; idfr = 0. ! = 0. if lead fraction increases due to ice thermodynamics |
---|
[1218] | 155 | !!$ ELSE ; idfr = 1. |
---|
| 156 | !!$ ENDIF |
---|
| 157 | !!$ |
---|
[3625] | 158 | !!$ iflt = zinda * (1 - i1mfr) * (1 - ifvt ) ! = 1. if ice (not only snow) at previous time and ice-free ocean currently |
---|
[1218] | 159 | !!$ |
---|
| 160 | !!$ ial = ifvt * i1mfr + ( 1 - ifvt ) * idfr |
---|
[3625] | 161 | !!$ = i1mfr if ifvt = 1 i.e. |
---|
| 162 | !!$ = idfr if ifvt = 0 |
---|
[1218] | 163 | !!$! snow no ice ice ice or nothing lead fraction increases |
---|
| 164 | !!$! at previous now at previous |
---|
[3625] | 165 | !!$! -> ice area increases ??? -> ice area decreases ??? |
---|
[1218] | 166 | !!$ |
---|
[2715] | 167 | !!$ iadv = ( 1 - i1mfr ) * zinda |
---|
[1218] | 168 | !!$! pure ocean ice at |
---|
| 169 | !!$! at current previous |
---|
| 170 | !!$! -> = 1. if ice disapear between previous and current |
---|
| 171 | !!$ |
---|
| 172 | !!$ ifral = ( 1 - i1mfr * ( 1 - ial ) ) |
---|
| 173 | !!$! ice at ??? |
---|
| 174 | !!$! current |
---|
| 175 | !!$! -> ??? |
---|
| 176 | !!$ |
---|
[2715] | 177 | !!$ ifrdv = ( 1 - ifral * ( 1 - ial ) ) * iadv |
---|
| 178 | !!$! ice disapear |
---|
[1218] | 179 | !!$ |
---|
[2715] | 180 | !!$ |
---|
[1218] | 181 | |
---|
[888] | 182 | ! computation the solar flux at ocean surface |
---|
[1218] | 183 | #if defined key_coupled |
---|
[1463] | 184 | zqsr = qsr_tot(ji,jj) + ( fstric(ji,jj) - qsr_ice(ji,jj,1) ) * ( 1.0 - pfrld(ji,jj) ) |
---|
[1218] | 185 | #else |
---|
| 186 | zqsr = pfrld(ji,jj) * qsr(ji,jj) + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj) |
---|
| 187 | #endif |
---|
[888] | 188 | ! computation the non solar heat flux at ocean surface |
---|
[3625] | 189 | zqns = - ( 1. - thcm(ji,jj) ) * zqsr & ! part of the solar energy used in leads |
---|
| 190 | & + iflt * ( fscmbq(ji,jj) + ffltbif(ji,jj) ) & |
---|
| 191 | & + ifral * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) * r1_rdtice & |
---|
| 192 | & + ifrdv * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) * r1_rdtice |
---|
[888] | 193 | |
---|
[3625] | 194 | fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj) ! store residual heat flux (to put into the ocean at the next time-step) |
---|
| 195 | zqhc = ( rdq_snw(ji,jj) & |
---|
| 196 | & + rdq_ice(ji,jj) * ( 1.- zswitch) ) * r1_rdtice ! heat flux due to snow ( & ice heat content, |
---|
| 197 | ! ! if ice/ocean mass exchange active) |
---|
[888] | 198 | qsr (ji,jj) = zqsr ! solar heat flux |
---|
[3625] | 199 | qns (ji,jj) = zqns - fdtcn(ji,jj) + zqhc ! non solar heat flux |
---|
[2528] | 200 | ! |
---|
[3625] | 201 | ! !------------------------------------------! |
---|
| 202 | ! ! mass and salt flux at the ocean surface ! |
---|
| 203 | ! !------------------------------------------! |
---|
| 204 | ! |
---|
| 205 | ! mass flux at the ocean-atmosphere interface (open ocean fraction = leads area) |
---|
[1218] | 206 | #if defined key_coupled |
---|
[3625] | 207 | ! ! coupled mode: |
---|
| 208 | zemp = + emp_tot(ji,jj) & ! net mass flux over the grid cell (ice+ocean area) |
---|
| 209 | & - emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) ) ! minus the mass flux intercepted by sea-ice |
---|
[1218] | 210 | #else |
---|
[3625] | 211 | ! ! forced mode: |
---|
| 212 | zemp = + emp(ji,jj) * frld(ji,jj) & ! mass flux over open ocean fraction |
---|
| 213 | & - tprecip(ji,jj) * ( 1. - frld(ji,jj) ) & ! liquid precip. over ice reaches directly the ocean |
---|
| 214 | & + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) ) ! snow is intercepted by sea-ice (previous frld) |
---|
[1218] | 215 | #endif |
---|
[2528] | 216 | ! |
---|
[3625] | 217 | ! mass flux at the ocean/ice interface (sea ice fraction) |
---|
| 218 | zemp_snw = rdm_snw(ji,jj) * r1_rdtice ! snow melting = pure water that enters the ocean |
---|
| 219 | zfmm = rdm_ice(ji,jj) * r1_rdtice ! Freezing minus Melting (F-M) |
---|
| 220 | |
---|
[4276] | 221 | fmmflx(ji,jj) = zfmm ! F/M mass flux save at least for biogeochemical model |
---|
| 222 | |
---|
[3625] | 223 | ! salt flux at the ice/ocean interface (sea ice fraction) [PSU*kg/m2/s] |
---|
| 224 | zfsalt = - sice_0(ji,jj) * zfmm ! F-M salt exchange |
---|
| 225 | zcd = soce_0(ji,jj) * zfmm ! concentration/dilution term due to F-M |
---|
[2528] | 226 | ! |
---|
[3625] | 227 | ! salt flux only : add concentration dilution term in salt flux and no F-M term in volume flux |
---|
| 228 | ! salt and mass fluxes : non concentration dilution term in salt flux and add F-M term in volume flux |
---|
| 229 | sfx (ji,jj) = zfsalt + zswitch * zcd ! salt flux (+ C/D if no ice/ocean mass exchange) |
---|
| 230 | emp (ji,jj) = zemp + zemp_snw + ( 1.- zswitch) * zfmm ! mass flux (+ F/M mass flux if ice/ocean mass exchange) |
---|
[2528] | 231 | ! |
---|
[888] | 232 | END DO |
---|
| 233 | END DO |
---|
[3625] | 234 | ! !------------------------------------------! |
---|
| 235 | ! ! mass of snow and ice per unit area ! |
---|
| 236 | ! !------------------------------------------! |
---|
| 237 | IF( nn_ice_embd /= 0 ) THEN ! embedded sea-ice (mass required) |
---|
| 238 | snwice_mass_b(:,:) = snwice_mass(:,:) ! save mass from the previous ice time step |
---|
| 239 | ! ! new mass per unit area |
---|
| 240 | snwice_mass (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:) ) * ( 1.0 - frld(:,:) ) |
---|
| 241 | ! ! time evolution of snow+ice mass |
---|
| 242 | snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / rdt_ice |
---|
| 243 | ENDIF |
---|
[888] | 244 | |
---|
[3625] | 245 | CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) ) |
---|
| 246 | CALL iom_put( 'qns_io_cea', qns(:,:) - zqnsoce(:,:) * pfrld(:,:) ) |
---|
| 247 | CALL iom_put( 'qsr_io_cea', fstric(:,:) * (1.e0 - pfrld(:,:)) ) |
---|
| 248 | |
---|
[2528] | 249 | IF( lk_diaar5 ) THEN ! AR5 diagnostics |
---|
[3625] | 250 | CALL iom_put( 'isnwmlt_cea' , rdm_snw(:,:) * r1_rdtice ) |
---|
| 251 | CALL iom_put( 'fsal_virt_cea', soce_0(:,:) * rdm_ice(:,:) * r1_rdtice ) |
---|
| 252 | CALL iom_put( 'fsal_real_cea', - sice_0(:,:) * rdm_ice(:,:) * r1_rdtice ) |
---|
[1756] | 253 | ENDIF |
---|
| 254 | |
---|
[888] | 255 | !-----------------------------------------------! |
---|
[1482] | 256 | ! Coupling variables ! |
---|
[888] | 257 | !-----------------------------------------------! |
---|
| 258 | |
---|
[3294] | 259 | #if defined key_coupled |
---|
| 260 | tn_ice(:,:,1) = sist(:,:) ! sea-ice surface temperature |
---|
| 261 | ht_i(:,:,1) = hicif(:,:) |
---|
| 262 | ht_s(:,:,1) = hsnif(:,:) |
---|
| 263 | a_i(:,:,1) = fr_i(:,:) |
---|
| 264 | ! ! Computation of snow/ice and ocean albedo |
---|
| 265 | CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb ) |
---|
| 266 | alb_ice(:,:,1) = 0.5 * ( zalbp(:,:,1) + zalb (:,:,1) ) ! Ice albedo (mean clear and overcast skys) |
---|
| 267 | CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) ) ! ice albedo |
---|
| 268 | #endif |
---|
[888] | 269 | |
---|
[2528] | 270 | IF(ln_ctl) THEN ! control print |
---|
[888] | 271 | CALL prt_ctl(tab2d_1=qsr , clinfo1=' lim_sbc: qsr : ', tab2d_2=qns , clinfo2=' qns : ') |
---|
[3625] | 272 | CALL prt_ctl(tab2d_1=emp , clinfo1=' lim_sbc: emp : ', tab2d_2=sfx , clinfo2=' sfx : ') |
---|
[888] | 273 | CALL prt_ctl(tab2d_1=utau , clinfo1=' lim_sbc: utau : ', mask1=umask, & |
---|
| 274 | & tab2d_2=vtau , clinfo2=' vtau : ' , mask2=vmask ) |
---|
[1463] | 275 | CALL prt_ctl(tab2d_1=fr_i , clinfo1=' lim_sbc: fr_i : ', tab2d_2=tn_ice(:,:,1), clinfo2=' tn_ice : ') |
---|
[888] | 276 | ENDIF |
---|
[2528] | 277 | ! |
---|
[3294] | 278 | CALL wrk_dealloc( jpi, jpj, zqnsoce ) |
---|
| 279 | CALL wrk_dealloc( jpi, jpj, 1, zalb, zalbp ) |
---|
[2715] | 280 | ! |
---|
[2528] | 281 | END SUBROUTINE lim_sbc_flx_2 |
---|
[888] | 282 | |
---|
[2528] | 283 | |
---|
| 284 | SUBROUTINE lim_sbc_tau_2( kt , pu_oce, pv_oce ) |
---|
| 285 | !!------------------------------------------------------------------- |
---|
[2566] | 286 | !! *** ROUTINE lim_sbc_tau_2 *** |
---|
[2528] | 287 | !! |
---|
| 288 | !! ** Purpose : Update the ocean surface stresses due to the ice |
---|
| 289 | !! |
---|
| 290 | !! ** Action : * at each ice time step (every nn_fsbc time step): |
---|
| 291 | !! - compute the modulus of ice-ocean relative velocity |
---|
| 292 | !! at T-point (C-grid) or I-point (B-grid) |
---|
| 293 | !! tmod_io = rhoco * | U_ice-U_oce | |
---|
| 294 | !! - update the modulus of stress at ocean surface |
---|
| 295 | !! taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce | |
---|
| 296 | !! * at each ocean time step (each kt): |
---|
| 297 | !! compute linearized ice-ocean stresses as |
---|
| 298 | !! Utau = tmod_io * | U_ice - pU_oce | |
---|
| 299 | !! using instantaneous current ocean velocity (usually before) |
---|
| 300 | !! |
---|
| 301 | !! NB: - the averaging operator used depends on the ice dynamics grid (cp_ice_msh='I' or 'C') |
---|
| 302 | !! - ice-ocean rotation angle only allowed in cp_ice_msh='I' case |
---|
| 303 | !! - here we make an approximation: taum is only computed every ice time step |
---|
| 304 | !! This avoids mutiple average to pass from T -> U,V grids and next from U,V grids |
---|
[2566] | 305 | !! to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximation... |
---|
[2528] | 306 | !! |
---|
[2566] | 307 | !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes |
---|
| 308 | !! - taum : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes |
---|
[2528] | 309 | !!--------------------------------------------------------------------- |
---|
| 310 | INTEGER , INTENT(in) :: kt ! ocean time-step index |
---|
| 311 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pu_oce, pv_oce ! surface ocean currents |
---|
| 312 | !! |
---|
| 313 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 314 | REAL(wp) :: zfrldu, zat_u, zu_i, zutau_ice, zu_t, zmodt ! local scalar |
---|
| 315 | REAL(wp) :: zfrldv, zat_v, zv_i, zvtau_ice, zv_t, zmodi ! - - |
---|
[2566] | 316 | REAL(wp) :: zsang, zumt ! - - |
---|
[3294] | 317 | REAL(wp), POINTER, DIMENSION(:,:) :: ztio_u, ztio_v ! ocean stress below sea-ice |
---|
[2528] | 318 | !!--------------------------------------------------------------------- |
---|
| 319 | ! |
---|
[3294] | 320 | CALL wrk_alloc( jpi, jpj, ztio_u, ztio_v ) |
---|
[2528] | 321 | ! |
---|
| 322 | SELECT CASE( cp_ice_msh ) |
---|
| 323 | ! !-----------------------! |
---|
| 324 | CASE( 'I' ) ! B-grid ice dynamics ! I-point (i.e. F-point with sea-ice indexation) |
---|
| 325 | ! !--=--------------------! |
---|
| 326 | ! |
---|
| 327 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 328 | !CDIR NOVERRCHK |
---|
| 329 | DO jj = 1, jpj !* modulus of ice-ocean relative velocity at I-point |
---|
| 330 | !CDIR NOVERRCHK |
---|
| 331 | DO ji = 1, jpi |
---|
| 332 | zu_i = u_ice(ji,jj) - u_oce(ji,jj) ! ice-ocean relative velocity at I-point |
---|
| 333 | zv_i = v_ice(ji,jj) - v_oce(ji,jj) |
---|
| 334 | tmod_io(ji,jj) = SQRT( zu_i * zu_i + zv_i * zv_i ) ! modulus of this velocity (at I-point) |
---|
| 335 | END DO |
---|
| 336 | END DO |
---|
| 337 | !CDIR NOVERRCHK |
---|
| 338 | DO jj = 1, jpjm1 !* update the modulus of stress at ocean surface (T-point) |
---|
| 339 | !CDIR NOVERRCHK |
---|
| 340 | DO ji = 1, jpim1 ! NO vector opt. |
---|
| 341 | ! ! modulus of U_ice-U_oce at T-point |
---|
[2566] | 342 | zumt = 0.25_wp * ( tmod_io(ji+1,jj) + tmod_io(ji ,jj ) & |
---|
[2528] | 343 | & + tmod_io(ji,jj+1) + tmod_io(ji+1,jj+1) ) |
---|
| 344 | ! ! update the modulus of stress at ocean surface |
---|
| 345 | taum(ji,jj) = frld(ji,jj) * taum(ji,jj) + ( 1._wp - frld(ji,jj) ) * rhoco * zumt * zumt |
---|
| 346 | END DO |
---|
| 347 | END DO |
---|
| 348 | CALL lbc_lnk( taum, 'T', 1. ) |
---|
| 349 | ! |
---|
| 350 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 351 | vtau_oce(:,:) = vtau(:,:) |
---|
| 352 | ! |
---|
| 353 | ENDIF |
---|
| 354 | ! |
---|
| 355 | ! !== at each ocean time-step ==! |
---|
| 356 | ! |
---|
| 357 | ! !* ice/ocean stress WITH a ice-ocean rotation angle at I-point |
---|
| 358 | DO jj = 2, jpj |
---|
| 359 | zsang = SIGN( 1._wp, gphif(1,jj) ) * sangvg ! change the cosine angle sign in the SH |
---|
| 360 | DO ji = 2, jpi ! NO vect. opt. possible |
---|
| 361 | ! ... ice-ocean relative velocity at I-point using instantaneous surface ocean current at u- & v-pts |
---|
| 362 | zu_i = u_ice(ji,jj) - 0.5_wp * ( pu_oce(ji-1,jj ) + pu_oce(ji-1,jj-1) ) * tmu(ji,jj) |
---|
| 363 | zv_i = v_ice(ji,jj) - 0.5_wp * ( pv_oce(ji ,jj-1) + pv_oce(ji-1,jj-1) ) * tmu(ji,jj) |
---|
| 364 | ! ... components of stress with a ice-ocean rotation angle |
---|
| 365 | zmodi = rhoco * tmod_io(ji,jj) |
---|
| 366 | ztio_u(ji,jj) = zmodi * ( cangvg * zu_i - zsang * zv_i ) |
---|
| 367 | ztio_v(ji,jj) = zmodi * ( cangvg * zv_i + zsang * zu_i ) |
---|
| 368 | END DO |
---|
| 369 | END DO |
---|
| 370 | ! !* surface ocean stresses at u- and v-points |
---|
| 371 | DO jj = 2, jpjm1 |
---|
| 372 | DO ji = 2, jpim1 ! NO vector opt. |
---|
| 373 | ! ! ice-ocean stress at U and V-points (from I-point values) |
---|
| 374 | zutau_ice = 0.5_wp * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) ) |
---|
| 375 | zvtau_ice = 0.5_wp * ( ztio_v(ji,jj+1) + ztio_v(ji+1,jj+1) ) |
---|
| 376 | ! ! open-ocean (lead) fraction at U- & V-points (from T-point values) |
---|
[2566] | 377 | zfrldu = 0.5_wp * ( frld(ji,jj) + frld(ji+1,jj) ) |
---|
| 378 | zfrldv = 0.5_wp * ( frld(ji,jj) + frld(ji,jj+1) ) |
---|
[2528] | 379 | ! ! update the surface ocean stress (ice-cover wheighted) |
---|
| 380 | utau(ji,jj) = zfrldu * utau_oce(ji,jj) + ( 1._wp - zfrldu ) * zutau_ice |
---|
| 381 | vtau(ji,jj) = zfrldv * vtau_oce(ji,jj) + ( 1._wp - zfrldv ) * zvtau_ice |
---|
| 382 | END DO |
---|
| 383 | END DO |
---|
| 384 | CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition |
---|
| 385 | ! |
---|
| 386 | ! |
---|
| 387 | ! !-----------------------! |
---|
| 388 | CASE( 'C' ) ! C-grid ice dynamics ! U & V-points (same as in the ocean) |
---|
| 389 | ! !--=--------------------! |
---|
| 390 | ! |
---|
| 391 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) |
---|
| 392 | !CDIR NOVERRCHK |
---|
| 393 | DO jj = 2, jpjm1 !* modulus of the ice-ocean velocity at T-point |
---|
| 394 | !CDIR NOVERRCHK |
---|
| 395 | DO ji = fs_2, fs_jpim1 |
---|
| 396 | zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj) ! 2*(U_ice-U_oce) at T-point |
---|
| 397 | zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) |
---|
| 398 | zmodt = 0.25_wp * ( zu_t * zu_t + zv_t * zv_t ) ! |U_ice-U_oce|^2 |
---|
| 399 | ! ! update the modulus of stress at ocean surface |
---|
| 400 | taum (ji,jj) = frld(ji,jj) * taum(ji,jj) + ( 1._wp - frld(ji,jj) ) * rhoco * zmodt |
---|
| 401 | tmod_io(ji,jj) = SQRT( zmodt ) * rhoco ! rhoco*|Uice-Uoce| |
---|
| 402 | END DO |
---|
| 403 | END DO |
---|
| 404 | CALL lbc_lnk( taum, 'T', 1. ) ; CALL lbc_lnk( tmod_io, 'T', 1. ) |
---|
| 405 | ! |
---|
| 406 | utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step |
---|
| 407 | vtau_oce(:,:) = vtau(:,:) |
---|
| 408 | ! |
---|
| 409 | ENDIF |
---|
| 410 | ! |
---|
| 411 | ! !== at each ocean time-step ==! |
---|
| 412 | ! |
---|
| 413 | DO jj = 2, jpjm1 !* ice stress over ocean WITHOUT a ice-ocean rotation angle |
---|
| 414 | DO ji = fs_2, fs_jpim1 |
---|
| 415 | ! ! ocean area at u- & v-points |
---|
[2566] | 416 | zfrldu = 0.5_wp * ( frld(ji,jj) + frld(ji+1,jj) ) |
---|
| 417 | zfrldv = 0.5_wp * ( frld(ji,jj) + frld(ji,jj+1) ) |
---|
[2528] | 418 | ! ! quadratic drag formulation without rotation |
---|
| 419 | ! ! using instantaneous surface ocean current |
---|
| 420 | zutau_ice = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) ) |
---|
| 421 | zvtau_ice = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) ) |
---|
| 422 | ! ! update the surface ocean stress (ice-cover wheighted) |
---|
| 423 | utau(ji,jj) = zfrldu * utau_oce(ji,jj) + ( 1._wp - zfrldu ) * zutau_ice |
---|
| 424 | vtau(ji,jj) = zfrldv * vtau_oce(ji,jj) + ( 1._wp - zfrldv ) * zvtau_ice |
---|
| 425 | END DO |
---|
| 426 | END DO |
---|
| 427 | CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition |
---|
| 428 | ! |
---|
| 429 | END SELECT |
---|
| 430 | |
---|
| 431 | IF(ln_ctl) CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau : ', mask1=umask, & |
---|
| 432 | & tab2d_2=vtau, clinfo2=' vtau : ' , mask2=vmask ) |
---|
| 433 | ! |
---|
[3294] | 434 | CALL wrk_dealloc( jpi, jpj, ztio_u, ztio_v ) |
---|
[2715] | 435 | ! |
---|
[2528] | 436 | END SUBROUTINE lim_sbc_tau_2 |
---|
| 437 | |
---|
[3858] | 438 | SUBROUTINE lim_bio_meanqsr_2 |
---|
| 439 | !!--------------------------------------------------------------------- |
---|
| 440 | !! *** ROUTINE lim_bio_meanqsr |
---|
| 441 | !! |
---|
| 442 | !! ** Purpose : provide daily qsr_mean for PISCES when |
---|
| 443 | !! analytic diurnal cycle is applied in physic |
---|
| 444 | !! |
---|
| 445 | !! ** Method : add part under ice |
---|
| 446 | !! |
---|
| 447 | !!--------------------------------------------------------------------- |
---|
[2715] | 448 | |
---|
[4024] | 449 | qsr_mean(:,:) = pfrld(:,:) * qsr_mean(:,:) + ( 1. - pfrld(:,:) ) * fstric_daymean(:,:) |
---|
[3858] | 450 | |
---|
| 451 | END SUBROUTINE lim_bio_meanqsr_2 |
---|
| 452 | |
---|
[2715] | 453 | SUBROUTINE lim_sbc_init_2 |
---|
| 454 | !!------------------------------------------------------------------- |
---|
| 455 | !! *** ROUTINE lim_sbc_init *** |
---|
| 456 | !! |
---|
| 457 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
| 458 | !! the temporal evolution of key variables |
---|
| 459 | !! |
---|
| 460 | !! ** input : Namelist namicedia |
---|
| 461 | !!------------------------------------------------------------------- |
---|
| 462 | ! |
---|
| 463 | IF(lwp) WRITE(numout,*) |
---|
| 464 | IF(lwp) WRITE(numout,*) 'lim_sbc_init_2 : LIM-2 sea-ice - surface boundary condition' |
---|
| 465 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~ ' |
---|
| 466 | |
---|
| 467 | ! ! allocate lim_sbc arrays |
---|
| 468 | IF( lim_sbc_alloc_2() /= 0 ) CALL ctl_stop( 'STOP', 'lim_sbc_flx_2 : unable to allocate arrays' ) |
---|
| 469 | ! |
---|
| 470 | r1_rdtice = 1._wp / rdt_ice |
---|
| 471 | ! |
---|
| 472 | soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case |
---|
| 473 | sice_0(:,:) = sice |
---|
| 474 | ! |
---|
| 475 | IF( cp_cfg == "orca" ) THEN ! decrease ocean & ice reference salinities in the Baltic sea |
---|
| 476 | WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & |
---|
| 477 | & 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) |
---|
| 478 | soce_0(:,:) = 4._wp |
---|
| 479 | sice_0(:,:) = 2._wp |
---|
| 480 | END WHERE |
---|
| 481 | ENDIF |
---|
[3625] | 482 | ! ! embedded sea ice |
---|
| 483 | IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass |
---|
| 484 | snwice_mass (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:) ) * ( 1.0 - frld(:,:) ) |
---|
| 485 | snwice_mass_b(:,:) = snwice_mass(:,:) |
---|
| 486 | ELSE |
---|
| 487 | snwice_mass (:,:) = 0.e0 ! no mass exchanges |
---|
| 488 | snwice_mass_b(:,:) = 0.e0 ! no mass exchanges |
---|
| 489 | ENDIF |
---|
| 490 | IF( nn_ice_embd == 2 .AND. & ! full embedment (case 2) & no restart : |
---|
| 491 | & .NOT.ln_rstart ) THEN ! deplete the initial ssh below sea-ice area |
---|
| 492 | sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 493 | sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 |
---|
| 494 | ENDIF |
---|
[2715] | 495 | ! |
---|
| 496 | END SUBROUTINE lim_sbc_init_2 |
---|
| 497 | |
---|
[888] | 498 | #else |
---|
| 499 | !!---------------------------------------------------------------------- |
---|
[2528] | 500 | !! Default option Empty module NO LIM 2.0 sea-ice model |
---|
[888] | 501 | !!---------------------------------------------------------------------- |
---|
| 502 | #endif |
---|
| 503 | |
---|
| 504 | !!====================================================================== |
---|
| 505 | END MODULE limsbc_2 |
---|