- Timestamp:
- Jul 19, 2018 1:26:52 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r3147 r3152 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Further adjustments for q_surface 28 ! 29 ! 3147 2018-07-18 22:38:11Z maronga 27 30 ! Adjustments for new surface structure 28 31 ! … … 2321 2324 q(k,j,i) 2322 2325 ENDIF 2326 2327 surf%q_surface(m) = q(k+k_off,j+j_off,i+i_off) 2323 2328 ! 2324 2329 !-- Update virtual potential temperature 2325 surf%vpt_surface(m) = surf%pt_surface(m) * &2326 ( 1.0_wp + 0.61_wp * q(k+k_off,j+j_off,i+i_off) )2330 surf%vpt_surface(m) = surf%pt_surface(m) * & 2331 ( 1.0_wp + 0.61_wp * surf%q_surface(m) ) 2327 2332 2328 2333 -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r3149 r3152 26 26 ! ----------------- 27 27 ! $Id$ 28 ! q_surface is now part of surface structure 29 ! 30 ! 3149 2018-07-19 05:48:09Z maronga 28 31 ! Correct accidental last commit 29 32 ! … … 338 341 CALL calc_pt_surface 339 342 IF ( humidity ) THEN 343 CALL calc_q_surface 340 344 CALL calc_vpt_surface 341 345 ENDIF … … 1595 1599 1596 1600 ! 1597 !-- Calculate potential temperature at first grid level1601 !-- Set potential temperature at surface grid level. 1598 1602 !-- ( only for upward-facing surfs ) 1599 1603 SUBROUTINE calc_pt_surface … … 1619 1623 1620 1624 ! 1621 !-- Calculate virtual potential temperature at first grid level 1625 !-- Set mixing ratio at surface grid level. ( Only for upward-facing surfs. ) 1626 SUBROUTINE calc_q_surface 1627 1628 IMPLICIT NONE 1629 1630 INTEGER(iwp) :: k_off !< index offset between surface and atmosphere grid point (-1 for upward-, +1 for downward-facing walls) 1631 INTEGER(iwp) :: m !< loop variable over all horizontal surf elements 1632 1633 k_off = surf%koff 1634 !$OMP PARALLEL DO PRIVATE( i, j, k ) 1635 DO m = 1, surf%ns 1636 1637 i = surf%i(m) 1638 j = surf%j(m) 1639 k = surf%k(m) 1640 1641 surf%q_surface(m) = q(k+k_off,j,i) 1642 1643 ENDDO 1644 1645 END SUBROUTINE calc_q_surface 1646 1647 ! 1648 !-- Set virtual potential temperature at surface grid level. 1622 1649 !-- ( only for upward-facing surfs ) 1623 1650 SUBROUTINE calc_vpt_surface … … 1781 1808 z_mo = surf%z_mo(m) 1782 1809 1783 surf%qs(m) = kappa * ( surf%qv1(m) - q(k-1,j,i) )&1810 surf%qs(m) = kappa * ( surf%qv1(m) - surf%q_surface(m) ) & 1784 1811 / ( LOG( z_mo / surf%z0q(m) ) & 1785 1812 - psi_h( z_mo / surf%ol(m) ) & -
palm/trunk/SOURCE/surface_mod.f90
r3147 r3152 26 26 ! ----------------- 27 27 ! $Id$ 28 ! q_surface added 29 ! 30 ! 3147 2018-07-18 22:38:11Z maronga 28 31 ! Added vpt_surface and vpt1 29 32 ! … … 306 309 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: rrtm_asdir !< albedo for shortwave direct radiation, solar angle of 60° 307 310 311 REAL(wp), DIMENSION(:), ALLOCATABLE :: q_surface !< skin-surface mixing ratio 308 312 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_surface !< skin-surface temperature 309 313 REAL(wp), DIMENSION(:), ALLOCATABLE :: vpt_surface !< skin-surface virtual temperature … … 1161 1165 ALLOCATE ( surfaces%qs(1:surfaces%ns) ) 1162 1166 ALLOCATE ( surfaces%qsws(1:surfaces%ns) ) 1167 ALLOCATE ( surfaces%q_surface(1:surfaces%ns) ) 1163 1168 ALLOCATE ( surfaces%vpt_surface(1:surfaces%ns) ) 1164 1169 ENDIF … … 1417 1422 DEALLOCATE ( surfaces%qs ) 1418 1423 DEALLOCATE ( surfaces%qsws ) 1424 DEALLOCATE ( surfaces%q_surface ) 1419 1425 DEALLOCATE ( surfaces%vpt_surface ) 1420 1426 ENDIF … … 1541 1547 ALLOCATE ( surfaces%qs(1:surfaces%ns) ) 1542 1548 ALLOCATE ( surfaces%qsws(1:surfaces%ns) ) 1549 ALLOCATE ( surfaces%q_surface(1:surfaces%ns) ) 1543 1550 ALLOCATE ( surfaces%vpt_surface(1:surfaces%ns) ) 1544 1551 ENDIF … … 2093 2100 2094 2101 surf%ts(num_h) = 0.0_wp 2095 2102 ! 2103 !-- Set initial value for surface temperature 2104 surf%pt_surface(num_h) = pt_surface 2105 2096 2106 IF ( humidity ) THEN 2097 2107 surf%qs(num_h) = 0.0_wp … … 2116 2126 2117 2127 ENDIF 2128 2129 surf%q_surface(num_h) = q_surface 2130 surf%vpt_surface(num_h) = surf%pt_surface(num_h) * & 2131 ( 1.0_wp + 0.61_wp * surf%q_surface(num_h) ) 2118 2132 ENDIF 2119 2133 … … 2123 2137 IF ( air_chemistry ) surf%css(lsp,num_h) = 0.0_wp 2124 2138 ENDDO 2125 !2126 !-- Set initial value for surface temperature2127 surf%pt_surface(num_h) = pt_surface2128 2139 ! 2129 2140 !-- Inititalize surface fluxes of sensible and latent heat, as well as … … 2619 2630 IF ( ALLOCATED( surf_def_h(l)%pt_surface ) ) & 2620 2631 surf_h(l)%pt_surface(mm(l)) = surf_def_h(l)%pt_surface(m) 2632 IF ( ALLOCATED( surf_def_h(l)%q_surface ) ) & 2633 surf_h(l)%q_surface(mm(l)) = surf_def_h(l)%q_surface(m) 2621 2634 IF ( ALLOCATED( surf_def_h(l)%vpt_surface ) ) & 2622 2635 surf_h(l)%vpt_surface(mm(l)) = surf_def_h(l)%vpt_surface(m) … … 2676 2689 IF ( ALLOCATED( surf_lsm_h%pt_surface ) ) & 2677 2690 surf_h(l)%pt_surface(mm(l)) = surf_lsm_h%pt_surface(m) 2691 IF ( ALLOCATED( surf_def_h(l)%q_surface ) ) & 2692 surf_h(l)%q_surface(mm(l)) = surf_def_h(l)%q_surface(m) 2678 2693 IF ( ALLOCATED( surf_def_h(l)%vpt_surface ) ) & 2679 surf_h(l)%vpt_surface(mm(l)) = surf_def_h(l)%vpt_surface(m)2694 surf_h(l)%vpt_surface(mm(l)) = surf_def_h(l)%vpt_surface(m) 2680 2695 IF ( ALLOCATED( surf_lsm_h%usws ) ) & 2681 2696 surf_h(0)%usws(mm(0)) = surf_lsm_h%usws(m) … … 2733 2748 IF ( ALLOCATED( surf_usm_h%pt_surface ) ) & 2734 2749 surf_h(l)%pt_surface(mm(l)) = surf_usm_h%pt_surface(m) 2750 IF ( ALLOCATED( surf_usm_h%q_surface ) ) & 2751 surf_h(l)%q_surface(mm(l)) = surf_usm_h%q_surface(m) 2735 2752 IF ( ALLOCATED( surf_usm_h%vpt_surface ) ) & 2736 2753 surf_h(l)%vpt_surface(mm(l)) = surf_usm_h%vpt_surface(m) … … 2831 2848 IF ( ALLOCATED( surf_def_v(l)%pt_surface ) ) & 2832 2849 surf_v(l)%pt_surface(mm(l)) = surf_def_v(l)%pt_surface(m) 2850 IF ( ALLOCATED( surf_def_v(l)%q_surface ) ) & 2851 surf_v(l)%q_surface(mm(l)) = surf_def_v(l)%q_surface(m) 2833 2852 IF ( ALLOCATED( surf_def_v(l)%vpt_surface ) ) & 2834 2853 surf_v(l)%vpt_surface(mm(l)) = surf_def_v(l)%vpt_surface(m) … … 2889 2908 IF ( ALLOCATED( surf_lsm_v(l)%pt_surface ) ) & 2890 2909 surf_v(l)%pt_surface(mm(l)) = surf_lsm_v(l)%pt_surface(m) 2910 IF ( ALLOCATED( surf_lsm_v(l)%q_surface ) ) & 2911 surf_v(l)%q_surface(mm(l)) = surf_lsm_v(l)%q_surface(m) 2891 2912 IF ( ALLOCATED( surf_lsm_v(l)%vpt_surface ) ) & 2892 2913 surf_v(l)%vpt_surface(mm(l)) = surf_lsm_v(l)%vpt_surface(m) … … 2951 2972 IF ( ALLOCATED( surf_usm_v(l)%pt_surface ) ) & 2952 2973 surf_v(l)%pt_surface(mm(l)) = surf_usm_v(l)%pt_surface(m) 2974 IF ( ALLOCATED( surf_usm_v(l)%q_surface ) ) & 2975 surf_v(l)%q_surface(mm(l)) = surf_usm_v(l)%q_surface(m) 2953 2976 IF ( ALLOCATED( surf_usm_v(l)%vpt_surface ) ) & 2954 2977 surf_v(l)%vpt_surface(mm(l)) = surf_usm_v(l)%vpt_surface(m) … … 3092 3115 WRITE ( 14 ) surf_h(l)%pt_surface 3093 3116 ENDIF 3117 3118 IF ( ALLOCATED ( surf_h(l)%q_surface ) ) THEN 3119 CALL wrd_write_string( 'surf_h(' // dum // ')%q_surface' ) 3120 WRITE ( 14 ) surf_h(l)%q_surface 3121 ENDIF 3094 3122 3095 3123 IF ( ALLOCATED ( surf_h(l)%vpt_surface ) ) THEN … … 3224 3252 WRITE ( 14 ) surf_v(l)%pt_surface 3225 3253 ENDIF 3254 3255 IF ( ALLOCATED ( surf_v(l)%q_surface ) ) THEN 3256 CALL wrd_write_string( 'surf_v(' // dum // ')%q_surface' ) 3257 WRITE ( 14 ) surf_v(l)%q_surface 3258 ENDIF 3226 3259 3227 3260 IF ( ALLOCATED ( surf_v(l)%vpt_surface ) ) THEN … … 3467 3500 IF ( ALLOCATED( surf_h(0)%pt_surface ) .AND. kk == 1 ) & 3468 3501 READ ( 13 ) surf_h(0)%pt_surface 3502 CASE ( 'surf_h(0)%q_surface' ) 3503 IF ( ALLOCATED( surf_h(0)%q_surface ) .AND. kk == 1 ) & 3504 READ ( 13 ) surf_h(0)%q_surface 3469 3505 CASE ( 'surf_h(0)%vpt_surface' ) 3470 3506 IF ( ALLOCATED( surf_h(0)%vpt_surface ) .AND. kk == 1 ) & … … 3547 3583 IF ( ALLOCATED( surf_h(1)%pt_surface ) .AND. kk == 1 ) & 3548 3584 READ ( 13 ) surf_h(1)%pt_surface 3585 CASE ( 'surf_h(1)%q_surface' ) 3586 IF ( ALLOCATED( surf_h(1)%q_surface ) .AND. kk == 1 ) & 3587 READ ( 13 ) surf_h(1)%q_surface 3549 3588 CASE ( 'surf_h(1)%vpt_surface' ) 3550 IF ( ALLOCATED( surf_h(1)%vpt_surface ) .AND. kk == 1 ) 3589 IF ( ALLOCATED( surf_h(1)%vpt_surface ) .AND. kk == 1 ) & 3551 3590 READ ( 13 ) surf_h(1)%vpt_surface 3552 3591 CASE ( 'surf_h(1)%usws' ) … … 3627 3666 IF ( ALLOCATED( surf_h(2)%pt_surface ) .AND. kk == 1 ) & 3628 3667 READ ( 13 ) surf_h(2)%pt_surface 3668 CASE ( 'surf_h(2)%q_surface' ) 3669 IF ( ALLOCATED( surf_h(2)%q_surface ) .AND. kk == 1 ) & 3670 READ ( 13 ) surf_h(2)%q_surface 3629 3671 CASE ( 'surf_h(2)%vpt_surface' ) 3630 IF ( ALLOCATED( surf_h(2)%vpt_surface ) .AND. kk == 1 ) 3672 IF ( ALLOCATED( surf_h(2)%vpt_surface ) .AND. kk == 1 ) & 3631 3673 READ ( 13 ) surf_h(2)%vpt_surface 3632 3674 CASE ( 'surf_h(2)%usws' ) … … 3709 3751 IF ( ALLOCATED( surf_v(0)%pt_surface ) .AND. kk == 1 ) & 3710 3752 READ ( 13 ) surf_v(0)%pt_surface 3753 CASE ( 'surf_v(0)%q_surface' ) 3754 IF ( ALLOCATED( surf_v(0)%q_surface ) .AND. kk == 1 ) & 3755 READ ( 13 ) surf_v(0)%q_surface 3711 3756 CASE ( 'surf_v(0)%vpt_surface' ) 3712 IF ( ALLOCATED( surf_v(0)%vpt_surface ) .AND. kk == 1 ) 3757 IF ( ALLOCATED( surf_v(0)%vpt_surface ) .AND. kk == 1 ) & 3713 3758 READ ( 13 ) surf_v(0)%vpt_surface 3714 3759 CASE ( 'surf_v(0)%shf' ) … … 3792 3837 IF ( ALLOCATED( surf_v(1)%pt_surface ) .AND. kk == 1 ) & 3793 3838 READ ( 13 ) surf_v(1)%pt_surface 3839 CASE ( 'surf_v(1)%q_surface' ) 3840 IF ( ALLOCATED( surf_v(1)%q_surface ) .AND. kk == 1 ) & 3841 READ ( 13 ) surf_v(1)%q_surface 3794 3842 CASE ( 'surf_v(1)%vpt_surface' ) 3795 3843 IF ( ALLOCATED( surf_v(1)%vpt_surface ) .AND. kk == 1 ) & … … 3875 3923 IF ( ALLOCATED( surf_v(2)%pt_surface ) .AND. kk == 1 ) & 3876 3924 READ ( 13 ) surf_v(2)%pt_surface 3925 CASE ( 'surf_v(2)%q_surface' ) 3926 IF ( ALLOCATED( surf_v(2)%q_surface ) .AND. kk == 1 ) & 3927 READ ( 13 ) surf_v(2)%q_surface 3877 3928 CASE ( 'surf_v(2)%vpt_surface' ) 3878 IF ( ALLOCATED( surf_v(2)%vpt_surface ) .AND. kk == 1 ) 3929 IF ( ALLOCATED( surf_v(2)%vpt_surface ) .AND. kk == 1 ) & 3879 3930 READ ( 13 ) surf_v(2)%vpt_surface 3880 3931 CASE ( 'surf_v(2)%shf' ) … … 3958 4009 IF ( ALLOCATED( surf_v(3)%pt_surface ) .AND. kk == 1 ) & 3959 4010 READ ( 13 ) surf_v(3)%pt_surface 4011 CASE ( 'surf_v(3)%q_surface' ) 4012 IF ( ALLOCATED( surf_v(3)%q_surface ) .AND. kk == 1 ) & 4013 READ ( 13 ) surf_v(3)%q_surface 3960 4014 CASE ( 'surf_v(3)%vpt_surface' ) 3961 IF ( ALLOCATED( surf_v(3)%vpt_surface ) .AND. kk == 1 ) 4015 IF ( ALLOCATED( surf_v(3)%vpt_surface ) .AND. kk == 1 ) & 3962 4016 READ ( 13 ) surf_v(3)%vpt_surface 3963 4017 CASE ( 'surf_v(3)%shf' ) … … 4154 4208 surf_target%pt_surface(m_target) = surf_file%pt_surface(m_file) 4155 4209 ENDIF 4210 4211 IF ( INDEX( restart_string(1:length), '%q_surface' ) /= 0 ) THEN 4212 IF ( ALLOCATED( surf_target%q_surface ) .AND. & 4213 ALLOCATED( surf_file%q_surface ) ) & 4214 surf_target%q_surface(m_target) = surf_file%q_surface(m_file) 4215 ENDIF 4156 4216 4157 4217 IF ( INDEX( restart_string(1:length), '%vpt_surface' ) /= 0 ) THEN -
palm/trunk/SOURCE/urban_surface_mod.f90
r3151 r3152 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Initialize q_surface, which might be used in surface_layer_fluxes 31 ! 32 ! 3151 2018-07-19 08:45:38Z raasch 30 33 ! remaining preprocessor define strings __check removed 31 34 ! … … 313 316 314 317 USE control_parameters, & 315 ONLY: coupling_start_time, topography, dt_3d, 318 ONLY: coupling_start_time, topography, dt_3d, humidity, & 316 319 intermediate_timestep_count, initializing_actions, & 317 320 intermediate_timestep_count_max, simulated_time, end_time, & … … 4706 4709 ENDDO 4707 4710 #endif 4711 ! 4712 !-- For the sake of correct initialization, set also q_surface. 4713 !-- Note, at urban surfaces q_surface is initialized with 0. 4714 IF ( humidity ) THEN 4715 DO m = 1, surf_usm_h%ns 4716 surf_usm_h%q_surface(m) = 0.0_wp 4717 ENDDO 4718 DO l = 0, 3 4719 DO m = 1, surf_usm_v(l)%ns 4720 surf_usm_v(l)%q_surface(m) = 0.0_wp 4721 ENDDO 4722 ENDDO 4723 ENDIF 4708 4724 4709 4725 !-- initial values for t_wall
Note: See TracChangeset
for help on using the changeset viewer.