Changeset 5600 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
 Timestamp:
 20150715T17:46:12+02:00 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
 Property svn:keywords set to Id
r5034 r5600 26 26 USE dom_ice_2 ! seaice domain 27 27 #elif defined key_lim3 28 USE par_ice29 28 USE ice ! LIM_3 ice variables 30 29 USE dom_ice ! seaice domain 30 USE limvar 31 31 #endif 32 32 USE par_oce ! ocean parameters … … 42 42 PRIVATE 43 43 44 PUBLIC bdy_ice_lim ! routine called in sbcmod44 PUBLIC bdy_ice_lim ! routine called in sbcmod 45 45 PUBLIC bdy_ice_lim_dyn ! routine called in limrhg 46 46 47 47 !! 48 48 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 49 !! $Id : bdyice.F90 2715 20110330 15:58:35Z rblod$49 !! $Id$ 50 50 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 51 51 !! … … 60 60 !! 61 61 INTEGER, INTENT( in ) :: kt ! Main time step counter 62 !!63 62 INTEGER :: ib_bdy ! Loop index 63 64 #if defined key_lim3 65 CALL lim_var_glo2eqv 66 #endif 67 64 68 DO ib_bdy=1, nb_bdy 65 69 … … 72 76 CALL ctl_stop( 'bdy_ice_lim : unrecognised option for open boundaries for ice fields' ) 73 77 END SELECT 74 ENDDO 78 79 END DO 80 81 #if defined key_lim3 82 CALL lim_var_zapsmall 83 CALL lim_var_agg(1) 84 #endif 75 85 76 86 END SUBROUTINE bdy_ice_lim … … 89 99 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 90 100 INTEGER, INTENT(in) :: kt ! main timestep counter 91 INTEGER, INTENT(in) :: ib_bdy ! BDY set index !!101 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 92 102 93 103 INTEGER :: jpbound ! 0 = incoming ice … … 169 179 jpbound = 0; ii = ji; ij = jj; 170 180 171 IF ( u_ice(ji+1,jj ) < 0. .AND. umask(ji1,jj ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 172 IF ( u_ice(ji1,jj ) > 0. .AND. umask(ji+1,jj ,1) == 0. ) jpbound = 1; ii = ji1; ij = jj 173 IF ( v_ice(ji ,jj+1) < 0. .AND. vmask(ji ,jj1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj+1 174 IF ( v_ice(ji ,jj1) > 0. .AND. vmask(ji ,jj+1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj1 175 176 rswitch = 1.0  MAX( 0.0_wp , SIGN ( 1.0_wp ,  at_i(ii,ij) + 0.01 ) ) ! 0 if no ice 181 IF( u_ice(ji+1,jj ) < 0. .AND. umask(ji1,jj ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 182 IF( u_ice(ji1,jj ) > 0. .AND. umask(ji+1,jj ,1) == 0. ) jpbound = 1; ii = ji1; ij = jj 183 IF( v_ice(ji ,jj+1) < 0. .AND. vmask(ji ,jj1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj+1 184 IF( v_ice(ji ,jj1) > 0. .AND. vmask(ji ,jj+1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj1 185 186 IF( nn_ice_lim_dta(ib_bdy) == 0 ) jpbound = 0; ii = ji; ij = jj ! case ice boundaries = initial conditions 187 ! do not make state variables dependent on velocity 188 189 190 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ii,ij)  0.01 ) ) ! 0 if no ice 177 191 178 192 ! concentration and thickness … … 190 204 191 205 ! Ice salinity, age, temperature 192 sm_i(ji,jj,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0  rswitch ) * s_i_min193 o _i(ji,jj,jl) = rswitch * rn_ice_age(ib_bdy) + ( 1.0  rswitch)206 sm_i(ji,jj,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0  rswitch ) * rn_simin 207 oa_i(ji,jj,jl) = rswitch * rn_ice_age(ib_bdy) * a_i(ji,jj,jl) 194 208 t_su(ji,jj,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0  rswitch ) * rn_ice_tem(ib_bdy) 195 209 DO jk = 1, nlay_s 196 t_s(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0  rswitch ) * rt t210 t_s(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0  rswitch ) * rt0 197 211 END DO 198 212 DO jk = 1, nlay_i 199 t_i(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0  rswitch ) * rt t200 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0  rswitch ) * s_i_min213 t_i(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0  rswitch ) * rt0 214 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0  rswitch ) * rn_simin 201 215 END DO 202 216 … … 204 218 205 219 ! Ice salinity, age, temperature 206 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0  rswitch ) * s_i_min207 o _i(ji,jj,jl) = rswitch * o_i(ii,ij,jl) + ( 1.0  rswitch)208 t_su(ji,jj,jl) = rswitch * t_su(ii,ij,jl) + ( 1.0  rswitch ) * rt t220 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0  rswitch ) * rn_simin 221 oa_i(ji,jj,jl) = rswitch * oa_i(ii,ij,jl) 222 t_su(ji,jj,jl) = rswitch * t_su(ii,ij,jl) + ( 1.0  rswitch ) * rt0 209 223 DO jk = 1, nlay_s 210 t_s(ji,jj,jk,jl) = rswitch * t_s(ii,ij,jk,jl) + ( 1.0  rswitch ) * rt t224 t_s(ji,jj,jk,jl) = rswitch * t_s(ii,ij,jk,jl) + ( 1.0  rswitch ) * rt0 211 225 END DO 212 226 DO jk = 1, nlay_i 213 t_i(ji,jj,jk,jl) = rswitch * t_i(ii,ij,jk,jl) + ( 1.0  rswitch ) * rt t214 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0  rswitch ) * s_i_min227 t_i(ji,jj,jk,jl) = rswitch * t_i(ii,ij,jk,jl) + ( 1.0  rswitch ) * rt0 228 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0  rswitch ) * rn_simin 215 229 END DO 216 230 … … 218 232 219 233 ! if salinity is constant, then overwrite rn_ice_sal 220 IF( n um_sal == 1 ) THEN221 sm_i(ji,jj,jl) = bulk_sal222 s_i (ji,jj,:,jl) = bulk_sal234 IF( nn_icesal == 1 ) THEN 235 sm_i(ji,jj,jl) = rn_icesal 236 s_i (ji,jj,:,jl) = rn_icesal 223 237 ENDIF 224 238 225 239 ! contents 226 240 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) 227 oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl)228 241 DO jk = 1, nlay_s 229 242 ! Snow energy of melting 230 e_s(ji,jj,jk,jl) = rswitch * rhosn * ( cpic * ( rtt  t_s(ji,jj,jk,jl) ) + lfus ) 231 ! Change dimensions 232 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) / unit_fac 233 ! Multiply by volume, so that heat content in 10^9 Joules 234 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * area(ji,jj) * v_s(ji,jj,jl) / nlay_s 243 e_s(ji,jj,jk,jl) = rswitch * rhosn * ( cpic * ( rt0  t_s(ji,jj,jk,jl) ) + lfus ) 244 ! Multiply by volume, so that heat content in J/m2 245 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) * r1_nlay_s 235 246 END DO 236 247 DO jk = 1, nlay_i 237 ztmelts =  tmut * s_i(ji,jj,jk,jl) + rt t!Melting temperature in K248 ztmelts =  tmut * s_i(ji,jj,jk,jl) + rt0 !Melting temperature in K 238 249 ! heat content per unit volume 239 250 e_i(ji,jj,jk,jl) = rswitch * rhoic * & 240 251 ( cpic * ( ztmelts  t_i(ji,jj,jk,jl) ) & 241 + lfus * ( 1.0  (ztmeltsrtt) / MIN((t_i(ji,jj,jk,jl)rtt),epsi20) ) & 242  rcp * ( ztmelts  rtt ) ) 243 ! Correct dimensions to avoid big values 244 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) / unit_fac 245 ! Mutliply by ice volume, and divide by number of layers to get heat content in 10^9 J 246 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * area(ji,jj) * a_i(ji,jj,jl) * ht_i(ji,jj,jl) / nlay_i 252 + lfus * ( 1.0  (ztmeltsrt0) / MIN((t_i(ji,jj,jk,jl)rt0),epsi20) ) & 253  rcp * ( ztmelts  rt0 ) ) 254 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 255 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * a_i(ji,jj,jl) * ht_i(ji,jj,jl) * r1_nlay_i 247 256 END DO 248 257 249 250 END DO !jb 258 END DO 251 259 252 CALL lbc_bdy_lnk( a_i(:,:,jl), 'T', 1., ib_bdy ) ! lateral boundary conditions260 CALL lbc_bdy_lnk( a_i(:,:,jl), 'T', 1., ib_bdy ) 253 261 CALL lbc_bdy_lnk( ht_i(:,:,jl), 'T', 1., ib_bdy ) 254 262 CALL lbc_bdy_lnk( ht_s(:,:,jl), 'T', 1., ib_bdy ) … … 259 267 CALL lbc_bdy_lnk( sm_i(:,:,jl), 'T', 1., ib_bdy ) 260 268 CALL lbc_bdy_lnk( oa_i(:,:,jl), 'T', 1., ib_bdy ) 261 CALL lbc_bdy_lnk( o_i(:,:,jl), 'T', 1., ib_bdy )262 269 CALL lbc_bdy_lnk( t_su(:,:,jl), 'T', 1., ib_bdy ) 263 270 DO jk = 1, nlay_s … … 291 298 !! 292 299 CHARACTER(len=1), INTENT(in) :: cd_type ! nature of velocity gridpoints 293 INTEGER :: jb, jgrd ! dummy loop indices300 INTEGER :: jb, jgrd ! dummy loop indices 294 301 INTEGER :: ji, jj ! local scalar 295 INTEGER :: ib_bdy ! Loop index302 INTEGER :: ib_bdy ! Loop index 296 303 REAL(wp) :: zmsk1, zmsk2, zflag 297 304 !! … … 309 316 CASE('frs') 310 317 311 318 IF( nn_ice_lim_dta(ib_bdy) == 0 ) CYCLE ! case ice boundaries = initial conditions 319 ! do not change ice velocity (it is only computed by rheology) 320 312 321 SELECT CASE ( cd_type ) 313 322 314 323 CASE ( 'U' ) 315 324 … … 326 335 327 336 ! u_ice = u_ice of the adjacent grid point except if this grid point is icefree (then u_ice = u_oce) 328 u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5 * ABS( zflag + 1._wp ) * zmsk1 + &329 & u_ice(ji1,jj) * 0.5 * ABS( zflag  1._wp ) * zmsk2 + &337 u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 338 & u_ice(ji1,jj) * 0.5_wp * ABS( zflag  1._wp ) * zmsk2 + & 330 339 & u_oce(ji ,jj) * ( 1._wp  MIN( 1._wp, zmsk1 + zmsk2 ) ) 331 340 ELSE ! everywhere else … … 334 343 ENDIF 335 344 ! mask ice velocities 336 rswitch = 1.0  MAX( 0.0_wp , SIGN ( 1.0_wp ,  at_i(ji,jj) + 0.01) ) ! 0 if no ice345 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj)  0.01_wp ) ) ! 0 if no ice 337 346 u_ice(ji,jj) = rswitch * u_ice(ji,jj) 338 347 339 348 ENDDO 340 349 341 350 CALL lbc_bdy_lnk( u_ice(:,:), 'U', 1., ib_bdy ) 342 351 … … 355 364 356 365 ! u_ice = u_ice of the adjacent grid point except if this grid point is icefree (then u_ice = u_oce) 357 v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5 * ABS( zflag + 1._wp ) * zmsk1 + &358 & v_ice(ji,jj1) * 0.5 * ABS( zflag  1._wp ) * zmsk2 + &366 v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 367 & v_ice(ji,jj1) * 0.5_wp * ABS( zflag  1._wp ) * zmsk2 + & 359 368 & v_oce(ji,jj ) * ( 1._wp  MIN( 1._wp, zmsk1 + zmsk2 ) ) 360 369 ELSE ! everywhere else … … 363 372 ENDIF 364 373 ! mask ice velocities 365 rswitch = 1.0  MAX( 0.0_wp , SIGN ( 1.0_wp ,  at_i(ji,jj) +0.01 ) ) ! 0 if no ice374 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj)  0.01 ) ) ! 0 if no ice 366 375 v_ice(ji,jj) = rswitch * v_ice(ji,jj) 367 376 … … 369 378 370 379 CALL lbc_bdy_lnk( v_ice(:,:), 'V', 1., ib_bdy ) 371 380 372 381 END SELECT 373 382
Note: See TracChangeset
for help on using the changeset viewer.