- Timestamp:
- Jun 24, 2020 4:58:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/radiation_model_mod.f90
r4574 r4575 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Allow the use of rotation_angle in RTM 31 ! 32 ! 4574 2020-06-24 16:33:32Z pavelkrc 30 33 ! - Restructure code in radiation_check_data_output 31 34 ! - Move calculation of MPI global array offsets to a subroutine … … 1485 1488 1486 1489 USE control_parameters, & 1487 ONLY: land_surface, message_string, rotation_angle,urban_surface1490 ONLY: land_surface, message_string, urban_surface 1488 1491 1489 1492 USE netcdf_data_input_mod, & … … 1585 1588 message_string = 'dt_radiation must be > 0.0' 1586 1589 CALL message( 'check_parameters', 'PA0591', 1, 2, 0, 6, 0 ) 1587 ENDIF1588 !1589 !-- Check rotation angle1590 !> @todo Remove this limitation1591 IF ( rotation_angle /= 0.0 ) THEN1592 message_string = 'rotation of the model domain is not considered in the radiation ' // &1593 'model.&Using rotation_angle /= 0.0 is not allowed in combination ' // &1594 'with the radiation model at the moment!'1595 CALL message( 'check_parameters', 'PA0675', 1, 2, 0, 6, 0 )1596 1590 ENDIF 1597 1591 … … 5847 5841 5848 5842 REAL(wp) :: sun_direct_factor !< factor for direct normal radiation from direct horizontal 5843 REAL(wp) :: sin_rot !< sine of rotation_angle 5844 REAL(wp) :: cos_rot !< cosine of rotation_angle 5845 REAL(wp) :: solar_azim !< solar azimuth in rotated model coordinates 5849 5846 #if defined( __parallel ) 5850 5847 REAL(wp), DIMENSION(1:7) :: combine_allreduce !< dummy array used to combine several MPI_ALLREDUCE calls … … 5866 5863 5867 5864 ! 5868 !-- prepare rotated normal vectors and irradiance factor 5865 !-- prepare rotated normal vectors and irradiance factor 5866 sin_rot = SIN( rotation_angle * pi / 180.0_wp ) 5867 cos_rot = COS( rotation_angle * pi / 180.0_wp ) 5869 5868 vnorm(1,:) = kdir(:) 5870 5869 vnorm(2,:) = jdir(:) 5871 5870 vnorm(3,:) = idir(:) 5872 mrot(1, :) = (/ 1._wp, 0._wp, 0._wp/)5873 mrot(2, :) = (/ 0._wp, COS(rotation_angle), SIN(rotation_angle)/)5874 mrot(3, :) = (/ 0._wp, - SIN(rotation_angle), COS(rotation_angle)/)5871 mrot(1, :) = (/ 1._wp, 0._wp, 0._wp /) 5872 mrot(2, :) = (/ 0._wp, cos_rot, sin_rot /) 5873 mrot(3, :) = (/ 0._wp, -sin_rot, cos_rot /) 5875 5874 sunorig = (/ cos_zenith, sun_dir_lat, sun_dir_lon /) 5876 5875 sunorig = MATMUL(mrot, sunorig) … … 6088 6087 ! 6089 6088 !-- Identify solar direction vector (discretized number) (1) 6089 solar_azim = ATAN2(sun_dir_lon, sun_dir_lat) * (180.0_wp/pi) - rotation_angle 6090 6090 j = FLOOR(ACOS(cos_zenith) / pi * raytrace_discrete_elevs) 6091 i = MODULO(NINT( ATAN2(sun_dir_lon, sun_dir_lat)&6092 / (2.0_wp*pi) * raytrace_discrete_azims-0.5_wp, iwp), &6091 i = MODULO(NINT(solar_azim / 360.0_wp * & 6092 raytrace_discrete_azims - 0.5_wp, iwp), & 6093 6093 raytrace_discrete_azims) 6094 6094 isd = dsidir_rev(j, i) … … 9169 9169 SUBROUTINE radiation_presimulate_solar_pos 9170 9170 9171 USE control_parameters, & 9172 ONLY: rotation_angle 9173 9171 9174 IMPLICIT NONE 9172 9175 … … 9220 9223 9221 9224 REAL(wp), INTENT(IN) :: time_since_reference_local !< local time since reference 9225 REAL(wp) :: solar_azim !< solar azimuth in rotated model coordinates 9222 9226 ! 9223 9227 !-- Update apparent solar position based on modified t_s_r_p … … 9229 9233 !-- 9230 9234 !-- Identify solar direction vector (discretized number) 1) 9231 i = MODULO(NINT(ATAN2(sun_dir_lon, sun_dir_lat) & 9232 / (2._wp*pi) * raytrace_discrete_azims-.5_wp, iwp), & 9235 solar_azim = ATAN2(sun_dir_lon, sun_dir_lat) * (180.0_wp/pi) - rotation_angle 9236 i = MODULO(NINT(solar_azim / 360.0_wp * & 9237 raytrace_discrete_azims - .5_wp, iwp), & 9233 9238 raytrace_discrete_azims) 9234 9239 j = FLOOR(ACOS(cos_zenith) / pi * raytrace_discrete_elevs)
Note: See TracChangeset
for help on using the changeset viewer.