reading HICO.nc L1 files in python
reading HICO.nc L1 files in python
Hi,
I am new to python and I am struggling to read HICO L1 .nc files properly. Im using python3 on Linux.
For some reason I cannot read solar_azimuth and sensor_azimuth data in python, but if I try with seadas it is ok. So the data is there.
Here are the comand lines I use:
#----------------------------------
from netCDF4 import Dataset
nc = Dataset('H2014045025457.L1B_ISS.nc','r')
sza = nc.groups['navigation']['solar_zenith'][1,1]
vza = nc.groups['navigation']['sensor_zenith'][1,1]
saa = nc.groups['navigation']['solar_azimuth'][1,1]
vaa = nc.groups['navigation']['sensor_azimuth'][1,1]
print(sza)
print(vza)
print(saa)
print(vaa)
#----------------------------------
And the output I get is:
58.751854
18.975159
--
--
Can anyone help? Thanks,
Mariana
I am new to python and I am struggling to read HICO L1 .nc files properly. Im using python3 on Linux.
For some reason I cannot read solar_azimuth and sensor_azimuth data in python, but if I try with seadas it is ok. So the data is there.
Here are the comand lines I use:
#----------------------------------
from netCDF4 import Dataset
nc = Dataset('H2014045025457.L1B_ISS.nc','r')
sza = nc.groups['navigation']['solar_zenith'][1,1]
vza = nc.groups['navigation']['sensor_zenith'][1,1]
saa = nc.groups['navigation']['solar_azimuth'][1,1]
vaa = nc.groups['navigation']['sensor_azimuth'][1,1]
print(sza)
print(vza)
print(saa)
print(vaa)
#----------------------------------
And the output I get is:
58.751854
18.975159
--
--
Can anyone help? Thanks,
Mariana
Filters:
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
reading HICO.nc L1 files in python
Mariana,
My suspicion is that the L1 file is lying to you. Well,not you specifically :wink:
The valid_min/max attributes for the azimuth angles listed in the file are -180 to 180 degrees, but the values in the array seem to be 0 to 360.
If the python reader is honoring the valid_min/max attributes, then it will treat the values above 180 as not valid.
...we may need to regenerate the files to correct this...:cry:
Sean
My suspicion is that the L1 file is lying to you. Well,not you specifically :wink:
The valid_min/max attributes for the azimuth angles listed in the file are -180 to 180 degrees, but the values in the array seem to be 0 to 360.
If the python reader is honoring the valid_min/max attributes, then it will treat the values above 180 as not valid.
...we may need to regenerate the files to correct this...:cry:
Sean
reading HICO.nc L1 files in python
Sean,
it seams to be related to python/modules/linux version I am using. Today I am working with another computer and works.
But another question now. I looked at the X and Y values for a specific coordinate in both L1 and L2 .nc files and they report different values. Same lat/lon, different X/Y.
Were the L2.nc files not generated from the L1 files that are available to download?
Best,
Mariana
it seams to be related to python/modules/linux version I am using. Today I am working with another computer and works.
But another question now. I looked at the X and Y values for a specific coordinate in both L1 and L2 .nc files and they report different values. Same lat/lon, different X/Y.
Were the L2.nc files not generated from the L1 files that are available to download?
Best,
Mariana
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
reading HICO.nc L1 files in python
In SeaDAS or python?
SeaDAS may flip the L2 array so north is at the top - but might not get it right for the L1.
Sean
SeaDAS may flip the L2 array so north is at the top - but might not get it right for the L1.
Sean
reading HICO.nc L1 files in python
SeaDAS,
I wanted to extract Ltoa and Rrs spectra for a specific sites (AERONET).
So if I use the lat/lon info I will be fine right?
Cheers,
Mariana
I wanted to extract Ltoa and Rrs spectra for a specific sites (AERONET).
So if I use the lat/lon info I will be fine right?
Cheers,
Mariana
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
reading HICO.nc L1 files in python
Yes. The geolocation is correct (well, consistent anyway) in both.
Sean
Sean