COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cllh2sph.f
Go to the documentation of this file.
1  subroutine cllh2sph(llh, sph)
2 ! llh: /coord/ structure. input. lat_long_height
3 ! sph: /coord/ structue. output.. spherical coordinate system
4 !
5 ! *** note ***
6 ! sph can be the same as llh. time component is unchanged
7 !
8  implicit none
9 
10 #include "Zglobalc.h"
11 #include "Zcoord.h"
12 #include "Zearth.h"
13  type(coord)::llh
14  type(coord)::sph
15  type(coord)::temp
16 #include "Zcoordtype.h"
17 ! ecentricity 0 approximation
18 #ifdef UNIONMAP
19  temp%radius = llh%h + eradius
20  temp%theta = 90.d0 - llh%lat
21 !
22  if(llh%long .lt. 0.d0) then
23  temp%phi = llh%long + 360.d0
24  else
25  temp%phi = llh%long
26  endif
27 #else
28  temp%r(3) = llh%r(3) + eradius
29  temp%r(1) = 90.d0 - llh%r(1)
30 !
31  if(llh%r(2) .lt. 0.d0) then
32  temp%r(2) = llh%r(2) + 360.d0
33  else
34  temp%r(2) = llh%r(2)
35  endif
36 #endif
37  temp%sys = coord_types(3)
38  sph = temp
39  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 cllh2sph(llh, sph)
Definition: cllh2sph.f:2
Definition: Zcoord.h:43