Adding multiple Netcdf4 files into a single file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I have downloaded multiple Merra-2 files in a netcdf4 format (.nc4 file extension). In total I have 2 sets of 365 files. Each of the 365 files stands for one day in a year and contains 24 time steps with different parameters e.g. temperature, humidity etc. The 2 sets have different parameteres, but both are for the exact same region (one set contains temperature, huidity etc. the other set different radiative fluxes.).
The files start at the 01.03.2010 and end on the 28.02.2011 and the filenames in set 1 look like this 'MERRA2_300.tavg1_2d_rad_Nx.20100301.nc4.nc4' and in set 2 like this 'MERRA2_300.inst1_2d_lfo_Nx.20100301.nc4.nc4'.
The Files in set 1 have a size of 300kb per file and in set 2 of 60kb per file.
Do you have an idea how to add first all 365 files from 1 set into a single file? And the next step would be to add the files from the 2 sets together?
0 Commenti
Risposte (1)
MJFcoNaN
il 14 Apr 2022
I suggest nco tools (a collection of utilities to manipulate and analyze netCDF files, but not a matlab toolbox) to do this kind of tasks which is flexible and easy to use.
This is the website: nco guide
You can search "ncrcat" to get examples and explains, such as
ncrcat foo_??.nc out.nc
0 Commenti
Vedere anche
Categorie
Scopri di più su NetCDF in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!