Changeset 3045 for palm/trunk/SOURCE/init_masks.f90
- Timestamp:
- May 28, 2018 7:55:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_masks.f90
r2718 r3045 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Error messages revised 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 192 195 193 196 ! 194 !-- Parallel mask output not yet tested 197 !-- Parallel mask output not yet supported. In check_parameters data format 198 !-- is restricted and is switched back to non-parallel output. Therefore the 199 !-- following error can not occur at the moment. 195 200 IF ( netcdf_data_format > 4 ) THEN 196 message_string = 'netCDF file formats '// &197 ' 3 (netCDF 4) and 4 (netCDF 4 Classic model)'//&198 ' &are currently not supported (not yet tested).'201 message_string = 'netCDF file formats '// & 202 '5 and 6 (with parallel I/O support)'// & 203 ' are currently not supported.' 199 204 CALL message( 'init_masks', 'PA0328', 1, 2, 0, 6, 0 ) 200 205 ENDIF … … 258 263 DO WHILE ( do_mask_user(mid,j) /= ' ' .AND. j <= 100 ) 259 264 IF ( i > 100 ) THEN 260 WRITE ( message_string, * ) 'number of output quantitities ', &261 'given by data_output_mask and data_output_mask_user ', &265 WRITE ( message_string, * ) 'number of output quantitities ', & 266 'given by data_output_mask and data_output_mask_user ', & 262 267 'exceeds the limit of 100' 263 268 CALL message( 'init_masks', 'PA0329', 1, 2, 0, 6, 0 ) … … 290 295 CASE ( 'e' ) 291 296 IF ( constant_diffusion ) THEN 292 WRITE ( message_string, * ) 'output of "', TRIM( var ), &297 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 293 298 '" requires constant_diffusion = .FALSE.' 294 299 CALL message( 'init_masks', 'PA0103', 1, 2, 0, 6, 0 ) … … 298 303 CASE ( 'lpt' ) 299 304 IF ( .NOT. cloud_physics ) THEN 300 WRITE ( message_string, * ) 'output of "', TRIM( var ), &305 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 301 306 '" requires cloud_physics = .TRUE.' 302 307 CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 ) … … 306 311 CASE ( 'nc' ) 307 312 IF ( .NOT. cloud_physics ) THEN 308 WRITE ( message_string, * ) 'output of "', TRIM( var ), &313 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 309 314 '" requires cloud_physics = .TRUE.' 310 315 CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 ) 311 316 ELSEIF ( .NOT. microphysics_morrison ) THEN 312 message_string = 'output of "' // TRIM( var ) // '" requi' //&313 're s = morrison'317 message_string = 'output of "' // TRIM( var ) // '" ' // & 318 'requires = morrison' 314 319 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 315 320 ENDIF … … 318 323 CASE ( 'nr' ) 319 324 IF ( .NOT. cloud_physics ) THEN 320 WRITE ( message_string, * ) 'output of "', TRIM( var ), &325 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 321 326 '" requires cloud_physics = .TRUE.' 322 327 CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 ) 323 328 ELSEIF ( .NOT. microphysics_seifert ) THEN 324 message_string = 'output of "' // TRIM( var ) // '" requi' //&325 're s cloud_scheme = seifert_beheng'329 message_string = 'output of "' // TRIM( var ) // '"' // & 330 'requires cloud_scheme = seifert_beheng' 326 331 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 327 332 ENDIF … … 330 335 CASE ( 'pc', 'pr' ) 331 336 IF ( .NOT. particle_advection ) THEN 332 WRITE ( message_string, * ) 'output of "', TRIM( var ), &333 '" requires a "particles_par"-NAMELIST in the ', &337 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 338 '" requires a "particles_par"-NAMELIST in the ', & 334 339 'parameter file (PARIN)' 335 340 CALL message( 'init_masks', 'PA0104', 1, 2, 0, 6, 0 ) … … 340 345 CASE ( 'q', 'vpt' ) 341 346 IF ( .NOT. humidity ) THEN 342 WRITE ( message_string, * ) 'output of "', TRIM( var ), &347 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 343 348 '" requires humidity = .TRUE.' 344 349 CALL message( 'init_masks', 'PA0105', 1, 2, 0, 6, 0 ) … … 349 354 CASE ( 'qc' ) 350 355 IF ( .NOT. cloud_physics ) THEN 351 message_string = 'output of "' // TRIM( var ) // '" requi' //&352 're s cloud_physics = .TRUE.'356 message_string = 'output of "' // TRIM( var ) // '"' // & 357 'requires cloud_physics = .TRUE.' 353 358 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 354 359 ENDIF … … 357 362 CASE ( 'ql' ) 358 363 IF ( .NOT. ( cloud_physics .OR. cloud_droplets ) ) THEN 359 WRITE ( message_string, * ) 'output of "', TRIM( var ), &364 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 360 365 '" requires cloud_physics = .TRUE. or cloud_droplets', & 361 366 ' = .TRUE.' 362 CALL message( 'init_masks', 'PA010 8', 1, 2, 0, 6, 0 )367 CALL message( 'init_masks', 'PA0106', 1, 2, 0, 6, 0 ) 363 368 ENDIF 364 369 unit = 'kg/kg' … … 366 371 CASE ( 'ql_c', 'ql_v', 'ql_vp' ) 367 372 IF ( .NOT. cloud_droplets ) THEN 368 WRITE ( message_string, * ) 'output of "', TRIM( var ), &373 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 369 374 '" requires cloud_droplets = .TRUE.' 370 375 CALL message( 'init_masks', 'PA0107', 1, 2, 0, 6, 0 ) … … 376 381 CASE ( 'qv' ) 377 382 IF ( .NOT. cloud_physics ) THEN 378 WRITE ( message_string, * ) 'output of "', TRIM( var ), &383 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 379 384 '" requires cloud_physics = .TRUE.' 380 385 CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 ) … … 384 389 CASE ( 'qr' ) 385 390 IF ( .NOT. cloud_physics ) THEN 386 message_string = 'output of "' // TRIM( var ) // '" requi' //&387 're s cloud_physics = .TRUE.'391 message_string = 'output of "' // TRIM( var ) // '" ' // & 392 'requires cloud_physics = .TRUE.' 388 393 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 389 394 ELSEIF ( .NOT. microphysics_seifert ) THEN 390 message_string = 'output of "' // TRIM( var ) // '" requi' //&391 're s cloud_scheme = seifert_beheng'395 message_string = 'output of "' // TRIM( var ) // '" ' // & 396 'requires cloud_scheme = seifert_beheng' 392 397 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 393 398 ENDIF … … 396 401 CASE ( 'rho_ocean' ) 397 402 IF ( .NOT. ocean ) THEN 398 WRITE ( message_string, * ) 'output of "', TRIM( var ), &403 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 399 404 '" requires ocean = .TRUE.' 400 405 CALL message( 'init_masks', 'PA0109', 1, 2, 0, 6, 0 ) … … 404 409 CASE ( 's' ) 405 410 IF ( .NOT. passive_scalar ) THEN 406 WRITE ( message_string, * ) 'output of "', TRIM( var ), &411 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 407 412 '" requires passive_scalar = .TRUE.' 408 413 CALL message( 'init_masks', 'PA0110', 1, 2, 0, 6, 0 ) … … 412 417 CASE ( 'sa' ) 413 418 IF ( .NOT. ocean ) THEN 414 WRITE ( message_string, * ) 'output of "', TRIM( var ), &419 WRITE ( message_string, * ) 'output of "', TRIM( var ), & 415 420 '" requires ocean = .TRUE.' 416 421 CALL message( 'init_masks', 'PA0109', 1, 2, 0, 6, 0 ) … … 419 424 420 425 CASE ( 'u*', 't*', 'lwp*', 'pra*', 'prr*', 'z0*', 'z0h*' ) 421 WRITE ( message_string, * ) 'illegal value for data_', &422 'output: "', TRIM( var ), '" is only allowed', &426 WRITE ( message_string, * ) 'illegal value for data_', & 427 'output: "', TRIM( var ), '" is only allowed', & 423 428 'for horizontal cross section' 424 429 CALL message( 'init_masks', 'PA0111', 1, 2, 0, 6, 0 ) … … 437 442 IF ( unit == 'illegal' ) THEN 438 443 IF ( do_mask_user(mid,1) /= ' ' ) THEN 439 WRITE ( message_string, * ) 'illegal value for data_', &440 'output or data_output_user: "',&444 WRITE ( message_string, * ) 'illegal value for data_', & 445 'output_masks or data_output_masks_user: "', & 441 446 TRIM( do_mask(mid,i) ), '"' 442 CALL message( 'init_masks', 'PA0 114', 1, 2, 0, 6, 0 )447 CALL message( 'init_masks', 'PA0018', 1, 2, 0, 6, 0 ) 443 448 ELSE 444 WRITE ( message_string, * ) 'illegal value for data_', &445 ' output: "', TRIM( do_mask(mid,i) ), '"'449 WRITE ( message_string, * ) 'illegal value for data_', & 450 ' output_masks : "', TRIM( do_mask(mid,i) ), '"' 446 451 CALL message( 'init_masks', 'PA0330', 1, 2, 0, 6, 0 ) 447 452 ENDIF … … 643 648 ENDIF 644 649 IF ( m > (nxyz+1) ) THEN 645 WRITE ( message_string, '(I3,A,I3,A,I1,3A,I3)' ) &646 m,' in mask ',mid,' along dimension ',dim, &650 WRITE ( message_string, '(I3,A,I3,A,I1,3A,I3)' ) & 651 m,' in mask ',mid,' along dimension ',dim, & 647 652 ' exceeds (',nxyz_string,'+1) = ',nxyz+1 648 653 CALL message( 'init_masks', 'PA0331', 1, 2, 0, 6, 0 ) … … 681 686 > (nxyz+1) * dxyz / mask_scale(dim) ) THEN 682 687 WRITE ( message_string, '(2(A,I3,A,I1,A,F9.3),5A,I1,A,F9.3)' ) & 683 'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1), &688 'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1), & 684 689 ' and/or mask_loop(',mid,',',dim,',2)=', & 685 mask_loop(mid,dim,2),' &exceed (', &686 nxyz_string,'+1)*',dxyz_string,'/mask_scale(',dim,')=', &690 mask_loop(mid,dim,2),' exceed (', & 691 nxyz_string,'+1)*',dxyz_string,'/mask_scale(',dim,')=', & 687 692 (nxyz+1)*dxyz/mask_scale(dim) 688 693 CALL message( 'init_masks', 'PA0332', 1, 2, 0, 6, 0 ) 689 694 ENDIF 690 loop_begin = NINT( mask_loop(mid,dim,1) * mask_scale(dim) &695 loop_begin = NINT( mask_loop(mid,dim,1) * mask_scale(dim) & 691 696 * ddxyz - 0.5_wp ) 692 loop_end = NINT( mask_loop(mid,dim,2) * mask_scale(dim) &697 loop_end = NINT( mask_loop(mid,dim,2) * mask_scale(dim) & 693 698 * ddxyz - 0.5_wp ) 694 loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) &699 loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) & 695 700 * ddxyz ) 696 701 IF ( loop_begin == -1 ) loop_begin = 0 ! avoid negative values … … 702 707 IF ( MAXVAL( mask_loop(mid,dim,1:2) ) & 703 708 > zu(nz+1) / mask_scale(dim) ) THEN 704 WRITE ( message_string, '(2(A,I3,A,I1,A,F9.3),A,I1,A,F9.3)' ) &705 'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1), &709 WRITE ( message_string, '(2(A,I3,A,I1,A,F9.3),A,I1,A,F9.3)' ) & 710 'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1), & 706 711 ' and/or mask_loop(',mid,',',dim,',2)=', & 707 mask_loop(mid,dim,2),' &exceed zu(nz+1)/mask_scale(',dim,&712 mask_loop(mid,dim,2),' exceed zu(nz+1)/mask_scale(',dim, & 708 713 ')=',zu(nz+1)/mask_scale(dim) 709 714 CALL message( 'init_masks', 'PA0333', 1, 2, 0, 6, 0 ) … … 724 729 IF ( mask_loop(mid,dim,2) * mask_scale(dim) > dz_stretch_level ) & 725 730 THEN 726 WRITE ( message_string, '(A,I3,A,I1,A,F9.3,A,F8.2,3A)' ) &727 'mask_loop(',mid,',',dim,',2)=', mask_loop(mid,dim,2), &728 ' exceeds dz_stretch_level=',dz_stretch_level, &729 '. &Vertical mask locations will not ',&730 'match the desired heights &within the stretching ',&731 WRITE ( message_string, '(A,I3,A,I1,A,F9.3,A,F8.2,3A)' ) & 732 'mask_loop(',mid,',',dim,',2)=', mask_loop(mid,dim,2), & 733 ' exceeds dz_stretch_level=',dz_stretch_level, & 734 '. Vertical mask locations will not ', & 735 'match the desired heights within the stretching ', & 731 736 'region.' 732 737 CALL message( 'init_masks', 'PA0334', 0, 1, 0, 6, 0 )
Note: See TracChangeset
for help on using the changeset viewer.