- Timestamp:
- 2016-02-18T17:46:36+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_pcbias/NEMOGCM/NEMO/OPA_SRC/ASM/bias.F90
r6300 r6328 113 113 & bias_wrt 114 114 115 #if defined key_bias116 LOGICAL, PUBLIC, PARAMETER :: lk_bias = .TRUE. !: Logical switch for bias correction117 #else118 LOGICAL, PUBLIC, PARAMETER :: lk_bias = .FALSE. !: No bias correction119 #endif120 115 121 116 !! * Shared variables … … 138 133 & fb_p_ofl, & !: parition of bias in P for ofl bias term 139 134 & fctamp, & !: amplification factor for T if inertial 140 & rn_maxlat ,& !: Max lat for latitudinal ramp141 & rn_minlat 135 & rn_maxlat_bias, & !: Max lat for latitudinal ramp 136 & rn_minlat_bias !: Min lat for latitudinal ramp 142 137 143 138 LOGICAL, PRIVATE :: lalloc … … 218 213 & bias_time_unit_asm, bias_time_unit_rlx, bias_time_unit_ofl, & 219 214 & cn_bias_tot, cn_bias_asm, cn_dir, sn_tbias_ofl, sn_sbias_ofl, & 220 & ln_bsyncro, fctamp, rn_maxlat, rn_minlat, nn_bias_itwrt, ln_itdecay 215 & ln_bsyncro, fctamp, rn_maxlat_bias, rn_minlat_bias, & 216 & nn_bias_itwrt, ln_itdecay 221 217 222 218 223 219 !----------------------------------------------------------------------- 224 ! Read Namelist nam_bias: bias interface220 ! Read Namelist : bias interface 225 221 !----------------------------------------------------------------------- 226 227 ! Set default values 228 log2 = LOG( 2.0_wp ) 229 ln_bias = .FALSE. 230 ln_bias_asm = .FALSE. 231 ln_bias_rlx = .FALSE. 232 ln_bias_ofl = .FALSE. 233 ln_bias_ts_app = .FALSE. 234 ln_bias_pc_app = .FALSE. 235 236 bias_time_unit_asm = 10.*86400.0_wp ! time unit for bias term 237 bias_time_unit_rlx = 1.0_wp ! same as rlx terms, i.e. seconds. 238 bias_time_unit_ofl = 1.0_wp ! same as ofl terms, i.e. seconds. 239 240 eft_rlx = 365.0_wp !efolding time for bias estimation 241 eft_asm = 365.0_wp !efolding time for bias estimation 242 ! t_rlx_mem = 1. - log2 * rdt / (eft_rlx * rday) 243 t_rlx_mem = EXP( - log2 * rdt / ( eft_rlx * rday ) ) 244 t_rlx_upd = 0.1_wp 245 t_asm_mem = EXP( - log2 * bias_time_unit_asm / ( eft_asm * rday ) ) 246 t_asm_upd = 0.1_wp 247 fctamp = 1. 248 fb_t_rlx = 0.0_wp 249 fb_t_asm = 0.0_wp 250 fb_t_ofl = 1.0_wp 251 fb_p_rlx = 1.0_wp 252 fb_p_asm = 1.0_wp 253 fb_p_ofl = 0.0_wp 254 nn_lat_ramp = 0 255 ln_bsyncro = .FALSE. 256 ln_itdecay = .FALSE. 257 rn_maxlat = 23.0_wp 258 rn_minlat = 10.0_wp 259 260 IF ( lk_asminc ) THEN 261 nn_bias_itwrt = nitiaufin 262 ELSE 263 nn_bias_itwrt = nitend 264 ENDIF 265 266 267 cn_bias_asm = "bias_asm.nc" 268 cn_bias_tot = "bias_tot.nc" 269 cn_dir = './' ! directory in which the model is executed 222 223 224 REWIND( numnam_ref ) ! Namelist nambias in reference namelist : Bias pressure correction 225 READ ( numnam_ref, nambias, IOSTAT = ios, ERR = 901) 226 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambias in reference namelist', lwp ) 227 228 229 ! Set additional default values (note that most values are set in the reference namelist) 230 231 IF ( ln_asmiau ) nn_bias_itwrt = nitiaufin 232 270 233 ! ... default values (NB: frequency positive => hours, negative => months) 271 234 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! … … 273 236 sn_tbias_ofl = FLD_N( 'tbias_ofl' , -1. , 'tbias' , .TRUE. , .FALSE. , 'yearly', '', '', '' ) 274 237 sn_sbias_ofl = FLD_N( 'sbias_ofl' , -1. , 'sbias' , .TRUE. , .FALSE. , 'yearly', '', '', '' ) 275 lrst_bias = .FALSE. 276 277 REWIND( numnam_ref ) ! Namelist nambias in reference namelist : Bias pressure correction 278 READ ( numnam_ref, nambias, IOSTAT = ios, ERR = 901) 279 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambias in reference namelist', lwp ) 238 280 239 281 240 REWIND( numnam_cfg ) ! Namelist nambias in configuration namelist : Bias pressure correction … … 290 249 ln_bias = .FALSE. 291 250 ENDIF 292 251 252 ! set up decay scales 253 log2 = LOG( 2.0_wp ) 293 254 t_rlx_mem = EXP( - log2 * rdt / ( eft_rlx * rday ) ) 294 255 t_asm_mem = EXP( - log2 * bias_time_unit_asm/ ( eft_asm * rday ) ) 256 295 257 ! Control print 296 258 IF(lwp) THEN … … 498 460 !latitudinal dependence of partition coeficients. Adhoc 499 461 IF ( nn_lat_ramp == 1 ) THEN 500 !!!fbcoef(:,:) = SIN( rad * gphit(:,:) )**2 501 !!! Introduce the (also adhoc) FOAM parameterisation for latitudinal dependence. 502 !!! This should be added as a different namelist option later. MM. 08/2011. 503 lenscl_bias = ( rn_maxlat - rn_minlat )*2._wp 504 WHERE ( abs( gphit(:,:) ) <= rn_minlat ) 462 ! Use the inertial ramp. 463 lenscl_bias = ( rn_maxlat_bias - rn_minlat_bias )*2._wp 464 WHERE ( abs( gphit(:,:) ) <= rn_minlat_bias ) 505 465 fbcoef(:,:) = 0._wp 506 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat )466 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 507 467 fbcoef(:,:) = 1._wp 508 468 ELSEWHERE 509 fbcoef(:,:) = 1._wp - exp( -( abs( gphit(:,:) ) - rn_minlat ) &510 * ( abs( gphit(:,:) ) - rn_minlat ) / lenscl_bias )469 fbcoef(:,:) = 1._wp - exp( -( abs( gphit(:,:) ) - rn_minlat_bias ) & 470 * ( abs( gphit(:,:) ) - rn_minlat_bias ) / lenscl_bias ) 511 471 ENDWHERE 512 472 ELSEIF ( nn_lat_ramp == 2 ) THEN 513 473 ! Use a linear ramp consist with the geostrophic velocity balance ramp in NEMOVAR 514 474 515 WHERE ( abs( gphit(:,:) ) <= rn_minlat )475 WHERE ( abs( gphit(:,:) ) <= rn_minlat_bias ) 516 476 fbcoef(:,:) = 0._wp 517 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat )477 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 518 478 fbcoef(:,:) = 1._wp 519 479 ELSEWHERE 520 fbcoef(:,:) = 1._wp - ((rn_maxlat - abs( gphit(:,:)))/(rn_maxlat - rn_minlat))480 fbcoef(:,:) = 1._wp - ((rn_maxlat_bias - abs( gphit(:,:)))/(rn_maxlat_bias - rn_minlat_bias)) 521 481 ENDWHERE 522 482 ELSE … … 696 656 ! if last outer loop (lk_asminc=true and ln_trainc=true). t/sbias_asm 697 657 ! is updated, only once (end of run) taking into account units. 698 IF ( (kt == nn_bias_itwrt) .and. lrst_bias) THEN699 IF(lwp) WRITE(numout,*)' estimating asm bias at lasttimestep: ',kt658 IF ( kt == nn_bias_itwrt ) THEN 659 IF(lwp) WRITE(numout,*)' estimating asm bias at timestep: ',kt 700 660 DO jk = 1, jpkm1 701 661 tbias_asm_out(:,:,jk) = t_asm_mem * tbias_asm(:,:,jk) + &
Note: See TracChangeset
for help on using the changeset viewer.