Changeset 3904 for palm/trunk


Ignore:
Timestamp:
Apr 16, 2019 6:22:51 PM (5 years ago)
Author:
gronemeier
Message:

rotate coordinates of stations by given rotation_angle

File:
1 edited

Legend:

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

    r3876 r3904  
    2525! -----------------
    2626! $Id$
     27! Rotate coordinates of stations by given rotation_angle
     28!
     29! 3876 2019-04-08 18:41:49Z knoop
    2730! Remove print statement
    2831!
     
    8285    USE arrays_3d,                                                             &
    8386        ONLY:  q, pt, u, v, w, zu, zw
     87
     88    USE basic_constants_and_equations_mod,                                     &
     89        ONLY:  pi
    8490
    8591    USE chem_gasphase_mod,                                                     &
     
    696702!--          First, compute relative x- and y-coordinates with respect to the
    697703!--          lower-left origin of the model domain, which is the difference
    698 !--          betwen UTM coordinates. Note, if the origin is not correct, the
     704!--          between UTM coordinates. Note, if the origin is not correct, the
    699705!--          virtual sites will be misplaced.
    700706             e_utm(t,1:dim_ntime) = e_utm(t,1:dim_ntime) - init_model%origin_x
    701707             n_utm(t,1:dim_ntime) = n_utm(t,1:dim_ntime) - init_model%origin_y
     708             e_utm(t,1:dim_ntime) = COS( init_model%rotation_angle * pi / 180.0_wp ) &
     709                                    * e_utm(t,1:dim_ntime)                           &
     710                                  - SIN( init_model%rotation_angle * pi / 180.0_wp ) &
     711                                    * n_utm(t,1:dim_ntime)
     712             n_utm(t,1:dim_ntime) = SIN( init_model%rotation_angle * pi / 180.0_wp ) &
     713                                    * e_utm(t,1:dim_ntime)                           &
     714                                  + COS( init_model%rotation_angle * pi / 180.0_wp ) &
     715                                    * n_utm(t,1:dim_ntime)
    702716!
    703717!--          Determine the individual time coordinate length for each station and
     
    10781092        ONLY:  exner, pt, q, u, v, w
    10791093
    1080     USE basic_constants_and_equations_mod,                                     &
    1081         ONLY:  pi
    1082    
    10831094    USE radiation_model_mod,                                                   &
    10841095        ONLY:  radiation 
Note: See TracChangeset for help on using the changeset viewer.