Changeset 2706 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Dec 18, 2017 6:33:49 PM (6 years ago)
- File:
-
- 1 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 "', &
Note: See TracChangeset
for help on using the changeset viewer.