[ncl-talk] Join several netcdf files

Dennis Shea shea at ucar.edu
Fri Apr 15 08:25:39 MDT 2016


[1] Is conservative regridding "...the best one for this type of data". YES!

[2] It is possible to "join" different regridded variables with different
dimension sizes" on a single file BUT you must provide a unique name and,
where grids are different sizes, vreate unique names for (sa) the lat and
lon dimensions.

Your source files: regrid_ll_alg_2010_CO2_emiss  and
regrid_ll_con_2010_CO2_emiss

have the same named dimensions 'lat' and 'lon' and the same variable name
'emiss' on both files.

netCDF requires unique names so

regrid_ll_alg_2010_CO2_emiss:  lat_alg, lon_alg, emiss_alg

regrid_ll_con_2010_CO2_emiss:  lat_con, lon_con, emiss_con

Then you could use (say) ncks to append each file to the 'big' file.

Good luck








On Thu, Apr 14, 2016 at 8:58 AM, Doumbia <thiernodoumbia at yahoo.fr> wrote:

> Dear ncl users,
>
> I have several high resolution data (0.00833 x 0.00833 degree, about 0.86
> km2 in the equator), representing different gas flaring regions in Africa
> (11 netcdf files). I am first regridding them to 0.1 x 0.1 degree using
> ESMP_regrid conserve method.
>
> Now, I would like to join all of them to make one netcdf file. Let me
> precise that files have the same variable but the lat and lon dimension
> sizes differ between files.
>
> Does anyone know how to combine these files ?
>
> Please find attached two samples of my regridding data.
>
> Also, I am wondering if the regredding method that I used is the best one
> for this type of data ?
>
> Here are the command lines I used for the regridding.
>
>
> %--------------------------------------------
> interp_method = “conserve”
>
> latS  = min(lat)
> latN  = max(lat)
> lonW = min(lon)
> lonE  = max(lon)
>
> Opt = True
>
> Opt at ForceOverwrite = True
>
> Opt at InterpMethod = interp_method
> Opt at WgtFileName = “Rect_2_1deg.nc”
>
> Opt at SrcInputFileName = srcFileName
>
> Opt at DstGridType = “0.1deg”
> Opt at DstTitle         = “Emission at 0.1 degree resolution”
> Opt at DstLLCorner = (/ latSn,  lonW /)
> Opt at DstURCorner= (/ latN, lonE /)
>
> Opt at SrcRegional  = True
> Opt at DstRegional  = True
>
> Var_regrid  = ESMF_regrid(satGV, Opt)
>
> %-------------------------------------------------------------
>
> Thanks you for your help,
> Thierno
> LATMOS/IPSL, CNRS
> Paris
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160415/301bae53/attachment.html 


More information about the ncl-talk mailing list