Changeset 3704 for palm/trunk/SOURCE/nesting_offl_mod.f90
 Timestamp:
 Jan 29, 2019 7:51:41 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/nesting_offl_mod.f90
r3655 r3704 20 20 ! Current revisions: 21 21 !  22 ! 22 ! Formatting adjustments 23 23 ! 24 24 ! Former revisions: … … 623 623 ENDIF 624 624 #else 625 u_ref = u_ref_l626 v_ref = v_ref_l627 IF ( humidity ) q_ref = q_ref_l628 IF ( .NOT. neutral ) pt_ref = pt_ref_l625 u_ref = u_ref_l 626 v_ref = v_ref_l 627 IF ( humidity ) q_ref = q_ref_l 628 IF ( .NOT. neutral ) pt_ref = pt_ref_l 629 629 #endif 630 630 ! 631 ! Average data. Note, reference profiles up to nzt are derived from lateral 632 ! boundaries, at the model top it is derived from the top boundary. Thus, 633 ! number of input data is different from nzb:nzt compared to nzt+1. 634 ! Derived from lateral boundaries. 635 u_ref(nzb:nzt) = u_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx ), & 636 KIND = wp ) 637 v_ref(nzb:nzt) = v_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + nx + 1 ), & 638 KIND = wp ) 639 IF ( humidity ) & 640 q_ref(nzb:nzt) = q_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), & 641 KIND = wp ) 642 IF ( .NOT. neutral ) & 643 pt_ref(nzb:nzt) = pt_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), & 644 KIND = wp ) 645 ! 646 ! Derived from top boundary. 647 u_ref(nzt+1) = u_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx ), KIND = wp ) 648 v_ref(nzt+1) = v_ref(nzt+1) / REAL( ( ny ) * ( nx + 1 ), KIND = wp ) 649 IF ( humidity ) & 650 q_ref(nzt+1) = q_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp ) 651 IF ( .NOT. neutral ) & 652 pt_ref(nzt+1) = pt_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp ) 653 ! 654 ! Write onto init profiles, which are used for damping 655 u_init = u_ref 656 v_init = v_ref 657 IF ( humidity ) q_init = q_ref 658 IF ( .NOT. neutral ) pt_init = pt_ref 659 ! 660 ! Set bottom boundary condition 661 IF ( humidity ) q_init(nzb) = q_init(nzb+1) 662 IF ( .NOT. neutral ) pt_init(nzb) = pt_init(nzb+1) 663 ! 664 ! Further, adjust Rayleigh damping height in case of timechanging conditions. 665 ! Therefore, calculate boundarylayer depth first. 666 CALL calc_zi 667 CALL adjust_sponge_layer 668 669 ! 670 ! Update geostrophic wind components from dynamic input file. 671 DO k = nzb+1, nzt 672 ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k), & 673 fac_dt ) 674 vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k), & 675 fac_dt ) 676 ENDDO 677 ug(nzt+1) = ug(nzt) 678 vg(nzt+1) = vg(nzt) 679 680 CALL cpu_log( log_point(58), 'offline nesting', 'stop' ) 631 ! Average data. Note, reference profiles up to nzt are derived from lateral 632 ! boundaries, at the model top it is derived from the top boundary. Thus, 633 ! number of input data is different from nzb:nzt compared to nzt+1. 634 ! Derived from lateral boundaries. 635 u_ref(nzb:nzt) = u_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx ), & 636 KIND = wp ) 637 v_ref(nzb:nzt) = v_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + nx + 1 ), & 638 KIND = wp ) 639 IF ( humidity ) & 640 q_ref(nzb:nzt) = q_ref(nzb:nzt) / REAL( 2.0_wp * & 641 ( ny + 1 + nx + 1 ), & 642 KIND = wp ) 643 IF ( .NOT. neutral ) & 644 pt_ref(nzb:nzt) = pt_ref(nzb:nzt) / REAL( 2.0_wp * & 645 ( ny + 1 + nx + 1 ), & 646 KIND = wp ) 647 ! 648 ! Derived from top boundary. 649 u_ref(nzt+1) = u_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx ), KIND = wp ) 650 v_ref(nzt+1) = v_ref(nzt+1) / REAL( ( ny ) * ( nx + 1 ), KIND = wp ) 651 IF ( humidity ) & 652 q_ref(nzt+1) = q_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), & 653 KIND = wp ) 654 IF ( .NOT. neutral ) & 655 pt_ref(nzt+1) = pt_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), & 656 KIND = wp ) 657 ! 658 ! Write onto init profiles, which are used for damping 659 u_init = u_ref 660 v_init = v_ref 661 IF ( humidity ) q_init = q_ref 662 IF ( .NOT. neutral ) pt_init = pt_ref 663 ! 664 ! Set bottom boundary condition 665 IF ( humidity ) q_init(nzb) = q_init(nzb+1) 666 IF ( .NOT. neutral ) pt_init(nzb) = pt_init(nzb+1) 667 ! 668 ! Further, adjust Rayleigh damping height in case of timechanging conditions. 669 ! Therefore, calculate boundarylayer depth first. 670 CALL calc_zi 671 CALL adjust_sponge_layer 672 673 ! 674 ! Update geostrophic wind components from dynamic input file. 675 DO k = nzb+1, nzt 676 ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k), & 677 fac_dt ) 678 vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k), & 679 fac_dt ) 680 ENDDO 681 ug(nzt+1) = ug(nzt) 682 vg(nzt+1) = vg(nzt) 683 684 CALL cpu_log( log_point(58), 'offline nesting', 'stop' ) 681 685 682 686 END SUBROUTINE nesting_offl_bc
Note: See TracChangeset
for help on using the changeset viewer.