Changeset 2169 for palm/trunk


Ignore:
Timestamp:
Mar 6, 2017 6:16:35 PM (8 years ago)
Author:
suehring
Message:

Bugfix, move setting of topography_grid_convention to init_grid, else, in case of restarts generic topography may not set properly if no value is prescribed

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r2143 r2169  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix, move setting for topography grid convention to init_grid
    2323!
    2424! Former revisions:
     
    826826                           TRIM( action )
    827827          CALL message( 'check_parameters', 'PA0014', 1, 2, 0, 6, 0 )
    828        ENDIF
    829 !
    830 !--    In case of non-flat topography, check whether the convention how to
    831 !--    define the topography grid has been set correctly, or whether the default
    832 !--    is applicable. If this is not possible, abort.
    833        IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
    834           IF ( TRIM( topography ) /= 'single_building' .AND.                   &
    835                TRIM( topography ) /= 'single_street_canyon' .AND.              &
    836                TRIM( topography ) /= 'read_from_file' )  THEN
    837 !--          The default value is not applicable here, because it is only valid
    838 !--          for the two standard cases 'single_building' and 'read_from_file'
    839 !--          defined in init_grid.
    840              WRITE( message_string, * )                                        &
    841                   'The value for "topography_grid_convention" ',               &
    842                   'is not set. Its default value is & only valid for ',        &
    843                   '"topography" = ''single_building'', ',                      &
    844                   '''single_street_canyon'' & or ''read_from_file''.',         &
    845                   ' & Choose ''cell_edge'' or ''cell_center''.'
    846              CALL message( 'check_parameters', 'PA0239', 1, 2, 0, 6, 0 )
    847           ELSE
    848 !--          The default value is applicable here.
    849 !--          Set convention according to topography.
    850              IF ( TRIM( topography ) == 'single_building' .OR.                 &
    851                   TRIM( topography ) == 'single_street_canyon' )  THEN
    852                 topography_grid_convention = 'cell_edge'
    853              ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
    854                 topography_grid_convention = 'cell_center'
    855              ENDIF
    856           ENDIF
    857        ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.        &
    858                 TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
    859           WRITE( message_string, * )                                           &
    860                'The value for "topography_grid_convention" is ',               &
    861                'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
    862           CALL message( 'check_parameters', 'PA0240', 1, 2, 0, 6, 0 )
    863828       ENDIF
    864829
  • palm/trunk/SOURCE/init_grid.f90

    r2129 r2169  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix, move setting for topography grid convention to init_grid, else, if no
     23! value is set, the simulation may abort in case of restarts
    2324!
    2425! Former revisions:
     
    896897       ENDIF
    897898
     899!
     900!--    In case of non-flat topography, check whether the convention how to
     901!--    define the topography grid has been set correctly, or whether the default
     902!--    is applicable. If this is not possible, abort.
     903       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
     904          IF ( TRIM( topography ) /= 'single_building' .AND.                   &
     905               TRIM( topography ) /= 'single_street_canyon' .AND.              &
     906               TRIM( topography ) /= 'read_from_file' )  THEN
     907!--          The default value is not applicable here, because it is only valid
     908!--          for the two standard cases 'single_building' and 'read_from_file'
     909!--          defined in init_grid.
     910             WRITE( message_string, * )                                        &
     911                  'The value for "topography_grid_convention" ',               &
     912                  'is not set. Its default value is & only valid for ',        &
     913                  '"topography" = ''single_building'', ',                      &
     914                  '''single_street_canyon'' & or ''read_from_file''.',         &
     915                  ' & Choose ''cell_edge'' or ''cell_center''.'
     916             CALL message( 'init_grid', 'PA0239', 1, 2, 0, 6, 0 )
     917          ELSE
     918!--          The default value is applicable here.
     919!--          Set convention according to topography.
     920             IF ( TRIM( topography ) == 'single_building' .OR.                 &
     921                  TRIM( topography ) == 'single_street_canyon' )  THEN
     922                topography_grid_convention = 'cell_edge'
     923             ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
     924                topography_grid_convention = 'cell_center'
     925             ENDIF
     926          ENDIF
     927       ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.        &
     928                TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
     929          WRITE( message_string, * )                                           &
     930               'The value for "topography_grid_convention" is ',               &
     931               'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
     932          CALL message( 'init_grid', 'PA0240', 1, 2, 0, 6, 0 )
     933       ENDIF
     934
    898935       IF ( topography_grid_convention == 'cell_edge' )  THEN
    899936!
Note: See TracChangeset for help on using the changeset viewer.