Changeset 964 for palm/trunk/SOURCE/close_file.f90
- Timestamp:
- Jul 26, 2012 9:14:24 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/close_file.f90
r565 r964 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! old profil-units (40:49) and respective code removed 7 7 ! 8 8 ! Former revisions: … … 67 67 CHARACTER (LEN=2) :: suffix 68 68 CHARACTER (LEN=10) :: datform = 'lit_endian' 69 CHARACTER (LEN=80) :: rtext, title, utext = '', xtext = '', ytext = '' 70 71 INTEGER :: av, anzzeile, cranz, cross_count, cross_numbers, dimx, dimy, & 72 fid, file_id, j, k, legpos = 1, planz, timodex = 1 73 INTEGER, DIMENSION(100) :: klist, lstyle, cucol 74 75 LOGICAL :: checkuf = .TRUE., datleg = .TRUE., dp = .FALSE., & 76 grid = .TRUE., rand = .TRUE., swap, twoxa = .TRUE., & 77 twoya = .TRUE. 78 79 REAL :: ansx = -999.999, ansy = -999.999, gwid = 0.1, rlegfak, & 80 sizex, sizey, texfac, utmove = 50.0, uxmax, uxmin, uymax, & 81 uymin, yright 82 REAL, DIMENSION(100) :: lwid, normx, normy 83 84 NAMELIST /CROSS/ ansx, ansy, cucol, grid, gwid, klist, legpos, lstyle, & 85 lwid, normx, normy, rand, rlegfak, sizex, sizey, & 86 texfac, timodex, twoxa, twoya, utext, utmove, uxmax, & 87 uxmin, uymax, uymin, xtext, ytext 88 NAMELIST /GLOBAL/ checkuf, datform, dimx, dimy, dp, planz, sizex, sizey, & 89 title, yright 90 NAMELIST /RAHMEN/ anzzeile, cranz, datleg, rtext, swap 69 CHARACTER (LEN=80) :: rtext, title 70 71 INTEGER :: av, anzzeile, dimx, dimy, & 72 fid, file_id, j, k, planz 73 74 LOGICAL :: checkuf = .TRUE., datleg = .TRUE., dp = .FALSE., swap 75 76 REAL :: sizex, sizey, yright 77 78 NAMELIST /GLOBAL/ checkuf, datform, dimx, dimy, dp, planz, & 79 title 80 NAMELIST /RAHMEN/ anzzeile, datleg, rtext, swap 91 81 92 82 ! … … 190 180 WRITE ( 32, 3200) ' ', TRIM( run_description_header ), & 191 181 nx+2, ny+2, nz_do3d+1, do3d_avs_n 192 ENDIF193 194 CASE ( 40:49 )195 !196 !-- Write PROFIL namelist parameters for 1D profiles.197 !-- First determine, how many crosses are to be drawn.198 IF ( myid == 0 ) THEN199 cross_numbers = 0200 DO j = 1, crmax201 IF ( cross_profile_number_count(j) /= 0 ) THEN202 cross_numbers = cross_numbers + 1203 ENDIF204 ENDDO205 206 IF ( cross_numbers /= 0 ) THEN207 !208 !-- Determine remaining RAHMEN parameters209 swap = .FALSE.210 rtext = '\0.5 ' // TRIM( run_description_header ) // &211 ' ' // TRIM( region( fid - 40 ) )212 !213 !-- Write RAHMEN parameters214 IF ( statistic_regions == 0 .AND. fid == 40 ) THEN215 suffix = ''216 ELSE217 WRITE ( suffix, '(''_'',I1)' ) fid - 40218 ENDIF219 OPEN ( 90, FILE='PLOT1D_PAR' // TRIM( suffix ), &220 FORM='FORMATTED', DELIM='APOSTROPHE' )221 !222 !-- Subtitle for crosses with time averaging223 IF ( averaging_interval_pr /= 0.0 ) THEN224 WRITE ( utext, 4000 ) averaging_interval_pr225 ENDIF226 !227 !-- Determine and write CROSS parameters for each individual228 !-- cross229 cross_count = 0230 DO j = 1, crmax231 k = cross_profile_number_count(j)232 IF ( k /= 0 ) THEN233 cross_count = cross_count + 1234 !235 !-- Write RAHMEN parameters236 IF ( MOD( cross_count-1, &237 profile_rows*profile_columns ) == 0 ) &238 THEN239 !240 !-- Determine number of crosses still to be drawn241 cranz = MIN( cross_numbers - cross_count + 1, &242 profile_rows * profile_columns )243 !244 !-- If the first line cannot be filled with crosses245 !-- completely, the default number of crosses per246 !-- line has to be reduced.247 IF ( cranz < profile_columns ) THEN248 anzzeile = cranz249 ELSE250 anzzeile = profile_columns251 ENDIF252 253 WRITE ( 90, RAHMEN )254 255 ENDIF256 !257 !-- Store graph numbers258 klist(1:k) = cross_profile_numbers(1:k,j)259 klist(k+1:100) = 999999260 !261 !-- Store graph attributes262 cucol = cross_linecolors(:,j)263 lstyle = cross_linestyles(:,j)264 lwid = 0.6265 !266 !-- Sizes, text etc.267 sizex = 100.0; sizey = 120.0268 rlegfak = 0.7; texfac = 1.0269 !270 !-- Determine range of x-axis values271 IF ( cross_normalized_x(j) == ' ' ) THEN272 !273 !-- Non-normalized profiles274 IF ( cross_uxmin(j) == 0.0 .AND. &275 cross_uxmax(j) == 0.0 ) THEN276 uxmin = cross_uxmin_computed(j)277 uxmax = cross_uxmax_computed(j)278 IF ( uxmin == uxmax ) uxmax = uxmin + 1.0279 ELSE280 !281 !-- Values set in check_parameters are used here282 uxmin = cross_uxmin(j); uxmax = cross_uxmax(j)283 ENDIF284 ELSE285 !286 !-- Normalized profiles287 IF ( cross_uxmin_normalized(j) == 0.0 .AND. &288 cross_uxmax_normalized(j) == 0.0 ) THEN289 uxmin = cross_uxmin_normalized_computed(j)290 uxmax = cross_uxmax_normalized_computed(j)291 IF ( uxmin == uxmax ) uxmax = uxmin + 1.0292 ELSE293 !294 !-- Values set in check_parameters are used here295 uxmin = cross_uxmin_normalized(j)296 uxmax = cross_uxmax_normalized(j)297 ENDIF298 ENDIF299 !300 !-- Range of y-axis values301 !-- may be re-adjusted during normalization if required302 uymin = cross_uymin(j); uymax = cross_uymax(j)303 ytext = 'height in m'304 !305 !-- Normalization of the axes306 normx = cross_normx_factor(:,j)307 normy = cross_normy_factor(:,j)308 !309 !-- Labelling of the axes310 IF ( cross_normalized_x(j) == ' ' ) THEN311 xtext = cross_xtext(j)312 ELSE313 xtext = TRIM( cross_xtext(j) ) // ' / ' // &314 cross_normalized_x(j)315 ENDIF316 IF ( cross_normalized_y(j) == ' ' ) THEN317 ytext = 'height in m'318 ELSE319 ytext = 'height in m' // ' / ' // &320 cross_normalized_y(j)321 !322 !-- Determine upper limit of value range323 IF ( z_max_do1d_normalized /= -1.0 ) THEN324 uymax = z_max_do1d_normalized325 ENDIF326 ENDIF327 328 WRITE ( 90, CROSS )329 330 ENDIF331 ENDDO332 333 CLOSE ( 90 )334 ENDIF335 ENDIF336 337 CASE ( 50:59 )338 !339 !-- Write PROFIL namelist parameters for time series340 !-- first determine number of crosses to be drawn341 IF ( myid == 0 ) THEN342 cranz = 0343 DO j = 1, 12344 IF ( cross_ts_number_count(j) /= 0 ) cranz = cranz+1345 ENDDO346 347 IF ( cranz /= 0 ) THEN348 !349 !-- Determine RAHMEN parameters350 anzzeile = 1351 swap = .TRUE.352 rtext = '\1.0 ' // TRIM( run_description_header ) // &353 ' ' // TRIM( region( fid - 50 ) )354 !355 !-- Write RAHMEN parameters356 IF ( statistic_regions == 0 .AND. fid == 50 ) THEN357 suffix = ''358 ELSE359 WRITE ( suffix, '(''_'',I1)' ) fid - 50360 ENDIF361 OPEN ( 90, FILE='PLOTTS_PAR' // TRIM( suffix ), &362 FORM='FORMATTED', DELIM='APOSTROPHE' )363 WRITE ( 90, RAHMEN )364 !365 !-- Determine and write CROSS parameters for each individual366 !-- cross367 DO j = 1, 12368 k = cross_ts_number_count(j)369 IF ( k /= 0 ) THEN370 !371 !-- Store graph numbers372 klist(1:k) = cross_ts_numbers(1:k,j)373 klist(k+1:100) = 999999374 !375 !-- Store graph attributes376 cucol(1:k) = linecolors(1:k)377 lstyle(1:k) = linestyles(1:k)378 lwid = 0.4379 !380 !-- Sizes, text etc.381 sizex = 250.0; sizey = 40.0382 rlegfak = 1.5; texfac = 1.5383 xtext = 'time in s'384 ytext = ''385 utext = ''386 !387 !-- Determine range of y-axis values388 IF ( cross_ts_uymin(j) == 999.999 ) THEN389 uymin = cross_ts_uymin_computed(j)390 ELSE391 uymin = cross_ts_uymin(j)392 ENDIF393 IF ( cross_ts_uymax(j) == 999.999 ) THEN394 uymax = cross_ts_uymax_computed(j)395 ELSE396 uymax = cross_ts_uymax(j)397 ENDIF398 IF ( uymin == uymax ) uymax = uymin + 1.0399 !400 !-- Range of x-axis values401 uxmin = 0.0; uxmax = simulated_time402 !403 !-- Normalizations404 normx = 1.0; normy = 1.0405 406 WRITE ( 90, CROSS )407 408 ENDIF409 ENDDO410 411 CLOSE ( 90 )412 ENDIF413 182 ENDIF 414 183
Note: See TracChangeset
for help on using the changeset viewer.