Changeset 3152 for palm/trunk/SOURCE/surface_mod.f90
- Timestamp:
- Jul 19, 2018 1:26:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.