Changeset 7731 for branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
- Timestamp:
- 2017-02-23T14:23:32+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r7730 r7731 53 53 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: risfLeff !:effective length (Leff) BG03 nn_isf==2 54 54 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: ttbl, stbl, utbl, vtbl !:top boundary layer variable at T point 55 #if defined key_agrif56 ! AGRIF can not handle these arrays as integers. The reason is a mystery but problems avoided by declaring them as reals57 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: misfkt, misfkb !:Level of ice shelf base58 !: (first wet level and last level include in the tbl)59 #else60 55 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: misfkt, misfkb !:Level of ice shelf base 61 #endif62 56 63 57 … … 92 86 REAL(wp) :: rmin 93 87 REAL(wp) :: zhk 94 CHARACTER(len=256) :: cfisf, cvarzisf, cvarhisf ! name for isf file 88 REAL(wp) :: zt_frz, zpress 89 CHARACTER(len=256) :: cfisf , cvarzisf, cvarhisf ! name for isf file 95 90 CHARACTER(LEN=256) :: cnameis ! name of iceshelf file 96 91 CHARACTER (LEN=32) :: cvarLeff ! variable name for efficient Length scale … … 176 171 DO jj = 1, jpj 177 172 jk = 2 178 DO WHILE ( jk .LE. mbkt(ji,jj) .AND. fsdepw(ji,jj,jk) < rzisf_tbl(ji,jj) ) ; jk = jk + 1 ; END DO173 DO WHILE ( jk .LE. mbkt(ji,jj) .AND. gdepw_0(ji,jj,jk) < rzisf_tbl(ji,jj) ) ; jk = jk + 1 ; END DO 179 174 misfkt(ji,jj) = jk-1 180 175 END DO … … 194 189 END IF 195 190 191 ! save initial top boundary layer thickness 196 192 rhisf_tbl_0(:,:) = rhisf_tbl(:,:) 193 194 END IF 195 196 ! ! ---------------------------------------- ! 197 IF( kt /= nit000 ) THEN ! Swap of forcing fields ! 198 ! ! ---------------------------------------- ! 199 fwfisf_b (:,: ) = fwfisf (:,: ) ! Swap the ocean forcing fields except at nit000 200 risf_tsc_b(:,:,:) = risf_tsc(:,:,:) ! where before fields are set at the end of the routine 201 ! 202 ENDIF 203 204 IF( MOD( kt-1, nn_fsbc) == 0 ) THEN 197 205 198 206 ! compute bottom level of isf tbl and thickness of tbl below the ice shelf … … 205 213 206 214 ! determine the deepest level influenced by the boundary layer 207 ! test on tmask useless ?????208 215 DO jk = ikt, mbkt(ji,jj) 209 216 IF ( (SUM(fse3t_n(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk … … 217 224 END DO 218 225 END DO 219 220 END IF221 222 ! ! ---------------------------------------- !223 IF( kt /= nit000 ) THEN ! Swap of forcing fields !224 ! ! ---------------------------------------- !225 fwfisf_b (:,: ) = fwfisf (:,: ) ! Swap the ocean forcing fields except at nit000226 risf_tsc_b(:,:,:) = risf_tsc(:,:,:) ! where before fields are set at the end of the routine227 !228 ENDIF229 230 IF( MOD( kt-1, nn_fsbc) == 0 ) THEN231 232 226 233 227 ! compute salf and heat flux … … 270 264 END IF 271 265 ! compute tsc due to isf 272 ! WARNING water add at temp = 0C, correction term is added in trasbc, maybe better here but need a 3D variable). 273 risf_tsc(:,:,jp_tem) = qisf(:,:) * r1_rau0_rcp ! 266 ! WARNING water add at temp = 0C, correction term is added, maybe better here but need a 3D variable). 267 ! zpress = grav*rau0*fsdept(ji,jj,jk)*1.e-04 268 zt_frz = -1.9 !eos_fzp( tsn(ji,jj,jk,jp_sal), zpress ) 269 risf_tsc(:,:,jp_tem) = qisf(:,:) * r1_rau0_rcp - rdivisf * fwfisf(:,:) * zt_frz * r1_rau0 ! 274 270 275 271 ! salt effect already take into account in vertical advection 276 272 risf_tsc(:,:,jp_sal) = (1.0_wp-rdivisf) * fwfisf(:,:) * stbl(:,:) * r1_rau0 277 273 274 ! output 275 IF( iom_use('qisf' ) ) CALL iom_put('qisf' , qisf) 276 IF( iom_use('fwfisf') ) CALL iom_put('fwfisf', fwfisf * stbl(:,:) / soce ) 277 278 ! if apply only on the trend and not as a volume flux (rdivisf = 0), fwfisf have to be set to 0 now 279 fwfisf(:,:) = rdivisf * fwfisf(:,:) 280 278 281 ! lbclnk 279 282 CALL lbc_lnk(risf_tsc(:,:,jp_tem),'T',1.) … … 295 298 ENDIF 296 299 ! 297 ! output298 CALL iom_put('qisf' , qisf)299 IF( iom_use('fwfisf') ) CALL iom_put('fwfisf', fwfisf * stbl(:,:) / soce )300 300 END IF 301 301 … … 472 472 473 473 nit = nit + 1 474 IF (nit .GE. 100) THEN 475 !WRITE(numout,*) "sbcisf : too many iteration ... ", zhtflx, zhtflx_b,zgammat, rn_gammat0, rn_tfri2, nn_gammablk, ji,jj 476 !WRITE(numout,*) "sbcisf : too many iteration ... ", (zhtflx - zhtflx_b)/zhtflx 477 CALL ctl_stop( 'STOP', 'sbc_isf_hol99 : too many iteration ...' ) 478 END IF 474 IF (nit .GE. 100) CALL ctl_stop( 'STOP', 'sbc_isf_hol99 : too many iteration ...' ) 475 479 476 ! save gammat and compute zhtflx_b 480 477 zgammat2d(ji,jj)=zgammat … … 794 791 ! test on tmask useless ????? 795 792 DO jk = ikt, mbkt(ji,jj) 796 !IF ( (SUM(fse3t(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk793 IF ( (SUM(fse3t(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk 797 794 END DO 798 795 rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(fse3t(ji,jj,ikt:ikb))) ! limit the tbl to water thickness.
Note: See TracChangeset
for help on using the changeset viewer.