Changeset 5208 for branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
- Timestamp:
- 2015-04-13T15:08:59+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r4624 r5208 37 37 USE sbcice_cice ! surface boundary condition: CICE sea-ice model 38 38 USE sbccpl ! surface boundary condition: coupled florulation 39 USE cpl_oasis3, ONLY:lk_cpl ! are we in coupled mode?40 39 USE sbcssr ! surface boundary condition: sea surface restoring 41 40 USE sbcrnf ! surface boundary condition: runoffs 41 USE sbcisf ! surface boundary condition: ice shelf 42 42 USE sbcfwb ! surface boundary condition: freshwater budget 43 43 USE closea ! closed sea … … 82 82 INTEGER :: icpt ! local integer 83 83 !! 84 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx, ln_blk_clio, ln_blk_core, ln_cpl,&84 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx, ln_blk_clio, ln_blk_core, & 85 85 & ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc , ln_rnf, & 86 & ln_ssr , nn_fwb , ln_cdgw , ln_wave , ln_sdw, nn_lsm, cn_iceflx86 & ln_ssr , nn_isf , nn_fwb , ln_cdgw , ln_wave , ln_sdw, nn_lsm, nn_limflx 87 87 INTEGER :: ios 88 88 !!---------------------------------------------------------------------- … … 123 123 WRITE(numout,*) ' CORE bulk formulation ln_blk_core = ', ln_blk_core 124 124 WRITE(numout,*) ' MFS bulk formulation ln_blk_mfs = ', ln_blk_mfs 125 WRITE(numout,*) ' coupled formulation (T if key_ sbc_cpl) ln_cpl = ', ln_cpl126 WRITE(numout,*) ' Flux handling over ice categories cn_iceflx = ', TRIM (cn_iceflx)125 WRITE(numout,*) ' coupled formulation (T if key_oasis3) lk_cpl = ', lk_cpl 126 WRITE(numout,*) ' Multicategory heat flux formulation (LIM3) nn_limflx = ', nn_limflx 127 127 WRITE(numout,*) ' Misc. options of sbc : ' 128 128 WRITE(numout,*) ' Patm gradient added in ocean & ice Eqs. ln_apr_dyn = ', ln_apr_dyn … … 131 131 WRITE(numout,*) ' daily mean to diurnal cycle qsr ln_dm2dc = ', ln_dm2dc 132 132 WRITE(numout,*) ' runoff / runoff mouths ln_rnf = ', ln_rnf 133 WRITE(numout,*) ' iceshelf formulation nn_isf = ', nn_isf 133 134 WRITE(numout,*) ' Sea Surface Restoring on SST and/or SSS ln_ssr = ', ln_ssr 134 135 WRITE(numout,*) ' FreshWater Budget control (=0/1/2) nn_fwb = ', nn_fwb … … 137 138 ENDIF 138 139 139 ! Flux handling over ice categories 140 #if defined key_coupled 141 SELECT CASE ( TRIM (cn_iceflx)) 142 CASE ('ave') 143 ln_iceflx_ave = .TRUE. 144 ln_iceflx_linear = .FALSE. 145 CASE ('linear') 146 ln_iceflx_ave = .FALSE. 147 ln_iceflx_linear = .TRUE. 148 CASE default 149 ln_iceflx_ave = .FALSE. 150 ln_iceflx_linear = .FALSE. 140 ! LIM3 Multi-category heat flux formulation 141 SELECT CASE ( nn_limflx) 142 CASE ( -1 ) 143 IF(lwp) WRITE(numout,*) ' Use of per-category fluxes (nn_limflx = -1) ' 144 CASE ( 0 ) 145 IF(lwp) WRITE(numout,*) ' Average per-category fluxes (nn_limflx = 0) ' 146 CASE ( 1 ) 147 IF(lwp) WRITE(numout,*) ' Average then redistribute per-category fluxes (nn_limflx = 1) ' 148 CASE ( 2 ) 149 IF(lwp) WRITE(numout,*) ' Redistribute a single flux over categories (nn_limflx = 2) ' 151 150 END SELECT 152 IF(lwp) WRITE(numout,*) ' Fluxes averaged over all ice categories ln_iceflx_ave = ', ln_iceflx_ave153 IF(lwp) WRITE(numout,*) ' Fluxes distributed linearly over ice categories ln_iceflx_linear = ', ln_iceflx_linear154 #endif155 151 ! 156 152 #if defined key_top && ! defined key_offline … … 180 176 rnfmsk_z(:) = 0.0_wp 181 177 ENDIF 178 IF( nn_isf .EQ. 0 ) THEN ! no specific treatment in vicinity of ice shelf 179 IF( sbc_isf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_isf arrays' ) 180 fwfisf (:,:) = 0.0_wp 181 END IF 182 182 IF( nn_ice == 0 ) fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 183 183 … … 186 186 187 187 fmmflx(:,:) = 0.0_wp ! freezing-melting array initialisation 188 189 taum(:,:) = 0.0_wp ! Initialise taum for use in gls in case of reduced restart 188 190 189 191 ! ! restartability … … 206 208 IF( ( nn_ice == 3 .OR. nn_ice == 4 ) .AND. nn_ice_embd == 0 ) & 207 209 & CALL ctl_stop( 'LIM3 and CICE sea-ice models require nn_ice_embd = 1 or 2' ) 208 #if defined key_coupled 209 IF( ln_iceflx_ave .AND. ln_iceflx_linear ) & 210 & CALL ctl_stop( ' ln_iceflx_ave and ln_iceflx_linear options are not compatible' ) 211 IF( ( nn_ice ==3 .AND. lk_cpl) .AND. .NOT. ( ln_iceflx_ave .OR. ln_iceflx_linear ) ) & 212 & CALL ctl_stop( ' With lim3 coupled, either ln_iceflx_ave or ln_iceflx_linear must be set to .TRUE.' ) 213 #endif 210 IF( ( nn_ice /= 3 ) .AND. ( nn_limflx >= 0 ) ) & 211 & WRITE(numout,*) 'The nn_limflx>=0 option has no effect if sea ice model is not LIM3' 212 IF( ( nn_ice == 3 ) .AND. ( lk_cpl ) .AND. ( ( nn_limflx == -1 ) .OR. ( nn_limflx == 1 ) ) ) & 213 & CALL ctl_stop( 'The chosen nn_limflx for LIM3 in coupled mode must be 0 or 2' ) 214 IF( ( nn_ice == 3 ) .AND. ( .NOT. lk_cpl ) .AND. ( nn_limflx == 2 ) ) & 215 & CALL ctl_stop( 'The chosen nn_limflx for LIM3 in forced mode cannot be 2' ) 216 214 217 IF( ln_dm2dc ) nday_qsr = -1 ! initialisation flag 215 218 … … 236 239 ! ! Choice of the Surface Boudary Condition (set nsbc) 237 240 icpt = 0 238 IF( ln_ana ) THEN ; nsbc = 1; icpt = icpt + 1 ; ENDIF ! analytical formulation239 IF( ln_flx ) THEN ; nsbc = 2; icpt = icpt + 1 ; ENDIF ! flux formulation240 IF( ln_blk_clio ) THEN ; nsbc = 3; icpt = icpt + 1 ; ENDIF ! CLIO bulk formulation241 IF( ln_blk_core ) THEN ; nsbc = 4; icpt = icpt + 1 ; ENDIF ! CORE bulk formulation242 IF( ln_blk_mfs ) THEN ; nsbc = 6; icpt = icpt + 1 ; ENDIF ! MFS bulk formulation243 IF( l n_cpl ) THEN ; nsbc = 5; icpt = icpt + 1 ; ENDIF ! Coupled formulation244 IF( cp_cfg == 'gyre') THEN ; nsbc = 0; ENDIF ! GYRE analytical formulation245 IF( lk_esopa ) nsbc = -1! esopa test, ALL formulations241 IF( ln_ana ) THEN ; nsbc = jp_ana ; icpt = icpt + 1 ; ENDIF ! analytical formulation 242 IF( ln_flx ) THEN ; nsbc = jp_flx ; icpt = icpt + 1 ; ENDIF ! flux formulation 243 IF( ln_blk_clio ) THEN ; nsbc = jp_clio ; icpt = icpt + 1 ; ENDIF ! CLIO bulk formulation 244 IF( ln_blk_core ) THEN ; nsbc = jp_core ; icpt = icpt + 1 ; ENDIF ! CORE bulk formulation 245 IF( ln_blk_mfs ) THEN ; nsbc = jp_mfs ; icpt = icpt + 1 ; ENDIF ! MFS bulk formulation 246 IF( lk_cpl ) THEN ; nsbc = jp_cpl ; icpt = icpt + 1 ; ENDIF ! Coupled formulation 247 IF( cp_cfg == 'gyre') THEN ; nsbc = jp_gyre ; ENDIF ! GYRE analytical formulation 248 IF( lk_esopa ) nsbc = jp_esopa ! esopa test, ALL formulations 246 249 ! 247 250 IF( icpt /= 1 .AND. .NOT.lk_esopa ) THEN … … 254 257 IF(lwp) THEN 255 258 WRITE(numout,*) 256 IF( nsbc == -1 ) WRITE(numout,*) ' ESOPA test All surface boundary conditions' 257 IF( nsbc == 0 ) WRITE(numout,*) ' GYRE analytical formulation' 258 IF( nsbc == 1 ) WRITE(numout,*) ' analytical formulation' 259 IF( nsbc == 2 ) WRITE(numout,*) ' flux formulation' 260 IF( nsbc == 3 ) WRITE(numout,*) ' CLIO bulk formulation' 261 IF( nsbc == 4 ) WRITE(numout,*) ' CORE bulk formulation' 262 IF( nsbc == 5 ) WRITE(numout,*) ' coupled formulation' 263 IF( nsbc == 6 ) WRITE(numout,*) ' MFS Bulk formulation' 264 ENDIF 265 ! 266 CALL sbc_ssm_init ! Sea-surface mean fields initialisation 267 ! 268 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialisation 269 ! 270 IF( nn_ice == 4 ) CALL cice_sbc_init( nsbc ) ! CICE initialisation 271 ! 259 IF( nsbc == jp_esopa ) WRITE(numout,*) ' ESOPA test All surface boundary conditions' 260 IF( nsbc == jp_gyre ) WRITE(numout,*) ' GYRE analytical formulation' 261 IF( nsbc == jp_ana ) WRITE(numout,*) ' analytical formulation' 262 IF( nsbc == jp_flx ) WRITE(numout,*) ' flux formulation' 263 IF( nsbc == jp_clio ) WRITE(numout,*) ' CLIO bulk formulation' 264 IF( nsbc == jp_core ) WRITE(numout,*) ' CORE bulk formulation' 265 IF( nsbc == jp_cpl ) WRITE(numout,*) ' coupled formulation' 266 IF( nsbc == jp_mfs ) WRITE(numout,*) ' MFS Bulk formulation' 267 ENDIF 268 ! 269 CALL sbc_ssm_init ! Sea-surface mean fields initialisation 270 ! 271 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialisation 272 ! 273 IF( nn_ice == 4 ) CALL cice_sbc_init( nsbc ) ! CICE initialisation 274 ! 275 IF( nsbc == jp_cpl ) CALL sbc_cpl_init (nn_ice) ! OASIS initialisation. must be done before first time step 276 272 277 END SUBROUTINE sbc_init 273 278 … … 320 325 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 321 326 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) 322 CASE( 0) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration323 CASE( 1) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc324 CASE( 2) ; CALL sbc_flx ( kt ) ! flux formulation325 CASE( 3) ; CALL sbc_blk_clio( kt ) ! bulk formulation : CLIO for the ocean326 CASE( 4) ; CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean327 CASE( 5) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! coupled formulation328 CASE( 6) ; CALL sbc_blk_mfs ( kt ) ! bulk formulation : MFS for the ocean329 CASE( -1)330 CALL sbc_ana ( kt ) ! ESOPA, test ALL the formulations331 CALL sbc_gyre ( kt ) !332 CALL sbc_flx ( kt ) !333 CALL sbc_blk_clio( kt ) !334 CALL sbc_blk_core( kt ) !335 CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) !327 CASE( jp_gyre ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration 328 CASE( jp_ana ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc 329 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation 330 CASE( jp_clio ) ; CALL sbc_blk_clio( kt ) ! bulk formulation : CLIO for the ocean 331 CASE( jp_core ) ; CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean 332 CASE( jp_cpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! coupled formulation 333 CASE( jp_mfs ) ; CALL sbc_blk_mfs ( kt ) ! bulk formulation : MFS for the ocean 334 CASE( jp_esopa ) 335 CALL sbc_ana ( kt ) ! ESOPA, test ALL the formulations 336 CALL sbc_gyre ( kt ) ! 337 CALL sbc_flx ( kt ) ! 338 CALL sbc_blk_clio( kt ) ! 339 CALL sbc_blk_core( kt ) ! 340 CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! 336 341 END SELECT 337 342 … … 342 347 CASE( 2 ) ; CALL sbc_ice_lim_2( kt, nsbc ) ! LIM-2 ice model 343 348 CASE( 3 ) ; CALL sbc_ice_lim ( kt, nsbc ) ! LIM-3 ice model 344 !is it useful?345 349 CASE( 4 ) ; CALL sbc_ice_cice ( kt, nsbc ) ! CICE ice model 346 350 END SELECT 347 351 348 352 IF( ln_icebergs ) CALL icb_stp( kt ) ! compute icebergs 353 354 IF( nn_isf /= 0 ) CALL sbc_isf( kt ) ! compute iceshelves 349 355 350 356 IF( ln_rnf ) CALL sbc_rnf( kt ) ! add runoffs to fresh water fluxes … … 414 420 CALL iom_put( "qsr" , qsr ) ! solar heat flux 415 421 IF( nn_ice > 0 ) CALL iom_put( "ice_cover", fr_i ) ! ice fraction 422 CALL iom_put( "taum" , taum ) ! wind stress module 423 CALL iom_put( "wspd" , wndm ) ! wind speed module over free ocean or leads in presence of sea-ice 416 424 ENDIF 417 425 ! 418 426 CALL iom_put( "utau", utau ) ! i-wind stress (stress can be updated at 419 427 CALL iom_put( "vtau", vtau ) ! j-wind stress each time step in sea-ice) 420 CALL iom_put( "taum", taum ) ! wind stress module421 CALL iom_put( "wspd", wndm ) ! wind speed module422 428 ! 423 429 IF(ln_ctl) THEN ! print mean trends (used for debugging) 424 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 )425 CALL prt_ctl(tab2d_1=(emp-rnf ), clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 )426 CALL prt_ctl(tab2d_1=(sfx-rnf ), clinfo1=' sfx-rnf - : ', mask1=tmask, ovlap=1 )430 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 431 CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf), clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 ) 432 CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf), clinfo1=' sfx-rnf - : ', mask1=tmask, ovlap=1 ) 427 433 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask, ovlap=1 ) 428 434 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1 )
Note: See TracChangeset
for help on using the changeset viewer.