Changeset 8563
- Timestamp:
- 2017-09-26T15:24:17+02:00 (7 years ago)
- Location:
- branches/2017/dev_r8183_ICEMODEL/NEMOGCM
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/CONFIG/SHARED/namelist_ref
r8517 r8563 564 564 ! for lim3 565 565 ! bn_a_i = 'amm12_bdyT_ice', 24 , 'ileadfra', .true. , .false. , 'daily' , '' , '' , '' 566 ! bn_h t_i = 'amm12_bdyT_ice', 24 , 'iicethic', .true. , .false. , 'daily' , '' , '' , ''567 ! bn_h t_s = 'amm12_bdyT_ice', 24 , 'isnowthi', .true. , .false. , 'daily' , '' , '' , ''566 ! bn_h_i = 'amm12_bdyT_ice', 24 , 'iicethic', .true. , .false. , 'daily' , '' , '' , '' 567 ! bn_h_s = 'amm12_bdyT_ice', 24 , 'isnowthi', .true. , .false. , 'daily' , '' , '' , '' 568 568 569 569 cn_dir = 'bdydta/' ! root directory for the location of the bulk files -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r8562 r8563 118 118 !!-------------|-------------|---------------------------------|-------| 119 119 !! | 120 !! h t_i | ht_i_1d | Ice thickness | m |121 !! h t_s ! ht_s_1d | Snow depth | m |120 !! h_i | h_i_1d | Ice thickness | m | 121 !! h_s ! h_s_1d | Snow depth | m | 122 122 !! sm_i ! sm_i_1d | Sea ice bulk salinity ! ppt | 123 123 !! s_i ! s_i_1d | Sea ice salinity profile ! ppt | … … 312 312 !!---------------------------------------------------------------------- 313 313 !! Variables defined for each ice category 314 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h t_i !: Ice thickness (m)314 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_i !: Ice thickness (m) 315 315 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i !: Ice fractional areas (concentration) 316 316 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_i !: Ice volume per unit area (m) 317 317 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s !: Snow volume per unit area(m) 318 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h t_s !: Snow thickness (m)318 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_s !: Snow thickness (m) 319 319 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: t_su !: Sea-Ice Surface Temperature (K) 320 320 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sm_i !: Sea-Ice Bulk salinity (ppt) … … 375 375 !! * Old values of global variables 376 376 !!---------------------------------------------------------------------- 377 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s_b, v_i_b, h t_s_b, ht_i_b !: snow and ice volumes/thickness377 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s_b, v_i_b, h_s_b, h_i_b !: snow and ice volumes/thickness 378 378 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_b, smv_i_b, oa_i_b !: 379 379 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e_s_b !: snow heat content … … 463 463 ii = ii + 1 464 464 ALLOCATE( ftr_ice(jpi,jpj,jpl) , & 465 & h t_i (jpi,jpj,jpl) , a_i (jpi,jpj,jpl) , v_i (jpi,jpj,jpl) , &466 & v_s (jpi,jpj,jpl) , h t_s (jpi,jpj,jpl) , t_su (jpi,jpj,jpl) , &465 & h_i (jpi,jpj,jpl) , a_i (jpi,jpj,jpl) , v_i (jpi,jpj,jpl) , & 466 & v_s (jpi,jpj,jpl) , h_s (jpi,jpj,jpl) , t_su (jpi,jpj,jpl) , & 467 467 & sm_i (jpi,jpj,jpl) , smv_i (jpi,jpj,jpl) , o_i (jpi,jpj,jpl) , & 468 468 & oa_i (jpi,jpj,jpl) , bv_i (jpi,jpj,jpl) , STAT=ierr(ii) ) … … 512 512 ! * Old values of global variables 513 513 ii = ii + 1 514 ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , h t_s_b(jpi,jpj,jpl) , ht_i_b(jpi,jpj,jpl) , &514 ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , h_s_b(jpi,jpj,jpl) , h_i_b(jpi,jpj,jpl) , & 515 515 & a_i_b (jpi,jpj,jpl) , smv_i_b(jpi,jpj,jpl) , e_i_b (jpi,jpj,nlay_i,jpl) , e_s_b (jpi,jpj,nlay_s,jpl) , & 516 516 & oa_i_b (jpi,jpj,jpl) , STAT=ierr(ii) ) -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice1D.F90
r8562 r8563 105 105 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: a_i_1d !: <==> the 2D a_i 106 106 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: a_ib_1d !: <==> the 2D a_i_b 107 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h t_i_1d !:108 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h t_ib_1d !:109 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h t_s_1d !:107 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h_i_1d !: 108 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h_ib_1d !: 109 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: h_s_1d !: 110 110 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_su !: Surface Conduction flux 111 111 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_bo_i !: Bottom Conduction flux … … 153 153 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: v_ip_2d 154 154 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_su_2d 155 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h t_i_2d155 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_i_2d 156 156 157 157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: a_ib_2d 158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h t_ib_2d158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_ib_2d 159 159 160 160 !!---------------------------------------------------------------------- … … 200 200 ii = ii + 1 201 201 ALLOCATE( t_su_1d (jpij) , t_si_1d (jpij) , a_i_1d (jpij) , a_ib_1d(jpij) , & 202 & h t_i_1d (jpij) , ht_ib_1d (jpij) , ht_s_1d (jpij) , fc_su (jpij) , fc_bo_i(jpij) , &202 & h_i_1d (jpij) , h_ib_1d (jpij) , h_s_1d (jpij) , fc_su (jpij) , fc_bo_i(jpij) , & 203 203 & dh_s_tot (jpij) , dh_i_surf (jpij) , dh_i_sub(jpij) , & 204 204 & dh_i_bott(jpij) , dh_snowice(jpij) , sm_i_1d (jpij) , s_i_new(jpij) , & … … 218 218 ! 219 219 ii = ii + 1 220 ALLOCATE( a_i_2d(jpij,jpl) , a_ib_2d(jpij,jpl) , h t_i_2d(jpij,jpl) , ht_ib_2d(jpij,jpl) , &220 ALLOCATE( a_i_2d(jpij,jpl) , a_ib_2d(jpij,jpl) , h_i_2d(jpij,jpl) , h_ib_2d(jpij,jpl) , & 221 221 & v_i_2d(jpij,jpl) ,v_s_2d(jpij,jpl) ,oa_i_2d(jpij,jpl) ,smv_i_2d(jpij,jpl) , & 222 222 & a_ip_2d(jpij,jpl) ,v_ip_2d(jpij,jpl) ,t_su_2d(jpij,jpl) , & -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icecor.F90
r8534 r8563 70 70 ! ! thickness of the smallest category above himin ! 71 71 ! !----------------------------------------------------- 72 WHERE( a_i(:,:,1) >= epsi20 ) ; h t_i(:,:,1) = v_i (:,:,1) / a_i(:,:,1)73 ELSEWHERE ; h t_i(:,:,1) = 0._wp72 WHERE( a_i(:,:,1) >= epsi20 ) ; h_i(:,:,1) = v_i (:,:,1) / a_i(:,:,1) 73 ELSEWHERE ; h_i(:,:,1) = 0._wp 74 74 END WHERE 75 WHERE( h t_i(:,:,1) < rn_himin ) a_i (:,:,1) = a_i (:,:,1) * ht_i(:,:,1) / rn_himin75 WHERE( h_i(:,:,1) < rn_himin ) a_i(:,:,1) = a_i (:,:,1) * h_i(:,:,1) / rn_himin 76 76 ! 77 77 ENDIF -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icectl.F90
r8534 r8563 248 248 DO jj = 1, jpj 249 249 DO ji = 1, jpi 250 IF( h t_i(ji,jj,jl) > 50._wp ) THEN250 IF( h_i(ji,jj,jl) > 50._wp ) THEN 251 251 !CALL ice_prt( kt, ji, jj, 2, ' ALERTE 3 : Very thick ice ' ) 252 252 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 … … 469 469 WRITE(numout,*) ' - Category (', jl,')' 470 470 WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl) 471 WRITE(numout,*) ' h t_i : ', ht_i(ji,jj,jl)472 WRITE(numout,*) ' h t_s : ', ht_s(ji,jj,jl)471 WRITE(numout,*) ' h_i : ', h_i(ji,jj,jl) 472 WRITE(numout,*) ' h_s : ', h_s(ji,jj,jl) 473 473 WRITE(numout,*) ' v_i : ', v_i(ji,jj,jl) 474 474 WRITE(numout,*) ' v_s : ', v_s(ji,jj,jl) … … 520 520 WRITE(numout,*) ' - Category (',jl,')' 521 521 WRITE(numout,*) ' ~~~~~~~~ ' 522 WRITE(numout,*) ' h t_i : ', ht_i(ji,jj,jl) , ' ht_s : ', ht_s(ji,jj,jl)522 WRITE(numout,*) ' h_i : ', h_i(ji,jj,jl) , ' h_s : ', h_s(ji,jj,jl) 523 523 WRITE(numout,*) ' t_i : ', t_i(ji,jj,1:nlay_i,jl) 524 524 WRITE(numout,*) ' t_su : ', t_su(ji,jj,jl) , ' t_s : ', t_s(ji,jj,1,jl) … … 630 630 CALL prt_ctl_info(' - Category : ', ivar1=jl) 631 631 CALL prt_ctl_info(' ~~~~~~~~~~') 632 CALL prt_ctl(tab2d_1=h t_i (:,:,jl) , clinfo1= ' ht_i : ')633 CALL prt_ctl(tab2d_1=h t_s (:,:,jl) , clinfo1= ' ht_s : ')632 CALL prt_ctl(tab2d_1=h_i (:,:,jl) , clinfo1= ' h_i : ') 633 CALL prt_ctl(tab2d_1=h_s (:,:,jl) , clinfo1= ' h_s : ') 634 634 CALL prt_ctl(tab2d_1=t_su (:,:,jl) , clinfo1= ' t_su : ') 635 635 CALL prt_ctl(tab2d_1=t_s (:,:,1,jl) , clinfo1= ' t_snow : ') -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icedyn.F90
r8562 r8563 85 85 tau_icebfr(:,:) = 0._wp 86 86 DO jl = 1, jpl 87 WHERE( h t_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr87 WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 88 88 END DO 89 89 IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr ) 90 90 ENDIF 91 91 92 zhmax(:,:,:) = h t_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig)92 zhmax(:,:,:) = h_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) 93 93 DO jl = 1, jpl 94 94 DO jj = 2, jpjm1 95 95 DO ji = 2, jpim1 96 96 !!gm use of MAXVAL here is very probably less efficient than expending the 9 values 97 zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h t_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) )97 zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) ) 98 98 END DO 99 99 END DO … … 166 166 IF ( ( zdv > 0.0 .AND. zh > phmax(ji,jj,jl) .AND. at_i_b(ji,jj) < 0.80 ) .OR. & 167 167 & ( zdv <= 0.0 .AND. zh > phmax(ji,jj,jl) ) ) THEN 168 a_i (ji,jj,jl) = v_i(ji,jj,jl) / MIN( phmax(ji,jj,jl), hi_max(jpl) ) !-- bound h t_i to hi_max (99 m)168 a_i (ji,jj,jl) = v_i(ji,jj,jl) / MIN( phmax(ji,jj,jl), hi_max(jpl) ) !-- bound h_i to hi_max (99 m) 169 169 ENDIF 170 170 ! -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceforcing.F90
r8534 r8563 130 130 131 131 ! --- cloud-sky and overcast-sky ice albedos --- ! 132 CALL ice_alb( t_su, h t_i, ht_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os )132 CALL ice_alb( t_su, h_i, h_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os ) 133 133 134 134 ! albedo depends on cloud fraction because of non-linear spectral effects -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceistate.F90
r8550 r8563 285 285 DO ji = 1, jpi 286 286 a_i(ji,jj,jl) = zswitch(ji,jj) * za_i_ini(ji,jj,jl) ! concentration 287 h t_i(ji,jj,jl) = zswitch(ji,jj) * zh_i_ini(ji,jj,jl) ! ice thickness287 h_i(ji,jj,jl) = zswitch(ji,jj) * zh_i_ini(ji,jj,jl) ! ice thickness 288 288 sm_i(ji,jj,jl) = zswitch(ji,jj) * zsm_i_ini(ji,jj) ! salinity 289 289 o_i(ji,jj,jl) = 0._wp ! age (0 day) … … 291 291 292 292 IF( zht_i_ini(ji,jj) > 0._wp )THEN 293 h t_s(ji,jj,jl)= ht_i(ji,jj,jl) * ( zht_s_ini(ji,jj) / zht_i_ini(ji,jj) ) ! snow depth293 h_s(ji,jj,jl)= h_i(ji,jj,jl) * ( zht_s_ini(ji,jj) / zht_i_ini(ji,jj) ) ! snow depth 294 294 ELSE 295 h t_s(ji,jj,jl)= 0._wp295 h_s(ji,jj,jl)= 0._wp 296 296 ENDIF 297 297 298 ! This case below should not be used if (h t_s/ht_i) is ok in namelist298 ! This case below should not be used if (h_s/h_i) is ok in namelist 299 299 ! In case snow load is in excess that would lead to transformation from snow to ice 300 300 ! Then, transfer the snow excess into the ice (different from icethd_dh) 301 zdh = MAX( 0._wp, ( rhosn * h t_s(ji,jj,jl) + ( rhoic - rau0 ) * ht_i(ji,jj,jl) ) * r1_rau0 )302 ! recompute h t_i, ht_s avoiding out of bounds values303 h t_i(ji,jj,jl) = MIN( hi_max(jl), ht_i(ji,jj,jl) + zdh )304 h t_s(ji,jj,jl) = MAX( 0._wp, ht_s(ji,jj,jl) - zdh * rhoic * r1_rhosn )301 zdh = MAX( 0._wp, ( rhosn * h_s(ji,jj,jl) + ( rhoic - rau0 ) * h_i(ji,jj,jl) ) * r1_rau0 ) 302 ! recompute h_i, h_s avoiding out of bounds values 303 h_i(ji,jj,jl) = MIN( hi_max(jl), h_i(ji,jj,jl) + zdh ) 304 h_s(ji,jj,jl) = MAX( 0._wp, h_s(ji,jj,jl) - zdh * rhoic * r1_rhosn ) 305 305 306 306 ! ice volume, salt content, age content 307 v_i(ji,jj,jl) = h t_i(ji,jj,jl) * a_i(ji,jj,jl) ! ice volume308 v_s(ji,jj,jl) = h t_s(ji,jj,jl) * a_i(ji,jj,jl) ! snow volume307 v_i(ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) ! ice volume 308 v_s(ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) ! snow volume 309 309 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content 310 310 oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl) ! age content … … 381 381 smv_i(:,:,:) = 0._wp 382 382 oa_i (:,:,:) = 0._wp 383 h t_i(:,:,:) = 0._wp384 h t_s(:,:,:) = 0._wp383 h_i (:,:,:) = 0._wp 384 h_s (:,:,:) = 0._wp 385 385 sm_i (:,:,:) = 0._wp 386 386 o_i (:,:,:) = 0._wp -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceitd.F90
r8534 r8563 101 101 zhbnew(:,:) = 0._wp 102 102 103 CALL tab_3d_2d( nidx, idxice(1:nidx), h t_i_2d (1:nidx,1:jpl), ht_i )104 CALL tab_3d_2d( nidx, idxice(1:nidx), h t_ib_2d(1:nidx,1:jpl), ht_i_b )103 CALL tab_3d_2d( nidx, idxice(1:nidx), h_i_2d (1:nidx,1:jpl), h_i ) 104 CALL tab_3d_2d( nidx, idxice(1:nidx), h_ib_2d(1:nidx,1:jpl), h_i_b ) 105 105 CALL tab_3d_2d( nidx, idxice(1:nidx), a_i_2d (1:nidx,1:jpl), a_i ) 106 106 CALL tab_3d_2d( nidx, idxice(1:nidx), a_ib_2d (1:nidx,1:jpl), a_i_b ) … … 109 109 ! Compute thickness change in each ice category 110 110 DO ji = 1, nidx 111 zdhice(ji,jl) = h t_i_2d(ji,jl) - ht_ib_2d(ji,jl)111 zdhice(ji,jl) = h_i_2d(ji,jl) - h_ib_2d(ji,jl) 112 112 END DO 113 113 END DO … … 119 119 ! 120 120 ! --- New boundary: Hn* = Hn + Fn*dt --- ! 121 ! Fn*dt = ( fn + (fn+1 - fn)/(hn+1 - hn) * (Hn - hn) ) * dt = zdhice + zslope * (Hmax - h t_i_b)121 ! Fn*dt = ( fn + (fn+1 - fn)/(hn+1 - hn) * (Hn - hn) ) * dt = zdhice + zslope * (Hmax - h_i_b) 122 122 ! 123 123 IF ( a_ib_2d(ji,jl) > epsi10 .AND. a_ib_2d(ji,jl+1) > epsi10 ) THEN ! a(jl+1) & a(jl) /= 0 124 zslope = ( zdhice(ji,jl+1) - zdhice(ji,jl) ) / ( h t_ib_2d(ji,jl+1) - ht_ib_2d(ji,jl) )125 zhbnew(ji,jl) = hi_max(jl) + zdhice(ji,jl) + zslope * ( hi_max(jl) - h t_ib_2d(ji,jl) )124 zslope = ( zdhice(ji,jl+1) - zdhice(ji,jl) ) / ( h_ib_2d(ji,jl+1) - h_ib_2d(ji,jl) ) 125 zhbnew(ji,jl) = hi_max(jl) + zdhice(ji,jl) + zslope * ( hi_max(jl) - h_ib_2d(ji,jl) ) 126 126 ELSEIF( a_ib_2d(ji,jl) > epsi10 .AND. a_ib_2d(ji,jl+1) <= epsi10 ) THEN ! a(jl+1)=0 => Hn* = Hn + fn*dt 127 127 zhbnew(ji,jl) = hi_max(jl) + zdhice(ji,jl) … … 136 136 ! Note: hn(t+1) must not be too close to either HR or HL otherwise a division by nearly 0 is possible 137 137 ! in ice_itd_glinear in the case (HR-HL) = 3(Hice - HL) or = 3(HR - Hice) 138 IF( a_i_2d(ji,jl ) > epsi10 .AND. h t_i_2d(ji,jl ) > ( zhbnew(ji,jl) - epsi10 ) ) idxice(ji) = 0139 IF( a_i_2d(ji,jl+1) > epsi10 .AND. h t_i_2d(ji,jl+1) < ( zhbnew(ji,jl) + epsi10 ) ) idxice(ji) = 0138 IF( a_i_2d(ji,jl ) > epsi10 .AND. h_i_2d(ji,jl ) > ( zhbnew(ji,jl) - epsi10 ) ) idxice(ji) = 0 139 IF( a_i_2d(ji,jl+1) > epsi10 .AND. h_i_2d(ji,jl+1) < ( zhbnew(ji,jl) + epsi10 ) ) idxice(ji) = 0 140 140 141 141 ! 2) Hn-1 < Hn* < Hn+1 … … 149 149 DO ji = 1, nidx 150 150 IF( a_i_2d(ji,jpl) > epsi10 ) THEN 151 zhbnew(ji,jpl) = MAX( hi_max(jpl-1), 3._wp * h t_i_2d(ji,jpl) - 2._wp * zhbnew(ji,jpl-1) )151 zhbnew(ji,jpl) = MAX( hi_max(jpl-1), 3._wp * h_i_2d(ji,jpl) - 2._wp * zhbnew(ji,jpl-1) ) 152 152 ELSE 153 153 zhbnew(ji,jpl) = hi_max(jpl) … … 158 158 ! h1(t) must not be too close to either HR or HL otherwise a division by nearly 0 is possible 159 159 ! in ice_itd_glinear in the case (HR-HL) = 3(Hice - HL) or = 3(HR - Hice) 160 IF( h t_ib_2d(ji,1) < ( hi_max(0) + epsi10 ) ) idxice(ji) = 0161 IF( h t_ib_2d(ji,1) > ( hi_max(1) - epsi10 ) ) idxice(ji) = 0160 IF( h_ib_2d(ji,1) < ( hi_max(0) + epsi10 ) ) idxice(ji) = 0 161 IF( h_ib_2d(ji,1) > ( hi_max(1) - epsi10 ) ) idxice(ji) = 0 162 162 END DO 163 163 ! … … 189 189 DO jl = 1, jpl 190 190 ! 191 CALL tab_2d_1d( nidx, idxice(1:nidx), h t_ib_1d(1:nidx), ht_i_b(:,:,jl) )192 CALL tab_2d_1d( nidx, idxice(1:nidx), h t_i_1d (1:nidx), ht_i(:,:,jl) )191 CALL tab_2d_1d( nidx, idxice(1:nidx), h_ib_1d(1:nidx), h_i_b(:,:,jl) ) 192 CALL tab_2d_1d( nidx, idxice(1:nidx), h_i_1d (1:nidx), h_i(:,:,jl) ) 193 193 CALL tab_2d_1d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i(:,:,jl) ) 194 194 CALL tab_2d_1d( nidx, idxice(1:nidx), v_i_1d (1:nidx), v_i(:,:,jl) ) … … 197 197 ! 198 198 ! --- g(h) for category 1 --- ! 199 CALL ice_itd_glinear( zhb0(1:nidx) , zhb1(1:nidx) , h t_ib_1d(1:nidx) , a_i_1d(1:nidx) , & ! in199 CALL ice_itd_glinear( zhb0(1:nidx) , zhb1(1:nidx) , h_ib_1d(1:nidx) , a_i_1d(1:nidx) , & ! in 200 200 & g0 (1:nidx,1), g1 (1:nidx,1), hL (1:nidx,1), hR (1:nidx,1) ) ! out 201 201 ! … … 205 205 IF( a_i_1d(ji) > epsi10 ) THEN 206 206 ! 207 zdh0 = h t_i_1d(ji) - ht_ib_1d(ji)207 zdh0 = h_i_1d(ji) - h_ib_1d(ji) 208 208 IF( zdh0 < 0.0 ) THEN !remove area from category 1 209 209 zdh0 = MIN( -zdh0, hi_max(1) ) … … 215 215 zx2 = 0.5 * zetamax * zetamax 216 216 zda0 = g1(ji,1) * zx2 + g0(ji,1) * zx1 ! ice area removed 217 zdamax = a_i_1d(ji) * (1.0 - h t_i_1d(ji) / ht_ib_1d(ji) ) ! Constrain new thickness <= ht_i217 zdamax = a_i_1d(ji) * (1.0 - h_i_1d(ji) / h_ib_1d(ji) ) ! Constrain new thickness <= h_i 218 218 zda0 = MIN( zda0, zdamax ) ! ice area lost due to melting 219 219 ! of thin ice (zdamax > 0) 220 220 ! Remove area, conserving volume 221 h t_i_1d(ji) = ht_i_1d(ji) * a_i_1d(ji) / ( a_i_1d(ji) - zda0 )221 h_i_1d(ji) = h_i_1d(ji) * a_i_1d(ji) / ( a_i_1d(ji) - zda0 ) 222 222 a_i_1d(ji) = a_i_1d(ji) - zda0 223 v_i_1d(ji) = a_i_1d(ji) * h t_i_1d(ji) ! clem-useless ?223 v_i_1d(ji) = a_i_1d(ji) * h_i_1d(ji) ! clem-useless ? 224 224 ENDIF 225 225 ! … … 233 233 END DO 234 234 ! 235 CALL tab_1d_2d( nidx, idxice(1:nidx), h t_i_1d (1:nidx), ht_i(:,:,jl) )235 CALL tab_1d_2d( nidx, idxice(1:nidx), h_i_1d (1:nidx), h_i(:,:,jl) ) 236 236 CALL tab_1d_2d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i(:,:,jl) ) 237 237 CALL tab_1d_2d( nidx, idxice(1:nidx), v_i_1d (1:nidx), v_i(:,:,jl) ) … … 240 240 ! 241 241 ! --- g(h) for each thickness category --- ! 242 CALL ice_itd_glinear( zhbnew(1:nidx,jl-1), zhbnew(1:nidx,jl), h t_i_1d(1:nidx) , a_i_1d(1:nidx) , & ! in242 CALL ice_itd_glinear( zhbnew(1:nidx,jl-1), zhbnew(1:nidx,jl), h_i_1d(1:nidx) , a_i_1d(1:nidx) , & ! in 243 243 & g0 (1:nidx,jl ), g1 (1:nidx,jl), hL (1:nidx,jl), hR (1:nidx,jl) ) ! out 244 244 ! … … 284 284 285 285 !---------------------------------------------------------------------------------------------- 286 ! 7) Make sure h t_i >= minimum ice thickness hi_min286 ! 7) Make sure h_i >= minimum ice thickness hi_min 287 287 !---------------------------------------------------------------------------------------------- 288 CALL tab_2d_1d( nidx, idxice(1:nidx), h t_i_1d (1:nidx), ht_i(:,:,1) )288 CALL tab_2d_1d( nidx, idxice(1:nidx), h_i_1d (1:nidx), h_i(:,:,1) ) 289 289 CALL tab_2d_1d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i(:,:,1) ) 290 290 CALL tab_2d_1d( nidx, idxice(1:nidx), a_ip_1d (1:nidx), a_ip(:,:,1) ) 291 291 292 292 DO ji = 1, nidx 293 IF ( a_i_1d(ji) > epsi10 .AND. h t_i_1d(ji) < rn_himin ) THEN294 a_i_1d (ji) = a_i_1d(ji) * h t_i_1d(ji) / rn_himin293 IF ( a_i_1d(ji) > epsi10 .AND. h_i_1d(ji) < rn_himin ) THEN 294 a_i_1d (ji) = a_i_1d(ji) * h_i_1d(ji) / rn_himin 295 295 ! MV MP 2016 296 296 IF ( nn_pnd_scheme > 0 ) THEN 297 a_ip_1d(ji) = a_ip_1d(ji) * h t_i_1d(ji) / rn_himin297 a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin 298 298 ENDIF 299 299 ! END MV MP 2016 300 h t_i_1d(ji) = rn_himin300 h_i_1d(ji) = rn_himin 301 301 ENDIF 302 302 END DO 303 303 ! 304 CALL tab_1d_2d( nidx, idxice(1:nidx), h t_i_1d (1:nidx), ht_i(:,:,1) )304 CALL tab_1d_2d( nidx, idxice(1:nidx), h_i_1d (1:nidx), h_i(:,:,1) ) 305 305 CALL tab_1d_2d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i(:,:,1) ) 306 306 CALL tab_1d_2d( nidx, idxice(1:nidx), a_ip_1d (1:nidx), a_ip(:,:,1) ) … … 392 392 !!------------------------------------------------------------------ 393 393 394 CALL tab_3d_2d( nidx, idxice(1:nidx), h t_i_2d (1:nidx,1:jpl), ht_i )394 CALL tab_3d_2d( nidx, idxice(1:nidx), h_i_2d (1:nidx,1:jpl), h_i ) 395 395 CALL tab_3d_2d( nidx, idxice(1:nidx), a_i_2d (1:nidx,1:jpl), a_i ) 396 396 CALL tab_3d_2d( nidx, idxice(1:nidx), v_i_2d (1:nidx,1:jpl), v_i ) … … 518 518 !------------------------------------------------------------------------------- 519 519 WHERE( a_i_2d(1:nidx,:) >= epsi20 ) 520 h t_i_2d(1:nidx,:) = v_i_2d(1:nidx,:) / a_i_2d(1:nidx,:)520 h_i_2d(1:nidx,:) = v_i_2d(1:nidx,:) / a_i_2d(1:nidx,:) 521 521 t_su_2d(1:nidx,:) = zaTsfn(1:nidx,:) / a_i_2d(1:nidx,:) 522 522 ELSEWHERE 523 h t_i_2d(1:nidx,:) = 0._wp523 h_i_2d(1:nidx,:) = 0._wp 524 524 t_su_2d(1:nidx,:) = rt0 525 525 END WHERE 526 526 ! 527 CALL tab_2d_3d( nidx, idxice(1:nidx), h t_i_2d (1:nidx,1:jpl), ht_i )527 CALL tab_2d_3d( nidx, idxice(1:nidx), h_i_2d (1:nidx,1:jpl), h_i ) 528 528 CALL tab_2d_3d( nidx, idxice(1:nidx), a_i_2d (1:nidx,1:jpl), a_i ) 529 529 CALL tab_2d_3d( nidx, idxice(1:nidx), v_i_2d (1:nidx,1:jpl), v_i ) … … 574 574 END DO 575 575 ! 576 !!clem CALL tab_2d_1d( nidx, idxice(1:nidx), h t_i_1d (1:nidx), ht_i(:,:,jl) )576 !!clem CALL tab_2d_1d( nidx, idxice(1:nidx), h_i_1d (1:nidx), h_i(:,:,jl) ) 577 577 CALL tab_2d_1d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i(:,:,jl) ) 578 578 CALL tab_2d_1d( nidx, idxice(1:nidx), v_i_1d (1:nidx), v_i(:,:,jl) ) … … 582 582 ! how much of a_i you send in cat sup is somewhat arbitrary 583 583 !!clem: these do not work properly after a restart (I do not know why) 584 !! zdaice(ji,jl) = a_i_1d(ji) * ( h t_i_1d(ji) - hi_max(jl) + epsi10 ) / ht_i_1d(ji)584 !! zdaice(ji,jl) = a_i_1d(ji) * ( h_i_1d(ji) - hi_max(jl) + epsi10 ) / h_i_1d(ji) 585 585 !! zdvice(ji,jl) = v_i_1d(ji) - ( a_i_1d(ji) - zdaice(ji,jl) ) * ( hi_max(jl) - epsi10 ) 586 586 !!clem: these do not work properly after a restart (I do not know why) -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90
r8562 r8563 146 146 ! 147 147 ! !== previous lead fraction and ice volume for flux calculations 148 CALL ice_var_glo2eqv ! h t_i and ht_s for ice albedo calculation148 CALL ice_var_glo2eqv ! h_i and h_s for ice albedo calculation 149 149 CALL ice_var_agg(1) ! at_i for coupling 150 150 CALL store_fields ! Store now ice values … … 358 358 e_i_b (:,:,:,:) = e_i (:,:,:,:) ! ice thermal energy 359 359 WHERE( a_i_b(:,:,:) >= epsi20 ) 360 h t_i_b(:,:,:) = v_i_b (:,:,:) / a_i_b(:,:,:) ! ice thickness361 h t_s_b(:,:,:) = v_s_b (:,:,:) / a_i_b(:,:,:) ! snw thickness360 h_i_b(:,:,:) = v_i_b (:,:,:) / a_i_b(:,:,:) ! ice thickness 361 h_s_b(:,:,:) = v_s_b (:,:,:) / a_i_b(:,:,:) ! snw thickness 362 362 ELSEWHERE 363 h t_i_b(:,:,:) = 0._wp364 h t_s_b(:,:,:) = 0._wp363 h_i_b(:,:,:) = 0._wp 364 h_s_b(:,:,:) = 0._wp 365 365 END WHERE 366 366 -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90
r8534 r8563 302 302 303 303 ! mask temperature 304 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - h t_i_1d(ji) ) )304 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - h_i_1d(ji) ) ) 305 305 t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt0 306 306 END DO … … 326 326 zdh_mel = MIN( 0._wp, dh_i_surf(ji) + dh_i_bott(ji) + dh_snowice(ji) + dh_i_sub(ji) ) 327 327 IF( zdh_mel < 0._wp .AND. a_i_1d(ji) > 0._wp ) THEN 328 zvi = a_i_1d(ji) * h t_i_1d(ji)329 zvs = a_i_1d(ji) * h t_s_1d(ji)328 zvi = a_i_1d(ji) * h_i_1d(ji) 329 zvs = a_i_1d(ji) * h_s_1d(ji) 330 330 ! lateral melting = concentration change 331 zhi_bef = h t_i_1d(ji) - zdh_mel331 zhi_bef = h_i_1d(ji) - zdh_mel 332 332 rswitch = MAX( 0._wp , SIGN( 1._wp , zhi_bef - epsi20 ) ) 333 333 zda_mel = rswitch * a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi20 ) ) 334 334 a_i_1d(ji) = MAX( epsi20, a_i_1d(ji) + zda_mel ) 335 335 ! adjust thickness 336 h t_i_1d(ji) = zvi / a_i_1d(ji)337 h t_s_1d(ji) = zvs / a_i_1d(ji)336 h_i_1d(ji) = zvi / a_i_1d(ji) 337 h_s_1d(ji) = zvs / a_i_1d(ji) 338 338 ! retrieve total concentration 339 339 at_i_1d(ji) = a_i_1d(ji) … … 362 362 CALL tab_2d_1d( nidx, idxice(1:nidx), at_i_1d(1:nidx), at_i ) 363 363 CALL tab_2d_1d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i (:,:,kl) ) 364 CALL tab_2d_1d( nidx, idxice(1:nidx), h t_i_1d(1:nidx), ht_i(:,:,kl) )365 CALL tab_2d_1d( nidx, idxice(1:nidx), h t_s_1d(1:nidx), ht_s(:,:,kl) )364 CALL tab_2d_1d( nidx, idxice(1:nidx), h_i_1d(1:nidx), h_i(:,:,kl) ) 365 CALL tab_2d_1d( nidx, idxice(1:nidx), h_s_1d(1:nidx), h_s(:,:,kl) ) 366 366 CALL tab_2d_1d( nidx, idxice(1:nidx), t_su_1d(1:nidx), t_su(:,:,kl) ) 367 367 CALL tab_2d_1d( nidx, idxice(1:nidx), sm_i_1d(1:nidx), sm_i(:,:,kl) ) … … 436 436 ! --- Change units of e_i, e_s from J/m2 to J/m3 --- ! 437 437 DO jk = 1, nlay_i 438 WHERE( h t_i_1d(1:nidx)>0._wp ) e_i_1d(1:nidx,jk) = e_i_1d(1:nidx,jk) / (ht_i_1d(1:nidx) * a_i_1d(1:nidx)) * nlay_i438 WHERE( h_i_1d(1:nidx)>0._wp ) e_i_1d(1:nidx,jk) = e_i_1d(1:nidx,jk) / (h_i_1d(1:nidx) * a_i_1d(1:nidx)) * nlay_i 439 439 END DO 440 440 DO jk = 1, nlay_s 441 WHERE( h t_s_1d(1:nidx)>0._wp ) e_s_1d(1:nidx,jk) = e_s_1d(1:nidx,jk) / (ht_s_1d(1:nidx) * a_i_1d(1:nidx)) * nlay_s441 WHERE( h_s_1d(1:nidx)>0._wp ) e_s_1d(1:nidx,jk) = e_s_1d(1:nidx,jk) / (h_s_1d(1:nidx) * a_i_1d(1:nidx)) * nlay_s 442 442 END DO 443 443 ! … … 447 447 ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! 448 448 DO jk = 1, nlay_i 449 e_i_1d(1:nidx,jk) = e_i_1d(1:nidx,jk) * h t_i_1d(1:nidx) * a_i_1d(1:nidx) * r1_nlay_i449 e_i_1d(1:nidx,jk) = e_i_1d(1:nidx,jk) * h_i_1d(1:nidx) * a_i_1d(1:nidx) * r1_nlay_i 450 450 END DO 451 451 DO jk = 1, nlay_s 452 e_s_1d(1:nidx,jk) = e_s_1d(1:nidx,jk) * h t_s_1d(1:nidx) * a_i_1d(1:nidx) * r1_nlay_s452 e_s_1d(1:nidx,jk) = e_s_1d(1:nidx,jk) * h_s_1d(1:nidx) * a_i_1d(1:nidx) * r1_nlay_s 453 453 END DO 454 454 ! 455 455 ! Change thickness to volume (replaces routine ice_var_eqv2glo) 456 v_i_1d(1:nidx) = h t_i_1d(1:nidx) * a_i_1d(1:nidx)457 v_s_1d(1:nidx) = h t_s_1d(1:nidx) * a_i_1d(1:nidx)456 v_i_1d(1:nidx) = h_i_1d(1:nidx) * a_i_1d(1:nidx) 457 v_s_1d(1:nidx) = h_s_1d(1:nidx) * a_i_1d(1:nidx) 458 458 smv_i_1d(1:nidx) = sm_i_1d(1:nidx) * v_i_1d(1:nidx) 459 459 460 460 CALL tab_1d_2d( nidx, idxice(1:nidx), at_i_1d(1:nidx), at_i ) 461 461 CALL tab_1d_2d( nidx, idxice(1:nidx), a_i_1d (1:nidx), a_i (:,:,kl) ) 462 CALL tab_1d_2d( nidx, idxice(1:nidx), h t_i_1d(1:nidx), ht_i(:,:,kl) )463 CALL tab_1d_2d( nidx, idxice(1:nidx), h t_s_1d(1:nidx), ht_s(:,:,kl) )462 CALL tab_1d_2d( nidx, idxice(1:nidx), h_i_1d(1:nidx), h_i(:,:,kl) ) 463 CALL tab_1d_2d( nidx, idxice(1:nidx), h_s_1d(1:nidx), h_s(:,:,kl) ) 464 464 CALL tab_1d_2d( nidx, idxice(1:nidx), t_su_1d(1:nidx), t_su(:,:,kl) ) 465 465 CALL tab_1d_2d( nidx, idxice(1:nidx), sm_i_1d(1:nidx), sm_i(:,:,kl) ) -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_da.F90
r8534 r8563 135 135 136 136 ! Contribution to salt flux 137 sfx_lam_1d(ji) = sfx_lam_1d(ji) + rhoic * h t_i_1d(ji) * zda * sm_i_1d(ji) * r1_rdtice137 sfx_lam_1d(ji) = sfx_lam_1d(ji) + rhoic * h_i_1d(ji) * zda * sm_i_1d(ji) * r1_rdtice 138 138 139 139 ! Contribution to heat flux into the ocean [W.m-2], (<0) 140 hfx_thd_1d(ji) = hfx_thd_1d(ji) - zda * r1_rdtice * ( h t_i_1d(ji) * r1_nlay_i * SUM( e_i_1d(ji,1:nlay_i) ) &141 + h t_s_1d(ji) * r1_nlay_s * SUM( e_s_1d(ji,1:nlay_s) ) )140 hfx_thd_1d(ji) = hfx_thd_1d(ji) - zda * r1_rdtice * ( h_i_1d(ji) * r1_nlay_i * SUM( e_i_1d(ji,1:nlay_i) ) & 141 + h_s_1d(ji) * r1_nlay_s * SUM( e_s_1d(ji,1:nlay_s) ) ) 142 142 143 143 ! Contribution to mass flux 144 wfx_lam_1d(ji) = wfx_lam_1d(ji) + zda * r1_rdtice * ( rhoic * h t_i_1d(ji) + rhosn * ht_s_1d(ji) )144 wfx_lam_1d(ji) = wfx_lam_1d(ji) + zda * r1_rdtice * ( rhoic * h_i_1d(ji) + rhosn * h_s_1d(ji) ) 145 145 146 146 ! new concentration 147 147 a_i_1d(ji) = a_i_1d(ji) - zda 148 148 149 ! ensure that h t_i = 0 where a_i = 0149 ! ensure that h_i = 0 where a_i = 0 150 150 IF( a_i_1d(ji) == 0._wp ) THEN 151 h t_i_1d(ji) = 0._wp152 h t_s_1d(ji) = 0._wp151 h_i_1d(ji) = 0._wp 152 h_s_1d(ji) = 0._wp 153 153 ENDIF 154 154 ENDIF -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_dh.F90
r8562 r8563 121 121 DO jk = 1, nlay_i 122 122 DO ji = 1, nidx 123 h_i_old (ji,jk) = h t_i_1d(ji) * r1_nlay_i123 h_i_old (ji,jk) = h_i_1d(ji) * r1_nlay_i 124 124 eh_i_old(ji,jk) = e_i_1d(ji,jk) * h_i_old(ji,jk) 125 125 END DO … … 145 145 IF( t_s_1d(ji,1) > rt0 ) THEN !!! Internal melting 146 146 ! Contribution to heat flux to the ocean [W.m-2], < 0 147 hfx_res_1d(ji) = hfx_res_1d(ji) + e_s_1d(ji,1) * h t_s_1d(ji) * a_i_1d(ji) * r1_rdtice147 hfx_res_1d(ji) = hfx_res_1d(ji) + e_s_1d(ji,1) * h_s_1d(ji) * a_i_1d(ji) * r1_rdtice 148 148 ! Contribution to mass flux 149 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) + rhosn * h t_s_1d(ji) * a_i_1d(ji) * r1_rdtice149 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) + rhosn * h_s_1d(ji) * a_i_1d(ji) * r1_rdtice 150 150 ! updates 151 h t_s_1d(ji) = 0._wp151 h_s_1d(ji) = 0._wp 152 152 e_s_1d (ji,1) = 0._wp 153 153 t_s_1d (ji,1) = rt0 … … 160 160 DO jk = 1, nlay_i 161 161 DO ji = 1, nidx 162 zh_i(ji,jk) = h t_i_1d(ji) * r1_nlay_i162 zh_i(ji,jk) = h_i_1d(ji) * r1_nlay_i 163 163 zeh_i(ji) = zeh_i(ji) + e_i_1d(ji,jk) * zh_i(ji,jk) 164 164 END DO … … 216 216 217 217 ! update thickness 218 h t_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_pre(ji) )218 h_s_1d(ji) = MAX( 0._wp , h_s_1d(ji) + zdh_s_pre(ji) ) 219 219 END DO 220 220 … … 225 225 DO ji = 1, nidx 226 226 ! thickness change 227 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - h t_s_1d(ji) ) )227 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - h_s_1d(ji) ) ) 228 228 rswitch = rswitch * ( MAX( 0._wp, SIGN( 1._wp, e_s_1d(ji,jk) - epsi20 ) ) ) 229 229 zdeltah (ji,jk) = - rswitch * zq_su(ji) / MAX( e_s_1d(ji,jk), epsi20 ) 230 zdeltah (ji,jk) = MAX( zdeltah(ji,jk) , - h t_s_1d(ji) ) ! bound melting230 zdeltah (ji,jk) = MAX( zdeltah(ji,jk) , - h_s_1d(ji) ) ! bound melting 231 231 zdh_s_mel(ji) = zdh_s_mel(ji) + zdeltah(ji,jk) 232 232 ! heat used to melt snow(W.m-2, >0) … … 236 236 ! updates available heat + thickness 237 237 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdeltah(ji,jk) * e_s_1d(ji,jk) ) 238 h t_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdeltah(ji,jk) )238 h_s_1d(ji) = MAX( 0._wp , h_s_1d(ji) + zdeltah(ji,jk) ) 239 239 END DO 240 240 END DO … … 247 247 zdeltah(1:nidx,:) = 0._wp 248 248 DO ji = 1, nidx 249 zdh_s_sub(ji) = MAX( - h t_s_1d(ji) , - evap_ice_1d(ji) * r1_rhosn * rdt_ice )249 zdh_s_sub(ji) = MAX( - h_s_1d(ji) , - evap_ice_1d(ji) * r1_rhosn * rdt_ice ) 250 250 ! remaining evap in kg.m-2 (used for ice melting later on) 251 251 zevap_rema(ji) = evap_ice_1d(ji) * rdt_ice + zdh_s_sub(ji) * rhosn … … 258 258 259 259 ! new snow thickness 260 h t_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_sub(ji) )260 h_s_1d(ji) = MAX( 0._wp , h_s_1d(ji) + zdh_s_sub(ji) ) 261 261 ! update precipitations after sublimation and correct sublimation 262 262 zdh_s_pre(ji) = zdh_s_pre(ji) + zdeltah(ji,1) … … 275 275 DO jk = 1, nlay_s 276 276 DO ji = 1,nidx 277 rswitch = MAX( 0._wp , SIGN( 1._wp, h t_s_1d(ji) - epsi20 ) )278 e_s_1d(ji,jk) = rswitch / MAX( h t_s_1d(ji), epsi20 ) * &277 rswitch = MAX( 0._wp , SIGN( 1._wp, h_s_1d(ji) - epsi20 ) ) 278 e_s_1d(ji,jk) = rswitch / MAX( h_s_1d(ji), epsi20 ) * & 279 279 & ( ( zdh_s_pre(ji) ) * zqprec(ji) + & 280 & ( h t_s_1d(ji) - zdh_s_pre(ji) ) * rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) )280 & ( h_s_1d(ji) - zdh_s_pre(ji) ) * rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) ) 281 281 END DO 282 282 END DO … … 376 376 ! update ice thickness 377 377 DO ji = 1, nidx 378 h t_i_1d(ji) = MAX( 0._wp , ht_i_1d(ji) + dh_i_surf(ji) + dh_i_sub(ji) )378 h_i_1d(ji) = MAX( 0._wp , h_i_1d(ji) + dh_i_surf(ji) + dh_i_sub(ji) ) 379 379 END DO 380 380 … … 555 555 !------------------------------------------- 556 556 DO ji = 1, nidx 557 h t_i_1d(ji) = MAX( 0._wp , ht_i_1d(ji) + dh_i_bott(ji) )557 h_i_1d(ji) = MAX( 0._wp , h_i_1d(ji) + dh_i_bott(ji) ) 558 558 END DO 559 559 … … 566 566 DO ji = 1, nidx 567 567 zq_rema(ji) = zq_su(ji) + zq_bo(ji) 568 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - h t_s_1d(ji) ) ) ! =1 if snow568 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - h_s_1d(ji) ) ) ! =1 if snow 569 569 rswitch = rswitch * MAX( 0._wp, SIGN( 1._wp, e_s_1d(ji,1) - epsi20 ) ) 570 570 zdeltah (ji,1) = - rswitch * zq_rema(ji) / MAX( e_s_1d(ji,1), epsi20 ) 571 zdeltah (ji,1) = MIN( 0._wp , MAX( zdeltah(ji,1) , - h t_s_1d(ji) ) ) ! bound melting571 zdeltah (ji,1) = MIN( 0._wp , MAX( zdeltah(ji,1) , - h_s_1d(ji) ) ) ! bound melting 572 572 dh_s_tot (ji) = dh_s_tot(ji) + zdeltah(ji,1) 573 h t_s_1d (ji) = ht_s_1d(ji) + zdeltah(ji,1)573 h_s_1d (ji) = h_s_1d(ji) + zdeltah(ji,1) 574 574 575 575 zq_rema(ji) = zq_rema(ji) + zdeltah(ji,1) * e_s_1d(ji,1) ! update available heat (J.m-2) … … 594 594 DO ji = 1, nidx 595 595 ! 596 dh_snowice(ji) = MAX( 0._wp , ( rhosn * h t_s_1d(ji) + (rhoic-rau0) * ht_i_1d(ji) ) * z1_rho )597 598 h t_i_1d(ji) = ht_i_1d(ji) + dh_snowice(ji)599 h t_s_1d(ji) = ht_s_1d(ji) - dh_snowice(ji)596 dh_snowice(ji) = MAX( 0._wp , ( rhosn * h_s_1d(ji) + (rhoic-rau0) * h_i_1d(ji) ) * z1_rho ) 597 598 h_i_1d(ji) = h_i_1d(ji) + dh_snowice(ji) 599 h_s_1d(ji) = h_s_1d(ji) - dh_snowice(ji) 600 600 601 601 ! Contribution to energy flux to the ocean [J/m2], >0 (if sst<0) … … 632 632 !------------------------------------------- 633 633 DO ji = 1, nidx 634 rswitch = 1.0 - MAX( 0._wp , SIGN( 1._wp , - h t_i_1d(ji) ) )634 rswitch = 1.0 - MAX( 0._wp , SIGN( 1._wp , - h_i_1d(ji) ) ) 635 635 t_su_1d(ji) = rswitch * t_su_1d(ji) + ( 1.0 - rswitch ) * rt0 636 636 END DO … … 639 639 DO ji = 1,nidx 640 640 ! mask enthalpy 641 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp, - h t_s_1d(ji) ) )641 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp, - h_s_1d(ji) ) ) 642 642 e_s_1d(ji,jk) = rswitch * e_s_1d(ji,jk) 643 643 ! recalculate t_s_1d from e_s_1d … … 646 646 END DO 647 647 648 ! --- ensure that a_i = 0 where h t_i = 0 ---649 WHERE( h t_i_1d(1:nidx) == 0._wp ) a_i_1d(1:nidx) = 0._wp648 ! --- ensure that a_i = 0 where h_i = 0 --- 649 WHERE( h_i_1d(1:nidx) == 0._wp ) a_i_1d(1:nidx) = 0._wp 650 650 ! 651 651 END SUBROUTINE ice_thd_dh -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_do.F90
r8562 r8563 76 76 !! - Computation of variation of ice volume and mass 77 77 !! - Computation of a_i after lateral accretion and 78 !! update h t_s_1d, ht_i_1d and tbif_1d(:,:)78 !! update h_s_1d, h_i_1d 79 79 !!------------------------------------------------------------------------ 80 80 INTEGER :: ji,jj,jk,jl ! dummy loop indices -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_sal.F90
r8559 r8563 75 75 ! Update ice salinity from snow-ice and bottom growth 76 76 !--------------------------------------------------------- 77 IF( h t_i_1d(ji) > 0._wp ) THEN77 IF( h_i_1d(ji) > 0._wp ) THEN 78 78 zs_sni = sss_1d(ji) * ( rhoic - rhosn ) * r1_rhoic ! Salinity of snow ice 79 zsm_i_si = ( zs_sni - sm_i_1d(ji) ) * dh_snowice(ji) / h t_i_1d(ji) ! snow-ice80 zsm_i_bg = ( s_i_new(ji) - sm_i_1d(ji) ) * MAX( 0._wp, dh_i_bott(ji) ) / h t_i_1d(ji) ! bottom growth79 zsm_i_si = ( zs_sni - sm_i_1d(ji) ) * dh_snowice(ji) / h_i_1d(ji) ! snow-ice 80 zsm_i_bg = ( s_i_new(ji) - sm_i_1d(ji) ) * MAX( 0._wp, dh_i_bott(ji) ) / h_i_1d(ji) ! bottom growth 81 81 ! Update salinity (nb: salt flux already included in icethd_dh) 82 82 sm_i_1d(ji) = sm_i_1d(ji) + zsm_i_bg + zsm_i_si … … 97 97 98 98 ! Salt flux 99 sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * h t_i_1d(ji) * ( zsm_i_fl + zsm_i_gd ) * r1_rdtice99 sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * h_i_1d(ji) * ( zsm_i_fl + zsm_i_gd ) * r1_rdtice 100 100 ENDIF 101 101 END DO -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_zdf.F90
r8562 r8563 81 81 !! ice salinities : s_i_1d 82 82 !! number of layers in the ice/snow: nlay_i, nlay_s 83 !! total ice/snow thickness : h t_i_1d, ht_s_1d83 !! total ice/snow thickness : h_i_1d, h_s_1d 84 84 !!------------------------------------------------------------------- 85 85 INTEGER :: ji, jk ! spatial loop index … … 145 145 ! --- diag error on heat diffusion - PART 1 --- ! 146 146 DO ji = 1, nidx 147 zq_ini(ji) = ( SUM( e_i_1d(ji,1:nlay_i) ) * h t_i_1d(ji) * r1_nlay_i + &148 & SUM( e_s_1d(ji,1:nlay_s) ) * h t_s_1d(ji) * r1_nlay_s )147 zq_ini(ji) = ( SUM( e_i_1d(ji,1:nlay_i) ) * h_i_1d(ji) * r1_nlay_i + & 148 & SUM( e_s_1d(ji,1:nlay_s) ) * h_s_1d(ji) * r1_nlay_s ) 149 149 END DO 150 150 … … 153 153 !------------------ 154 154 DO ji = 1, nidx 155 isnow(ji)= 1._wp - MAX( 0._wp , SIGN(1._wp, - h t_s_1d(ji) ) ) ! is there snow or not155 isnow(ji)= 1._wp - MAX( 0._wp , SIGN(1._wp, - h_s_1d(ji) ) ) ! is there snow or not 156 156 ! layer thickness 157 zh_i(ji) = h t_i_1d(ji) * r1_nlay_i158 zh_s(ji) = h t_s_1d(ji) * r1_nlay_s157 zh_i(ji) = h_i_1d(ji) * r1_nlay_i 158 zh_s(ji) = h_s_1d(ji) * r1_nlay_s 159 159 END DO 160 160 ! … … 187 187 ! ftr_ice = io.qsr_ice.exp(-k(h_i)) transmitted below the ice 188 188 ! fr1_i0_1d = i0 for a thin ice cover, fr1_i0_2d = i0 for a thick ice cover 189 zfac = MAX( 0._wp , 1._wp - ( h t_i_1d(ji) * z1_hsu ) )189 zfac = MAX( 0._wp , 1._wp - ( h_i_1d(ji) * z1_hsu ) ) 190 190 i0(ji) = ( 1._wp - isnow(ji) ) * ( fr1_i0_1d(ji) + zfac * fr2_i0_1d(ji) ) 191 191 … … 279 279 DO ji = 1, nidx 280 280 zcnd_i = SUM( ztcond_i(ji,:) ) / REAL( nlay_i+1, wp ) ! Mean sea ice thermal conductivity 281 zhe = ( rn_cnd_s * h t_i_1d(ji) + zcnd_i * ht_s_1d(ji) ) / ( rn_cnd_s + zcnd_i ) ! Effective thickness he (zhe)281 zhe = ( rn_cnd_s * h_i_1d(ji) + zcnd_i * h_s_1d(ji) ) / ( rn_cnd_s + zcnd_i ) ! Effective thickness he (zhe) 282 282 IF( zhe >= zepsilon * 0.5_wp * EXP(1._wp) ) THEN 283 283 zghe(ji) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( 2._wp * zhe / zepsilon ) ) ) ! G(he) … … 382 382 DO ji = 1, nidx 383 383 ! !---------------------! 384 IF ( h t_s_1d(ji) > 0.0 ) THEN ! snow-covered cells !384 IF ( h_s_1d(ji) > 0.0 ) THEN ! snow-covered cells ! 385 385 ! !---------------------! 386 386 ! snow interior terms (bottom equation has the same form as the others) … … 524 524 DO ji = 1, nidx 525 525 ! snow temperatures 526 IF( h t_s_1d(ji) > 0._wp ) THEN526 IF( h_s_1d(ji) > 0._wp ) THEN 527 527 t_s_1d(ji,nlay_s) = ( zindtbis(ji,nlay_s+1) - ztrid(ji,nlay_s+1,3) * t_i_1d(ji,1) ) & 528 528 & / zdiagbis(ji,nlay_s+1) … … 598 598 ! zhfx_err = correction on the diagnosed heat flux due to non-convergence of the algorithm used to solve heat equation 599 599 DO ji = 1, nidx 600 zdq = - zq_ini(ji) + ( SUM( e_i_1d(ji,1:nlay_i) ) * h t_i_1d(ji) * r1_nlay_i + &601 & SUM( e_s_1d(ji,1:nlay_s) ) * h t_s_1d(ji) * r1_nlay_s )600 zdq = - zq_ini(ji) + ( SUM( e_i_1d(ji,1:nlay_i) ) * h_i_1d(ji) * r1_nlay_i + & 601 & SUM( e_s_1d(ji,1:nlay_s) ) * h_s_1d(ji) * r1_nlay_s ) 602 602 603 603 IF( t_su_1d(ji) < rt0 ) THEN ! case T_su < 0degC -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceupdate.F90
r8562 r8563 199 199 ! Snow/ice albedo (only if sent to coupler, useless in forced mode) 200 200 !------------------------------------------------------------------ 201 CALL ice_alb( t_su, h t_i, ht_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os ) ! cloud-sky and overcast-sky ice albedos201 CALL ice_alb( t_su, h_i, h_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os ) ! cloud-sky and overcast-sky ice albedos 202 202 ! 203 203 alb_ice(:,:,:) = ( 1._wp - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icevar.F90
r8559 r8563 15 15 !! - oa_i (jpi,jpj,jpl) 16 16 !! VEQV : equivalent variables sometimes used in the model 17 !! - h t_i(jpi,jpj,jpl)18 !! - h t_s(jpi,jpj,jpl)19 !! - t_i 17 !! - h_i(jpi,jpj,jpl) 18 !! - h_s(jpi,jpj,jpl) 19 !! - t_i(jpi,jpj,nlay_i,jpl) 20 20 !! ... 21 21 !! VAGG : aggregate variables, averaged/summed over all … … 174 174 END WHERE 175 175 ! 176 h t_i(:,:,:) = v_i (:,:,:) * z1_a_i(:,:,:) !--- ice thickness176 h_i(:,:,:) = v_i (:,:,:) * z1_a_i(:,:,:) !--- ice thickness 177 177 178 178 zhmax = hi_max(jpl) 179 179 z1_zhmax = 1._wp / hi_max(jpl) 180 WHERE( h t_i(:,:,jpl) > zhmax ) !--- bound ht_i by hi_max (i.e. 99 m) with associated update of ice area181 h t_i (:,:,jpl) = zhmax180 WHERE( h_i(:,:,jpl) > zhmax ) !--- bound h_i by hi_max (i.e. 99 m) with associated update of ice area 181 h_i (:,:,jpl) = zhmax 182 182 a_i (:,:,jpl) = v_i(:,:,jpl) * z1_zhmax 183 z1_a_i(:,:,jpl) = zhmax * z1_v_i(:,:,jpl) ! NB: v_i always /=0 as h t_i > hi_max183 z1_a_i(:,:,jpl) = zhmax * z1_v_i(:,:,jpl) ! NB: v_i always /=0 as h_i > hi_max 184 184 END WHERE 185 185 186 h t_s(:,:,:) = v_s (:,:,:) * z1_a_i(:,:,:) !--- snow thickness186 h_s(:,:,:) = v_s (:,:,:) * z1_a_i(:,:,:) !--- snow thickness 187 187 188 188 o_i(:,:,:) = oa_i(:,:,:) * z1_a_i(:,:,:) !--- ice age … … 253 253 !!------------------------------------------------------------------- 254 254 ! 255 v_i (:,:,:) = h t_i(:,:,:) * a_i(:,:,:)256 v_s (:,:,:) = h t_s(:,:,:) * a_i(:,:,:)255 v_i (:,:,:) = h_i(:,:,:) * a_i(:,:,:) 256 v_s (:,:,:) = h_s(:,:,:) * a_i(:,:,:) 257 257 smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 258 258 ! … … 305 305 END DO 306 306 ! ! Slope of the linear profile 307 WHERE( h t_i(:,:,:) > epsi20 ) ; z_slope_s(:,:,:) = 2._wp * sm_i(:,:,:) / ht_i(:,:,:)307 WHERE( h_i(:,:,:) > epsi20 ) ; z_slope_s(:,:,:) = 2._wp * sm_i(:,:,:) / h_i(:,:,:) 308 308 ELSEWHERE ; z_slope_s(:,:,:) = 0._wp 309 309 END WHERE … … 326 326 DO ji = 1, jpi 327 327 ! ! linear profile with 0 surface value 328 zs0 = z_slope_s(ji,jj,jl) * ( REAL(jk,wp) - 0.5_wp ) * h t_i(ji,jj,jl) * r1_nlay_i328 zs0 = z_slope_s(ji,jj,jl) * ( REAL(jk,wp) - 0.5_wp ) * h_i(ji,jj,jl) * r1_nlay_i 329 329 zs = zalpha(ji,jj,jl) * zs0 + ( 1._wp - zalpha(ji,jj,jl) ) * sm_i(ji,jj,jl) ! weighting the profile 330 330 s_i(ji,jj,jk,jl) = MIN( rn_simax, MAX( zs, rn_simin ) ) … … 389 389 ! 390 390 ! ! Slope of the linear profile 391 WHERE( h t_i_1d(1:nidx) > epsi20 ) ; z_slope_s(1:nidx) = 2._wp * sm_i_1d(1:nidx) / ht_i_1d(1:nidx)391 WHERE( h_i_1d(1:nidx) > epsi20 ) ; z_slope_s(1:nidx) = 2._wp * sm_i_1d(1:nidx) / h_i_1d(1:nidx) 392 392 ELSEWHERE ; z_slope_s(1:nidx) = 0._wp 393 393 END WHERE … … 404 404 DO ji = 1, nidx 405 405 ! ! linear profile with 0 surface value 406 zs0 = z_slope_s(ji) * ( REAL(jk,wp) - 0.5_wp ) * h t_i_1d(ji) * r1_nlay_i406 zs0 = z_slope_s(ji) * ( REAL(jk,wp) - 0.5_wp ) * h_i_1d(ji) * r1_nlay_i 407 407 zs = zalpha(ji) * zs0 + ( 1._wp - zalpha(ji) ) * sm_i_1d(ji) 408 408 s_i_1d(ji,jk) = MIN( rn_simax , MAX( zs , rn_simin ) ) … … 447 447 ! Zap ice energy and use ocean heat to melt ice 448 448 !----------------------------------------------------------------- 449 WHERE( a_i(:,:,jl) > epsi20 ) ; h t_i(:,:,jl) = v_i(:,:,jl) / a_i(:,:,jl)450 ELSEWHERE ; h t_i(:,:,jl) = 0._wp449 WHERE( a_i(:,:,jl) > epsi20 ) ; h_i(:,:,jl) = v_i(:,:,jl) / a_i(:,:,jl) 450 ELSEWHERE ; h_i(:,:,jl) = 0._wp 451 451 END WHERE 452 452 ! 453 WHERE( a_i(:,:,jl) < epsi10 .OR. v_i(:,:,jl) < epsi10 .OR. h t_i(:,:,jl) < epsi10 ) ; zswitch(:,:) = 0._wp453 WHERE( a_i(:,:,jl) < epsi10 .OR. v_i(:,:,jl) < epsi10 .OR. h_i(:,:,jl) < epsi10 ) ; zswitch(:,:) = 0._wp 454 454 ELSEWHERE ; zswitch(:,:) = 1._wp 455 455 END WHERE … … 490 490 smv_i(ji,jj,jl) = smv_i(ji,jj,jl) * zswitch(ji,jj) 491 491 492 h t_i (ji,jj,jl) = ht_i (ji,jj,jl) * zswitch(ji,jj)493 h t_s (ji,jj,jl) = ht_s (ji,jj,jl) * zswitch(ji,jj)492 h_i (ji,jj,jl) = h_i (ji,jj,jl) * zswitch(ji,jj) 493 h_s (ji,jj,jl) = h_s (ji,jj,jl) * zswitch(ji,jj) 494 494 495 495 END DO … … 519 519 520 520 521 SUBROUTINE ice_var_itd( zhti, zhts, za i, zht_i, zht_s, za_i )521 SUBROUTINE ice_var_itd( zhti, zhts, zati, zh_i, zh_s, za_i ) 522 522 !!------------------------------------------------------------------- 523 523 !! *** ROUTINE ice_var_itd *** … … 543 543 !! ** Arguments : zhti: 1-cat ice thickness 544 544 !! zhts: 1-cat snow depth 545 !! za i: 1-cat ice concentration545 !! zati: 1-cat ice concentration 546 546 !! 547 547 !! ** Output : jpl-cat … … 552 552 INTEGER :: ijpij, i_fill, jl0 553 553 REAL(wp) :: zarg, zV, zconv, zdh, zdv 554 REAL(wp), DIMENSION(:), INTENT(in) :: zhti, zhts, za i ! input ice/snow variables555 REAL(wp), DIMENSION(:,:), INTENT(inout) :: zh t_i, zht_s, za_i ! output ice/snow variables554 REAL(wp), DIMENSION(:), INTENT(in) :: zhti, zhts, zati ! input ice/snow variables 555 REAL(wp), DIMENSION(:,:), INTENT(inout) :: zh_i, zh_s, za_i ! output ice/snow variables 556 556 INTEGER , DIMENSION(4) :: itest 557 557 !!------------------------------------------------------------------- … … 564 564 ! volume and area conservation, positivity and ice categories bounds 565 565 ijpij = SIZE( zhti , 1 ) 566 zh t_i(1:ijpij,1:jpl) = 0._wp567 zh t_s(1:ijpij,1:jpl) = 0._wp566 zh_i(1:ijpij,1:jpl) = 0._wp 567 zh_s(1:ijpij,1:jpl) = 0._wp 568 568 za_i (1:ijpij,1:jpl) = 0._wp 569 569 … … 587 587 i_fill = i_fill - 1 588 588 ! 589 zh t_i(ji,1:jpl) = 0._wp589 zh_i(ji,1:jpl) = 0._wp 590 590 za_i (ji,1:jpl) = 0._wp 591 591 itest(:) = 0 592 592 593 593 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 594 zh t_i(ji,1) = zhti(ji)595 za_i (ji,1) = za i (ji)594 zh_i(ji,1) = zhti(ji) 595 za_i (ji,1) = zati (ji) 596 596 ELSE !-- case ice is thicker: fill categories >1 597 597 ! thickness 598 598 DO jl = 1, i_fill - 1 599 zh t_i(ji,jl) = hi_mean(jl)599 zh_i(ji,jl) = hi_mean(jl) 600 600 END DO 601 601 602 602 ! concentration 603 za_i(ji,jl0) = za i(ji) / SQRT(REAL(jpl))603 za_i(ji,jl0) = zati(ji) / SQRT(REAL(jpl)) 604 604 DO jl = 1, i_fill - 1 605 605 IF ( jl /= jl0 ) THEN 606 zarg = ( zh t_i(ji,jl) - zhti(ji) ) / ( zhti(ji) * 0.5_wp )606 zarg = ( zh_i(ji,jl) - zhti(ji) ) / ( zhti(ji) * 0.5_wp ) 607 607 za_i(ji,jl) = za_i (ji,jl0) * EXP(-zarg**2) 608 608 ENDIF … … 610 610 611 611 ! last category 612 za_i(ji,i_fill) = za i(ji) - SUM( za_i(ji,1:i_fill-1) )613 zV = SUM( za_i(ji,1:i_fill-1) * zh t_i(ji,1:i_fill-1) )614 zh t_i(ji,i_fill) = ( zhti(ji) * zai(ji) - zV ) / MAX( za_i(ji,i_fill), epsi10 )612 za_i(ji,i_fill) = zati(ji) - SUM( za_i(ji,1:i_fill-1) ) 613 zV = SUM( za_i(ji,1:i_fill-1) * zh_i(ji,1:i_fill-1) ) 614 zh_i(ji,i_fill) = ( zhti(ji) * zati(ji) - zV ) / MAX( za_i(ji,i_fill), epsi10 ) 615 615 616 616 ! clem: correction if concentration of upper cat is greater than lower cat … … 619 619 DO jl = jpl, jl0+1, -1 620 620 IF ( za_i(ji,jl) > za_i(ji,jl-1) ) THEN 621 zdv = zh t_i(ji,jl) * za_i(ji,jl)622 zh t_i(ji,jl ) = 0._wp621 zdv = zh_i(ji,jl) * za_i(ji,jl) 622 zh_i(ji,jl ) = 0._wp 623 623 za_i (ji,jl ) = 0._wp 624 624 za_i (ji,1:jl-1) = za_i(ji,1:jl-1) + zdv / MAX( REAL(jl-1) * zhti(ji), epsi10 ) … … 630 630 631 631 ! Compatibility tests 632 zconv = ABS( za i(ji) - SUM( za_i(ji,1:jpl) ) )632 zconv = ABS( zati(ji) - SUM( za_i(ji,1:jpl) ) ) 633 633 IF ( zconv < epsi06 ) itest(1) = 1 ! Test 1: area conservation 634 634 635 zconv = ABS( zhti(ji)*za i(ji) - SUM( za_i(ji,1:jpl)*zht_i(ji,1:jpl) ) )635 zconv = ABS( zhti(ji)*zati(ji) - SUM( za_i(ji,1:jpl)*zh_i(ji,1:jpl) ) ) 636 636 IF ( zconv < epsi06 ) itest(2) = 1 ! Test 2: volume conservation 637 637 638 IF ( zh t_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ?638 IF ( zh_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 639 639 640 640 itest(4) = 1 … … 652 652 DO ji = 1, ijpij 653 653 IF( za_i(ji,jl) > 0._wp ) THEN 654 zh t_s(ji,jl) = zht_i(ji,jl) * ( zhts(ji) / zhti(ji) )654 zh_s(ji,jl) = zh_i(ji,jl) * ( zhts(ji) / zhti(ji) ) 655 655 ! In case snow load is in excess that would lead to transformation from snow to ice 656 656 ! Then, transfer the snow excess into the ice (different from icethd_dh) 657 zdh = MAX( 0._wp, ( rhosn * zh t_s(ji,jl) + ( rhoic - rau0 ) * zht_i(ji,jl) ) * r1_rau0 )658 ! recompute h t_i, ht_s avoiding out of bounds values659 zh t_i(ji,jl) = MIN( hi_max(jl), zht_i(ji,jl) + zdh )660 zh t_s(ji,jl) = MAX( 0._wp, zht_s(ji,jl) - zdh * rhoic * r1_rhosn )657 zdh = MAX( 0._wp, ( rhosn * zh_s(ji,jl) + ( rhoic - rau0 ) * zh_i(ji,jl) ) * r1_rau0 ) 658 ! recompute h_i, h_s avoiding out of bounds values 659 zh_i(ji,jl) = MIN( hi_max(jl), zh_i(ji,jl) + zdh ) 660 zh_s(ji,jl) = MAX( 0._wp, zh_s(ji,jl) - zdh * rhoic * r1_rhosn ) 661 661 ENDIF 662 662 END DO -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icewri.F90
r8562 r8563 137 137 !---------------------------------- 138 138 IF ( iom_use('iceconc_cat' ) ) CALL iom_put( "iceconc_cat" , a_i * zswi2 ) ! area for categories 139 IF ( iom_use('icethic_cat' ) ) CALL iom_put( "icethic_cat" , h t_i * zswi2 ) ! thickness for categories140 IF ( iom_use('snowthic_cat') ) CALL iom_put( "snowthic_cat" , h t_s * zswi2 ) ! snow depth for categories139 IF ( iom_use('icethic_cat' ) ) CALL iom_put( "icethic_cat" , h_i * zswi2 ) ! thickness for categories 140 IF ( iom_use('snowthic_cat') ) CALL iom_put( "snowthic_cat" , h_s * zswi2 ) ! snow depth for categories 141 141 IF ( iom_use('salinity_cat') ) CALL iom_put( "salinity_cat" , sm_i * zswi2 ) ! salinity for categories 142 142 IF ( iom_use('icetemp_cat' ) ) CALL iom_put( "icetemp_cat", ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zswi2 ) ! ice temperature … … 164 164 165 165 IF ( iom_use( "iceconc_cat_mv" ) ) CALL iom_put( "iceconc_cat_mv" , a_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Area for categories 166 IF ( iom_use( "icethic_cat_mv" ) ) CALL iom_put( "icethic_cat_mv" , h t_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Thickness for categories167 IF ( iom_use( "snowthic_cat_mv" ) ) CALL iom_put( "snowthic_cat_mv", h t_s(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Snow depth for categories166 IF ( iom_use( "icethic_cat_mv" ) ) CALL iom_put( "icethic_cat_mv" , h_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Thickness for categories 167 IF ( iom_use( "snowthic_cat_mv" ) ) CALL iom_put( "snowthic_cat_mv", h_s(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Snow depth for categories 168 168 169 169 IF ( iom_use( "icestK" ) ) CALL iom_put( "icestK" , tm_su(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice surface temperature … … 387 387 CALL histwrite( kid, "vfxpnd", kt, wfx_pnd , jpi*jpj, (/1/) ) 388 388 389 CALL histwrite( kid, "sithicat", kt, h t_i, jpi*jpj*jpl, (/1/) )389 CALL histwrite( kid, "sithicat", kt, h_i , jpi*jpj*jpl, (/1/) ) 390 390 CALL histwrite( kid, "siconcat", kt, a_i , jpi*jpj*jpl, (/1/) ) 391 391 CALL histwrite( kid, "sisalcat", kt, sm_i , jpi*jpj*jpl, (/1/) ) 392 392 CALL histwrite( kid, "sitemcat", kt, tm_i - rt0 , jpi*jpj*jpl, (/1/) ) 393 CALL histwrite( kid, "snthicat", kt, h t_s, jpi*jpj*jpl, (/1/) )393 CALL histwrite( kid, "snthicat", kt, h_s , jpi*jpj*jpl, (/1/) ) 394 394 CALL histwrite( kid, "sntemcat", kt, tm_su - rt0 , jpi*jpj*jpl, (/1/) ) 395 395 -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90
r8306 r8563 57 57 #if defined key_lim3 58 58 LOGICAL :: ll_a_i 59 LOGICAL :: ll_h t_i60 LOGICAL :: ll_h t_s59 LOGICAL :: ll_h_i 60 LOGICAL :: ll_h_s 61 61 REAL(wp), POINTER, DIMENSION(:,:) :: a_i !: now ice leads fraction climatology 62 REAL(wp), POINTER, DIMENSION(:,:) :: h t_i!: Now ice thickness climatology63 REAL(wp), POINTER, DIMENSION(:,:) :: h t_s!: now snow thickness62 REAL(wp), POINTER, DIMENSION(:,:) :: h_i !: Now ice thickness climatology 63 REAL(wp), POINTER, DIMENSION(:,:) :: h_s !: now snow thickness 64 64 #endif 65 65 #if defined key_top -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r8424 r8563 187 187 END DO 188 188 ENDIF 189 IF( dta%ll_h t_i ) THEN189 IF( dta%ll_h_i ) THEN 190 190 igrd = 1 191 191 DO jl = 1, jpl … … 193 193 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 194 194 ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 195 dta_bdy(ib_bdy)%h t_i (ib,jl) = ht_i(ii,ij,jl) * tmask(ii,ij,1)195 dta_bdy(ib_bdy)%h_i (ib,jl) = h_i(ii,ij,jl) * tmask(ii,ij,1) 196 196 END DO 197 197 END DO 198 198 ENDIF 199 IF( dta%ll_h t_s ) THEN199 IF( dta%ll_h_s ) THEN 200 200 igrd = 1 201 201 DO jl = 1, jpl … … 203 203 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 204 204 ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 205 dta_bdy(ib_bdy)%h t_s (ib,jl) = ht_s(ii,ij,jl) * tmask(ii,ij,1)205 dta_bdy(ib_bdy)%h_s (ib,jl) = h_s(ii,ij,jl) * tmask(ii,ij,1) 206 206 END DO 207 207 END DO … … 345 345 IF( .NOT. ll_bdylim3 .AND. cn_ice_lim(ib_bdy) /= 'none' .AND. nn_ice_lim_dta(ib_bdy) == 1 ) THEN ! bdy ice input (case input is 1cat) 346 346 CALL ice_var_itd ( bf(jfld_hti)%fnow(:,1,1), bf(jfld_hts)%fnow(:,1,1), bf(jfld_ai)%fnow(:,1,1), & 347 & dta_bdy(ib_bdy)%h t_i, dta_bdy(ib_bdy)%ht_s, dta_bdy(ib_bdy)%a_i )347 & dta_bdy(ib_bdy)%h_i, dta_bdy(ib_bdy)%h_s, dta_bdy(ib_bdy)%a_i ) 348 348 ENDIF 349 349 #endif … … 420 420 TYPE(FLD_N) :: bn_ssh, bn_u2d, bn_v2d ! informations about the fields to be read 421 421 #if defined key_lim3 422 TYPE(FLD_N) :: bn_a_i, bn_h t_i, bn_ht_s422 TYPE(FLD_N) :: bn_a_i, bn_h_i, bn_h_s 423 423 #endif 424 424 NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d 425 425 #if defined key_lim3 426 NAMELIST/nambdy_dta/ bn_a_i, bn_h t_i, bn_ht_s426 NAMELIST/nambdy_dta/ bn_a_i, bn_h_i, bn_h_s 427 427 #endif 428 428 NAMELIST/nambdy_dta/ ln_full_vel, nb_jpk_bdy … … 638 638 ENDIF 639 639 640 IF( dta%ll_h t_i ) THEN641 jfld = jfld + 1 642 blf_i(jfld) = bn_h t_i640 IF( dta%ll_h_i ) THEN 641 jfld = jfld + 1 642 blf_i(jfld) = bn_h_i 643 643 ibdy(jfld) = ib_bdy 644 644 igrid(jfld) = 1 … … 647 647 ENDIF 648 648 649 IF( dta%ll_h t_s ) THEN650 jfld = jfld + 1 651 blf_i(jfld) = bn_h t_s649 IF( dta%ll_h_s ) THEN 650 jfld = jfld + 1 651 blf_i(jfld) = bn_h_s 652 652 ibdy(jfld) = ib_bdy 653 653 igrid(jfld) = 1 … … 785 785 IF (cn_ice_lim(ib_bdy) /= 'none') THEN 786 786 IF( nn_ice_lim_dta(ib_bdy) == 0 ) THEN 787 ALLOCATE( dta_bdy(ib_bdy)%a_i 788 ALLOCATE( dta_bdy(ib_bdy)%h t_i(nblen(1),jpl) )789 ALLOCATE( dta_bdy(ib_bdy)%h t_s(nblen(1),jpl) )787 ALLOCATE( dta_bdy(ib_bdy)%a_i(nblen(1),jpl) ) 788 ALLOCATE( dta_bdy(ib_bdy)%h_i(nblen(1),jpl) ) 789 ALLOCATE( dta_bdy(ib_bdy)%h_s(nblen(1),jpl) ) 790 790 ELSE 791 791 IF ( ll_bdylim3 ) THEN ! case input is Xcat 792 792 jfld = jfld + 1 793 dta_bdy(ib_bdy)%a_i 794 jfld = jfld + 1 795 dta_bdy(ib_bdy)%h t_i => bf(jfld)%fnow(:,1,:)796 jfld = jfld + 1 797 dta_bdy(ib_bdy)%h t_s => bf(jfld)%fnow(:,1,:)793 dta_bdy(ib_bdy)%a_i => bf(jfld)%fnow(:,1,:) 794 jfld = jfld + 1 795 dta_bdy(ib_bdy)%h_i => bf(jfld)%fnow(:,1,:) 796 jfld = jfld + 1 797 dta_bdy(ib_bdy)%h_s => bf(jfld)%fnow(:,1,:) 798 798 ELSE ! case input is 1cat 799 799 jfld_ai = jfld + 1 … … 801 801 jfld_hts = jfld + 3 802 802 jfld = jfld + 3 803 ALLOCATE( dta_bdy(ib_bdy)%a_i 804 ALLOCATE( dta_bdy(ib_bdy)%h t_i(nblen(1),jpl) )805 ALLOCATE( dta_bdy(ib_bdy)%h t_s(nblen(1),jpl) )806 dta_bdy(ib_bdy)%a_i 807 dta_bdy(ib_bdy)%h t_i(:,:) = 0._wp808 dta_bdy(ib_bdy)%h t_s(:,:) = 0._wp803 ALLOCATE( dta_bdy(ib_bdy)%a_i(nblen(1),jpl) ) 804 ALLOCATE( dta_bdy(ib_bdy)%h_i(nblen(1),jpl) ) 805 ALLOCATE( dta_bdy(ib_bdy)%h_s(nblen(1),jpl) ) 806 dta_bdy(ib_bdy)%a_i(:,:) = 0._wp 807 dta_bdy(ib_bdy)%h_i(:,:) = 0._wp 808 dta_bdy(ib_bdy)%h_s(:,:) = 0._wp 809 809 ENDIF 810 810 -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice.F90
r8514 r8563 111 111 zwgt = idx%nbw(jb,jgrd) 112 112 zwgt1 = 1.e0 - idx%nbw(jb,jgrd) 113 a_i (ji,jj,jl) = ( a_i (ji,jj,jl) * zwgt1 + dta%a_i(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Leads fraction114 h t_i(ji,jj,jl) = ( ht_i(ji,jj,jl) * zwgt1 + dta%ht_i(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Ice depth115 h t_s(ji,jj,jl) = ( ht_s(ji,jj,jl) * zwgt1 + dta%ht_s(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Snow depth113 a_i(ji,jj,jl) = ( a_i(ji,jj,jl) * zwgt1 + dta%a_i(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Leads fraction 114 h_i(ji,jj,jl) = ( h_i(ji,jj,jl) * zwgt1 + dta%h_i(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Ice depth 115 h_s(ji,jj,jl) = ( h_s(ji,jj,jl) * zwgt1 + dta%h_s(jb,jl) * zwgt ) * tmask(ji,jj,1) ! Snow depth 116 116 117 117 ! ----------------- … … 122 122 123 123 ! Then, a) transfer the snow excess into the ice (different from icethd_dh) 124 zdh = MAX( 0._wp, ( rhosn * h t_s(ji,jj,jl) + ( rhoic - rau0 ) * ht_i(ji,jj,jl) ) * r1_rau0 )124 zdh = MAX( 0._wp, ( rhosn * h_s(ji,jj,jl) + ( rhoic - rau0 ) * h_i(ji,jj,jl) ) * r1_rau0 ) 125 125 ! Or, b) transfer all the snow into ice (if incoming ice is likely to melt as it comes into a warmer environment) 126 !zdh = MAX( 0._wp, h t_s(ji,jj,jl) * rhosn / rhoic )127 128 ! recompute h t_i, ht_s129 h t_i(ji,jj,jl) = MIN( hi_max(jl), ht_i(ji,jj,jl) + zdh )130 h t_s(ji,jj,jl) = MAX( 0._wp, ht_s(ji,jj,jl) - zdh * rhoic / rhosn )126 !zdh = MAX( 0._wp, h_s(ji,jj,jl) * rhosn / rhoic ) 127 128 ! recompute h_i, h_s 129 h_i(ji,jj,jl) = MIN( hi_max(jl), h_i(ji,jj,jl) + zdh ) 130 h_s(ji,jj,jl) = MAX( 0._wp, h_s(ji,jj,jl) - zdh * rhoic / rhosn ) 131 131 132 132 ENDDO 133 CALL lbc_bdy_lnk( 134 CALL lbc_bdy_lnk( h t_i(:,:,jl), 'T', 1., ib_bdy )135 CALL lbc_bdy_lnk( h t_s(:,:,jl), 'T', 1., ib_bdy )133 CALL lbc_bdy_lnk( a_i(:,:,jl), 'T', 1., ib_bdy ) 134 CALL lbc_bdy_lnk( h_i(:,:,jl), 'T', 1., ib_bdy ) 135 CALL lbc_bdy_lnk( h_s(:,:,jl), 'T', 1., ib_bdy ) 136 136 ENDDO 137 137 ! retrieve at_i … … 161 161 ! 162 162 ! concentration and thickness 163 a_i (ji,jj,jl) = a_i(ii,ij,jl) * rswitch164 h t_i(ji,jj,jl) = ht_i(ii,ij,jl) * rswitch165 h t_s(ji,jj,jl) = ht_s(ii,ij,jl) * rswitch163 a_i(ji,jj,jl) = a_i(ii,ij,jl) * rswitch 164 h_i(ji,jj,jl) = h_i(ii,ij,jl) * rswitch 165 h_s(ji,jj,jl) = h_s(ii,ij,jl) * rswitch 166 166 ! 167 167 ! Ice and snow volumes 168 v_i(ji,jj,jl) = h t_i(ji,jj,jl) * a_i(ji,jj,jl)169 v_s(ji,jj,jl) = h t_s(ji,jj,jl) * a_i(ji,jj,jl)168 v_i(ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) 169 v_s(ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) 170 170 ! 171 171 SELECT CASE( jpbound ) … … 222 222 - rcp * ( ztmelts - rt0 ) ) 223 223 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 224 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * a_i(ji,jj,jl) * h t_i(ji,jj,jl) * r1_nlay_i224 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * a_i(ji,jj,jl) * h_i(ji,jj,jl) * r1_nlay_i 225 225 END DO 226 226 ! … … 228 228 ! 229 229 CALL lbc_bdy_lnk( a_i(:,:,jl), 'T', 1., ib_bdy ) 230 CALL lbc_bdy_lnk( ht_i(:,:,jl), 'T', 1., ib_bdy )231 CALL lbc_bdy_lnk( ht_s(:,:,jl), 'T', 1., ib_bdy )230 CALL lbc_bdy_lnk( h_i(:,:,jl), 'T', 1., ib_bdy ) 231 CALL lbc_bdy_lnk( h_s(:,:,jl), 'T', 1., ib_bdy ) 232 232 CALL lbc_bdy_lnk( v_i(:,:,jl), 'T', 1., ib_bdy ) 233 233 CALL lbc_bdy_lnk( v_s(:,:,jl), 'T', 1., ib_bdy ) -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
r8306 r8563 356 356 CASE('none') 357 357 IF(lwp) WRITE(numout,*) ' no open boundary condition' 358 dta_bdy(ib_bdy)%ll_a_i 359 dta_bdy(ib_bdy)%ll_h t_i = .false.360 dta_bdy(ib_bdy)%ll_h t_s = .false.358 dta_bdy(ib_bdy)%ll_a_i = .false. 359 dta_bdy(ib_bdy)%ll_h_i = .false. 360 dta_bdy(ib_bdy)%ll_h_s = .false. 361 361 CASE('frs') 362 362 IF(lwp) WRITE(numout,*) ' Flow Relaxation Scheme' 363 dta_bdy(ib_bdy)%ll_a_i 364 dta_bdy(ib_bdy)%ll_h t_i = .true.365 dta_bdy(ib_bdy)%ll_h t_s = .true.363 dta_bdy(ib_bdy)%ll_a_i = .true. 364 dta_bdy(ib_bdy)%ll_h_i = .true. 365 dta_bdy(ib_bdy)%ll_h_s = .true. 366 366 CASE DEFAULT ; CALL ctl_stop( 'unrecognised value for cn_ice_lim' ) 367 367 END SELECT -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
r8306 r8563 768 768 #if defined key_lim3 769 769 DO jl=1,jpl 770 transports_2d(1,jsec,jseg) = transports_2d(1,jsec,jseg) + (zTnorm)* &771 a_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) *&772 ( h t_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) + &773 h t_s(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) )770 transports_2d(1,jsec,jseg) = transports_2d(1,jsec,jseg) + (zTnorm)* & 771 a_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) * & 772 ( h_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) + & 773 h_s(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) ) 774 774 775 775 transports_2d(2,jsec,jseg) = transports_2d(2,jsec,jseg) + (zTnorm)* & 776 a_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl)776 a_i(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J,jl) 777 777 END DO 778 778 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
r8512 r8563 91 91 ! already defined in ice.F90 for LIM3 92 92 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i 93 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h t_i, ht_s93 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_i, h_s 94 94 95 95 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tatm_ice !: air temperature [K] … … 143 143 & emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj,1) , & 144 144 & STAT= ierr(3) ) 145 IF( ln_cpl ) ALLOCATE( h t_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(4) )145 IF( ln_cpl ) ALLOCATE( h_i(jpi,jpj,jpl) , h_s(jpi,jpj,jpl) , STAT=ierr(4) ) 146 146 #endif 147 147 … … 173 173 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_ice 174 174 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice 175 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h t_i, ht_s175 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_i, h_s 176 176 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: topmelt, botmelt 177 177 ! -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r8422 r8563 1998 1998 ! we must send the surface potential temperature 1999 1999 IF( l_useCT ) THEN ; ztmp1(:,:) = eos_pt_from_ct( tsn(:,:,1,jp_tem), tsn(:,:,1,jp_sal) ) 2000 ELSE 2000 ELSE ; ztmp1(:,:) = tsn(:,:,1,jp_tem) 2001 2001 ENDIF 2002 2002 ! … … 2111 2111 SELECT CASE( sn_snd_thick%clcat ) 2112 2112 CASE( 'yes' ) 2113 ztmp3(:,:,1:jpl) = h t_i(:,:,1:jpl) * a_i(:,:,1:jpl)2114 ztmp4(:,:,1:jpl) = h t_s(:,:,1:jpl) * a_i(:,:,1:jpl)2113 ztmp3(:,:,1:jpl) = h_i(:,:,1:jpl) * a_i(:,:,1:jpl) 2114 ztmp4(:,:,1:jpl) = h_s(:,:,1:jpl) * a_i(:,:,1:jpl) 2115 2115 CASE( 'no' ) 2116 2116 ztmp3(:,:,:) = 0.0 ; ztmp4(:,:,:) = 0.0 2117 2117 DO jl=1,jpl 2118 ztmp3(:,:,1) = ztmp3(:,:,1) + h t_i(:,:,jl) * a_i(:,:,jl)2119 ztmp4(:,:,1) = ztmp4(:,:,1) + h t_s(:,:,jl) * a_i(:,:,jl)2118 ztmp3(:,:,1) = ztmp3(:,:,1) + h_i(:,:,jl) * a_i(:,:,jl) 2119 ztmp4(:,:,1) = ztmp4(:,:,1) + h_s(:,:,jl) * a_i(:,:,jl) 2120 2120 ENDDO 2121 2121 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) … … 2124 2124 SELECT CASE( sn_snd_thick%clcat ) 2125 2125 CASE( 'yes' ) 2126 ztmp3(:,:,1:jpl) = h t_i(:,:,1:jpl)2127 ztmp4(:,:,1:jpl) = h t_s(:,:,1:jpl)2126 ztmp3(:,:,1:jpl) = h_i(:,:,1:jpl) 2127 ztmp4(:,:,1:jpl) = h_s(:,:,1:jpl) 2128 2128 CASE( 'no' ) 2129 2129 WHERE( SUM( a_i, dim=3 ) /= 0. ) 2130 ztmp3(:,:,1) = SUM( h t_i * a_i, dim=3 ) / SUM( a_i, dim=3 )2131 ztmp4(:,:,1) = SUM( h t_s * a_i, dim=3 ) / SUM( a_i, dim=3 )2130 ztmp3(:,:,1) = SUM( h_i * a_i, dim=3 ) / SUM( a_i, dim=3 ) 2131 ztmp4(:,:,1) = SUM( h_s * a_i, dim=3 ) / SUM( a_i, dim=3 ) 2132 2132 ELSEWHERE 2133 2133 ztmp3(:,:,1) = 0. -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r8331 r8563 721 721 722 722 DO jl = 1,ncat 723 CALL cice2nemo(vsnon(:,:,jl,:),h t_s(:,:,jl),'T', 1. )724 CALL cice2nemo(vicen(:,:,jl,:),h t_i(:,:,jl),'T', 1. )723 CALL cice2nemo(vsnon(:,:,jl,:),h_s(:,:,jl),'T', 1. ) 724 CALL cice2nemo(vicen(:,:,jl,:),h_i(:,:,jl),'T', 1. ) 725 725 ENDDO 726 726 !
Note: See TracChangeset
for help on using the changeset viewer.