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

Go to the source code of this file.

Functions/Subroutines

subroutine csph2llh (sph, llh)
 

Function/Subroutine Documentation

◆ csph2llh()

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

Definition at line 2 of file csph2llh.f.

References coord_types(), and d0.

Referenced by ctranscoord2().

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
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
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
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: