Changeset 254 for palm/trunk/SOURCE/init_grid.f90
- Timestamp:
- Mar 5, 2009 3:33:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r240 r254 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! Output of messages replaced by message handling routine. 6 7 ! new topography case 'single_street_canyon' 7 8 ! … … 78 79 !-- Compute height of u-levels from constant grid length and dz stretch factors 79 80 IF ( dz == -1.0 ) THEN 80 IF ( myid == 0 ) PRINT*,'+++ init_grid:missing dz'81 CALL local_stop81 message_string = 'missing dz' 82 CALL message( 'init_grid', 'PA0200', 1, 2, 0, 6, 0 ) 82 83 ELSEIF ( dz <= 0.0 ) THEN 83 IF ( myid == 0 ) PRINT*,'+++ init_grid:dz=',dz,' <= 0.0'84 CALL local_stop84 WRITE( message_string, * ) 'dz=',dz,' <= 0.0' 85 CALL message( 'init_grid', 'PA0201', 1, 2, 0, 6, 0 ) 85 86 ENDIF 86 87 … … 309 310 IF ( l_grid(k) > 1.5 * dx * wall_adjustment_factor .OR. & 310 311 l_grid(k) > 1.5 * dy * wall_adjustment_factor ) THEN 311 IF ( myid == 0 ) THEN 312 PRINT*, '+++ WARNING: grid anisotropy exceeds '// & 313 'threshold given by only local' 314 PRINT*, ' horizontal reduction of near_wall '// & 315 'mixing length l_wall' 316 PRINT*, ' starting from height level k = ', k, '.' 317 ENDIF 312 WRITE( message_string, * ) 'grid anisotropy exceeds ', & 313 'threshold given by only local', & 314 ' &horizontal reduction of near_wall ', & 315 'mixing length l_wall', & 316 ' &starting from height level k = ', k, '.' 317 CALL message( 'init_grid', 'PA0202', 0, 1, 0, 6, 0 ) 318 318 EXIT 319 319 ENDIF … … 367 367 IF ( ( bxl < 1 ) .OR. ( bxr > nx-1 ) .OR. ( bxr < bxl+3 ) .OR. & 368 368 ( bys < 1 ) .OR. ( byn > ny-1 ) .OR. ( byn < bys+3 ) ) THEN 369 IF ( myid == 0 ) THEN 370 PRINT*, '+++ init_grid: inconsistent building parameters:' 371 PRINT*, ' bxl=', bxl, 'bxr=', bxr, 'bys=', bys, & 372 'byn=', byn, 'nx=', nx, 'ny=', ny 373 ENDIF 374 CALL local_stop 369 WRITE( message_string, * ) 'inconsistent building parameters:', & 370 '& bxl=', bxl, 'bxr=', bxr, 'bys=', bys, & 371 'byn=', byn, 'nx=', nx, 'ny=', ny 372 CALL message( 'init_grid', 'PA0203', 1, 2, 0, 6, 0 ) 375 373 ENDIF 376 374 … … 405 403 406 404 ELSE 407 IF ( myid == 0 ) THEN408 PRINT*, '+++ user_init_grid:no street canyon width given'409 ENDIF410 CALL local_stop405 406 message_string = 'no street canyon width given' 407 CALL message( 'init_grid', 'PA0204', 1, 2, 0, 6, 0 ) 408 411 409 ENDIF 412 410 … … 418 416 IF ( ( cxl < 1 ) .OR. ( cxr > nx-1 ) .OR. ( cwx < 3 ) .OR. & 419 417 ( ch < 3 ) ) THEN 420 IF ( myid == 0 ) THEN 421 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 422 PRINT*, ' cxl=', cxl, 'cxr=', cxr, & 423 'cwx=', cwx, & 424 'ch=', ch, 'nx=', nx, 'ny=', ny 425 ENDIF 426 CALL local_stop 418 WRITE( message_string, * ) 'inconsistent canyon parameters:', & 419 '&cxl=', cxl, 'cxr=', cxr, & 420 'cwx=', cwx, & 421 'ch=', ch, 'nx=', nx, 'ny=', ny 422 CALL message( 'init_grid', 'PA0205', 1, 2, 0, 6, 0 ) 427 423 ENDIF 428 424 ELSEIF ( canyon_width_y /= 9999999.9 ) THEN 429 425 IF ( ( cys < 1 ) .OR. ( cyn > ny-1 ) .OR. ( cwy < 3 ) .OR. & 430 426 ( ch < 3 ) ) THEN 431 IF ( myid == 0 ) THEN 432 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 433 PRINT*, ' cys=', cys, 'cyn=', cyn, & 434 'cwy=', cwy, & 435 'ch=', ch, 'nx=', nx, 'ny=', ny 436 ENDIF 437 CALL local_stop 427 WRITE( message_string, * ) 'inconsistent canyon parameters:', & 428 '&cys=', cys, 'cyn=', cyn, & 429 'cwy=', cwy, & 430 'ch=', ch, 'nx=', nx, 'ny=', ny 431 CALL message( 'init_grid', 'PA0206', 1, 2, 0, 6, 0 ) 438 432 ENDIF 439 433 ENDIF 440 434 IF ( canyon_width_x /= 9999999.9 .AND. canyon_width_y /= 9999999.9 ) & 441 435 THEN 442 IF ( myid == 0 ) THEN 443 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 444 PRINT*, ' street canyon can only be oriented' 445 PRINT*, ' either in x- or in y-direction' 446 ENDIF 447 CALL local_stop 436 message_string = 'inconsistent canyon parameters:' // & 437 '&street canyon can only be oriented' // & 438 '&either in x- or in y-direction' 439 CALL message( 'init_grid', 'PA0207', 1, 2, 0, 6, 0 ) 448 440 ENDIF 449 441 … … 480 472 481 473 GOTO 12 482 483 10 IF ( myid == 0 ) THEN 484 PRINT*, '+++ init_grid: file TOPOGRAPHY_DATA does not exist' 485 ENDIF 486 CALL local_stop 487 488 11 IF ( myid == 0 ) THEN 489 PRINT*, '+++ init_grid: errors in file TOPOGRAPHY_DATA' 490 ENDIF 491 CALL local_stop 474 475 10 message_string = 'file TOPOGRAPHY_DATA does not exist' 476 CALL message( 'init_grid', 'PA0208', 1, 2, 0, 6, 0 ) 477 478 11 message_string = 'errors in file TOPOGRAPHY_DATA' 479 CALL message( 'init_grid', 'PA0209', 1, 2, 0, 6, 0 ) 492 480 493 481 12 CLOSE( 90 ) … … 519 507 !-- Consistency checks 520 508 IF ( MINVAL( nzb_local ) < 0 .OR. MAXVAL( nzb_local ) > nz + 1 ) THEN 521 IF ( myid == 0 ) THEN 522 PRINT*, '+++ init_grid: nzb_local values are outside the', & 523 'model domain' 524 PRINT*, ' MINVAL( nzb_local ) = ', MINVAL(nzb_local) 525 PRINT*, ' MAXVAL( nzb_local ) = ', MAXVAL(nzb_local) 526 ENDIF 527 CALL local_stop 509 WRITE( message_string, * ) 'nzb_local values are outside the', & 510 'model domain', & 511 '&MINVAL( nzb_local ) = ', MINVAL(nzb_local), & 512 '&MAXVAL( nzb_local ) = ', MAXVAL(nzb_local) 513 CALL message( 'init_grid', 'PA0210', 1, 2, 0, 6, 0 ) 528 514 ENDIF 529 515 … … 531 517 IF ( ANY( nzb_local(:,-1) /= nzb_local(:,nx) ) .OR. & 532 518 ANY( nzb_local(:,0) /= nzb_local(:,nx+1) ) ) THEN 533 IF ( myid == 0 ) THEN 534 PRINT*, '+++ init_grid: nzb_local does not fulfill cyclic', & 535 ' boundary condition in x-direction' 536 ENDIF 537 CALL local_stop 519 message_string = 'nzb_local does not fulfill cyclic' // & 520 ' boundary condition in x-direction' 521 CALL message( 'init_grid', 'PA0211', 1, 2, 0, 6, 0 ) 538 522 ENDIF 539 523 ENDIF … … 541 525 IF ( ANY( nzb_local(-1,:) /= nzb_local(ny,:) ) .OR. & 542 526 ANY( nzb_local(0,:) /= nzb_local(ny+1,:) ) ) THEN 543 IF ( myid == 0 ) THEN 544 PRINT*, '+++ init_grid: nzb_local does not fulfill cyclic', & 545 ' boundary condition in y-direction' 546 ENDIF 547 CALL local_stop 527 message_string = 'nzb_local does not fulfill cyclic' // & 528 ' boundary condition in y-direction' 529 CALL message( 'init_grid', 'PA0212', 1, 2, 0, 6, 0 ) 548 530 ENDIF 549 531 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.