Changeset 256 for palm/trunk/SOURCE


Ignore:
Timestamp:
Mar 8, 2009 8:56:27 AM (15 years ago)
Author:
letzel
Message:
  • topography_grid_convention moved from userpar to inipar
  • documentation and examples updated
Location:
palm/trunk/SOURCE
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r254 r256  
    2626First constant in array den also defined as type double. (eqn_state_seawater)
    2727
    28 advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra,  eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, sort_particles
     28topography_grid_convention moved from userpar to inipar (check_parameters,
     29header, parin, read_var_list, user_check_parameters, user_header,
     30user_init_grid, user_parin, write_var_list)
     31
     32advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra,  eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, parin, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, write_var_list
    2933
    3034
  • palm/trunk/SOURCE/check_parameters.f90

    r241 r256  
    66! Bugfix: pressure included for profile output
    77! Check pressure gradient conditions
     8! topography_grid_convention moved from user_check_parameters
     9! 'single_street_canyon'
    810!
    911! Former revisions:
     
    324326          CALL message( 'check_parameters', 'PA0014', 1, 2, 0, 6, 0 )
    325327       ENDIF
     328!
     329!--    In case of non-flat topography, check whether the convention how to
     330!--    define the topography grid has been set correctly, or whether the default
     331!--    is applicable. If this is not possible, abort.
     332       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
     333          IF ( TRIM( topography ) /= 'single_building' .AND.  &
     334               TRIM( topography ) /= 'single_street_canyon' .AND.  &
     335               TRIM( topography ) /= 'read_from_file' )  THEN
     336!--          The default value is not applicable here, because it is only valid
     337!--          for the two standard cases 'single_building' and 'read_from_file'
     338!--          defined in init_grid.
     339             WRITE( message_string, * )  &
     340                  'The value for "topography_grid_convention" ',  &
     341                  'is not set. Its default value is & only valid for ',  &
     342                  '"topography" = ''single_building'', ',  &
     343                  '''single_street_canyon'' & or ''read_from_file''.',  &
     344                  ' & Choose ''cell_edge'' or ''cell_center''.'
     345             CALL message( 'user_check_parameters', 'PA0239', 1, 2, 0, 6, 0 )
     346          ELSE
     347!--          The default value is applicable here.
     348!--          Set convention according to topography.
     349             IF ( TRIM( topography ) == 'single_building' .OR.  &
     350                  TRIM( topography ) == 'single_street_canyon' )  THEN
     351                topography_grid_convention = 'cell_edge'
     352             ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
     353                topography_grid_convention = 'cell_center'
     354             ENDIF
     355          ENDIF
     356       ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.  &
     357                TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
     358          WRITE( message_string, * )  &
     359               'The value for "topography_grid_convention" is ', &
     360               'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
     361          CALL message( 'user_check_parameters', 'PA0240', 1, 2, 0, 6, 0 )
     362       ENDIF
     363
    326364    ENDIF
    327365
  • palm/trunk/SOURCE/header.f90

    r254 r256  
    99! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    1010! dp_smooth, dpdxy, u_bulk, v_bulk
     11! topography_grid_convention moved from user_header
    1112!
    1213! Former revisions:
     
    425426
    426427    END SELECT
     428
     429    IF ( TRIM( topography ) /= 'flat' )  THEN
     430       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
     431          IF ( TRIM( topography ) == 'single_building' .OR.  &
     432               TRIM( topography ) == 'single_street_canyon' )  THEN
     433             WRITE ( io, 278 )
     434          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
     435             WRITE ( io, 279 )
     436          ENDIF
     437       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
     438          WRITE ( io, 278 )
     439       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
     440          WRITE ( io, 279 )
     441       ENDIF
     442    ENDIF
    427443
    428444    IF ( plant_canopy ) THEN
     
    14591475              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
    14601476              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
     1477278 FORMAT (' Topography grid definition convention:'/ &
     1478            ' cell edge (staggered grid points'/  &
     1479            ' (u in x-direction, v in y-direction))' /)
     1480279 FORMAT (' Topography grid definition convention:'/ &
     1481            ' cell center (scalar grid points)' /)
    14611482280 FORMAT (//' Vegetation canopy (drag) model:'/ &
    14621483              ' ------------------------------'// &
  • palm/trunk/SOURCE/parin.f90

    r241 r256  
    77! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    88! dp_smooth, dpdxy, u_bulk, v_bulk in inipar
     9! topography_grid_convention moved from userpar
    910!
    1011! Former revisions:
     
    117118             surface_waterflux, s_surface, s_surface_initial_change, &
    118119             s_vertical_gradient, s_vertical_gradient_level, timestep_scheme, &
    119              topography, top_heatflux, top_momentumflux_u, top_momentumflux_v, &
     120             topography, topography_grid_convention, top_heatflux, &
     121             top_momentumflux_u, top_momentumflux_v, &
    120122             top_salinityflux, turbulent_inflow, ug_surface, &
    121123             ug_vertical_gradient, ug_vertical_gradient_level, u_bulk, &
  • palm/trunk/SOURCE/read_var_list.f90

    r241 r256  
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    77! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    8 ! dp_smooth, dpdxy, u_bulk, v_bulk
     8! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
    99!
    1010! Former revisions:
     
    499499          CASE ( 'topography' )
    500500             READ ( 13 )  topography
     501          CASE ( 'topography_grid_convention' )
     502             READ ( 13 )  topography_grid_convention
    501503          CASE ( 'top_heatflux' )
    502504             READ ( 13 )  top_heatflux
  • palm/trunk/SOURCE/user_check_parameters.f90

    r240 r256  
    44! Actual revisions:
    55! -----------------
    6 ! add default topography_grid_convention for the new topography case
    7 ! 'single_street_canyon'
    86!
    97! Former revisions:
     
    2523
    2624!
    27 !-- In case of non-flat topography, check whether the convention how to
    28 !-- define the topography grid has been set correctly, or whether the default
    29 !-- is applicable. If this is not possible, abort.
    30     IF ( TRIM( topography ) /= 'flat' )  THEN
    31        IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
    32           IF ( TRIM( topography ) /= 'single_building' .AND.  &
    33                TRIM( topography ) /= 'single_street_canyon' .AND.  &
    34                TRIM( topography ) /= 'read_from_file' )  THEN
    35 !--          The default value is not applicable here, because it is only valid
    36 !--          for the two standard cases 'single_building' and 'read_from_file'
    37 !--          defined in init_grid.
    38              WRITE( message_string, * )  &
    39                   'The value for "topography_grid_convention" ',  &
    40                   'is not set. Its default value is & only valid for ',  &
    41                   '"topography" = ''single_building'', ',  &
    42                   '''single_street_canyon'' & or ''read_from_file''.',  &
    43                   ' & Choose ''cell_edge'' or ''cell_center''.'
    44              CALL message( 'user_check_parameters', 'UI0001', 1, 2, 0, 6, 0 )
    45           ELSE
    46 !--          The default value is applicable here.
    47 !--          Set convention according to topography.
    48              IF ( TRIM( topography ) == 'single_building' .OR.  &
    49                   TRIM( topography ) == 'single_street_canyon' )  THEN
    50                 topography_grid_convention = 'cell_edge'
    51              ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
    52                 topography_grid_convention = 'cell_center'
    53              ENDIF
    54           ENDIF
    55        ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.  &
    56                 TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
    57           WRITE( message_string, * )  &
    58                'The value for "topography_grid_convention" is ', &
    59                'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
    60           CALL message( 'user_check_parameters', 'UI0002', 1, 2, 0, 6, 0 )
    61        ENDIF
    62     ENDIF
    63 
    64 !
    6525!-- Here the user may add code to check the validity of further &userpar
    6626!-- control parameters or deduce further quantities.
  • palm/trunk/SOURCE/user_header.f90

    r240 r256  
    55! -----------------
    66! new topography case 'single_street_canyon'
     7! topography_grid_convention moved to header
    78!
    89! Former revisions:
     
    4647    ENDIF
    4748
    48     IF ( TRIM( topography ) /= 'flat' )  THEN
    49        WRITE ( io, 300 )
    50        IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
    51           IF ( TRIM( topography ) == 'single_building' .OR.  &
    52                TRIM( topography ) == 'single_street_canyon' )  THEN
    53              WRITE ( io, 301 )
    54           ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
    55              WRITE ( io, 302 )
    56           ENDIF
    57        ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
    58           WRITE ( io, 301 )
    59        ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
    60           WRITE ( io, 302 )
    61        ENDIF
    62     ENDIF
    63 
    6449!
    6550!-- Format-descriptors
     
    7055200 FORMAT (' Output of profiles and time series for following regions:' /)
    7156201 FORMAT (4X,'Region ',I1,':   ',A)
    72 300 FORMAT (' Topography grid definition convention:'/)
    73 301 FORMAT (' cell edge (staggered grid points'/  &
    74             ' (u in x-direction, v in y-direction))' /)
    75 302 FORMAT (' cell center (scalar grid points)' /)
    7657
    7758
  • palm/trunk/SOURCE/user_init_grid.f90

    r240 r256  
    55! -----------------
    66! add 'single_street_canyon' as standard topography case
     7! -topography_grid_convention
    78!
    89! Former revisions:
     
    4546       CASE ( 'user_defined_topography_1' )
    4647!
    47 !--       Here the user can define his own topography.
    48 
    49 !
    50 !--       For each user-defined topography, the topography grid convention has
    51 !--       to be explicitly set to either 'cell_edge' or 'cell_center'.
    52 !--       topography_grid_convention = 'cell_edge'     ! OR:
    53 !--       topography_grid_convention = 'cell_center'
    54 
    55 !
     48!--       Here the user can define his own topography.
    5649!--       After definition, please remove the following three lines!
    5750          PRINT*, '+++ user_init_grid: topography "', &
  • palm/trunk/SOURCE/user_parin.f90

    r226 r256  
    44! Actual revisions:
    55! -----------------
    6 !
     6! topography_grid_convention moved to inipar
    77!
    88! Former revisions:
     
    3131
    3232
    33     NAMELIST /userpar/  data_output_pr_user, data_output_user, region,  &
    34                         topography_grid_convention
     33    NAMELIST /userpar/  data_output_pr_user, data_output_user, region
    3534
    3635!
  • palm/trunk/SOURCE/write_var_list.f90

    r241 r256  
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    77! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    8 ! dp_smooth, dpdxy, u_bulk, v_bulk
     8! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
    99!
    1010! Former revisions:
     
    423423    WRITE ( 14 )  'topography                    '
    424424    WRITE ( 14 )  topography
     425    WRITE ( 14 )  'topography_grid_convention    '
     426    WRITE ( 14 )  topography_grid_convention
    425427    WRITE ( 14 )  'top_heatflux                  '
    426428    WRITE ( 14 )  top_heatflux
Note: See TracChangeset for help on using the changeset viewer.