Comments (4)
@yukaribbba You can read Pygac FDR files using the avhrr_l1c_eum_gac_fdr_nc
reader and then use the overlap_free_start/end
datasets to crop the overlap.
from satpy import Scene
filename = "AVHRR-GAC_FDR_1C_N06_19810330T005421Z_19810330T024632Z_R_O_20200101T000000Z_0100.nc"
scn = Scene([filename], reader="avhrr_l1c_eum_gac_fdr_nc")
scn.load(["reflectance_channel_1", "overlap_free_start", "overlap_free_end"])
refl = scn["reflectance_channel_1"]
start = scn["overlap_free_start"].astype(int).item()
end = scn["overlap_free_end"].astype(int).item()
overlap_free = refl.isel(y=slice(start, end))
from pygac.
@sfinkens That's just what I need. But when I tried to produce a FDR dataset from a GAC file, an error raised:
python pygac-fdr-run --debug --cfg pygac-fdr.yaml --tle-dir D:\noaa_tles NSS.GHRR.TN.D79285.S0006.E0126.B0512728.gc
[INFO: 2022-10-11 17:37:03 : pygac_fdr] Processing file C:\Users\45107\Downloads\Sat\Polar\NSS.GHRR.TN.D79285.S0006.E0126.B0512728.gc
C:\users\45107\miniconda3\lib\site-packages\pygac\reader.py:274: RuntimeWarning: Unexpected number of scanlines!
warnings.warn("Unexpected number of scanlines!",
C:\users\45107\miniconda3\lib\site-packages\pygac\calibration.py:198: RuntimeWarning: Using CoeffStatus.PROVISIONAL calibration coefficients
warnings.warn(warning, RuntimeWarning)
C:\users\45107\miniconda3\lib\site-packages\geotiepoints\geointerpolator.py:81: RuntimeWarning: invalid value encountered in arcsin
lats = np.sign(z__) * (90 - np.rad2deg(np.arcsin(np.sqrt(x__ ** 2 + y__ ** 2) / radius)))
C:\users\45107\miniconda3\lib\site-packages\pygac\calibration.py:544: RuntimeWarning: invalid value encountered in log
tsE = c2*nu_c / np.log(1.0 + nBB_num / Ne)
C:\users\45107\miniconda3\lib\site-packages\pygac_fdr\writer.py:363: UserWarning: Attribute access to DataIDs is deprecated, use key access instead.
scn_keys = set([key.name for key in scene.keys()])
[INFO: 2022-10-11 17:37:08 : pygac_fdr] Writing calibrated scene to C:\Users\45107\Downloads\Sat\Polar\AVHRR-GAC_FDR_1C_TSN_19791012T000633Z_19791012T012633Z_R_O_20200101T000000Z_0100.nc
C:\users\45107\miniconda3\lib\site-packages\satpy\writers\cf_writer.py:571: FutureWarning: The default behaviour of the CF writer will soon change to not compress data by default.
warnings.warn("The default behaviour of the CF writer will soon change to not compress data by default.",
Traceback (most recent call last):
File "C:\Users\45107\miniconda3\Scripts\pygac-fdr-run", line 134, in <module>
process_file(filename, config)
File "C:\Users\45107\miniconda3\Scripts\pygac-fdr-run", line 59, in process_file
writer.write(scene=scene)
File "C:\users\45107\miniconda3\lib\site-packages\pygac_fdr\writer.py", line 410, in write
self._save_datasets(scene, filename, global_attrs)
File "C:\users\45107\miniconda3\lib\site-packages\pygac_fdr\writer.py", line 429, in _save_datasets
scene.save_datasets(
File "C:\users\45107\miniconda3\lib\site-packages\satpy\scene.py", line 1159, in save_datasets
return writer.save_datasets(dataarrays, compute=compute, **save_kwargs)
File "C:\users\45107\miniconda3\lib\site-packages\satpy\writers\cf_writer.py", line 844, in save_datasets
datas, start_times, end_times = self._collect_datasets(
File "C:\users\45107\miniconda3\lib\site-packages\satpy\writers\cf_writer.py", line 764, in _collect_datasets
assert_xy_unique(datas)
File "C:\users\45107\miniconda3\lib\site-packages\satpy\writers\cf_writer.py", line 282, in assert_xy_unique
raise ValueError('Datasets to be saved in one file (or one group) must have identical projection coordinates. '
ValueError: Datasets to be saved in one file (or one group) must have identical projection coordinates. Please group them by area or save them in separate files.
I'm using satpy 0.36 from pypi
from pygac.
@yukaribbba I tried with the same TIROS-N file but couldn't reproduce the error. However, I ran into another problem, which I fixed here: pytroll/pygac-fdr#107. So please try upgrading to the latest version from github
pip install git+https://github.com/pytroll/pygac-fdr --upgrade --no-deps
Then you should be able to process that file.
from pygac.
I hope this was closed by pytroll/pygac-fdr#107. Feel free to re-open
from pygac.
Related Issues (20)
- API is missing on readthedocs
- Links to POD/KLM user guides are mixed up
- Fix sun-earth distance correction HOT 3
- Use pyorbital for sun-earth distance correction
- Usage documentation uses wrong function name for 'get_reader_class' HOT 1
- Reading of files broken for numpy 2.0.0
- Make angles computation optional for KLM HOT 2
- Roll, pitch, yaw from KLM data not used when computing angles
- Typos in calibration coefficients HOT 3
- Remove Cython dependency HOT 7
- IndexError in PODReader._adjust_clock_drift HOT 3
- Avoid implicit changes to ict and space counts in thermal calibration HOT 2
- Handle completely missing ICT or space counts HOT 4
- Reduce rounding error in POD reader adjust clock drift
- Update documentation HOT 2
- Unit test discovery
- Half a pixel shift on the x-axis for Metop GAC data. HOT 16
- Change in masked scanlines HOT 17
- Method get_tle_lines() raises index error when tle lines are empty strings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygac.