Changeset 7788 for trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
- Timestamp:
- 2017-03-11T10:40:59+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r7646 r7788 51 51 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: ttbl, stbl, utbl, vtbl !:top boundary layer variable at T point 52 52 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:) :: misfkt, misfkb !:Level of ice shelf base 53 54 LOGICAL, PUBLIC :: l_isfcpl = .false. ! isf recieved from oasis 53 55 54 56 REAL(wp), PUBLIC, SAVE :: rcpi = 2000.0_wp ! specific heat of ice shelf [J/kg/K] … … 97 99 !!--------------------------------------------------------------------- 98 100 ! 99 ! ! ====================== !100 IF( kt == nit000 ) THEN ! First call kt=nit000 !101 ! ! ====================== !102 CALL sbc_isf_init103 ! ! ---------------------------------------- !104 ELSE ! Swap of forcing fields !105 ! ! ---------------------------------------- !106 fwfisf_b (:,: ) = fwfisf (:,: ) ! Swap the ocean forcing fields except at nit000107 risf_tsc_b(:,:,:) = risf_tsc(:,:,:) ! where before fields are set at the end of the routine108 !109 END IF110 111 101 IF( MOD( kt-1, nn_fsbc) == 0 ) THEN 112 102 ! allocation … … 127 117 CALL iom_put('vtbl',vtbl(:,:) * (1._wp - tmask(:,:,1)) * ssmask(:,:)) 128 118 ! compute fwf and heat flux 129 CALL sbc_isf_cav (kt) 119 ! compute fwf and heat flux 120 IF( .NOT.l_isfcpl ) THEN ; CALL sbc_isf_cav (kt) 121 ELSE ; qisf(:,:) = fwfisf(:,:) * rlfusisf ! heat flux 122 ENDIF 130 123 131 124 CASE ( 2 ) ! Beckmann and Goosse parametrisation … … 134 127 135 128 CASE ( 3 ) ! specified runoff in depth (Mathiot et al., XXXX in preparation) 136 CALL fld_read ( kt, nn_fsbc, sf_rnfisf ) 137 fwfisf(:,:) = - sf_rnfisf(1)%fnow(:,:,1) ! fwf flux from the isf (fwfisf <0 mean melting) 129 ! specified runoff in depth (Mathiot et al., XXXX in preparation) 130 IF( .NOT.l_isfcpl ) THEN 131 CALL fld_read ( kt, nn_fsbc, sf_rnfisf ) 132 fwfisf(:,:) = - sf_rnfisf(1)%fnow(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 133 ENDIF 138 134 qisf(:,:) = fwfisf(:,:) * rlfusisf ! heat flux 139 135 stbl(:,:) = soce 140 136 141 137 CASE ( 4 ) ! specified fwf and heat flux forcing beneath the ice shelf 142 CALL fld_read ( kt, nn_fsbc, sf_fwfisf ) 143 fwfisf(:,:) = - sf_fwfisf(1)%fnow(:,:,1) ! fwf flux from the isf (fwfisf <0 mean melting) 138 ! specified fwf and heat flux forcing beneath the ice shelf 139 IF( .NOT.l_isfcpl ) THEN 140 CALL fld_read ( kt, nn_fsbc, sf_fwfisf ) 141 !CALL fld_read ( kt, nn_fsbc, sf_qisf ) 142 fwfisf(:,:) = -sf_fwfisf(1)%fnow(:,:,1) ! fwf 143 ENDIF 144 144 qisf(:,:) = fwfisf(:,:) * rlfusisf ! heat flux 145 145 stbl(:,:) = soce … … 167 167 CALL lbc_lnk(qisf(:,:) ,'T',1.) 168 168 169 !============================================================================================================================================= 170 IF ( iom_use('fwfisf3d') .OR. iom_use('qlatisf3d') .OR. iom_use('qhcisf3d') .OR. iom_use('qhcisf')) THEN 169 ! output 170 CALL iom_put('qlatisf' , qisf) 171 CALL iom_put('fwfisf' , fwfisf) 172 173 ! Diagnostics 174 IF ( iom_use('fwfisf3d') .OR. iom_use('qlatisf3d') .OR. iom_use('qhcisf3d') .OR. iom_use('qhcisf')) THEN 171 175 CALL wrk_alloc( jpi,jpj,jpk, zfwfisf3d, zqhcisf3d, zqlatisf3d ) 172 176 CALL wrk_alloc( jpi,jpj, zqhcisf2d ) … … 199 203 CALL wrk_dealloc( jpi,jpj,jpk, zfwfisf3d, zqhcisf3d, zqlatisf3d ) 200 204 CALL wrk_dealloc( jpi,jpj, zqhcisf2d ) 201 END IF 202 203 ! output 204 CALL iom_put('qlatisf' , qisf) 205 CALL iom_put('fwfisf', fwfisf) 206 !============================================================================================================================================= 207 208 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 209 IF( ln_rstart .AND. & ! Restart: read in restart file 205 END IF 206 ! deallocation 207 CALL wrk_dealloc( jpi,jpj, zt_frz, zdep ) 208 ! 209 END IF 210 211 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 212 IF( ln_rstart .AND. & ! Restart: read in restart file 210 213 & iom_varid( numror, 'fwf_isf_b', ldstop = .FALSE. ) > 0 ) THEN 211 214 IF(lwp) WRITE(numout,*) ' nit000-1 isf tracer content forcing fields read in the restart file' … … 213 216 CALL iom_get( numror, jpdom_autoglo, 'isf_sc_b', risf_tsc_b(:,:,jp_sal) ) ! before salt content isf_tsc trend 214 217 CALL iom_get( numror, jpdom_autoglo, 'isf_hc_b', risf_tsc_b(:,:,jp_tem) ) ! before salt content isf_tsc trend 215 218 ELSE 216 219 fwfisf_b(:,:) = fwfisf(:,:) 217 220 risf_tsc_b(:,:,:)= risf_tsc(:,:,:) 218 221 END IF 219 222 END IF 220 223 ! 221 ! deallocation 222 CALL wrk_dealloc( jpi,jpj, zt_frz, zdep ) 223 END IF 224 ! 224 IF( lrst_oce ) THEN 225 IF(lwp) WRITE(numout,*) 226 IF(lwp) WRITE(numout,*) 'sbc : isf surface tracer content forcing fields written in ocean restart file ', & 227 & 'at it= ', kt,' date= ', ndastp 228 IF(lwp) WRITE(numout,*) '~~~~' 229 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:) ) 230 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem) ) 231 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal) ) 232 ENDIF 233 ! 225 234 END SUBROUTINE sbc_isf 226 235 … … 306 315 307 316 CASE ( 2 , 3 ) 308 ALLOCATE( sf_rnfisf(1), STAT=ierror ) 309 ALLOCATE( sf_rnfisf(1)%fnow(jpi,jpj,1), sf_rnfisf(1)%fdta(jpi,jpj,1,2) ) 310 CALL fld_fill( sf_rnfisf, (/ sn_rnfisf /), cn_dirisf, 'sbc_isf_init', 'read fresh water flux isf data', 'namsbc_isf' ) 311 312 ! read effective lenght (BG03) 313 IF (nn_isf == 2) THEN 317 IF( .NOT.l_isfcpl ) THEN 318 ALLOCATE( sf_rnfisf(1), STAT=ierror ) 319 ALLOCATE( sf_rnfisf(1)%fnow(jpi,jpj,1), sf_rnfisf(1)%fdta(jpi,jpj,1,2) ) 320 CALL fld_fill( sf_rnfisf, (/ sn_rnfisf /), cn_dirisf, 'sbc_isf_init', 'read fresh water flux isf data', 'namsbc_isf' ) 321 ENDIF 322 ! read effective lenght (BG03) 323 IF (nn_isf == 2) THEN 314 324 CALL iom_open( sn_Leff_isf%clname, inum ) 315 325 cvarLeff = TRIM(sn_Leff_isf%clvar) … … 318 328 ! 319 329 risfLeff = risfLeff*1000.0_wp !: convertion in m 320 END IF 321 330 END IF 322 331 ! read depth of the top and bottom of the isf top boundary layer (in this case, isf front depth and grounding line depth) 323 332 CALL iom_open( sn_depmax_isf%clname, inum ) … … 348 357 349 358 ! load variable used in fldread (use for temporal interpolation of isf fwf forcing) 350 ALLOCATE( sf_fwfisf(1), STAT=ierror ) 351 ALLOCATE( sf_fwfisf(1)%fnow(jpi,jpj,1), sf_fwfisf(1)%fdta(jpi,jpj,1,2) ) 352 CALL fld_fill( sf_fwfisf, (/ sn_fwfisf /), cn_dirisf, 'sbc_isf_init', 'read fresh water flux isf data', 'namsbc_isf' ) 359 IF( .NOT.l_isfcpl ) THEN 360 ALLOCATE( sf_fwfisf(1), STAT=ierror ) 361 ALLOCATE( sf_fwfisf(1)%fnow(jpi,jpj,1), sf_fwfisf(1)%fdta(jpi,jpj,1,2) ) 362 CALL fld_fill( sf_fwfisf, (/ sn_fwfisf /), cn_dirisf, 'sbc_isf_init', 'read fresh water flux isf data', 'namsbc_isf' ) 363 ENDIF 353 364 354 365 END SELECT
Note: See TracChangeset
for help on using the changeset viewer.