Ignore:
Timestamp:
Jan 14, 2021 10:42:28 AM (4 years ago)
Author:
raasch
Message:

reading of namelist file and actions in case of namelist errors revised so that statement labels and goto statements are not required any more, deprecated namelists removed

File:
1 edited

Legend:

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

    r4831 r4842  
    2727! -----------------
    2828! $Id$
     29! reading of namelist file and actions in case of namelist errors revised so that statement labels
     30! and goto statements are not required any more
     31!
     32! 4831 2021-01-06 17:55:14Z suehring
    2933! Bugfix in checking output variables with suffix indicating the surface facing
    30 ! 
     34!
    3135! 4828 2021-01-05 11:21:41Z Giersch
    3236! Deactivated A/C cooling capacity for office buildings built before year 2000.
     
    4347! - bugfix in openmp directive
    4448! - make t_green_h and t_green_v public (required in indoor model)
    45 ! 
     49!
    4650! 4747 2020-10-16 09:19:57Z pavelkrc
    4751! Fix window absorptivity calculation (correctly account for 2-sided reflection)
    48 ! 
     52!
    4953! 4738 2020-10-14 08:05:07Z maronga
    5054! Updating building data base (on behalf of Sascha Rissmann)
     
    111115! 4602 2020-07-14 14:49:45Z suehring
    112116! Add missing initialization of albedo type with values given from static input file
    113 ! 
     117!
    114118! 4581 2020-06-29 08:49:58Z suehring
    115119! Missing initialization in case of cyclic_fill runs
    116 ! 
     120!
    117121! 4535 2020-05-15 12:07:23Z raasch
    118122! bugfix for restart data format query
    119 ! 
     123!
    120124! 4517 2020-05-03 14:29:30Z raasch
    121125! added restart with MPI-IO for reading local arrays
    122 ! 
     126!
    123127! 4510 2020-04-29 14:19:18Z raasch
    124128! Further re-formatting to follow the PALM coding standard
     
    318322!> -------------
    319323!> @todo Revise sorting of building_pars
    320 !> @todo Revise initialization when building_pars / building_surface_pars are provided - 
     324!> @todo Revise initialization when building_pars / building_surface_pars are provided -
    321325!>       intialization is not consistent to building_pars
    322326!> @todo Revise flux conversion in energy-balance solver
     
    58135817    IMPLICIT NONE
    58145818
    5815     CHARACTER(LEN=80)  ::  line  !< string containing current line of file PARIN
    5816 
    5817     NAMELIST /urban_surface_par/                                                                   &
    5818                         building_type,                                                             &
    5819                         roof_category,                                                             &
    5820                         roof_inner_temperature,                                                    &
    5821                         roughness_concrete,                                                        &
    5822                         soil_inner_temperature,                                                    &
    5823                         urban_surface,                                                             &
    5824                         usm_wall_mod,                                                              &
    5825                         wall_category,                                                             &
    5826                         wall_inner_temperature,                                                    &
    5827                         window_inner_temperature
    5828 
     5819    CHARACTER(LEN=100)  ::  line  !< string containing current line of file PARIN
     5820
     5821    INTEGER(iwp) ::  io_status    !< status after reading the namelist file
    58295822
    58305823    NAMELIST /urban_surface_parameters/                                                            &
     
    58435836
    58445837!
    5845 !-- Try to find urban surface model package
    5846     REWIND ( 11 )
    5847     line = ' '
    5848     DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 )
    5849        READ ( 11, '(A)', END = 12 )  line
    5850     ENDDO
    5851     BACKSPACE ( 11 )
    5852 
    5853 !
    5854 !-- Read user-defined namelist
    5855     READ ( 11, urban_surface_parameters, ERR = 10 )
    5856 
    5857 !
    5858 !-- Set flag that indicates that the urban surface model is switched on
    5859     urban_surface = .TRUE.
    5860 
    5861     GOTO 14
    5862 
    5863  10 BACKSPACE( 11 )
    5864     READ( 11 , '(A)') line
    5865     CALL parin_fail_message( 'urban_surface_parameters', line )
    5866 !
    5867 !-- Try to find old namelist
    5868  12 REWIND ( 11 )
    5869     line = ' '
    5870     DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 )
    5871        READ ( 11, '(A)', END = 14 )  line
    5872     ENDDO
    5873     BACKSPACE ( 11 )
    5874 
    5875 !
    5876 !-- Read user-defined namelist
    5877     READ ( 11, urban_surface_par, ERR = 13, END = 14 )
    5878 
    5879     message_string = 'namelist urban_surface_par is deprecated and will be removed in near ' //    &
    5880                      'future. Please use namelist urban_surface_parameters instead'
    5881     CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 )
    5882 
    5883 !
    5884 !-- Set flag that indicates that the urban surface model is switched on
    5885     urban_surface = .TRUE.
    5886 
    5887     GOTO 14
    5888 
    5889  13 BACKSPACE( 11 )
    5890     READ( 11 , '(A)') line
    5891     CALL parin_fail_message( 'urban_surface_par', line )
    5892 
    5893 
    5894  14 CONTINUE
    5895 
     5838!-- Move to the beginning of the namelist file and try to find and read the namelist.
     5839    REWIND( 11 )
     5840    READ( 11, urban_surface_parameters, IOSTAT=io_status )
     5841
     5842!
     5843!-- Action depending on the READ status
     5844    IF ( io_status == 0 )  THEN
     5845!
     5846!--    urban_surface_parameters namelist was found and read correctly. Set flag that indicates that
     5847!--    the urban surface model is switched on.
     5848       urban_surface = .TRUE.
     5849
     5850    ELSEIF ( io_status > 0 )  THEN
     5851!
     5852!--    urban_surface_parameters namelist was found but contained errors. Print an error message
     5853!--    including the line that caused the problem.
     5854       BACKSPACE( 11 )
     5855       READ( 11 , '(A)' ) line
     5856       CALL parin_fail_message( 'urban_surface_parameters', line )
     5857
     5858    ENDIF
    58965859
    58975860 END SUBROUTINE usm_parin
     
    75847547       1512000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    75857548       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    7586        0.81_wp,        &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     7549       0.81_wp,        &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    75877550       0.81_wp,        &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    75887551       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
    7589        293.15_wp,      &  !< parameter 13  - [K] indoor target winter temperature 
     7552       293.15_wp,      &  !< parameter 13  - [K] indoor target winter temperature
    75907553       0.93_wp,        &  !< parameter 14  - [-] wall emissivity above ground floor level
    75917554       0.86_wp,        &  !< parameter 15  - [-] green emissivity above ground floor level
     
    77267689                        /)
    77277690
    7728     building_pars(:,2) = (/                                                                        &                       
     7691    building_pars(:,2) = (/                                                                        &
    77297692       0.75_wp,        &  !< parameter 0   - [-] wall fraction above ground floor level
    77307693       0.25_wp,        &  !< parameter 1   - [-] window fraction above ground floor level
     
    77377700       2112000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    77387701       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    7739        0.046_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     7702       0.046_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    77407703       2.1_wp,         &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    77417704       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
     
    78797842                        /)
    78807843
    7881     building_pars(:,3) = (/                                                                        &                       
     7844    building_pars(:,3) = (/                                                                        &
    78827845       0.71_wp,        &  !< parameter 0   - [-] wall fraction above ground floor level
    78837846       0.29_wp,        &  !< parameter 1   - [-] window fraction above ground floor level
     
    78907853       1344000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    78917854       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    7892        0.035_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     7855       0.035_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    78937856       0.68_wp,        &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    78947857       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
     
    80097972       4.5_wp,         &  !< parameter 127 - [m2/m2] ratio internal surface/floor area
    80107973       40.0_wp,        &  !< parameter 128 - [W] maximal heating capacity
    8011        0.0_wp,         &  !< parameter 129 - [W] maximal cooling capacity 
     7974       0.0_wp,         &  !< parameter 129 - [W] maximal cooling capacity
    80127975       0.0_wp,         &  !< parameter 130 - [W/m2] additional internal heat gains dependent on occupancy of the room
    80137976       4.2_wp,         &  !< parameter 131 - [W/m2] basic internal heat gains without occupancy of the room
     
    80438006       1512000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    80448007       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    8045        0.81_wp,        &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     8008       0.81_wp,        &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    80468009       0.81_wp,        &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    80478010       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
     
    81568119       2.9_wp,         &  !< parameter 121 - [W/(m2*K)] u-value windows
    81578120       1.0_wp,         &  !< parameter 122 - [1/h] basic airflow without occupancy of the room for - summer 1.0_wp, winter 0.2
    8158        1.0_wp,         &  !< parameter 123 - [1/h] additional airflow dependent on occupancy of the room for - summer 1.0_wp, winter 0.8 
     8121       1.0_wp,         &  !< parameter 123 - [1/h] additional airflow dependent on occupancy of the room for - summer 1.0_wp, winter 0.8
    81598122       0.0_wp,         &  !< parameter 124 - [-] heat recovery efficiency
    81608123       3.0_wp,         &  !< parameter 125 - [m2/m2] dynamic parameter specific effective surface
     
    81968159       2112000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    81978160       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    8198        2.1_wp,         &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     8161       2.1_wp,         &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    81998162       0.046_wp,       &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    82008163       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
     
    83088271       0.7_wp,         &  !< parameter 120 - [-] g-value windows
    83098272       1.7_wp,         &  !< parameter 121 - [W/(m2*K)] u-value windows
    8310        1.0_wp,         &  !< parameter 122 - [1/h] basic airflow without occupancy of the room for - summer 1.0_wp, winter 0.2 
     8273       1.0_wp,         &  !< parameter 122 - [1/h] basic airflow without occupancy of the room for - summer 1.0_wp, winter 0.2
    83118274       1.0_wp,         &  !< parameter 123 - [1/h] additional airflow dependent on occupancy of the room for - summer 1.0_wp, winter 0.8
    83128275       0.0_wp,         &  !< parameter 124 - [-] heat recovery efficiency
     
    83498312       1344000.0_wp,   &  !< parameter 8   - [J/(m3*K)] heat capacity 3rd wall layer above ground floor level
    83508313       0.93_wp,        &  !< parameter 9   - [W/(m*K)] thermal conductivity 1st wall layer (outside) above ground floor level
    8351        0.035_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level       
     8314       0.035_wp,       &  !< parameter 10  - [W/(m*K)] thermal conductivity 2nd wall layer above ground floor level
    83528315       0.68_wp,        &  !< parameter 11  - [W/(m*K)] thermal conductivity 3rd wall layer above ground floor level
    83538316       299.15_wp,      &  !< parameter 12  - [K] indoor target summer temperature
     
    86308593      1848000.0_wp,    &  !< parameter 136 - [J/(m3*K)] heat capacity 4th wall layer (downside) above ground floor level
    86318594      1.0_wp,          &  !< parameter 137 - [W/(m*K)] thermal conductivity 4th wall layer (downside) above ground floor level
    8632       1848000.0_wp,    &  !< parameter 138 - [J/(m3*K)] heat capacity 4th wall layer (downside) ground floor level 
     8595      1848000.0_wp,    &  !< parameter 138 - [J/(m3*K)] heat capacity 4th wall layer (downside) ground floor level
    86338596      1.0_wp,          &  !< parameter 139 - [W/(m*K)] thermal conductivity 4th wall layer (downside) ground floor level
    86348597      1848000.0_wp,    &  !< parameter 140 - [J/(m3*K)] heat capacity 4th wall layer (downside) ground plate
Note: See TracChangeset for help on using the changeset viewer.