Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
nav_seahawk
hawknav
llh2geocoord.py
Go to the documentation of this file.
1
def
llh2geocoord
(iyr,iday,lon,lat,hgt):
2
# output: geomat
3
# format data as input to geomag70.c
4
# Liang Hong, 2/24/2020
5
6
from
hawknav.jddate
import
jddate
7
from
hawknav.jd
import
jd
8
import
numpy
as
np
9
10
nl = np.size(lon)
11
njday =
jd
(iyr,1,iday)
12
iy,mon,idy =
jddate
(njday)
13
14
# row: iyr,mon,idy,fix(hgt(i)),lat(i),lon(i),format='(i4,2(",",i02)," D K",i3,2f9.3)'
15
geomat = np.column_stack((iyr*np.ones(nl),mon*np.ones(nl),idy*np.ones(nl),np.ones(nl),np.fix(hgt),lat,lon))
16
17
return
geomat
llh2geocoord.llh2geocoord
def llh2geocoord(iyr, iday, lon, lat, hgt)
Definition:
llh2geocoord.py:1
jddate
Definition:
jddate.py:1
jd
Definition:
jd.py:1