Changeset 4806 for palm/trunk/SOURCE
- Timestamp:
- Dec 2, 2020 9:00:32 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/biometeorology_mod.f90
r4768 r4806 21 21 ! Current revisions: 22 22 ! ------------------ 23 ! 23 ! Add checks for setup of UV exposure (only workaround!); corrected formatting errors. 24 24 ! 25 25 ! Former revisions: … … 34 34 ! Enable restart via mpi-IO. Therefore, allocated array mrt_av_grid as 3D array instead of an 35 35 ! 1D array. 36 ! 36 ! 37 37 ! 4577 2020-06-25 09:53:58Z raasch 38 38 ! further re-formatting concerning Fortran parameter variables … … 147 147 !> @todo uv_vitd3dose-->new output type necessary (cumulative) 148 148 !> @todo consider upwelling radiation in UV 149 !> @todo re-design module to work with PALM's module interface and reduce number of workarounds 149 150 !> 150 151 !> @note nothing now 151 152 !> 152 !> @bug no known bugs by now 153 !> @bug checks for proper parameter settings and required input data are missing. Currently 154 !< implemented only by a workaround! 153 155 !--------------------------------------------------------------------------------------------------! 154 156 MODULE biometeorology_mod … … 164 166 165 167 USE control_parameters, & 166 ONLY: average_count_3d, biometeorology, & 168 ONLY: average_count_3d, & 169 biometeorology, & 167 170 debug_output, & 168 dz, dz_stretch_factor, & 169 dz_stretch_level, humidity, initializing_actions, nz_do3d, & 170 restart_data_format_output, surface_pressure 171 dz, & 172 dz_stretch_factor, & 173 dz_stretch_level, & 174 humidity, & 175 initializing_actions, message_string, & 176 nz_do3d, & 177 restart_data_format_output, & 178 surface_pressure 171 179 172 180 USE grid_variables, & … … 180 188 181 189 USE netcdf_data_input_mod, & 182 ONLY: building_obstruction_f, netcdf_data_input_uvem, uvem_integration_f, & 183 uvem_irradiance_f, uvem_projarea_f, uvem_radiance_f 190 ONLY: building_obstruction_f, & 191 input_file_uvem, & 192 input_pids_uvem, & 193 netcdf_data_input_uvem, & 194 uvem_integration_f, & 195 uvem_irradiance_f, & 196 uvem_projarea_f, & 197 uvem_radiance_f 184 198 185 199 USE palm_date_time_mod, & … … 741 755 742 756 ! 743 !-- No averaging for UVEM SINce we are calculating a dose (only sum is calculated and saved to757 !-- No averaging for UVEM since we are calculating a dose (only sum is calculated and saved to 744 758 !-- av.nc file) 745 759 END SELECT … … 777 791 !-- Arrays for time-averaged thermal indices are also allocated here because they are not running 778 792 !-- through the standard averaging procedure in bio_3d_data_averaging as the values of the 779 !-- averaged thermal indices are derived in a SINgle step based on priorly averaged arrays (see793 !-- averaged thermal indices are derived in a single step based on priorly averaged arrays (see 780 794 !-- bio_calculate_thermal_index_maps). 781 795 CASE ( 'bio_mrt', 'bio_mrt*' ) … … 843 857 844 858 CASE ( 'uvem_vitd3*' ) 845 !IF ( .NOT. uv_exposure ) THEN846 ! message_string = 'output of "' // TRIM( var ) // '" requi' //&847 ! 'res a namelist &uvexposure_par'848 ! CALL message( 'uvem_check_data_output', 'UV0001', 1, 2, 0, 6, 0 )849 !ENDIF859 IF ( .NOT. uv_exposure ) THEN 860 message_string = 'output of "' // TRIM( var ) // '" requires uv_exposure = .TRUE.' // & 861 '&in namelist "biometeorology_parameters"' 862 CALL message( 'uvem_check_data_output', 'PA0512', 1, 2, 0, 6, 0 ) 863 ENDIF 850 864 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 851 865 message_string = 'illegal value for data_output: "' // & … … 861 875 862 876 CASE ( 'uvem_vitd3dose*' ) 863 !IF ( .NOT. uv_exposure ) THEN864 ! message_string = 'output of "' // TRIM( var ) // '" requi' //&865 ! 'res a namelist &uvexposure_par'866 ! CALL message( 'uvem_check_data_output', 'UV0001', 1, 2, 0, 6, 0 )867 !ENDIF877 IF ( .NOT. uv_exposure ) THEN 878 message_string = 'output of "' // TRIM( var ) // '" requires uv_exposure = .TRUE.' // & 879 '&in namelist "biometeorology_parameters"' 880 CALL message( 'uvem_check_data_output', 'PA0512', 1, 2, 0, 6, 0 ) 881 ENDIF 868 882 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 869 883 message_string = 'illegal value for data_output: "' // & … … 922 936 IMPLICIT NONE 923 937 938 ! 939 !-- Check settings for UV exposure part 940 IF ( uv_exposure ) THEN 941 942 ! 943 !-- Input file not present 944 IF ( .NOT. input_pids_uvem ) THEN 945 WRITE( message_string, * ) 'uv_exposure = .TRUE. but input file "' // & 946 TRIM( input_file_uvem ) // '" is not present.&' // & 947 'Calculating UV exposure impossible.' 948 CALL message( 'bio_check_parameters', 'PA0513', 1, 2, 0, 6, 0 ) 949 ELSE 950 951 ! 952 !-- Required variables not given in input file 953 IF ( .NOT. uvem_integration_f%from_file .OR. .NOT. uvem_irradiance_f%from_file .OR. & 954 .NOT. uvem_projarea_f%from_file .OR. .NOT. uvem_radiance_f%from_file ) THEN 955 WRITE( message_string, * ) 'uv_exposure = .TRUE. but one or more required input ' // & 956 'varaibles are not present in file "' // & 957 TRIM( input_file_uvem ) // '".&' // & 958 'Calculating UV exposure impossible.' 959 CALL message( 'bio_check_parameters', 'PA0514', 1, 2, 0, 6, 0 ) 960 ENDIF 961 962 ! 963 !-- Obstruction requested but not given 964 IF ( consider_obstructions .AND. .NOT. building_obstruction_f%from_file ) THEN 965 WRITE( message_string, * ) 'consider_obstructions = .TRUE. but varaible ' // & 966 '"obstruction" is not present in file "' // & 967 TRIM( input_file_uvem ) // '".&' // & 968 'Calculating UV exposure impossible.' 969 CALL message( 'bio_check_parameters', 'PA0515', 1, 2, 0, 6, 0 ) 970 ENDIF 971 ENDIF 972 ENDIF 924 973 925 974 END SUBROUTINE bio_check_parameters … … 1288 1337 IF ( uv_exposure ) CALL netcdf_data_input_uvem 1289 1338 1339 ! 1340 !-- Check parameters 1341 !-- WARNING This is a WORKAROUND! Due to the design of the module, checks are called at this point 1342 !-- rather than within module_interface_check_parameters. 1343 CALL bio_check_parameters 1344 1290 1345 IF ( debug_output ) CALL debug_message( 'bio_init', 'end' ) 1291 1346 … … 1896 1951 1897 1952 REAL(wp), INTENT ( IN ) :: age !< Age of agent (y) 1898 REAL(wp), INTENT ( IN ) :: dt !< Time past SINce last calculation (s)1953 REAL(wp), INTENT ( IN ) :: dt !< Time past since last calculation (s) 1899 1954 REAL(wp), INTENT ( IN ) :: height !< Height of agent (m) 1900 1955 REAL(wp), INTENT ( IN ) :: pair !< Air pressure (hPa) … … 2615 2670 ELSE 2616 2671 ! 2617 !-- Never get here in x_ridder: SINgularity in y2672 !-- Never get here in x_ridder: singularity in y 2618 2673 nerr = -1_iwp 2619 2674 clo_res = x_ridder … … 4325 4380 4326 4381 USE control_parameters, & 4327 ONLY: latitude, longitude, time_ SINce_reference_point4382 ONLY: latitude, longitude, time_since_reference_point 4328 4383 4329 4384 IMPLICIT NONE … … 4345 4400 4346 4401 4347 CALL get_date_time( time_ SINce_reference_point, day_of_year = day_of_year, &4402 CALL get_date_time( time_since_reference_point, day_of_year = day_of_year, & 4348 4403 second_of_day = second_of_day ) 4349 4404 dtor = pi / 180.0_wp -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4767 r4806 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Deactivated reading of building_obstruction_full due to improper implementation (conflicts with 22 ! building_obstruction_f and it is also not used anywhere else in the code). 22 23 ! 23 24 ! Former revisions: … … 628 629 !-- Define 3D variables of type NC_BYTE 629 630 TYPE(int_3d_8bit) :: building_obstruction_f !< input variable for building obstruction 630 TYPE(int_3d_8bit) :: building_obstruction_full !< input variable for building obstruction631 ! TYPE(int_3d_8bit) :: building_obstruction_full !< input variable for building obstruction 631 632 ! 632 633 !-- Define 2D variables of type NC_INT … … 2094 2095 ! 2095 2096 !-- Read building obstruction 2096 IF ( check_existence( var_names, 'obstruction' ) ) THEN 2097 building_obstruction_full%from_file = .TRUE. 2098 ! 2099 !-- Input 3D uvem building obstruction 2100 ALLOCATE( building_obstruction_full%var_3d(0:44,0:2,0:2) ) 2101 CALL get_variable( id_uvem, 'obstruction', building_obstruction_full%var_3d, 0, 2, 0, 2, & 2102 0, 44 ) 2103 ELSE 2104 building_obstruction_full%from_file = .FALSE. 2105 ENDIF 2097 ! @bug This part is deactivated due to improper implementation: conflicts with 2098 ! building_obstruction_f and it is also not used anywhere else in the code 2099 ! IF ( check_existence( var_names, 'obstruction' ) ) THEN 2100 ! building_obstruction_full%from_file = .TRUE. 2101 ! ! 2102 ! !-- Input 3D uvem building obstruction 2103 ! ALLOCATE( building_obstruction_full%var_3d(0:44,0:2,0:2) ) 2104 ! CALL get_variable( id_uvem, 'obstruction', building_obstruction_full%var_3d, & 2105 ! 0, 2, 0, 2, 0, 44 ) 2106 ! ELSE 2107 ! building_obstruction_full%from_file = .FALSE. 2108 ! ENDIF 2106 2109 ! 2107 2110 IF ( check_existence( var_names, 'obstruction' ) ) THEN
Note: See TracChangeset
for help on using the changeset viewer.