- Timestamp:
- 2015-10-06T13:40:42+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
r5656 r5777 59 59 !! 60 60 !!---------------------------------------------------------------------- 61 INTEGER, INTENT( in ) :: kt ! Main time step counter 62 INTEGER :: ib_bdy ! Loop index 63 61 INTEGER, INTENT( in ) :: kt ! Main time step counter 62 ! 63 INTEGER :: ib_bdy ! Loop index 64 !!---------------------------------------------------------------------- 65 ! 64 66 #if defined key_lim3 65 67 CALL lim_var_glo2eqv 66 68 #endif 67 69 ! 68 70 DO ib_bdy=1, nb_bdy 69 71 ! 70 72 SELECT CASE( cn_ice_lim(ib_bdy) ) 71 73 CASE('none') … … 76 78 CALL ctl_stop( 'bdy_ice_lim : unrecognised option for open boundaries for ice fields' ) 77 79 END SELECT 78 80 ! 79 81 END DO 80 82 ! 81 83 #if defined key_lim3 82 84 CALL lim_var_zapsmall 83 85 CALL lim_var_agg(1) 84 86 #endif 85 87 ! 86 88 END SUBROUTINE bdy_ice_lim 89 87 90 88 91 SUBROUTINE bdy_ice_frs( idx, dta, kt, ib_bdy ) … … 96 99 !! dimensional baroclinic ocean model with realistic topography. Tellus, 365-382. 97 100 !!------------------------------------------------------------------------------ 98 TYPE(OBC_INDEX), INTENT(in) :: idx ! OBC indices99 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data100 INTEGER, INTENT(in) :: kt ! main time-step counter101 TYPE(OBC_INDEX), INTENT(in) :: idx ! OBC indices 102 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 103 INTEGER, INTENT(in) :: kt ! main time-step counter 101 104 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 102 105 ! 103 106 INTEGER :: jpbound ! 0 = incoming ice 104 107 ! ! 1 = outgoing ice 105 108 INTEGER :: jb, jk, jgrd, jl ! dummy loop indices 106 109 INTEGER :: ji, jj, ii, ij ! local scalar … … 111 114 USE ice_2, vt_i => hicm 112 115 #endif 113 114 !!------------------------------------------------------------------------------ 115 ! 116 IF( nn_timing == 1 ) CALL timing_start('bdy_ice_frs') 116 !!------------------------------------------------------------------------------ 117 ! 118 IF( nn_timing == 1 ) CALL timing_start('bdy_ice_frs') 117 119 ! 118 120 jgrd = 1 ! Everything is at T-points here … … 181 183 ! condition on ice thickness depends on the ice velocity 182 184 ! if velocity is outward (strictly), then ice thickness, volume... must be equal to adjacent values 183 jpbound = 0 ; ii = ji; ij = jj;184 185 jpbound = 0 ; ii = ji ; ij = jj 186 ! 185 187 IF( u_ice(ji+1,jj ) < 0. .AND. umask(ji-1,jj ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 186 188 IF( u_ice(ji-1,jj ) > 0. .AND. umask(ji+1,jj ,1) == 0. ) jpbound = 1; ii = ji-1; ij = jj 187 189 IF( v_ice(ji ,jj+1) < 0. .AND. vmask(ji ,jj-1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj+1 188 190 IF( v_ice(ji ,jj-1) > 0. .AND. vmask(ji ,jj+1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj-1 189 191 ! 190 192 IF( nn_ice_lim_dta(ib_bdy) == 0 ) jpbound = 0; ii = ji; ij = jj ! case ice boundaries = initial conditions 191 ! do not make state variables dependent on velocity 192 193 193 ! ! do not make state variables dependent on velocity 194 ! 194 195 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ii,ij) - 0.01 ) ) ! 0 if no ice 195 196 ! 196 197 ! concentration and thickness 197 198 a_i (ji,jj,jl) = a_i (ii,ij,jl) * rswitch 198 199 ht_i(ji,jj,jl) = ht_i(ii,ij,jl) * rswitch 199 200 ht_s(ji,jj,jl) = ht_s(ii,ij,jl) * rswitch 200 201 ! 201 202 ! Ice and snow volumes 202 203 v_i(ji,jj,jl) = ht_i(ji,jj,jl) * a_i(ji,jj,jl) 203 204 v_s(ji,jj,jl) = ht_s(ji,jj,jl) * a_i(ji,jj,jl) 204 205 ! 205 206 SELECT CASE( jpbound ) 206 207 CASE( 0 ) ! velocity is inward208 207 ! 208 CASE( 0 ) ! velocity is inward 209 ! 209 210 ! Ice salinity, age, temperature 210 211 sm_i(ji,jj,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * rn_simin … … 218 219 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * rn_simin 219 220 END DO 220 221 CASE( 1 ) ! velocity is outward222 221 ! 222 CASE( 1 ) ! velocity is outward 223 ! 223 224 ! Ice salinity, age, temperature 224 225 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0 - rswitch ) * rn_simin … … 232 233 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rn_simin 233 234 END DO 234 235 ! 235 236 END SELECT 236 237 ! if salinity is constant, then overwrite rn_ice_sal 238 IF( nn_icesal == 1 ) THEN 239 sm_i(ji,jj,jl) = rn_icesal 237 ! 238 IF( nn_icesal == 1 ) THEN ! constant salinity : overwrite rn_ice_sal 239 sm_i(ji,jj ,jl) = rn_icesal 240 240 s_i (ji,jj,:,jl) = rn_icesal 241 241 ENDIF 242 242 ! 243 243 ! contents 244 244 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) … … 259 259 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 260 260 END DO 261 261 ! 262 262 END DO 263 263 ! 264 264 CALL lbc_bdy_lnk( a_i(:,:,jl), 'T', 1., ib_bdy ) 265 265 CALL lbc_bdy_lnk( ht_i(:,:,jl), 'T', 1., ib_bdy ) … … 267 267 CALL lbc_bdy_lnk( v_i(:,:,jl), 'T', 1., ib_bdy ) 268 268 CALL lbc_bdy_lnk( v_s(:,:,jl), 'T', 1., ib_bdy ) 269 269 ! 270 270 CALL lbc_bdy_lnk( smv_i(:,:,jl), 'T', 1., ib_bdy ) 271 271 CALL lbc_bdy_lnk( sm_i(:,:,jl), 'T', 1., ib_bdy ) … … 280 280 CALL lbc_bdy_lnk(e_i(:,:,jk,jl), 'T', 1., ib_bdy ) 281 281 END DO 282 282 ! 283 283 END DO !jl 284 284 ! 285 285 #endif 286 286 ! 287 IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_frs')287 IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_frs') 288 288 ! 289 289 END SUBROUTINE bdy_ice_frs … … 300 300 !! 2013-06 : C. Rousset 301 301 !!------------------------------------------------------------------------------ 302 !!303 302 CHARACTER(len=1), INTENT(in) :: cd_type ! nature of velocity grid-points 303 ! 304 304 INTEGER :: jb, jgrd ! dummy loop indices 305 305 INTEGER :: ji, jj ! local scalar 306 306 INTEGER :: ib_bdy ! Loop index 307 307 REAL(wp) :: zmsk1, zmsk2, zflag 308 !!------------------------------------------------------------------------------308 !!------------------------------------------------------------------------------ 309 309 ! 310 310 IF( nn_timing == 1 ) CALL timing_start('bdy_ice_lim_dyn') … … 313 313 ! 314 314 SELECT CASE( cn_ice_lim(ib_bdy) ) 315 315 ! 316 316 CASE('none') 317 318 317 CYCLE 319 318 ! 320 319 CASE('frs') 321 320 ! 322 321 IF( nn_ice_lim_dta(ib_bdy) == 0 ) CYCLE ! case ice boundaries = initial conditions 323 ! do not change ice velocity (it is only computed by rheology) 324 322 ! ! do not change ice velocity (it is only computed by rheology) 325 323 SELECT CASE ( cd_type ) 326 327 CASE ( 'U' ) 328 324 ! 325 CASE ( 'U' ) 329 326 jgrd = 2 ! u velocity 330 327 DO jb = 1, idx_bdy(ib_bdy)%nblen(jgrd) … … 332 329 jj = idx_bdy(ib_bdy)%nbj(jb,jgrd) 333 330 zflag = idx_bdy(ib_bdy)%flagu(jb,jgrd) 334 331 ! 335 332 IF ( ABS( zflag ) == 1. ) THEN ! eastern and western boundaries 336 333 ! one of the two zmsk is always 0 (because of zflag) 337 334 zmsk1 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji+1,jj) ) ) ! 0 if no ice 338 335 zmsk2 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji-1,jj) ) ) ! 0 if no ice 339 336 ! 340 337 ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 341 338 u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & … … 349 346 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01_wp ) ) ! 0 if no ice 350 347 u_ice(ji,jj) = rswitch * u_ice(ji,jj) 351 352 ENDDO 353 348 ! 349 END DO 354 350 CALL lbc_bdy_lnk( u_ice(:,:), 'U', -1., ib_bdy ) 355 351 ! 356 352 CASE ( 'V' ) 357 358 353 jgrd = 3 ! v velocity 359 354 DO jb = 1, idx_bdy(ib_bdy)%nblen(jgrd) … … 361 356 jj = idx_bdy(ib_bdy)%nbj(jb,jgrd) 362 357 zflag = idx_bdy(ib_bdy)%flagv(jb,jgrd) 363 358 ! 364 359 IF ( ABS( zflag ) == 1. ) THEN ! northern and southern boundaries 365 360 ! one of the two zmsk is always 0 (because of zflag) 366 361 zmsk1 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji,jj+1) ) ) ! 0 if no ice 367 362 zmsk2 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji,jj-1) ) ) ! 0 if no ice 368 363 ! 369 364 ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 370 365 v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & … … 378 373 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01 ) ) ! 0 if no ice 379 374 v_ice(ji,jj) = rswitch * v_ice(ji,jj) 380 381 ENDDO 382 375 ! 376 END DO 383 377 CALL lbc_bdy_lnk( v_ice(:,:), 'V', -1., ib_bdy ) 384 378 ! 385 379 END SELECT 386 380 ! 387 381 CASE DEFAULT 388 382 CALL ctl_stop( 'bdy_ice_lim_dyn : unrecognised option for open boundaries for ice fields' ) 389 383 END SELECT 390 391 END DO392 384 ! 385 END DO 386 ! 393 387 IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_lim_dyn') 394 388 ! 395 389 END SUBROUTINE bdy_ice_lim_dyn 396 390
Note: See TracChangeset
for help on using the changeset viewer.