Changeset 7081
 Timestamp:
 20161025T09:37:22+02:00 (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/UKMO/dev_r5518_pcbias_ipc/NEMOGCM/NEMO/OPA_SRC/ASM/bias.F90
r6337 r7081 133 133 & fb_p_ofl, & !: parition of bias in P for ofl bias term 134 134 & fctamp, & !: amplification factor for T if inertial 135 & rn_maxlat_bias, 136 & rn_minlat_bias 135 & rn_maxlat_bias, & !: Max lat for latitudinal ramp 136 & rn_minlat_bias !: Min lat for latitudinal ramp 137 137 138 138 LOGICAL, PRIVATE :: lalloc … … 153 153 ! 1:inertial ramp, 2:linear ramp, else:no ramp 154 154 LOGICAL, PRIVATE :: ln_bsyncro ! syncronous or assincrous bias correction 155 LOGICAL, PRIVATE :: ln_itdecay ! evolve bias correction at every time step. 156 157 REAL(wp), PRIVATE, DIMENSION(:,:), ALLOCATABLE :: fbcoef 155 LOGICAL, PRIVATE :: ln_itdecay ! evolve bias correction at every time step. 156 LOGICAL, PRIVATE :: ln_incpc ! incremental pressure correction 157 LOGICAL, PRIVATE :: lat_ramp_incpc ! ramp for incremental pressure correction 158 159 REAL(wp), PRIVATE, DIMENSION(:,:), ALLOCATABLE :: fbcoef 160 REAL(wp), PRIVATE, DIMENSION(:,:), ALLOCATABLE :: fbcoef_stscale 158 161 159 162 INTEGER, PRIVATE :: & … … 214 217 & cn_bias_tot, cn_bias_asm, cn_dir, sn_tbias_ofl, sn_sbias_ofl, & 215 218 & ln_bsyncro, fctamp, rn_maxlat_bias, rn_minlat_bias, & 216 & nn_bias_itwrt, ln_itdecay 219 & nn_bias_itwrt, ln_itdecay, ln_incpc, lat_ramp_incpc 217 220 218 221 … … 273 276 WRITE(numout,*) ' time step for writing bias fld nn_bias_itwrt = ',nn_bias_itwrt 274 277 WRITE(numout,*) ' evolve pcbias at each timestep ln_itdecay = ',ln_itdecay 278 WRITE(numout,*) ' incremental press. correction ln_incpc = ',ln_incpc 279 WRITE(numout,*) ' lat ramp for inc.press.corr lat_ramp_incpc = ',lat_ramp_incpc 275 280 WRITE(numout,*) ' Parameters for parition of bias term ' 276 281 WRITE(numout,*) ' fb_t_rlx = ',fb_t_rlx … … 304 309 & tbias_p(jpi,jpj,jpk), & 305 310 & sbias_p(jpi,jpj,jpk), & 311 & tbias_i(jpi,jpj,jpk), & 312 & sbias_i(jpi,jpj,jpk), & 306 313 & rhd_pc(jpi,jpj,jpk) , & 307 314 & gru_pc(jpi,jpj) , & 308 315 & grv_pc(jpi,jpj) ) 309 316 310 ALLOCATE( fbcoef(jpi,jpj) 317 ALLOCATE( fbcoef(jpi,jpj), fbcoef_stscale(jpi,jpj) ) 311 318 312 319 IF( ln_bias_asm ) ALLOCATE( tbias_asm(jpi,jpj,jpk), & … … 321 328 tbias_rlx_out(jpi,jpj,jpk), & 322 329 sbias_rlx_out(jpi,jpj,jpk) ) 330 331 IF( ln_incpc ) ALLOCATE( tbias_asm_stscale(jpi,jpj,jpk), & 332 & sbias_asm_stscale(jpi,jpj,jpk)) 333 323 334 lalloc = .TRUE. 324 335 … … 369 380 sbias_asm(:,:,:) = 0.0_wp 370 381 ENDIF 382 383 IF ( ln_incpc ) THEN !incr pressure correction 384 tbias_asm_stscale(:,:,:) = 0.0_wp 385 sbias_asm_stscale(:,:,:) = 0.0_wp 386 ENDIF 387 388 371 389 numbias_tot = 0 372 390 ! Get bias from file and prevent fail if the file does not exist … … 402 420 CALL ctl_stop( 'Bias assim variables not found in ',cn_bias_tot ) 403 421 ENDIF 422 423 424 IF ( ln_incpc ) THEN 425 IF(lwp) WRITE(numout,*) 'Reading short time scale bias correction fields for bias asm from file ',cn_bias_tot 426 IF( iom_varid( numbias_tot, 'tbias_asm_stscale' ) > 0 ) THEN 427 ! Get the T and S bias data 428 CALL iom_get( numbias_tot, jpdom_autoglo, 'tbias_asm_stscale', tbias_asm_stscale ) 429 CALL iom_get( numbias_tot, jpdom_autoglo, 'sbias_asm_stscale', sbias_asm_stscale ) 430 ELSE 431 CALL ctl_stop( 'Short time scale bias assim variables not found in ',cn_bias_tot ) 432 ENDIF 433 ENDIF 434 404 435 ENDIF 436 437 405 438 406 439 ! Close the file … … 483 516 fbcoef(:,:) = 0.0_wp 484 517 fctamp = 0.0_wp 485 ENDIF 518 fbcoef_stscale(:,:) = 0.0_wp 519 ENDIF 520 521 522 IF ( lat_ramp_incpc) THEN 523 ! not sure if this should be a special case of nn_lat_ramp == 2 524 minlat_bias = 3.0_wp 525 maxlat_bias = 8.0_wp 526 WHERE ( abs( gphit(:,:) ) <= minlat_bias ) 527 fbcoef_stscale(:,:)=0._wp 528 ELSEWHERE ( abs( gphit(:,:) ) >= maxlat_bias ) 529 fbcoef_stscale(:,:)=1._wp 530 ELSEWHERE 531 fbcoef_stscale(:,:)=1._wp  ((maxlat_bias  abs( gphit(:,:)))/(maxlat_biasminlat_bias)) 532 ENDWHERE 533 ENDIF 486 534 487 535 … … 516 564 REAL(wp) :: fb_t_asm_max, fb_t_rlx_max, fb_t_ofl_max 517 565 REAL(wp) :: ztfrac, ztsday 566 REAL(wp) :: zfrac, zfrac1 ! temporal weights for inst pcbias (names could be changed) 567 REAL(wp) :: ztscale ! reduce the inst pcbias by this amount per 24 hours 568 REAL(wp) :: zwgt ! Weight for the inst pcorr term 569 REAL(wp) :: zdecay ! used in inst pcorr 518 570 REAL(wp), DIMENSION(jpi,jpj) :: zcof1, zcof2 519 571 … … 527 579 tbias_p(:,:,:) = 0.0_wp 528 580 sbias_p(:,:,:) = 0.0_wp 581 582 ztscale = 0.1_wp 583 zwgt = 1.0_wp 584 tbias_i(:,:,:) = 0.0_wp 585 sbias_i(:,:,:) = 0.0_wp 586 529 587 IF ( ln_bias_asm ) THEN 530 588 … … 539 597 ztsday = rday / real(rdt) 540 598 599 zdecay = (1ztscale)**(1/real(ztsday)) ! used in ipc 600 zfrac1 = max(0.0_wp, zdecay**real(kt)) ! used in ipc 601 602 541 603 IF( ln_asmiau .and. ln_trainc ) THEN ! nudge in increments and decay historical contribution 542 604 … … 545 607 546 608 ztfrac = real(kt) / real(nitiaufin) ! nudging factor during the IAU 547 609 548 610 549 611 IF (lwp) THEN … … 569 631 ENDDO 570 632 633 634 IF (ln_incpc) THEN 635 636 DO jk = 1, jpkm1 637 638 tbias_i(:,:,jk) = tbias_i(:,:,jk) + & ! not sure if it should sum to previous 639 & ( t_bkginc(:,:,jk) * zwgt * ztfrac * (1.0  fbcoef_stscale(:,:)) ) & 640 &  ( tbias_asm_stscale(:,:,jk) * zfrac1 * (1.0  fbcoef_stscale(:,:)) ) 641 sbias_i(:,:,jk) = sbias_i(:,:,jk) + & 642 & ( s_bkginc(:,:,jk) * zwgt * ztfrac * (1.0  fbcoef_stscale(:,:)) ) & 643 &  ( sbias_asm_stscale(:,:,jk) * zfrac1 * (1.0  fbcoef_stscale(:,:)) ) 644 645 ENDDO 646 647 ENDIF 648 571 649 IF ( .not.ln_bsyncro ) THEN 572 650 IF ( kt == nn_bias_itwrt ) THEN … … 593 671 594 672 ztfrac=t_asm_mem**(real(ktnitiaufin)/real(nitiaufin)) ! decay from end of IAU 595 673 674 596 675 DO jk = 1, jpkm1 597 676 tbias(:,:,jk) = tbias(:,:,jk) + & … … 603 682 sbias_p(:,:,jk) = sbias_p(:,:,jk) + & 604 683 & ( ztfrac * sbias_asm(:,:,jk) ) * zcof2(:,:) 684 605 685 ENDDO 686 687 IF (ln_incpc) THEN 688 689 zfrac = max(0.0_wp, zdecay**real(ktnitiaufin) ) 690 691 DO jk = 1, jpkm1 692 tbias_i(:,:,jk) = tbias_i(:,:,jk) + & ! not sure if it should sum to previous 693 & ( t_bkginc(:,:,jk) * zwgt * zfrac * (1.0  fbcoef_stscale(:,:)) ) & 694 &  ( tbias_asm_stscale(:,:,jk) * zfrac1 * (1.0  fbcoef_stscale(:,:)) ) 695 sbias_i(:,:,jk) = sbias_i(:,:,jk) + & ! not sure if it should sum to previous 696 & ( s_bkginc(:,:,jk) * zwgt * zfrac * (1.0  fbcoef_stscale(:,:)) ) & 697 &  ( sbias_asm_stscale(:,:,jk) * zfrac1 * (1.0  fbcoef_stscale(:,:)) ) 698 ENDDO 699 700 ENDIF 606 701 607 702 IF (lwp) THEN … … 773 868 tsw(:,:,:,jp_tem) = tsa(:,:,:,jp_tem)  tbias_p(:,:,:) 774 869 tsw(:,:,:,jp_sal) = tsa(:,:,:,jp_sal)  sbias_p(:,:,:) 870 871 IF (ln_incpc) THEN 872 tsw(:,:,:,jp_tem) = tsa(:,:,:,jp_tem) tbias_i(:,:,:)  tbias_p(:,:,:) 873 tsw(:,:,:,jp_sal) = tsa(:,:,:,jp_sal) sbias_i(:,:,:)  sbias_p(:,:,:) 874 ENDIF 875 775 876 ELSE 776 877 tsw(:,:,:,jp_tem) = tsb(:,:,:,jp_tem)  tbias_p(:,:,:) 777 878 tsw(:,:,:,jp_sal) = tsb(:,:,:,jp_sal)  sbias_p(:,:,:) 879 880 IF (ln_incpc) THEN 881 tsw(:,:,:,jp_tem) = tsb(:,:,:,jp_tem)  tbias_i(:,:,:)  tbias_p(:,:,:) 882 tsw(:,:,:,jp_sal) = tsb(:,:,:,jp_sal)  sbias_i(:,:,:)  sbias_p(:,:,:) 883 ENDIF 884 778 885 ENDIF 779 886
Note: See TracChangeset
for help on using the changeset viewer.