Changeset 2706
- Timestamp:
- Dec 18, 2017 6:33:49 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r2705 r2706 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix, read surface temperature in case of restart runs. 23 23 ! 24 24 ! Former revisions: … … 1768 1768 (0.81_wp * (0.004_wp * surf%rad_sw_in(m) & 1769 1769 + 1.0_wp)) ) 1770 1770 1771 ! 1771 1772 !-- f2: correction for soil moisture availability to plants (the … … 1915 1916 1916 1917 ENDIF 1917 1918 1918 1919 1919 tend = 0.0_wp … … 4052 4052 ENDDO 4053 4053 ENDDO 4054 4055 !4056 !-- Actions for restart runs4057 ELSE4058 !4059 !-- Horizontal surfaces4060 DO m = 1, surf_lsm_h%ns4061 i = surf_lsm_h%i(m)4062 j = surf_lsm_h%j(m)4063 k = surf_lsm_h%k(m)4064 t_surface_h%var_1d(m) = pt(k-1,j,i) * exn4065 ENDDO4066 !4067 !-- Vertical surfaces4068 DO l = 0, 34069 !4070 !-- Set index offset of surface element, seen from atmospheric grid point4071 j_off = surf_lsm_v(l)%joff4072 i_off = surf_lsm_v(l)%ioff4073 4074 DO m = 1, surf_lsm_v(l)%ns4075 i = surf_lsm_v(l)%i(m)4076 j = surf_lsm_v(l)%j(m)4077 k = surf_lsm_v(l)%k(m)4078 t_surface_v(l)%var_1d(m) = pt(k,j+j_off,i+i_off) * exn4079 ENDDO4080 ENDDO4081 4082 4054 ENDIF 4083 4055 ! … … 4245 4217 t_soil_h_p = t_soil_h 4246 4218 m_soil_h_p = m_soil_h 4247 m_liq_h_p = m_liq_h4219 m_liq_h_p = m_liq_h 4248 4220 t_surface_h_p = t_surface_h 4249 4221 4250 4222 t_soil_v_p = t_soil_v 4251 4223 m_soil_v_p = m_soil_v 4252 m_liq_v_p = m_liq_v4224 m_liq_v_p = m_liq_v 4253 4225 t_surface_v_p = t_surface_v 4254 4226 … … 5824 5796 ENDDO 5825 5797 5826 5827 5798 WRITE ( 14 ) 'lsm_start_index_h ' 5828 5799 WRITE ( 14 ) surf_lsm_h%start_index … … 5841 5812 WRITE ( 14 ) m_liq_v(l)%var_1d 5842 5813 ENDDO 5814 5815 WRITE ( 14 ) 'lsm_start_index_h ' 5816 WRITE ( 14 ) surf_lsm_h%start_index 5817 WRITE ( 14 ) 'lsm_end_index_h ' 5818 WRITE ( 14 ) surf_lsm_h%end_index 5819 WRITE ( 14 ) 't_surface_h ' 5820 WRITE ( 14 ) t_surface_h%var_1d 5821 5822 DO l = 0, 3 5823 WRITE ( 14 ) 'lsm_start_index_v ' 5824 WRITE ( 14 ) surf_lsm_v(l)%start_index 5825 WRITE ( 14 ) 'lsm_end_index_v ' 5826 WRITE ( 14 ) surf_lsm_v(l)%end_index 5827 WRITE( dum, '(I1)') l 5828 WRITE ( 14 ) 't_surface_v(' // dum // ') ' 5829 WRITE ( 14 ) t_surface_v(l)%var_1d 5830 ENDDO 5831 5843 5832 5844 5833 WRITE ( 14 ) '*** end lsm *** ' … … 6340 6329 6341 6330 6331 CASE ( 't_surface_h' ) 6332 6333 IF ( k == 1 ) THEN 6334 IF ( .NOT. ALLOCATED( t_surface_h%var_1d ) ) & 6335 ALLOCATE( t_surface_h%var_1d(1:surf_lsm_h%ns) ) 6336 READ ( 13 ) tmp_walltype_h_1d%var_1d 6337 ENDIF 6338 CALL surface_restore_elements( & 6339 t_surface_h%var_1d, & 6340 tmp_walltype_h_1d%var_1d, & 6341 surf_lsm_h%start_index, & 6342 start_index_on_file, & 6343 end_index_on_file, & 6344 nxlc, nysc, & 6345 nxlf, nxrf, nysf, nynf, & 6346 nys_on_file, nyn_on_file, & 6347 nxl_on_file,nxr_on_file ) 6348 6349 CASE ( 't_surface_v(0)' ) 6350 6351 IF ( k == 1 ) THEN 6352 IF ( .NOT. ALLOCATED( t_surface_v(0)%var_1d ) ) & 6353 ALLOCATE( t_surface_v(0)%var_1d(1:surf_lsm_v(0)%ns) ) 6354 READ ( 13 ) tmp_walltype_v_1d(0)%var_1d 6355 ENDIF 6356 CALL surface_restore_elements( & 6357 t_surface_v(0)%var_1d, & 6358 tmp_walltype_v_1d(0)%var_1d, & 6359 surf_lsm_v(0)%start_index, & 6360 start_index_on_file, & 6361 end_index_on_file, & 6362 nxlc, nysc, & 6363 nxlf, nxrf, nysf, nynf, & 6364 nys_on_file, nyn_on_file, & 6365 nxl_on_file,nxr_on_file ) 6366 6367 CASE ( 't_surface_v(1)' ) 6368 6369 IF ( k == 1 ) THEN 6370 IF ( .NOT. ALLOCATED( t_surface_v(1)%var_1d ) ) & 6371 ALLOCATE( t_surface_v(1)%var_1d(1:surf_lsm_v(1)%ns) ) 6372 READ ( 13 ) tmp_walltype_v_1d(1)%var_1d 6373 ENDIF 6374 CALL surface_restore_elements( & 6375 t_surface_v(1)%var_1d, & 6376 tmp_walltype_v_1d(1)%var_1d, & 6377 surf_lsm_v(1)%start_index, & 6378 start_index_on_file, & 6379 end_index_on_file, & 6380 nxlc, nysc, & 6381 nxlf, nxrf, nysf, nynf, & 6382 nys_on_file, nyn_on_file, & 6383 nxl_on_file,nxr_on_file ) 6384 6385 CASE ( 't_surface_v(2)' ) 6386 6387 IF ( k == 1 ) THEN 6388 IF ( .NOT. ALLOCATED( t_surface_v(2)%var_1d ) ) & 6389 ALLOCATE( t_surface_v(2)%var_1d(1:surf_lsm_v(2)%ns) ) 6390 READ ( 13 ) tmp_walltype_v_1d(2)%var_1d 6391 ENDIF 6392 CALL surface_restore_elements( & 6393 t_surface_v(2)%var_1d, & 6394 tmp_walltype_v_1d(2)%var_1d, & 6395 surf_lsm_v(2)%start_index, & 6396 start_index_on_file, & 6397 end_index_on_file, & 6398 nxlc, nysc, & 6399 nxlf, nxrf, nysf, nynf, & 6400 nys_on_file, nyn_on_file, & 6401 nxl_on_file,nxr_on_file ) 6402 6403 CASE ( 't_surface_v(3)' ) 6404 6405 IF ( k == 1 ) THEN 6406 IF ( .NOT. ALLOCATED( t_surface_v(3)%var_1d ) ) & 6407 ALLOCATE( t_surface_v(3)%var_1d(1:surf_lsm_v(3)%ns) ) 6408 READ ( 13 ) tmp_walltype_v_1d(3)%var_1d 6409 ENDIF 6410 CALL surface_restore_elements( & 6411 t_surface_v(3)%var_1d, & 6412 tmp_walltype_v_1d(3)%var_1d, & 6413 surf_lsm_v(3)%start_index, & 6414 start_index_on_file, & 6415 end_index_on_file, & 6416 nxlc, nysc, & 6417 nxlf, nxrf, nysf, nynf, & 6418 nys_on_file, nyn_on_file, & 6419 nxl_on_file,nxr_on_file ) 6420 6342 6421 CASE DEFAULT 6343 6422 WRITE( message_string, * ) 'unknown variable named "', & -
palm/trunk/SOURCE/radiation_model_mod.f90
r2701 r2706 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix, in average radiation case calculate exner function before using it. 23 23 ! 24 24 ! Former revisions: … … 2323 2323 IF ( cloud_physics ) ql1 = ql1_l 2324 2324 #endif 2325 2326 exn1 = ( hyp(nzut) / 100000.0_wp )**0.286_wp 2325 2327 IF ( cloud_physics ) pt1 = pt1 + l_d_cp / exn1 * ql1 2326 2328 ! -
palm/trunk/SOURCE/read_3d_binary.f90
r2696 r2706 1138 1138 myid_char = myid_char_save 1139 1139 1140 1141 1140 ! 1142 1141 !-- End of time measuring for reading binary data -
palm/trunk/SOURCE/surface_mod.f90
r2698 r2706 21 21 ! Current revisions: 22 22 ! ------------------ 23 ! 23 ! In case of restarts read and write pt_surface 24 24 ! 25 25 ! Former revisions: … … 2235 2235 IF ( ALLOCATED( surf_def_h(l)%rib ) ) & 2236 2236 surf_h(l)%rib(mm(l)) = surf_def_h(l)%rib(m) 2237 IF ( ALLOCATED( surf_def_h(l)%pt_surface ) ) & 2238 surf_h(l)%pt_surface(mm(l)) = surf_def_h(l)%pt_surface(m) 2237 2239 IF ( ALLOCATED( surf_def_h(l)%usws ) ) & 2238 2240 surf_h(l)%usws(mm(l)) = surf_def_h(l)%usws(m) … … 2290 2292 IF ( ALLOCATED( surf_lsm_h%rib ) ) & 2291 2293 surf_h(0)%rib(mm(0)) = surf_lsm_h%rib(m) 2294 IF ( ALLOCATED( surf_lsm_h%pt_surface ) ) & 2295 surf_h(l)%pt_surface(mm(l)) = surf_lsm_h%pt_surface(m) 2292 2296 IF ( ALLOCATED( surf_lsm_h%usws ) ) & 2293 2297 surf_h(0)%usws(mm(0)) = surf_lsm_h%usws(m) … … 2345 2349 IF ( ALLOCATED( surf_usm_h%rib ) ) & 2346 2350 surf_h(0)%rib(mm(0)) = surf_usm_h%rib(m) 2351 IF ( ALLOCATED( surf_usm_h%pt_surface ) ) & 2352 surf_h(l)%pt_surface(mm(l)) = surf_usm_h%pt_surface(m) 2347 2353 IF ( ALLOCATED( surf_usm_h%usws ) ) & 2348 2354 surf_h(0)%usws(mm(0)) = surf_usm_h%usws(m) … … 2436 2442 IF ( ALLOCATED( surf_def_v(l)%rib ) ) & 2437 2443 surf_v(l)%rib(mm(l)) = surf_def_v(l)%rib(m) 2444 IF ( ALLOCATED( surf_def_v(l)%pt_surface ) ) & 2445 surf_v(l)%pt_surface(mm(l)) = surf_def_v(l)%pt_surface(m) 2438 2446 IF ( ALLOCATED( surf_def_v(l)%shf ) ) & 2439 2447 surf_v(l)%shf(mm(l)) = surf_def_v(l)%shf(m) … … 2492 2500 IF ( ALLOCATED( surf_lsm_v(l)%rib ) ) & 2493 2501 surf_v(l)%rib(mm(l)) = surf_lsm_v(l)%rib(m) 2502 IF ( ALLOCATED( surf_lsm_v(l)%pt_surface ) ) & 2503 surf_v(l)%pt_surface(mm(l)) = surf_lsm_v(l)%pt_surface(m) 2494 2504 IF ( ALLOCATED( surf_lsm_v(l)%usws ) ) & 2495 2505 surf_v(l)%usws(mm(l)) = surf_lsm_v(l)%usws(m) … … 2552 2562 IF ( ALLOCATED( surf_usm_v(l)%rib ) ) & 2553 2563 surf_v(l)%rib(mm(l)) = surf_usm_v(l)%rib(m) 2564 IF ( ALLOCATED( surf_usm_v(l)%pt_surface ) ) & 2565 surf_v(l)%pt_surface(mm(l)) = surf_usm_v(l)%pt_surface(m) 2554 2566 IF ( ALLOCATED( surf_usm_v(l)%usws ) ) & 2555 2567 surf_v(l)%usws(mm(l)) = surf_usm_v(l)%usws(m) … … 2657 2669 WRITE ( 14 ) surf_h(l)%rib 2658 2670 ENDIF 2671 WRITE ( 14 ) 'surf_h(' // dum // ')%pt_surface ' 2672 IF ( ALLOCATED ( surf_h(l)%pt_surface ) ) THEN 2673 WRITE ( 14 ) surf_h(l)%pt_surface 2674 ENDIF 2659 2675 WRITE ( 14 ) 'surf_h(' // dum // ')%usws ' 2660 2676 IF ( ALLOCATED ( surf_h(l)%usws ) ) THEN … … 2757 2773 IF ( ALLOCATED ( surf_v(l)%rib ) ) THEN 2758 2774 WRITE ( 14 ) surf_v(l)%rib 2775 ENDIF 2776 WRITE ( 14 ) 'surf_v(' // dum // ')%pt_surface ' 2777 IF ( ALLOCATED ( surf_v(l)%pt_surface ) ) THEN 2778 WRITE ( 14 ) surf_v(l)%pt_surface 2759 2779 ENDIF 2760 2780 WRITE ( 14 ) 'surf_v(' // dum // ')%shf ' … … 2997 3017 IF ( ALLOCATED( surf_h(0)%rib ) .AND. kk == 1 ) & 2998 3018 READ ( 13 ) surf_h(0)%rib 3019 CASE ( 'surf_h(0)%pt_surface' ) 3020 IF ( ALLOCATED( surf_h(0)%pt_surface ) .AND. kk == 1 ) & 3021 READ ( 13 ) surf_h(0)%pt_surface 2999 3022 CASE ( 'surf_h(0)%usws' ) 3000 3023 IF ( ALLOCATED( surf_h(0)%usws ) .AND. kk == 1 ) & … … 3073 3096 IF ( ALLOCATED( surf_h(1)%rib ) .AND. kk == 1 ) & 3074 3097 READ ( 13 ) surf_h(1)%rib 3098 CASE ( 'surf_h(1)%pt_surface' ) 3099 IF ( ALLOCATED( surf_h(1)%pt_surface ) .AND. kk == 1 ) & 3100 READ ( 13 ) surf_h(1)%pt_surface 3075 3101 CASE ( 'surf_h(1)%usws' ) 3076 3102 IF ( ALLOCATED( surf_h(1)%usws ) .AND. kk == 1 ) & … … 3227 3253 IF ( ALLOCATED( surf_v(0)%rib ) .AND. kk == 1 ) & 3228 3254 READ ( 13 ) surf_v(0)%rib 3255 CASE ( 'surf_v(0)%pt_surface' ) 3256 IF ( ALLOCATED( surf_v(0)%pt_surface ) .AND. kk == 1 ) & 3257 READ ( 13 ) surf_v(0)%pt_surface 3229 3258 CASE ( 'surf_v(0)%shf' ) 3230 3259 IF ( ALLOCATED( surf_v(0)%shf ) .AND. kk == 1 ) & … … 3306 3335 IF ( ALLOCATED( surf_v(1)%rib ) .AND. kk == 1 ) & 3307 3336 READ ( 13 ) surf_v(1)%rib 3337 CASE ( 'surf_v(1)%pt_surface' ) 3338 IF ( ALLOCATED( surf_v(1)%pt_surface ) .AND. kk == 1 ) & 3339 READ ( 13 ) surf_v(1)%pt_surface 3308 3340 CASE ( 'surf_v(1)%shf' ) 3309 3341 IF ( ALLOCATED( surf_v(1)%shf ) .AND. kk == 1 ) & … … 3385 3417 IF ( ALLOCATED( surf_v(2)%rib ) .AND. kk == 1 ) & 3386 3418 READ ( 13 ) surf_v(2)%rib 3419 CASE ( 'surf_v(2)%pt_surface' ) 3420 IF ( ALLOCATED( surf_v(2)%pt_surface ) .AND. kk == 1 ) & 3421 READ ( 13 ) surf_v(2)%pt_surface 3387 3422 CASE ( 'surf_v(2)%shf' ) 3388 3423 IF ( ALLOCATED( surf_v(2)%shf ) .AND. kk == 1 ) & … … 3464 3499 IF ( ALLOCATED( surf_v(3)%rib ) .AND. kk == 1 ) & 3465 3500 READ ( 13 ) surf_v(3)%rib 3501 CASE ( 'surf_v(3)%pt_surface' ) 3502 IF ( ALLOCATED( surf_v(3)%pt_surface ) .AND. kk == 1 ) & 3503 READ ( 13 ) surf_v(3)%pt_surface 3466 3504 CASE ( 'surf_v(3)%shf' ) 3467 3505 IF ( ALLOCATED( surf_v(3)%shf ) .AND. kk == 1 ) & … … 3646 3684 ENDIF 3647 3685 3686 IF ( INDEX( TRIM( field_chr ), '%pt_surface' ) /= 0 ) THEN 3687 IF ( ALLOCATED( surf_target%pt_surface ) .AND. & 3688 ALLOCATED( surf_file%pt_surface ) ) & 3689 surf_target%pt_surface(m_target) = surf_file%pt_surface(m_file) 3690 ENDIF 3691 3648 3692 IF ( INDEX( TRIM( field_chr ), '%usws' ) /= 0 ) THEN 3649 3693 IF ( ALLOCATED( surf_target%usws ) .AND. &
Note: See TracChangeset
for help on using the changeset viewer.