Changeset 2696 for palm/trunk/SOURCE/data_output_2d.f90
- Timestamp:
- Dec 14, 2017 5:12:51 PM (6 years ago)
- Location:
- palm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk
-
palm/trunk/SOURCE
-
palm/trunk/SOURCE/data_output_2d.f90
r2512 r2696 1 1 !> @file data_output_2d.f90 2 2 !------------------------------------------------------------------------------! 3 ! This file is part of PALM.3 ! This file is part of the PALM model system. 4 4 ! 5 5 ! PALM is free software: you can redistribute it and/or modify it under the … … 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Implementation of uv exposure model (FK) 28 ! Implementation of turbulence_closure_mod (TG) 29 ! Set fill values at topography grid points or e.g. non-natural-type surface 30 ! in case of LSM output (MS) 31 ! 32 ! 2512 2017-10-04 08:26:59Z raasch 27 33 ! upper bounds of cross section output changed from nx+1,ny+1 to nx,ny 28 34 ! no output of ghost layer data … … 196 202 ntdim_2d_xy, ntdim_2d_xz, ntdim_2d_yz, & 197 203 psolver, section, simulated_time, simulated_time_chr, & 198 time_since_reference_point 204 time_since_reference_point, uv_exposure 199 205 200 206 USE cpulog, & … … 205 211 206 212 USE indices, & 207 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nz, nzb, nzt 213 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nz, nzb, nzt, wall_flags_0 208 214 209 215 USE kinds … … 217 223 218 224 USE netcdf_interface, & 219 ONLY: id_set_xy, id_set_xz, id_set_yz, id_var_do2d, id_var_time_xy,&220 id_var_time_x z, id_var_time_yz, nc_stat, netcdf_data_format,&221 netcdf_ handle_error225 ONLY: fill_value, id_set_xy, id_set_xz, id_set_yz, id_var_do2d, & 226 id_var_time_xy, id_var_time_xz, id_var_time_yz, nc_stat, & 227 netcdf_data_format, netcdf_handle_error 222 228 223 229 USE particle_attributes, & … … 232 238 USE surface_mod, & 233 239 ONLY: surf_def_h, surf_lsm_h, surf_usm_h 240 241 USE turbulence_closure_mod, & 242 ONLY: tcm_data_output_2d 243 244 USE uv_exposure_model_mod, & 245 ONLY: uvem_data_output_2d 246 234 247 235 248 IMPLICIT NONE … … 244 257 INTEGER(iwp) :: ngp !< 245 258 INTEGER(iwp) :: file_id !< 259 INTEGER(iwp) :: flag_nr !< number of masking flag 246 260 INTEGER(iwp) :: i !< 247 261 INTEGER(iwp) :: if !< … … 457 471 nzt_do = nzt+1 458 472 ! 473 !-- Before each output, set array local_pf to fill value 474 local_pf = fill_value 475 ! 476 !-- Set masking flag for topography for not resorted arrays 477 flag_nr = 0 478 479 ! 459 480 !-- Store the array chosen on the temporary array. 460 481 resorted = .FALSE. 461 482 SELECT CASE ( TRIM( do2d(av,if) ) ) 462 463 483 CASE ( 'e_xy', 'e_xz', 'e_yz' ) 464 484 IF ( av == 0 ) THEN … … 928 948 929 949 CASE ( 'u_xy', 'u_xz', 'u_yz' ) 950 flag_nr = 1 930 951 IF ( av == 0 ) THEN 931 952 to_be_resorted => u … … 970 991 971 992 CASE ( 'v_xy', 'v_xz', 'v_yz' ) 993 flag_nr = 2 972 994 IF ( av == 0 ) THEN 973 995 to_be_resorted => v … … 992 1014 993 1015 CASE ( 'w_xy', 'w_xz', 'w_yz' ) 1016 flag_nr = 3 994 1017 IF ( av == 0 ) THEN 995 1018 to_be_resorted => w … … 1093 1116 1094 1117 ! 1118 !-- Turbulence closure variables 1119 IF ( .NOT. found ) THEN 1120 CALL tcm_data_output_2d( av, do2d(av,if), found, grid, mode,& 1121 local_pf, two_d, nzb_do, nzt_do ) 1122 ENDIF 1123 1124 ! 1095 1125 !-- Radiation quantity 1096 1126 IF ( .NOT. found .AND. radiation ) THEN 1097 1127 CALL radiation_data_output_2d( av, do2d(av,if), found, grid,& 1098 1128 mode, local_pf, two_d ) 1129 ENDIF 1130 1131 ! 1132 !-- UV exposure model quantity 1133 IF ( uv_exposure ) THEN 1134 CALL uvem_data_output_2d( av, do2d(av,if), found, grid, mode,& 1135 local_pf, two_d, nzb_do, nzt_do ) 1099 1136 ENDIF 1100 1137 … … 1127 1164 1128 1165 ! 1129 !-- Resort the array to be output, if not done above 1166 !-- Resort the array to be output, if not done above. Flag topography 1167 !-- grid points with fill values, using the corresponding maksing flag. 1130 1168 IF ( .NOT. resorted ) THEN 1131 1169 DO i = nxl, nxr 1132 1170 DO j = nys, nyn 1133 1171 DO k = nzb_do, nzt_do 1134 local_pf(i,j,k) = to_be_resorted(k,j,i) 1172 local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), & 1173 REAL( fill_value, KIND = wp ), & 1174 BTEST( wall_flags_0(k,j,i), & 1175 flag_nr ) ) 1135 1176 ENDDO 1136 1177 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.