SUBROUTINE user_check_parameters !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! add default topography_grid_convention for the new topography case ! 'single_street_canyon' ! ! Former revisions: ! ----------------- ! $Id: user_check_parameters.f90 240 2009-02-18 17:50:38Z letzel $ ! ! 217 2008-12-09 18:00:48Z letzel ! Initial version ! ! Description: ! ------------ ! Check &userpar control parameters and deduce further quantities. !------------------------------------------------------------------------------! USE control_parameters USE user IMPLICIT NONE ! !-- In case of non-flat topography, check whether the convention how to !-- define the topography grid has been set correctly, or whether the default !-- is applicable. If this is not possible, abort. IF ( TRIM( topography ) /= 'flat' ) THEN IF ( TRIM( topography_grid_convention ) == ' ' ) THEN IF ( TRIM( topography ) /= 'single_building' .AND. & TRIM( topography ) /= 'single_street_canyon' .AND. & TRIM( topography ) /= 'read_from_file' ) THEN !-- The default value is not applicable here, because it is only valid !-- for the two standard cases 'single_building' and 'read_from_file' !-- defined in init_grid. WRITE( message_string, * ) & 'The value for "topography_grid_convention" ', & 'is not set. Its default value is & only valid for ', & '"topography" = ''single_building'', ', & '''single_street_canyon'' & or ''read_from_file''.', & ' & Choose ''cell_edge'' or ''cell_center''.' CALL message( 'user_check_parameters', 'UI0001', 1, 2, 0, 6, 0 ) ELSE !-- The default value is applicable here. !-- Set convention according to topography. IF ( TRIM( topography ) == 'single_building' .OR. & TRIM( topography ) == 'single_street_canyon' ) THEN topography_grid_convention = 'cell_edge' ELSEIF ( TRIM( topography ) == 'read_from_file' ) THEN topography_grid_convention = 'cell_center' ENDIF ENDIF ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND. & TRIM( topography_grid_convention ) /= 'cell_center' ) THEN WRITE( message_string, * ) & 'The value for "topography_grid_convention" is ', & 'not recognized. & Choose ''cell_edge'' or ''cell_center''.' CALL message( 'user_check_parameters', 'UI0002', 1, 2, 0, 6, 0 ) ENDIF ENDIF ! !-- Here the user may add code to check the validity of further &userpar !-- control parameters or deduce further quantities. END SUBROUTINE user_check_parameters