-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help about Netcdf Data #2839
Comments
Hi @markjinz Something like this can work to generate a netcdf file: scn = Scene(filenames=filenames,
reader='seviri_l1b_hrit',
)
composites = ["VIS006", "VIS008", ...]
scn.load(composites)
rscn = scn.resample("eurol")
rscn.save_datasets(writer="cf") Or have you tried that already? |
hello @mraspaud
but i have this problem :
And i have a heavy file as output , the main idea that i want convert my HRIT segments (8 files each channel ) to 1 file Netcdf or Grib but at the result i have a file with many times in seconds |
Sorry @markjinz, Martin is on holiday and I have very little experience with SEVIRI data and with outputting to NetCDF files in Satpy but maybe I can help or find someone who can help more.
Otherwise, @pytroll/seviri_power_users might be able to help. |
To avoid huge files with the NetCDF writer, you need to pass ls.save_datasets(
writer="cf",
format="NETCDF4",
filename=os.path.join(
out_dir,
"{platform_name}-{sensor}-{area.area_id}-{name}-{start_time:%Y%m%d%H%M%S}-{end_time:%Y%m%d%H%M%S}.nc"),
encoding={
"IR_108":
{"zlib": True,
"complevel": 9,
"scale_factor": 0.1,
"dtype": "int16",
"_FillValue": 0}},
include_lonlats=False) Example for FCI, producing a simple NetCDF file with a single uncalibrated channel: import hdf5plugin
from satpy import Scene
from glob import glob
filenames = glob(".../W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-*-FD--CHK-BODY--DIS-NC4E_C_EUMT_20231115*_IDPFI_OPE_20231115*_20231115*_N_JLS_C_0054_*.nc")
sc = Scene(filenames=filenames, reader="fci_l1c_nc")
sc.load(["vis_06"], calibration="counts")
sc.save_dataset(
"vis_06",
"/media/nas/x21308/scratch/FCI/{platform_name}-{sensor}-{area.area_id}-{name}-{start_time:%Y%m%d%H%M%S}-{end_time:%Y%m%d%H%M%S}.nc",
encoding={"vis_06": {"dtype": "int16", "zlib": True}},
include_lonlats=False) |
I don't really understand what you mean by multiple numbers. It is accurate that x=3712 and y=3712 as two separate dimensions. It is a known issue that there is no direct way to include a time dimension. At #2428 someone has proposed a (possibly noncompliant) way to include one. |
Those are likely the acquisition times for each row. It looks like mcidas is finding those when you select the image variable (IR_108 versus IR_108_acq_time) because it is listed as the only thing under I would consider the fact that |
Looks like some comments have been removed from the issue by the OP and the description has been edited, so it's impossible to follow the discussion anymore. I'll close the issue. |
Thank you for your help
The text was updated successfully, but these errors were encountered: