Changeset 1299


Ignore:
Timestamp:
Mar 6, 2014 1:15:21 PM (11 years ago)
Author:
heinze
Message:

enable usage of large_scale subsidence in combination with large_scale_forcing

Location:
palm/trunk/SOURCE
Files:
5 edited

Legend:

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

    r1277 r1299  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! enable usage of large_scale subsidence in combination with large_scale_forcing
     23! output for profile of large scale vertical velocity w_subs added
    2324!
    2425! Former revisions:
     
    13541355!
    13551356!-- Initialize large scale subsidence if required
    1356     IF ( subs_vertical_gradient_level(1) /= -9999999.9 )  THEN
    1357        large_scale_subsidence = .TRUE.
    1358        CALL init_w_subsidence
    1359     ENDIF
     1357    If ( large_scale_subsidence )  THEN
     1358       IF ( subs_vertical_gradient_level(1) /= -9999999.9 .AND. &
     1359                                     .NOT. large_scale_forcing )  THEN
     1360          CALL init_w_subsidence
     1361       ENDIF
     1362!
     1363!--    In case large_scale_forcing is used, profiles for subsidence velocity
     1364!--    are read in from file LSF_DATA
     1365
     1366       IF ( subs_vertical_gradient_level(1) == -9999999.9 .AND. &
     1367                                     .NOT. large_scale_forcing )  THEN
     1368          message_string = 'There is no default large scale vertical ' // &
     1369                           'velocity profile set. Specify the subsidence ' // &
     1370                           'velocity profile via subs_vertical_gradient and ' // &
     1371                           'subs_vertical_gradient_level.'
     1372          CALL message( 'check_parameters', 'PA0380', 1, 2, 0, 6, 0 )
     1373       ENDIF
     1374    ELSE
     1375        IF ( subs_vertical_gradient_level(1) /= -9999999.9 )  THEN
     1376           message_string = 'Enable usage of large scale subsidence by ' // &
     1377                            'setting large_scale_subsidence = .T..'
     1378          CALL message( 'check_parameters', 'PA0381', 1, 2, 0, 6, 0 )
     1379        ENDIF
     1380    ENDIF   
    13601381
    13611382!
     
    27232744             hom(:,2,79,:) = SPREAD( zu, 2, statistic_regions+1 )
    27242745
     2746          CASE ( 'w_subs' )
     2747             IF ( .NOT. large_scale_subsidence )  THEN
     2748                message_string = 'data_output_pr = ' // &
     2749                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
     2750                                 'lemented for large_scale_subsidence = .FALSE.'
     2751                CALL message( 'check_parameters', 'PA0382', 1, 2, 0, 6, 0 )
     2752             ELSE
     2753                dopr_index(i) = 80
     2754                dopr_unit(i)  = 'm/s'
     2755                hom(:,2,80,:) = SPREAD( zu, 2, statistic_regions+1 )
     2756             ENDIF
     2757
    27252758          CASE DEFAULT
    27262759
  • palm/trunk/SOURCE/flow_statistics.f90

    r1258 r1299  
    2121! Current revisions:
    2222! -----------------
    23 !
     23! Output of large scale vertical velocity w_subs
    2424!
    2525! Former revisions:
     
    11641164       hom(:,1,78,sr) = ug             ! ug
    11651165       hom(:,1,79,sr) = vg             ! vg
     1166       hom(:,1,80,sr) = w_subs         ! w_subs
    11661167
    11671168       hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1)
     
    27842785       hom(:,1,78,sr) = ug             ! ug
    27852786       hom(:,1,79,sr) = vg             ! vg
     2787       hom(:,1,80,sr) = w_subs         ! w_subs
    27862788
    27872789       hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1)
  • palm/trunk/SOURCE/header.f90

    r1242 r1299  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! output for using large_scale subsidence in combination
     23! with large_scale_forcing
     24! reformatting, more detailed explanations
    2325!
    2426! Former revisions:
     
    368370    IF ( momentum_advec == 'pw-scheme' )  THEN
    369371       WRITE ( io, 113 )
    370     ELSEIF (momentum_advec == 'ws-scheme' ) THEN
     372    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
    371373       WRITE ( io, 503 )
    372374    ENDIF
     
    578580    ENDIF
    579581
    580     IF ( plant_canopy ) THEN
     582    IF ( plant_canopy )  THEN
    581583
    582584       WRITE ( io, 280 ) canopy_mode, pch_index, drag_coefficient
    583        IF ( passive_scalar ) THEN
     585       IF ( passive_scalar )  THEN
    584586          WRITE ( io, 281 ) scalar_exchange_coefficient,   &
    585587                            leaf_surface_concentration
     
    717719       WRITE ( io, 303 )
    718720       IF ( constant_heatflux )  THEN
    719           IF ( large_scale_forcing .AND. lsf_surf ) THEN
     721          IF ( large_scale_forcing .AND. lsf_surf )  THEN
    720722             WRITE ( io, 306 )  shf(0,0)
    721723          ELSE
     
    725727       ENDIF
    726728       IF ( humidity  .AND.  constant_waterflux )  THEN
    727           IF ( large_scale_forcing .AND. lsf_surf ) THEN
     729          IF ( large_scale_forcing .AND. lsf_surf )  THEN
    728730             WRITE ( io, 311 ) qsws(0,0)
    729731          ELSE
     
    12271229!
    12281230!-- Spectra output
    1229     IF ( dt_dosp /= 9999999.9 ) THEN
     1231    IF ( dt_dosp /= 9999999.9 )  THEN
    12301232       WRITE ( io, 370 )
    12311233
     
    12691271!
    12701272!-- Cloud physics parameters
    1271     IF ( cloud_physics ) THEN
     1273    IF ( cloud_physics )  THEN
    12721274       WRITE ( io, 415 )
    12731275       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
     
    13071309    ENDDO
    13081310
    1309     IF ( .NOT. large_scale_forcing ) THEN
     1311    IF ( .NOT. large_scale_forcing )  THEN
    13101312       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
    13111313                          TRIM( gradients ), TRIM( slices )
     
    13431345    ENDDO
    13441346
    1345     IF ( .NOT. large_scale_forcing ) THEN
     1347    IF ( .NOT. large_scale_forcing )  THEN
    13461348       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
    13471349                          TRIM( gradients ), TRIM( slices )
     
    13821384    ENDDO
    13831385
    1384     IF ( .NOT. nudging ) THEN
     1386    IF ( .NOT. nudging )  THEN
    13851387       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
    13861388                          TRIM( gradients ), TRIM( slices )
     
    14211423
    14221424       IF ( humidity )  THEN
    1423           IF ( .NOT. nudging ) THEN
     1425          IF ( .NOT. nudging )  THEN
    14241426             WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
    14251427                                TRIM( gradients ), TRIM( slices )
     
    14981500       ENDDO
    14991501
    1500        WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
    1501                           TRIM( gradients ), TRIM( slices )
     1502 
     1503       IF ( .NOT. large_scale_forcing )  THEN
     1504          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
     1505                             TRIM( gradients ), TRIM( slices )
     1506        ELSE
     1507           WRITE ( io, 460 )
     1508       ENDIF
     1509
     1510
    15021511    ENDIF
    15031512
     
    17341743           /'     starting from dp_level_b =', F8.3, 'm', A /)
    17351744153 FORMAT (' --> Large-scale vertical motion is used in the ', &
    1736                   'prognostic equation for')
    1737 154 FORMAT ('     the potential temperature')
     1745                  'prognostic equation(s) for')
     1746154 FORMAT ('     the scalar(s) only')
    17381747155 FORMAT (' --> Nudging is used - initial profiles for u, v, pt and q ',&
    17391748                  'correspond to the')
     
    19962005             '    NUDGING_DATA')
    19972006429 FORMAT (/'    Geostrophic wind profiles (ug, vg) are are taken from file '/ &
    1998              '    LSF_DATA_DATA')
     2007             '    LSF_DATA')
    19992008430 FORMAT (//' Cloud physics quantities / methods:'/ &
    20002009              ' ----------------------------------'/)
     
    20232032454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
    20242033455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
     2034460 FORMAT (/'    Profiles for large scale vertical velocity are '/ &
     2035             '    taken from file LSF_DATA')
    20252036470 FORMAT (//' Actions during the simulation:'/ &
    20262037              ' -----------------------------'/)
  • palm/trunk/SOURCE/init_3d_model.f90

    r1242 r1299  
    2323! Current revisions:
    2424! ------------------
    25 !
     25! Allocate w_subs due to extension of large scale subsidence in combination
     26! with large scale forcing data (LSF_DATA)
    2627!
    2728! Former revisions:
     
    542543
    543544!
     545!-- 1D-array for large scale subsidence velocity
     546    IF ( large_scale_subsidence )  THEN
     547       ALLOCATE ( w_subs(nzb:nzt+1) )
     548       w_subs = 0.0
     549    ENDIF
     550
     551!
    544552!-- 3D-arrays for the leaf area density and the canopy drag coefficient
    545553    IF ( plant_canopy ) THEN
  • palm/trunk/SOURCE/ls_forcing.f90

    r1277 r1299  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Ensure a zero large scale vertical velocity at the surface
     23! Bugfix: typo in case of boundary condition in if-clause
    2324!
    2425! Former revisions:
     
    3940! ------------
    4041! Calculates large scale forcings (geostrophic wind and subsidence velocity) as
    41 ! well as surfaces fluxes dependend on time given in an external file (LSF_DATA).
     42! well as surfaces fluxes dependent on time given in an external file (LSF_DATA).
    4243! Code is based in parts on DALES and UCLA-LES.
    4344!--------------------------------------------------------------------------------!
     
    110111
    111112          IF ( ierrn < 0 )  THEN
    112             WRITE ( message_string, * ) 'No time dependend surface variables ',&
     113            WRITE ( message_string, * ) 'No time dependent surface variables ',&
    113114                              'in&LSF_DATA for end of run found'
    114115
     
    119120
    120121       IF ( time_surf(1) > end_time )  THEN
    121           WRITE ( message_string, * ) 'No time dependend surface variables in ',&
     122          WRITE ( message_string, * ) 'No time dependent surface variables in ',&
    122123                                     '&LSF_DATA for end of run found - ',  &
    123124                                     'lsf_surf is set to FALSE'
     
    146147             READ ( finput, *, IOSTAT=ierrn ) hash, time_vert(t)
    147148             IF ( ierrn < 0 )  THEN
    148                 WRITE( message_string, * ) 'No time dependend vertical profiles',&
     149                WRITE( message_string, * ) 'No time dependent vertical profiles',&
    149150                                 ' in&LSF_DATA for end of run found'
    150151                CALL message( 'ls_forcing', 'PA0372', 1, 2, 0, 6, 0 )
     
    158159          IF ( ierrn /= 0 )  THEN
    159160             message_string = 'errors in file LSF_DATA'
    160              CALL message( 'nudging', 'PA0369', 1, 2, 0, 6, 0 )
     161             CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
    161162          ENDIF
    162163
     
    166167          IF ( ierrn /= 0 )  THEN
    167168             message_string = 'errors in file LSF_DATA'
    168              CALL message( 'nudging', 'PA0369', 1, 2, 0, 6, 0 )
     169             CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
    169170          ENDIF
    170171
     
    183184                IF ( ierrn /= 0 )  THEN
    184185                   message_string = 'errors in file LSF_DATA'
    185                    CALL message( 'nudging', 'PA0369', 1, 2, 0, 6, 0 )
     186                   CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
    186187                ENDIF
    187188
     
    200201       ENDDO
    201202
     203!
     204!--    Large scale vertical velocity has to be zero at the surface
     205       wsubs_vert(nzb,:) = 0.0
     206 
    202207       IF ( time_vert(1) > end_time )  THEN
    203208          WRITE ( message_string, * ) 'Time dependent large scale profile ',&
     
    262267          q_surface = q_surf(t) + fac * ( q_surf(t+1) - q_surf(t) )
    263268
    264        ELSEIF ( ibc_pt_b == 1 )  THEN
     269       ELSEIF ( ibc_q_b == 1 )  THEN
    265270
    266271          qsws = qsws_surf(t) + fac * ( qsws_surf(t+1) - qsws_surf(t) )
Note: See TracChangeset for help on using the changeset viewer.