COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cllh2sph.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cllh2sph (llh, sph)
 

Function/Subroutine Documentation

◆ cllh2sph()

subroutine cllh2sph ( type(coord llh,
type(coord sph 
)

Definition at line 2 of file cllh2sph.f.

References coord_types(), and d0.

Referenced by ctranscoord2().

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
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system llh
Definition: Zcoord.h:25
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
Definition: Zcoord.h:43
Here is the call graph for this function:
Here is the caller graph for this function: