- Timestamp:
- Apr 30, 2019 9:48:33 AM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r3933 r3941 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Check that at least one surface type is set at surface element. 28 ! 29 ! 3933 2019-04-25 12:33:20Z kanani 27 30 ! Remove unused subroutine and allocation of pt_2m, this is done in surface_mod 28 31 ! now (surfaces%pt_2m) … … 2277 2280 ENDIF 2278 2281 2279 2280 ! pt(k+k_off,j+j_off,i+i_off) = surf_t_surface_p%var_1d(m) / exner(nzb) !is actually no air temperature2281 2282 surf%pt_surface(m) = surf_t_surface_p%var_1d(m) / exner(nzb) 2282 2283 … … 2881 2882 IF ( water_type_f%var(j,i) /= water_type_f%fill ) & 2882 2883 surf_lsm_h%water_surface(m) = .TRUE. 2884 ! 2885 !-- Check if at least one type is set. 2886 IF ( .NOT. surf_lsm_h%vegetation_surface(m) .AND. & 2887 .NOT. surf_lsm_h%pavement_surface(m) .AND. & 2888 .NOT. surf_lsm_h%water_surface(m) ) THEN 2889 WRITE( message_string, * ) 'Horizontal surface element ' // & 2890 ' at i, j = ', i, j, & 2891 ' is neither a vegetation, ' // & 2892 'pavement, nor a water surface.' 2893 CALL message( 'land_surface_model_mod', 'PA0619', & 2894 2, 2, myid, 6, 0 ) 2895 ENDIF 2896 2883 2897 ENDDO 2884 2898 ! … … 2959 2973 surf_lsm_v(l)%water_surface(m) = .TRUE. 2960 2974 ! 2961 !-- Check if surface element has the flag %building_covered_all, 2962 !-- this case, set vegetation_type appropriate 2975 !-- Check if at least one type is set. 2976 IF ( .NOT. surf_lsm_v(l)%vegetation_surface(m) .AND. & 2977 .NOT. surf_lsm_v(l)%pavement_surface(m) .AND. & 2978 .NOT. surf_lsm_v(l)%water_surface(m) ) THEN 2979 WRITE( message_string, * ) 'Vertical surface element ' //& 2980 ' at i, j = ', i, j, & 2981 ' is neither a vegetation, ' // & 2982 'pavement, nor a water surface.' 2983 CALL message( 'land_surface_model_mod', 'PA0619', & 2984 2, 2, myid, 6, 0 ) 2985 ENDIF 2963 2986 ENDDO 2964 2987 ENDDO -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r3885 r3941 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Move check for grid dimension to an earlier point in time when first array 28 ! is read. 29 ! Improve checks for building types / IDs with respect to 2D/3D buildings. 30 ! 31 ! 3885 2019-04-11 11:29:34Z kanani 27 32 ! Changes related to global restructuring of location messages and introduction 28 33 ! of additional debug messages … … 2498 2503 ONLY: message_string, topography 2499 2504 2505 USE grid_variables, & 2506 ONLY: dx, dy 2507 2500 2508 USE indices, & 2501 ONLY: nbgp, nx l, nxr, ny, nyn, nys, nzb2509 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nzb 2502 2510 2503 2511 … … 2544 2552 CALL get_variable( id_topo, 'x', dim_static%x ) 2545 2553 CALL get_variable( id_topo, 'y', dim_static%y ) 2554 ! 2555 !-- Check whether dimension size in input file matches the model dimensions 2556 IF ( dim_static%nx-1 /= nx .OR. dim_static%ny-1 /= ny ) THEN 2557 message_string = 'Static input file: horizontal dimension in ' // & 2558 'x- and/or y-direction ' // & 2559 'do not match the respective model dimension' 2560 CALL message( 'netcdf_data_input_mod', 'PA0548', 1, 2, 0, 6, 0 ) 2561 ENDIF 2562 ! 2563 !-- Check if grid spacing of provided input data matches the respective 2564 !-- grid spacing in the model. 2565 IF ( ABS( dim_static%x(1) - dim_static%x(0) - dx ) > 10E-6_wp .OR. & 2566 ABS( dim_static%y(1) - dim_static%y(0) - dy ) > 10E-6_wp ) THEN 2567 message_string = 'Static input file: horizontal grid spacing ' // & 2568 'in x- and/or y-direction ' // & 2569 'do not match the respective model grid spacing.' 2570 CALL message( 'netcdf_data_input_mod', 'PA0549', 1, 2, 0, 6, 0 ) 2571 ENDIF 2546 2572 ! 2547 2573 !-- Terrain height. First, get variable-related _FillValue attribute … … 3810 3836 ONLY: land_surface, message_string, urban_surface 3811 3837 3812 USE grid_variables, &3813 ONLY: dx, dy3814 3815 3838 USE indices, & 3816 ONLY: nx , nxl, nxr, ny, nyn, nys3839 ONLY: nxl, nxr, nyn, nys 3817 3840 3818 3841 IMPLICIT NONE … … 3827 3850 !-- Return if no static input file is available 3828 3851 IF ( .NOT. input_pids_static ) RETURN 3829 !3830 !-- Check whether dimension size in input file matches the model dimensions3831 IF ( dim_static%nx-1 /= nx .OR. dim_static%ny-1 /= ny ) THEN3832 message_string = 'Static input file: horizontal dimension in ' // &3833 'x- and/or y-direction ' // &3834 'do not match the respective model dimension'3835 CALL message( 'netcdf_data_input_mod', 'PA0548', 1, 2, 0, 6, 0 )3836 ENDIF3837 !3838 !-- Check if grid spacing of provided input data matches the respective3839 !-- grid spacing in the model.3840 IF ( ABS( dim_static%x(1) - dim_static%x(0) - dx ) > 10E-6_wp .OR. &3841 ABS( dim_static%y(1) - dim_static%y(0) - dy ) > 10E-6_wp ) THEN3842 message_string = 'Static input file: horizontal grid spacing ' // &3843 'in x- and/or y-direction ' // &3844 'do not match the respective model grid spacing.'3845 CALL message( 'netcdf_data_input_mod', 'PA0549', 1, 2, 0, 6, 0 )3846 ENDIF3847 3852 ! 3848 3853 !-- Check for correct dimension of surface_fractions, should run from 0-2. … … 4250 4255 IF ( buildings_f%lod == 1 ) THEN 4251 4256 IF ( buildings_f%var_2d(j,i) /= buildings_f%fill1 .AND. & 4252 building_type_f%var(j,i) == building_type_f%fill ) THEN 4257 building_type_f%var(j,i) == building_type_f%fill .OR. & 4258 buildings_f%var_2d(j,i) == buildings_f%fill1 .AND. & 4259 building_type_f%var(j,i) /= building_type_f%fill ) THEN 4253 4260 WRITE( message_string, * ) 'Each location where a ' // & 4254 'building is set requires a type ' // &4255 '( and vice versa ) in case the ' //&4256 'urban-surface model is applied. ' //&4257 4261 '2D building is set requires a type ' // & 4262 '( and vice versa ) in case the ' // & 4263 'urban-surface model is applied. ' // & 4264 'i, j = ', i, j 4258 4265 CALL message( 'netcdf_data_input_mod', 'PA0573', & 4259 4266 2, 2, myid, 6, 0 ) … … 4262 4269 IF ( buildings_f%lod == 2 ) THEN 4263 4270 IF ( ANY( buildings_f%var_3d(:,j,i) == 1 ) .AND. & 4264 building_type_f%var(j,i) == building_type_f%fill ) THEN 4271 building_type_f%var(j,i) == building_type_f%fill .OR. & 4272 .NOT. ANY( buildings_f%var_3d(:,j,i) == 1 ) .AND. & 4273 building_type_f%var(j,i) /= building_type_f%fill ) THEN 4265 4274 WRITE( message_string, * ) 'Each location where a ' // & 4266 'building is set requires a type ' // &4267 '( and vice versa ) in case the ' //&4268 'urban-surface model is applied. ' //&4269 4275 '3D building is set requires a type ' // & 4276 '( and vice versa ) in case the ' // & 4277 'urban-surface model is applied. ' // & 4278 'i, j = ', i, j 4270 4279 CALL message( 'netcdf_data_input_mod', 'PA0573', & 4271 4280 2, 2, myid, 6, 0 ) … … 4279 4288 IF ( buildings_f%lod == 1 ) THEN 4280 4289 IF ( buildings_f%var_2d(j,i) /= buildings_f%fill1 .AND. & 4281 building_id_f%var(j,i) == building_id_f%fill ) THEN 4290 building_id_f%var(j,i) == building_id_f%fill .OR. & 4291 buildings_f%var_2d(j,i) == buildings_f%fill1 .AND. & 4292 building_id_f%var(j,i) /= building_id_f%fill ) THEN 4282 4293 WRITE( message_string, * ) 'Each location where a ' // & 4283 'building is set requires an ID ' // &4284 4294 '2D building is set requires an ID ' // & 4295 '( and vice versa ). i, j = ', i, j 4285 4296 CALL message( 'netcdf_data_input_mod', 'PA0574', & 4286 4297 2, 2, myid, 6, 0 ) … … 4288 4299 ELSEIF ( buildings_f%lod == 2 ) THEN 4289 4300 IF ( ANY( buildings_f%var_3d(:,j,i) == 1 ) .AND. & 4290 building_id_f%var(j,i) == building_id_f%fill ) THEN 4301 building_id_f%var(j,i) == building_id_f%fill .OR. & 4302 .NOT. ANY( buildings_f%var_3d(:,j,i) == 1 ) .AND. & 4303 building_id_f%var(j,i) /= building_id_f%fill ) THEN 4291 4304 WRITE( message_string, * ) 'Each location where a ' // & 4292 'building is set requires an ID ' // &4293 4305 '3D building is set requires an ID ' // & 4306 '( and vice versa ). i, j = ', i, j 4294 4307 CALL message( 'netcdf_data_input_mod', 'PA0574', & 4295 4308 2, 2, myid, 6, 0 )
Note: See TracChangeset
for help on using the changeset viewer.