Changeset 1425 for palm/trunk


Ignore:
Timestamp:
Jul 5, 2014 10:57:53 AM (10 years ago)
Author:
knoop
Message:

Bugfix for parallel random number generator.

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/check_parameters.f90

    r1403 r1425  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! bugfix: perturbation domain modified for parallel random number generator
    2323!
    2424! Former revisions:
     
    24272427                hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 )
    24282428             ELSE
    2429                 message_string = 'data_output_pr = ' // &
     2429                message_string = 'data_output_pr = ' //                        &
    24302430                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    24312431                                 'lemented for cloud_physics = .FALSE. an&' // &
     
    24362436          CASE ( 'ql' )
    24372437             IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
    2438                 message_string = 'data_output_pr = ' // &
     2438                message_string = 'data_output_pr = ' //                        &
    24392439                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    24402440                                 'lemented for cloud_physics = .FALSE. or'  // &
     
    24952495          CASE ( 'rho' )
    24962496             IF ( .NOT. ocean ) THEN
    2497                 message_string = 'data_output_pr = ' // &
     2497                message_string = 'data_output_pr = ' //                        &
    24982498                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    24992499                                 'lemented for ocean = .FALSE.'
     
    25132513          CASE ( 'w"sa"' )
    25142514             IF ( .NOT. ocean ) THEN
    2515                 message_string = 'data_output_pr = ' // &
     2515                message_string = 'data_output_pr = ' //                        &
    25162516                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25172517                                 'lemented for ocean = .FALSE.'
     
    25252525          CASE ( 'w*sa*' )
    25262526             IF ( .NOT. ocean ) THEN
    2527                 message_string = 'data_output_pr = ' // &
     2527                message_string = 'data_output_pr = ' //                        &
    25282528                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25292529                                 'lemented for ocean = .FALSE.'
     
    25372537          CASE ( 'wsa' )
    25382538             IF ( .NOT. ocean ) THEN
    2539                 message_string = 'data_output_pr = ' // &
     2539                message_string = 'data_output_pr = ' //                        &
    25402540                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25412541                                 'lemented for ocean = .FALSE.'
     
    25592559          CASE ( 'q*2' )
    25602560             IF ( .NOT. humidity )  THEN
    2561                 message_string = 'data_output_pr = ' // &
     2561                message_string = 'data_output_pr = ' //                        &
    25622562                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25632563                                 'lemented for humidity = .FALSE.'
     
    25712571          CASE ( 'prho' )
    25722572             IF ( .NOT. ocean ) THEN
    2573                 message_string = 'data_output_pr = ' // &
     2573                message_string = 'data_output_pr = ' //                        &
    25742574                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25752575                                 'lemented for ocean = .FALSE.'
     
    25882588          CASE ( 'nr' )
    25892589             IF ( .NOT. cloud_physics )  THEN
    2590                 message_string = 'data_output_pr = ' // &
     2590                message_string = 'data_output_pr = ' //                        &
    25912591                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25922592                                 'lemented for cloud_physics = .FALSE.'
    25932593                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
    25942594             ELSEIF ( icloud_scheme /= 0 )  THEN
    2595                 message_string = 'data_output_pr = ' // &
     2595                message_string = 'data_output_pr = ' //                        &
    25962596                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    25972597                                 'lemented for cloud_scheme /= seifert_beheng'
    25982598                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
    25992599             ELSEIF ( .NOT. precipitation )  THEN
    2600                 message_string = 'data_output_pr = ' // &
     2600                message_string = 'data_output_pr = ' //                        &
    26012601                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26022602                                 'lemented for precipitation = .FALSE.'
     
    26102610          CASE ( 'qr' )
    26112611             IF ( .NOT. cloud_physics )  THEN
    2612                 message_string = 'data_output_pr = ' // &
     2612                message_string = 'data_output_pr = ' //                        &
    26132613                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26142614                                 'lemented for cloud_physics = .FALSE.'
    26152615                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
    26162616             ELSEIF ( icloud_scheme /= 0 )  THEN
    2617                 message_string = 'data_output_pr = ' // &
     2617                message_string = 'data_output_pr = ' //                        &
    26182618                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26192619                                 'lemented for cloud_scheme /= seifert_beheng'
    26202620                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
    26212621             ELSEIF ( .NOT. precipitation )  THEN
    2622                 message_string = 'data_output_pr = ' // &
     2622                message_string = 'data_output_pr = ' //                        &
    26232623                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26242624                                 'lemented for precipitation = .FALSE.'
     
    26322632          CASE ( 'qc' )
    26332633             IF ( .NOT. cloud_physics )  THEN
    2634                 message_string = 'data_output_pr = ' // &
     2634                message_string = 'data_output_pr = ' //                        &
    26352635                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26362636                                 'lemented for cloud_physics = .FALSE.'
    26372637                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
    26382638             ELSEIF ( icloud_scheme /= 0 )  THEN
    2639                 message_string = 'data_output_pr = ' // &
     2639                message_string = 'data_output_pr = ' //                        &
    26402640                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26412641                                 'lemented for cloud_scheme /= seifert_beheng'
     
    26492649          CASE ( 'prr' )
    26502650             IF ( .NOT. cloud_physics )  THEN
    2651                 message_string = 'data_output_pr = ' // &
     2651                message_string = 'data_output_pr = ' //                        &
    26522652                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26532653                                 'lemented for cloud_physics = .FALSE.'
    26542654                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
    26552655             ELSEIF ( icloud_scheme /= 0 )  THEN
    2656                 message_string = 'data_output_pr = ' // &
     2656                message_string = 'data_output_pr = ' //                        &
    26572657                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26582658                                 'lemented for cloud_scheme /= seifert_beheng'
    26592659                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
    26602660             ELSEIF ( .NOT. precipitation )  THEN
    2661                 message_string = 'data_output_pr = ' // &
     2661                message_string = 'data_output_pr = ' //                        &
    26622662                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26632663                                 'lemented for precipitation = .FALSE.'
     
    26822682          CASE ( 'w_subs' )
    26832683             IF ( .NOT. large_scale_subsidence )  THEN
    2684                 message_string = 'data_output_pr = ' // &
     2684                message_string = 'data_output_pr = ' //                        &
    26852685                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26862686                                 'lemented for large_scale_subsidence = .FALSE.'
     
    26942694          CASE ( 'td_lsa_lpt' )
    26952695             IF ( .NOT. large_scale_forcing )  THEN
    2696                 message_string = 'data_output_pr = ' // &
     2696                message_string = 'data_output_pr = ' //                        &
    26972697                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    26982698                                 'lemented for large_scale_forcing = .FALSE.'
     
    27062706          CASE ( 'td_lsa_q' )
    27072707             IF ( .NOT. large_scale_forcing )  THEN
    2708                 message_string = 'data_output_pr = ' // &
     2708                message_string = 'data_output_pr = ' //                        &
    27092709                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27102710                                 'lemented for large_scale_forcing = .FALSE.'
     
    27182718          CASE ( 'td_sub_lpt' )
    27192719             IF ( .NOT. large_scale_forcing )  THEN
    2720                 message_string = 'data_output_pr = ' // &
     2720                message_string = 'data_output_pr = ' //                        &
    27212721                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27222722                                 'lemented for large_scale_forcing = .FALSE.'
     
    27302730          CASE ( 'td_sub_q' )
    27312731             IF ( .NOT. large_scale_forcing )  THEN
    2732                 message_string = 'data_output_pr = ' // &
     2732                message_string = 'data_output_pr = ' //                        &
    27332733                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27342734                                 'lemented for large_scale_forcing = .FALSE.'
     
    27422742          CASE ( 'td_nud_lpt' )
    27432743             IF ( .NOT. nudging )  THEN
    2744                 message_string = 'data_output_pr = ' // &
     2744                message_string = 'data_output_pr = ' //                        &
    27452745                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27462746                                 'lemented for nudging = .FALSE.'
     
    27542754          CASE ( 'td_nud_q' )
    27552755             IF ( .NOT. nudging )  THEN
    2756                 message_string = 'data_output_pr = ' // &
     2756                message_string = 'data_output_pr = ' //                        &
    27572757                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27582758                                 'lemented for nudging = .FALSE.'
     
    27662766          CASE ( 'td_nud_u' )
    27672767             IF ( .NOT. nudging )  THEN
    2768                 message_string = 'data_output_pr = ' // &
     2768                message_string = 'data_output_pr = ' //                        &
    27692769                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27702770                                 'lemented for nudging = .FALSE.'
     
    27782778          CASE ( 'td_nud_v' )
    27792779             IF ( .NOT. nudging )  THEN
    2780                 message_string = 'data_output_pr = ' // &
     2780                message_string = 'data_output_pr = ' //                        &
    27812781                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
    27822782                                 'lemented for nudging = .FALSE.'
     
    27952795             IF ( unit == 'illegal' )  THEN
    27962796                IF ( data_output_pr_user(1) /= ' ' )  THEN
    2797                    message_string = 'illegal value for data_output_pr or ' // &
    2798                                     'data_output_pr_user = "' // &
     2797                   message_string = 'illegal value for data_output_pr or ' //  &
     2798                                    'data_output_pr_user = "' //               &
    27992799                                    TRIM( data_output_pr(i) ) // '"'
    28002800                   CALL message( 'check_parameters', 'PA0097', 1, 2, 0, 6, 0 )
    28012801                ELSE
    2802                    message_string = 'illegal value for data_output_pr = "' // &
     2802                   message_string = 'illegal value for data_output_pr = "' //  &
    28032803                                    TRIM( data_output_pr(i) ) // '"'
    28042804                   CALL message( 'check_parameters', 'PA0098', 1, 2, 0, 6, 0 )
     
    28512851       var = data_output(i)(1:ilen)
    28522852       IF ( ilen > 3 )  THEN
    2853           IF ( data_output(i)(ilen-2:ilen) == '_xy'  .OR. &
    2854                data_output(i)(ilen-2:ilen) == '_xz'  .OR. &
     2853          IF ( data_output(i)(ilen-2:ilen) == '_xy'  .OR.                      &
     2854               data_output(i)(ilen-2:ilen) == '_xz'  .OR.                      &
    28552855               data_output(i)(ilen-2:ilen) == '_yz' )  THEN
    28562856             k = 1                                             ! 2d data
     
    28642864          CASE ( 'e' )
    28652865             IF ( constant_diffusion )  THEN
    2866                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2866                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    28672867                                 'res constant_diffusion = .FALSE.'
    28682868                CALL message( 'check_parameters', 'PA0103', 1, 2, 0, 6, 0 )
     
    28722872          CASE ( 'lpt' )
    28732873             IF ( .NOT. cloud_physics )  THEN
    2874                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2874                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    28752875                         'res cloud_physics = .TRUE.'
    28762876                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
     
    28802880          CASE ( 'nr' )
    28812881             IF ( .NOT. cloud_physics )  THEN
    2882                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2882                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    28832883                         'res cloud_physics = .TRUE.'
    28842884                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
    28852885             ELSEIF ( icloud_scheme /= 0 )  THEN
    2886                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2886                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    28872887                         'res cloud_scheme = seifert_beheng'
    28882888                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
     
    29012901          CASE ( 'prr' )
    29022902             IF ( .NOT. cloud_physics )  THEN
    2903                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2903                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29042904                         'res cloud_physics = .TRUE.'
    29052905                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
    29062906             ELSEIF ( icloud_scheme /= 0 )  THEN
    2907                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2907                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29082908                         'res cloud_scheme = seifert_beheng'
    29092909                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
    29102910             ELSEIF ( .NOT. precipitation )  THEN
    2911                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2911                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29122912                                 'res precipitation = .TRUE.'
    29132913                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
     
    29172917          CASE ( 'q', 'vpt' )
    29182918             IF ( .NOT. humidity )  THEN
    2919                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2919                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29202920                                 'res humidity = .TRUE.'
    29212921                CALL message( 'check_parameters', 'PA0105', 1, 2, 0, 6, 0 )
     
    29262926          CASE ( 'qc' )
    29272927             IF ( .NOT. cloud_physics )  THEN
    2928                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2928                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29292929                         'res cloud_physics = .TRUE.'
    29302930                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
    29312931             ELSEIF ( icloud_scheme /= 0 ) THEN
    2932                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2932                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29332933                         'res cloud_scheme = seifert_beheng'
    29342934                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
     
    29382938          CASE ( 'ql' )
    29392939             IF ( .NOT. ( cloud_physics  .OR.  cloud_droplets ) )  THEN
    2940                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2940                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29412941                         'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.'
    29422942                CALL message( 'check_parameters', 'PA0106', 1, 2, 0, 6, 0 )
     
    29462946          CASE ( 'ql_c', 'ql_v', 'ql_vp' )
    29472947             IF ( .NOT. cloud_droplets )  THEN
    2948                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2948                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29492949                                 'res cloud_droplets = .TRUE.'
    29502950                CALL message( 'check_parameters', 'PA0107', 1, 2, 0, 6, 0 )
     
    29562956          CASE ( 'qr' )
    29572957             IF ( .NOT. cloud_physics )  THEN
    2958                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2958                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29592959                         'res cloud_physics = .TRUE.'
    29602960                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
    29612961             ELSEIF ( icloud_scheme /= 0 ) THEN
    2962                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2962                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29632963                         'res cloud_scheme = seifert_beheng'
    29642964                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
    29652965             ELSEIF ( .NOT. precipitation )  THEN
    2966                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2966                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29672967                                 'res precipitation = .TRUE.'
    29682968                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
     
    29722972          CASE ( 'qv' )
    29732973             IF ( .NOT. cloud_physics )  THEN
    2974                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2974                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29752975                                 'res cloud_physics = .TRUE.'
    29762976                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
     
    29802980          CASE ( 'rho' )
    29812981             IF ( .NOT. ocean )  THEN
    2982                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2982                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29832983                                 'res ocean = .TRUE.'
    29842984                CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 )
     
    29882988          CASE ( 's' )
    29892989             IF ( .NOT. passive_scalar )  THEN
    2990                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2990                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29912991                                 'res passive_scalar = .TRUE.'
    29922992                CALL message( 'check_parameters', 'PA0110', 1, 2, 0, 6, 0 )
     
    29962996          CASE ( 'sa' )
    29972997             IF ( .NOT. ocean )  THEN
    2998                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     2998                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    29992999                                 'res ocean = .TRUE.'
    30003000                CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 )
     
    30043004          CASE ( 'u*', 't*', 'lwp*', 'pra*', 'prr*', 'qsws*', 'shf*', 'z0*', 'z0h*' )
    30053005             IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
    3006                 message_string = 'illegal value for data_output: "' // &
    3007                                  TRIM( var ) // '" & only 2d-horizontal ' // &
     3006                message_string = 'illegal value for data_output: "' //         &
     3007                                 TRIM( var ) // '" & only 2d-horizontal ' //   &
    30083008                                 'cross sections are allowed for this value'
    30093009                CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
    30103010             ENDIF
    30113011             IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. cloud_physics )  THEN
    3012                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     3012                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    30133013                                 'res cloud_physics = .TRUE.'
    30143014                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
    30153015             ENDIF
    30163016             IF ( TRIM( var ) == 'pra*'  .AND.  .NOT. precipitation )  THEN
    3017                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     3017                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    30183018                                 'res precipitation = .TRUE.'
    30193019                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
    30203020             ENDIF
    30213021             IF ( TRIM( var ) == 'pra*'  .AND.  j == 1 )  THEN
    3022                 message_string = 'temporal averaging of precipitation ' // &
     3022                message_string = 'temporal averaging of precipitation ' //     &
    30233023                          'amount "' // TRIM( var ) // '" is not possible'
    30243024                CALL message( 'check_parameters', 'PA0113', 1, 2, 0, 6, 0 )
    30253025             ENDIF
    30263026             IF ( TRIM( var ) == 'prr*'  .AND.  .NOT. precipitation )  THEN
    3027                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     3027                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    30283028                                 'res precipitation = .TRUE.'
    30293029                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
    30303030             ENDIF
    30313031             IF ( TRIM( var ) == 'qsws*'  .AND.  .NOT. humidity )  THEN
    3032                 message_string = 'output of "' // TRIM( var ) // '" requi' // &
     3032                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
    30333033                                 'res humidity = .TRUE.'
    30343034                CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 )
     
    30593059             IF ( unit == 'illegal' )  THEN
    30603060                IF ( data_output_user(1) /= ' ' )  THEN
    3061                    message_string = 'illegal value for data_output or ' // &
     3061                   message_string = 'illegal value for data_output or ' //     &
    30623062                         'data_output_user = "' // TRIM( data_output(i) ) // '"'
    30633063                   CALL message( 'check_parameters', 'PA0114', 1, 2, 0, 6, 0 )
    30643064                ELSE
    3065                    message_string = 'illegal value for data_output =' // &
     3065                   message_string = 'illegal value for data_output =' //       &
    30663066                                    TRIM( data_output(i) ) // '"'
    30673067                   CALL message( 'check_parameters', 'PA0115', 1, 2, 0, 6, 0 )
     
    31393139    IF ( z_max_do2d == -1.0_wp )  z_max_do2d = zu(nzt)
    31403140    IF ( z_max_do2d < zu(nzb+1)  .OR.  z_max_do2d > zu(nzt) )  THEN
    3141        WRITE( message_string, * )  'z_max_do2d = ', z_max_do2d, &
     3141       WRITE( message_string, * )  'z_max_do2d = ', z_max_do2d,                &
    31423142                    ' must be >= ', zu(nzb+1), '(zu(nzb+1)) and <= ', zu(nzt), &
    31433143                    ' (zu(nzt))'
     
    31843184!-- Check mask conditions
    31853185    DO mid = 1, max_masks
    3186        IF ( data_output_masks(mid,1) /= ' ' .OR.   &
     3186       IF ( data_output_masks(mid,1) /= ' ' .OR.                               &
    31873187            data_output_masks_user(mid,1) /= ' ' ) THEN
    31883188          masks = masks + 1
     
    31913191   
    31923192    IF ( masks < 0 .OR. masks > max_masks )  THEN
    3193        WRITE( message_string, * )  'illegal value: masks must be >= 0 and ', &
     3193       WRITE( message_string, * )  'illegal value: masks must be >= 0 and ',   &
    31943194            '<= ', max_masks, ' (=max_masks)'
    31953195       CALL message( 'check_parameters', 'PA0325', 1, 2, 0, 6, 0 )
     
    32003200       mask_scale(3) = mask_scale_z
    32013201       IF ( ANY( mask_scale <= 0.0_wp ) )  THEN
    3202           WRITE( message_string, * )  &
    3203                'illegal value: mask_scale_x, mask_scale_y and mask_scale_z', &
     3202          WRITE( message_string, * )                                           &
     3203               'illegal value: mask_scale_x, mask_scale_y and mask_scale_z',   &
    32043204               'must be > 0.0'
    32053205          CALL message( 'check_parameters', 'PA0326', 1, 2, 0, 6, 0 )
     
    32323232       CONTINUE
    32333233#else
    3234        message_string = 'netCDF: netCDF4 format requested but no ' // &
    3235                         'cpp-directive __netcdf4 given & switch '  // &
     3234       message_string = 'netCDF: netCDF4 format requested but no ' //          &
     3235                        'cpp-directive __netcdf4 given & switch '  //          &
    32363236                        'back to 64-bit offset format'
    32373237       CALL message( 'check_parameters', 'PA0171', 0, 1, 0, 6, 0 )
     
    32603260       ntdim_3d(0)    = INT( ( end_time - skip_time_do3d ) / dt_do3d )
    32613261       IF ( do3d_at_begin ) ntdim_3d(0) = ntdim_3d(0) + 1
    3262        ntdim_3d(1)    = INT( ( end_time - skip_time_data_output_av ) &
     3262       ntdim_3d(1)    = INT( ( end_time - skip_time_data_output_av )           &
    32633263                             / dt_data_output_av )
    32643264       ntdim_2d_xy(0) = INT( ( end_time - skip_time_do2d_xy ) / dt_do2d_xy )
     
    32903290       ELSE
    32913291          IF ( prandtl_number < 0.0_wp )  THEN
    3292              WRITE( message_string, * )  'prandtl_number = ', prandtl_number, &
     3292             WRITE( message_string, * )  'prandtl_number = ', prandtl_number,  &
    32933293                                         ' < 0.0'
    32943294             CALL message( 'check_parameters', 'PA0122', 1, 2, 0, 6, 0 )
     
    32973297
    32983298          IF ( prandtl_layer )  THEN
    3299              message_string = 'prandtl_layer is not allowed with fixed ' // &
     3299             message_string = 'prandtl_layer is not allowed with fixed ' //    &
    33003300                              'value of km'
    33013301             CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 )
     
    33083308!-- potential temperature, check the width of the damping layer
    33093309    IF ( bc_lr /= 'cyclic' ) THEN
    3310        IF ( pt_damping_width < 0.0_wp  .OR.  pt_damping_width > REAL( nx * dx ) )  THEN
     3310       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
     3311            pt_damping_width > REAL( nx * dx ) )  THEN
    33113312          message_string = 'pt_damping_width out of range'
    33123313          CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
     
    33153316
    33163317    IF ( bc_ns /= 'cyclic' )  THEN
    3317        IF ( pt_damping_width < 0.0_wp  .OR.  pt_damping_width > REAL( ny * dy ) )  THEN
     3318       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
     3319            pt_damping_width > REAL( ny * dy ) )  THEN
    33183320          message_string = 'pt_damping_width out of range'
    33193321          CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
     
    33243326!-- Check value range for rif
    33253327    IF ( rif_min >= rif_max )  THEN
    3326        WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ', &
     3328       WRITE( message_string, * )  'rif_min = ', rif_min, ' must be less ',    &
    33273329                                   'than rif_max = ', rif_max
    33283330       CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 )
     3331    ENDIF
     3332
     3333!
     3334!-- Check random generator
     3335    IF ( (random_generator /= 'system-specific'     .AND.                      &
     3336          random_generator /= 'random-parallel'   ) .AND.                      &
     3337          random_generator /= 'numerical-recipes' )  THEN
     3338       message_string = 'unknown random generator: random_generator = "' //    &
     3339                        TRIM( random_generator ) // '"'
     3340       CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
    33293341    ENDIF
    33303342
     
    33403352       ENDIF
    33413353    ELSEIF ( disturbance_level_b < zu(3) )  THEN
    3342        WRITE( message_string, * )  'disturbance_level_b = ', &
     3354       WRITE( message_string, * )  'disturbance_level_b = ',                   &
    33433355                           disturbance_level_b, ' must be >= ', zu(3), '(zu(3))'
    33443356       CALL message( 'check_parameters', 'PA0126', 1, 2, 0, 6, 0 )
    33453357    ELSEIF ( disturbance_level_b > zu(nzt-2) )  THEN
    3346        WRITE( message_string, * )  'disturbance_level_b = ', &
     3358       WRITE( message_string, * )  'disturbance_level_b = ',                   &
    33473359                   disturbance_level_b, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
    33483360       CALL message( 'check_parameters', 'PA0127', 1, 2, 0, 6, 0 )
     
    33653377       ENDIF
    33663378    ELSEIF ( disturbance_level_t > zu(nzt-2) )  THEN
    3367        WRITE( message_string, * )  'disturbance_level_t = ', &
     3379       WRITE( message_string, * )  'disturbance_level_t = ',                   &
    33683380                   disturbance_level_t, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
    33693381       CALL message( 'check_parameters', 'PA0128', 1, 2, 0, 6, 0 )
    33703382    ELSEIF ( disturbance_level_t < disturbance_level_b )  THEN
    3371        WRITE( message_string, * )  'disturbance_level_t = ', &
    3372                    disturbance_level_t, ' must be >= disturbance_level_b = ', &
     3383       WRITE( message_string, * )  'disturbance_level_t = ',                   &
     3384                   disturbance_level_t, ' must be >= disturbance_level_b = ',  &
    33733385                   disturbance_level_b
    33743386       CALL message( 'check_parameters', 'PA0129', 1, 2, 0, 6, 0 )
     
    33873399!-- z-direction.
    33883400    IF ( disturbance_level_ind_t < disturbance_level_ind_b )  THEN
    3389        WRITE( message_string, * )  'disturbance_level_ind_t = ', &
     3401       WRITE( message_string, * )  'disturbance_level_ind_t = ',               &
    33903402                disturbance_level_ind_t, ' must be >= disturbance_level_b = ', &
    33913403                disturbance_level_b
     
    33983410!-- near the inflow and the perturbation area is further limited to ...(1)
    33993411!-- after the initial phase of the flow.
    3400     dist_nxl = 0;  dist_nxr = nx
    3401     dist_nys = 0;  dist_nyn = ny
     3412   
    34023413    IF ( bc_lr /= 'cyclic' )  THEN
    34033414       IF ( inflow_disturbance_begin == -1 )  THEN
     
    34363447    ENDIF
    34373448
    3438     IF ( bc_lr == 'radiation/dirichlet' )  THEN
    3439        dist_nxr    = nx - inflow_disturbance_begin
    3440        dist_nxl(1) = nx - inflow_disturbance_end
    3441     ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
    3442        dist_nxl    = inflow_disturbance_begin
    3443        dist_nxr(1) = inflow_disturbance_end
    3444     ENDIF
    3445     IF ( bc_ns == 'dirichlet/radiation' )  THEN
    3446        dist_nyn    = ny - inflow_disturbance_begin
    3447        dist_nys(1) = ny - inflow_disturbance_end
    3448     ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
    3449        dist_nys    = inflow_disturbance_begin
    3450        dist_nyn(1) = inflow_disturbance_end
     3449    IF ( random_generator == 'random-parallel' )  THEN
     3450       dist_nxl = nxl;  dist_nxr = nxr
     3451       dist_nys = nys;  dist_nyn = nyn
     3452       IF ( bc_lr == 'radiation/dirichlet' )  THEN
     3453          dist_nxr    = MIN( nx - inflow_disturbance_begin, nxr )
     3454          dist_nxl(1) = MAX( nx - inflow_disturbance_end, nxl )
     3455       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
     3456          dist_nxl    = MAX( inflow_disturbance_begin, nxl )
     3457          dist_nxr(1) = MIN( inflow_disturbance_end, nxr )
     3458       ENDIF
     3459       IF ( bc_ns == 'dirichlet/radiation' )  THEN
     3460          dist_nyn    = MIN( ny - inflow_disturbance_begin, nyn )
     3461          dist_nys(1) = MAX( ny - inflow_disturbance_end, nys )
     3462       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
     3463          dist_nys    = MAX( inflow_disturbance_begin, nys )
     3464          dist_nyn(1) = MIN( inflow_disturbance_end, nyn )
     3465       ENDIF
     3466    ELSE
     3467       dist_nxl = 0;  dist_nxr = nx
     3468       dist_nys = 0;  dist_nyn = ny
     3469       IF ( bc_lr == 'radiation/dirichlet' )  THEN
     3470          dist_nxr    = nx - inflow_disturbance_begin
     3471          dist_nxl(1) = nx - inflow_disturbance_end
     3472       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
     3473          dist_nxl    = inflow_disturbance_begin
     3474          dist_nxr(1) = inflow_disturbance_end
     3475       ENDIF
     3476       IF ( bc_ns == 'dirichlet/radiation' )  THEN
     3477          dist_nyn    = ny - inflow_disturbance_begin
     3478          dist_nys(1) = ny - inflow_disturbance_end
     3479       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
     3480          dist_nys    = inflow_disturbance_begin
     3481          dist_nyn(1) = inflow_disturbance_end
     3482       ENDIF
    34513483    ENDIF
    34523484
     
    34553487!-- boundary (so far, a turbulent inflow is realized from the left side only)
    34563488    IF ( turbulent_inflow  .AND.  bc_lr /= 'dirichlet/radiation' )  THEN
    3457        message_string = 'turbulent_inflow = .T. requires a Dirichlet ' // &
     3489       message_string = 'turbulent_inflow = .T. requires a Dirichlet ' //      &
    34583490                        'condition at the inflow boundary'
    34593491       CALL message( 'check_parameters', 'PA0133', 1, 2, 0, 6, 0 )
     
    34653497    IF ( turbulent_inflow  .AND.  initializing_actions /= 'cyclic_fill'  .AND. &
    34663498         initializing_actions /= 'read_restart_data' )  THEN
    3467        message_string = 'turbulent_inflow = .T. requires ' // &
     3499       message_string = 'turbulent_inflow = .T. requires ' //                  &
    34683500                        'initializing_actions = ''cyclic_fill'' '
    34693501       CALL message( 'check_parameters', 'PA0055', 1, 2, 0, 6, 0 )
     
    34903522
    34913523!
    3492 !-- Check random generator
    3493     IF ( (random_generator /= 'system-specific'     .AND.                      &
    3494           random_generator /= 'random-parallel'   ) .AND.                      &
    3495           random_generator /= 'numerical-recipes' )  THEN
    3496        message_string = 'unknown random generator: random_generator = "' // &
    3497                         TRIM( random_generator ) // '"'
    3498        CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
    3499     ENDIF
    3500 
    3501 !
    35023524!-- Determine damping level index for 1D model
    35033525    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
     
    35063528          damp_level_ind_1d = nzt + 1
    35073529       ELSEIF ( damp_level_1d < 0.0_wp  .OR.  damp_level_1d > zu(nzt+1) )  THEN
    3508           WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d, &
     3530          WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d,       &
    35093531                 ' must be > 0.0 and < ', zu(nzt+1), '(zu(nzt+1))'
    35103532          CALL message( 'check_parameters', 'PA0136', 1, 2, 0, 6, 0 )
     
    35213543!
    35223544!-- Check some other 1d-model parameters
    3523     IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND. &
     3545    IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND.                   &
    35243546         TRIM( mixing_length_1d ) /= 'blackadar' )  THEN
    3525        message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) // &
     3547       message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) //  &
    35263548                        '" is unknown'
    35273549       CALL message( 'check_parameters', 'PA0137', 1, 2, 0, 6, 0 )
    35283550    ENDIF
    3529     IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND. &
     3551    IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND.                     &
    35303552         TRIM( dissipation_1d ) /= 'detering' )  THEN
    3531        message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) // &
     3553       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) //      &
    35323554                        '" is unknown'
    35333555       CALL message( 'check_parameters', 'PA0138', 1, 2, 0, 6, 0 )
     
    35653587!--    MPP_TREMAIN gives the remaining CPU time only in steps of 30 seconds
    35663588       IF ( termination_time_needed <= 30.0_wp )  THEN
    3567           WRITE( message_string, * )  'termination_time_needed = ', &
    3568                  termination_time_needed, ' must be > 30.0 on host "', &
     3589          WRITE( message_string, * )  'termination_time_needed = ',            &
     3590                 termination_time_needed, ' must be > 30.0 on host "',         &
    35693591                 TRIM( host ), '"'
    35703592          CALL message( 'check_parameters', 'PA0139', 1, 2, 0, 6, 0 )
     
    35763598!--    copying of files, etc.) has to be regarded
    35773599       IF ( termination_time_needed < 300.0_wp )  THEN
    3578           WRITE( message_string, * )  'termination_time_needed = ', &
    3579                  termination_time_needed, ' should be >= 300.0 on host "', &
     3600          WRITE( message_string, * )  'termination_time_needed = ',            &
     3601                 termination_time_needed, ' should be >= 300.0 on host "',     &
    35803602                 TRIM( host ), '"'
    35813603          CALL message( 'check_parameters', 'PA0140', 1, 2, 0, 6, 0 )
     
    36033625    ENDIF
    36043626    IF ( ANY( dpdxy /= 0.0_wp ) .AND. .NOT. dp_external )  THEN
    3605        WRITE( message_string, * )  'dpdxy is nonzero but dp_external is ', &
     3627       WRITE( message_string, * )  'dpdxy is nonzero but dp_external is ',     &
    36063628            '.FALSE., i.e. the external pressure gradient & will not be applied'
    36073629       CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 )
     
    36133635
    36143636       ELSEIF ( TRIM( conserve_volume_flow_mode ) /= 'initial_profiles' .AND.  &
    3615             TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND.  &
     3637            TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND.        &
    36163638            TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' )  THEN
    3617           WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ', &
     3639          WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ',   &
    36183640               conserve_volume_flow_mode
    36193641          CALL message( 'check_parameters', 'PA0154', 1, 2, 0, 6, 0 )
    36203642       ENDIF
    3621        IF ( (bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic')  .AND. &
     3643       IF ( (bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic')  .AND.                &
    36223644          TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
    3623           WRITE( message_string, * )  'non-cyclic boundary conditions ', &
     3645          WRITE( message_string, * )  'non-cyclic boundary conditions ',       &
    36243646               'require  conserve_volume_flow_mode = ''initial_profiles'''
    36253647          CALL message( 'check_parameters', 'PA0155', 1, 2, 0, 6, 0 )
    36263648       ENDIF
    3627        IF ( bc_lr == 'cyclic'  .AND.  bc_ns == 'cyclic'  .AND.  &
     3649       IF ( bc_lr == 'cyclic'  .AND.  bc_ns == 'cyclic'  .AND.                 &
    36283650            TRIM( conserve_volume_flow_mode ) == 'inflow_profile' )  THEN
    3629           WRITE( message_string, * )  'cyclic boundary conditions ', &
    3630                'require conserve_volume_flow_mode = ''initial_profiles''', &
     3651          WRITE( message_string, * )  'cyclic boundary conditions ',           &
     3652               'require conserve_volume_flow_mode = ''initial_profiles''',     &
    36313653               ' or ''bulk_velocity'''
    36323654          CALL message( 'check_parameters', 'PA0156', 1, 2, 0, 6, 0 )
    36333655       ENDIF
    36343656    ENDIF
    3635     IF ( ( u_bulk /= 0.0_wp .OR. v_bulk /= 0.0_wp ) .AND.  &
    3636          ( .NOT. conserve_volume_flow .OR.  &
     3657    IF ( ( u_bulk /= 0.0_wp .OR. v_bulk /= 0.0_wp ) .AND.                      &
     3658         ( .NOT. conserve_volume_flow .OR.                                     &
    36373659         TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) )  THEN
    3638        WRITE( message_string, * )  'nonzero bulk velocity requires ', &
    3639             'conserve_volume_flow = .T. and ', &
     3660       WRITE( message_string, * )  'nonzero bulk velocity requires ',          &
     3661            'conserve_volume_flow = .T. and ',                                 &
    36403662            'conserve_volume_flow_mode = ''bulk_velocity'''
    36413663       CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 )
     
    36453667!-- Check particle attributes
    36463668    IF ( particle_color /= 'none' )  THEN
    3647        IF ( particle_color /= 'absuv'  .AND.  particle_color /= 'pt*'  .AND.  &
     3669       IF ( particle_color /= 'absuv'  .AND.  particle_color /= 'pt*'  .AND.   &
    36483670            particle_color /= 'z' )  THEN
    3649           message_string = 'illegal value for parameter particle_color: ' // &
     3671          message_string = 'illegal value for parameter particle_color: ' //   &
    36503672                           TRIM( particle_color)
    36513673          CALL message( 'check_parameters', 'PA0313', 1, 2, 0, 6, 0 )
     
    36743696!-- Check nudging and large scale forcing from external file
    36753697    IF ( nudging .AND. ( .NOT. large_scale_forcing ) )  THEN
    3676        message_string = 'Nudging requires large_scale_forcing = .T.. &'// &
    3677                         'Surface fluxes and geostrophic wind should be &'// &
     3698       message_string = 'Nudging requires large_scale_forcing = .T.. &'//      &
     3699                        'Surface fluxes and geostrophic wind should be &'//    &
    36783700                        'prescribed in file LSF_DATA'
    36793701       CALL message( 'check_parameters', 'PA0374', 1, 2, 0, 6, 0 )
    36803702    ENDIF
    36813703
    3682     IF ( large_scale_forcing .AND. ( bc_lr /= 'cyclic'  .OR. &
     3704    IF ( large_scale_forcing .AND. ( bc_lr /= 'cyclic'  .OR.                   &
    36833705                                    bc_ns /= 'cyclic' ) )  THEN
    3684        message_string = 'Non-cyclic lateral boundaries do not allow for &' // &
     3706       message_string = 'Non-cyclic lateral boundaries do not allow for &' //  &
    36853707                        'the usage of large scale forcing from external file.'
    36863708       CALL message( 'check_parameters', 'PA0375', 1, 2, 0, 6, 0 )
     
    36883710
    36893711    IF ( large_scale_forcing .AND. ( .NOT. humidity ) )  THEN
    3690        message_string = 'The usage of large scale forcing from external &'//&
     3712       message_string = 'The usage of large scale forcing from external &'//   &
    36913713                        'file LSF_DATA requires humidity = .T..'
    36923714       CALL message( 'check_parameters', 'PA0376', 1, 2, 0, 6, 0 )
     
    36943716
    36953717    IF ( large_scale_forcing .AND. topography /= 'flat' )  THEN
    3696        message_string = 'The usage of large scale forcing from external &'//&
     3718       message_string = 'The usage of large scale forcing from external &'//   &
    36973719                        'file LSF_DATA is not implemented for non-flat topography'
    36983720       CALL message( 'check_parameters', 'PA0377', 1, 2, 0, 6, 0 )
     
    37003722
    37013723    IF ( large_scale_forcing .AND.  ocean  )  THEN
    3702        message_string = 'The usage of large scale forcing from external &'//&
     3724       message_string = 'The usage of large scale forcing from external &'//   &
    37033725                        'file LSF_DATA is not implemented for ocean runs'
    37043726       CALL message( 'check_parameters', 'PA0378', 1, 2, 0, 6, 0 )
  • palm/trunk/SOURCE/disturb_field.f90

    r1401 r1425  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! bugfix: Parallel random number generator loop: print-statement no needed
    2323!
    2424! Former revisions:
     
    135135                ENDIF
    136136             ENDDO
    137 !              IF (myid == 0) PRINT*, nxl, i, nxr, i, nys, j, nyn, j
    138137             CALL random_seed_parallel( get=seq_random_array(:, j, i) )
    139138          ENDDO
Note: See TracChangeset for help on using the changeset viewer.