COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csph2llh.f
Go to the documentation of this file.
1  subroutine csph2llh(sph, llh)
2 ! sph: /coord/ structue. Input. spherical coordinate system
3 ! llh: /coord/ structure. Output. to contain data in latitude,
4 ! longitude, height.
5 ! *** note ***
6 ! llh can be the same as xyz. time component is unchanged
7 !
8  implicit none
9 
10 #include "Zglobalc.h"
11 
12 #include "Zcoord.h"
13 #include "Zearth.h"
14  type(coord)::llh
15  type(coord)::sph
16  type(coord)::temp
17 #include "Zcoordtype.h"
18 
19 ! ecentricity 0 approximation
20 #ifdef UNIONMAP
21  temp%h = sph%radius - eradius
22  temp%lat = 90.d0 - sph%theta
23 !
24  if(sph%phi .gt. 180.d0) then
25  temp%long = sph%phi - 360.d0
26  else
27  temp%long = sph%phi
28  endif
29 #else
30  temp%r(3) = sph%r(3) - eradius
31  temp%r(1) = 90.d0 - sph%r(1)
32 !
33  if(sph%r(2) .gt. 180.d0) then
34  temp%r(2) = sph%r(2) - 360.d0
35  else
36  temp%r(2) = sph%r(2)
37  endif
38 #endif
39  temp%sys = coord_types(2)
40  llh = temp
41  end
integer max_coord_types * coord_types(2)/'llh'/
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine csph2llh(sph, llh)
Definition: csph2llh.f:2
Definition: Zcoord.h:43