SUBROUTINE user_check_parameters !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: user_check_parameters.f90 226 2009-02-02 07:39:34Z monakurppa $ ! ! 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 ) /= '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. message_string = 'The value for "topography_grid_convention" '// & 'is not set. Its default value is & only valid for '// & '"topography" = ''single_building'' 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' ) 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 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