Changeset 5385 for trunk/NEMOGCM/NEMO/OPA_SRC/SBC
- Timestamp:
- 2015-06-09T15:50:42+02:00 (9 years ago)
- Location:
- trunk/NEMOGCM/NEMO/OPA_SRC/SBC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
r5123 r5385 58 58 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qns_ice !: non solar heat flux over ice [W/m2] 59 59 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice !: solar heat flux over ice [W/m2] 60 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice_mean !: daily mean solar heat flux over ice [W/m2]61 60 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qla_ice !: latent flux over ice [W/m2] 62 61 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dqla_ice !: latent sensibility over ice [W/m2/K] … … 152 151 #endif 153 152 ! 154 #if defined key_lim2155 IF( ltrcdm2dc_ice ) ALLOCATE( qsr_ice_mean (jpi,jpj,jpl), STAT=ierr(3) )156 #endif157 !158 153 #if defined key_cice || defined key_lim2 159 154 IF( lk_cpl ) ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(5) ) -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r5120 r5385 81 81 !! Ocean Surface Boundary Condition fields 82 82 !!---------------------------------------------------------------------- 83 INTEGER , PUBLIC :: ncpl_qsr_freq !: qsr coupling frequency per days from atmosphere 84 ! 83 85 LOGICAL , PUBLIC :: lhftau = .FALSE. !: HF tau used in TKE: mean(stress module) - module(mean stress) 84 LOGICAL , PUBLIC :: ltrcdm2dc !: In case of Diurnal Cycle short wave, compute a Daily Mean short waves flux85 86 !! !! now ! before !! 86 87 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau , utau_b !: sea surface i-stress (ocean referential) [N/m2] … … 90 91 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm !: wind speed module at T-point (=|U10m-Uoce|) [m/s] 91 92 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr !: sea heat flux: solar [W/m2] 92 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_mean !: daily mean sea heat flux: solar [W/m2]93 93 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns , qns_b !: sea heat flux: non solar [W/m2] 94 94 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_tot !: total solar heat flux (over sea and ice) [W/m2] … … 162 162 #endif 163 163 ! 164 IF( ltrcdm2dc ) ALLOCATE( qsr_mean(jpi,jpj) , STAT=ierr(5) )165 !166 164 sbc_oce_alloc = MAXVAL( ierr ) 167 165 IF( lk_mpp ) CALL mpp_sum ( sbc_oce_alloc ) -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r5065 r5385 22 22 !! blk_oce_core : computes momentum, heat and freshwater fluxes over ocean 23 23 !! blk_ice_core : computes momentum, heat and freshwater fluxes over ice 24 !! blk_bio_meanqsr : compute daily mean short wave radiation over the ocean25 !! blk_ice_meanqsr : compute daily mean short wave radiation over the ice26 24 !! turb_core_2z : Computes turbulent transfert coefficients 27 25 !! cd_neutral_10m : Estimate of the neutral drag coefficient at 10m … … 52 50 PUBLIC sbc_blk_core ! routine called in sbcmod module 53 51 PUBLIC blk_ice_core ! routine called in sbc_ice_lim module 54 PUBLIC blk_ice_meanqsr ! routine called in sbc_ice_lim module55 52 PUBLIC turb_core_2z ! routine calles in sbcblk_mfs module 56 53 … … 195 192 ! ! compute the surface ocean fluxes using CORE bulk formulea 196 193 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m ) 197 198 ! If diurnal cycle is activated, compute a daily mean short waves flux for biogeochemistery199 IF( ltrcdm2dc ) CALL blk_bio_meanqsr200 194 201 195 #if defined key_cice … … 302 296 ELSE ; qsr(:,:) = zztmp * sf(jp_qsr)%fnow(:,:,1) * tmask(:,:,1) 303 297 ENDIF 298 304 299 zqlw(:,:) = ( sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Long Wave 305 300 ! ----------------------------------------------------------------------------- ! … … 611 606 ! 612 607 END SUBROUTINE blk_ice_core 613 614 615 SUBROUTINE blk_bio_meanqsr616 !!---------------------------------------------------------------------617 !! *** ROUTINE blk_bio_meanqsr618 !!619 !! ** Purpose : provide daily qsr_mean for PISCES when620 !! analytic diurnal cycle is applied in physic621 !!622 !! ** Method : add part where there is no ice623 !!624 !!---------------------------------------------------------------------625 IF( nn_timing == 1 ) CALL timing_start('blk_bio_meanqsr')626 !627 qsr_mean(:,:) = (1. - albo ) * sf(jp_qsr)%fnow(:,:,1)628 !629 IF( nn_timing == 1 ) CALL timing_stop('blk_bio_meanqsr')630 !631 END SUBROUTINE blk_bio_meanqsr632 633 634 SUBROUTINE blk_ice_meanqsr( palb, p_qsr_mean, pdim )635 !!---------------------------------------------------------------------636 !!637 !! ** Purpose : provide the daily qsr_mean over sea_ice for PISCES when638 !! analytic diurnal cycle is applied in physic639 !!640 !! ** Method : compute qsr641 !!642 !!---------------------------------------------------------------------643 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: palb ! ice albedo (clear sky) (alb_ice_cs) [%]644 REAL(wp), DIMENSION(:,:,:), INTENT( out) :: p_qsr_mean ! solar heat flux over ice (T-point) [W/m2]645 INTEGER , INTENT(in ) :: pdim ! number of ice categories646 !647 INTEGER :: ijpl ! number of ice categories (size of 3rd dim of input arrays)648 INTEGER :: ji, jj, jl ! dummy loop indices649 REAL(wp) :: zztmp ! temporary variable650 !!---------------------------------------------------------------------651 IF( nn_timing == 1 ) CALL timing_start('blk_ice_meanqsr')652 !653 ijpl = pdim ! number of ice categories654 zztmp = 1. / ( 1. - albo )655 ! ! ========================== !656 DO jl = 1, ijpl ! Loop over ice categories !657 ! ! ========================== !658 DO jj = 1 , jpj659 DO ji = 1, jpi660 p_qsr_mean(ji,jj,jl) = zztmp * ( 1. - palb(ji,jj,jl) ) * qsr_mean(ji,jj)661 END DO662 END DO663 END DO664 !665 IF( nn_timing == 1 ) CALL timing_stop('blk_ice_meanqsr')666 !667 END SUBROUTINE blk_ice_meanqsr668 669 608 670 609 SUBROUTINE turb_core_2z( zt, zu, sst, T_zt, q_sat, q_zt, dU, & -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
r4990 r5385 194 194 & tprecip , sprecip , & 195 195 & fr1_i0 , fr2_i0 , cp_ice_msh , jpl ) 196 IF( ltrcdm2dc_ice ) CALL blk_ice_meanqsr( zalb_ice, qsr_ice_mean, jpl )197 196 198 197 CASE( jp_cpl ) ! Coupled formulation : atmosphere-ice stress only (fluxes provided after ice dynamics) … … 232 231 CALL sbc_cpl_ice_flx( frld, & 233 232 ! optional arguments, used only in 'mixed oce-ice' case 234 & palbi = zalb_ice, psst = sst_m, pist =zsist )233 & palbi=zalb_ice, psst=sst_m, pist=zsist ) 235 234 sprecip(:,:) = - emp_ice(:,:) ! Ugly patch, WARNING, in coupled mode, sublimation included in snow (parsub = 0.) 236 235 ENDIF 237 236 CALL lim_thd_2 ( kt ) ! Ice thermodynamics 238 237 CALL lim_sbc_flx_2 ( kt ) ! update surface ocean mass, heat & salt fluxes 239 #if defined key_top240 IF( ltrcdm2dc_ice )CALL lim_bio_meanqsr_2241 #endif242 238 243 239 IF( .NOT. lk_mpp )THEN -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r5123 r5385 24 24 USE phycst ! physical constants 25 25 USE sbc_oce ! Surface boundary condition: ocean fields 26 USE trc_oce ! shared ocean-passive tracers variables 26 27 USE sbc_ice ! Surface boundary condition: ice fields 27 28 USE sbcdcy ! surface boundary condition: diurnal cycle … … 151 152 END SELECT 152 153 ! 153 #if defined key_top && ! defined key_offline154 ltrcdm2dc = (ln_dm2dc .AND. ln_blk_core .AND. nn_ice==2)155 IF( ltrcdm2dc )THEN156 IF(lwp)THEN157 WRITE(numout,*)"analytical diurnal cycle, core bulk formulation and LIM2 use: "158 WRITE(numout,*)"Diurnal cycle on physics but not in passive tracers"159 ENDIF160 ENDIF161 #else162 ltrcdm2dc = .FALSE.163 #endif164 165 !166 154 ! ! allocate sbc arrays 167 155 IF( sbc_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_oce arrays' ) … … 238 226 & asked coupling with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 239 227 ENDIF 240 241 228 ! ! Choice of the Surface Boudary Condition (set nsbc) 242 229 icpt = 0 … … 273 260 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialisation 274 261 ! 262 IF( ln_rnf ) CALL sbc_rnf_init ! Runof initialisation 263 ! 275 264 IF( nn_ice == 3 ) CALL sbc_lim_init ! LIM3 initialisation 276 265 … … 278 267 ! 279 268 IF( nsbc == jp_cpl ) CALL sbc_cpl_init (nn_ice) ! OASIS initialisation. must be done before first time step 280 269 281 270 END SUBROUTINE sbc_init 282 271 -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r4990 r5385 37 37 ! !!* namsbc_rnf namelist * 38 38 CHARACTER(len=100), PUBLIC :: cn_dir !: Root directory for location of ssr files 39 LOGICAL , PUBLIC :: ln_rnf_depth !: depth river runoffs attribute specified in a file 39 LOGICAL , PUBLIC :: ln_rnf_depth !: depth river runoffs attribute specified in a file 40 LOGICAL :: ln_rnf_depth_ini !: depth river runoffs computed at the initialisation 41 REAL(wp) :: rn_rnf_max !: maximum value of the runoff climatologie ( ln_rnf_depth_ini = .true ) 42 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 43 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 40 44 LOGICAL , PUBLIC :: ln_rnf_tem !: temperature river runoffs attribute specified in a file 41 45 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file … … 104 108 ! 105 109 CALL wrk_alloc( jpi,jpj, ztfrz) 106 107 !108 IF( kt == nit000 ) CALL sbc_rnf_init ! Read namelist and allocate structures109 110 110 111 ! ! ---------------------------------------- ! … … 255 256 !!---------------------------------------------------------------------- 256 257 CHARACTER(len=32) :: rn_dep_file ! runoff file name 257 INTEGER :: ji, jj, jk ! dummy loop indices258 INTEGER :: ji, jj, jk, jm ! dummy loop indices 258 259 INTEGER :: ierror, inum ! temporary integer 259 260 INTEGER :: ios ! Local integer output status for namelist read 261 INTEGER :: nbrec ! temporary integer 262 REAL(wp) :: zacoef 263 REAL(wp), DIMENSION(12) :: zrec ! times records 264 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zrnfcl 265 REAL(wp), DIMENSION(:,: ), ALLOCATABLE :: zrnf 260 266 ! 261 267 NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, & 262 268 & sn_rnf, sn_cnf , sn_s_rnf , sn_t_rnf , sn_dep_rnf, & 263 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact 269 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact, & 270 & ln_rnf_depth_ini , rn_dep_max , rn_rnf_max, nn_rnf_depth_file 264 271 !!---------------------------------------------------------------------- 265 272 ! … … 299 306 IF(lwp) WRITE(numout,*) 300 307 IF(lwp) WRITE(numout,*) ' runoffs directly provided in the precipitations' 301 IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal ) THEN308 IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal .OR. ln_rnf_depth_ini ) THEN 302 309 CALL ctl_warn( 'runoffs already included in precipitations, so runoff (T,S, depth) attributes will not be used' ) 303 ln_rnf_depth = .FALSE. ; ln_rnf_tem = .FALSE. ; ln_rnf_sal = .FALSE. 310 ln_rnf_depth = .FALSE. ; ln_rnf_tem = .FALSE. ; ln_rnf_sal = .FALSE. ; ln_rnf_depth_ini = .FALSE. 304 311 ENDIF 305 312 ! … … 375 382 END DO 376 383 END DO 384 ! 385 ELSE IF( ln_rnf_depth_ini ) THEN ! runoffs applied at the surface 386 ! 387 IF(lwp) WRITE(numout,*) 388 IF(lwp) WRITE(numout,*) ' depth of runoff computed once from max value of runoff' 389 IF(lwp) WRITE(numout,*) ' max value of the runoff climatologie (over global domain) rn_rnf_max = ', rn_rnf_max 390 IF(lwp) WRITE(numout,*) ' depth over which runoffs is spread rn_dep_max = ', rn_dep_max 391 IF(lwp) WRITE(numout,*) ' create (=1) a runoff depth file or not (=0) nn_rnf_depth_file = ', nn_rnf_depth_file 392 393 CALL iom_open( TRIM( sn_rnf%clname ), inum ) ! open runoff file 394 CALL iom_gettime( inum, zrec, kntime=nbrec) 395 ALLOCATE( zrnfcl(jpi,jpj,nbrec) ) ; ALLOCATE( zrnf(jpi,jpj) ) 396 DO jm = 1, nbrec 397 CALL iom_get( inum, jpdom_data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,jm), jm ) 398 END DO 399 CALL iom_close( inum ) 400 zrnf(:,:) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! maximum value in time 401 DEALLOCATE( zrnfcl ) 402 ! 403 h_rnf(:,:) = 1. 404 ! 405 zacoef = rn_dep_max / rn_rnf_max ! coef of linear relation between runoff and its depth (150m for max of runoff) 406 ! 407 WHERE( zrnf(:,:) > 0._wp ) h_rnf(:,:) = zacoef * zrnf(:,:) ! compute depth for all runoffs 408 ! 409 DO jj = 1, jpj ! take in account min depth of ocean rn_hmin 410 DO ji = 1, jpi 411 IF( zrnf(ji,jj) > 0._wp ) THEN 412 jk = mbkt(ji,jj) 413 h_rnf(ji,jj) = MIN( h_rnf(ji,jj), gdept_0(ji,jj,jk ) ) 414 ENDIF 415 END DO 416 END DO 417 ! 418 nk_rnf(:,:) = 0 ! number of levels on which runoffs are distributed 419 DO jj = 1, jpj 420 DO ji = 1, jpi 421 IF( zrnf(ji,jj) > 0._wp ) THEN 422 jk = 2 423 DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ; jk = jk + 1 ; END DO 424 nk_rnf(ji,jj) = jk 425 ELSE 426 nk_rnf(ji,jj) = 1 427 ENDIF 428 END DO 429 END DO 430 ! 431 DEALLOCATE( zrnf ) 432 ! 433 DO jj = 1, jpj ! set the associated depth 434 DO ji = 1, jpi 435 h_rnf(ji,jj) = 0._wp 436 DO jk = 1, nk_rnf(ji,jj) 437 h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) 438 END DO 439 END DO 440 END DO 441 ! 442 IF( nn_rnf_depth_file == 1 ) THEN ! save output nb levels for runoff 443 IF(lwp) WRITE(numout,*) ' create runoff depht file' 444 CALL iom_open ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE., kiolib = jprstlib ) 445 CALL iom_rstput( 0, 0, inum, 'rodepth', h_rnf ) 446 CALL iom_close ( inum ) 447 ENDIF 377 448 ELSE ! runoffs applied at the surface 378 449 nk_rnf(:,:) = 1
Note: See TracChangeset
for help on using the changeset viewer.