Can I open NetCDF files with QGIS?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I open NetCDF files with QGIS?

Paolo Corti
Hi
sorry if this has been discussed before, but according to what I see
here [1] there was not an answer.

I need to open a NetCDF file with QGIS.
I am using QGIS 1.7.2, and GDAL 1.9.0.
I can successfully manage NetCDF files with GDAL:

$ gdalinfo --formats
Supported Formats:
  ...
  netCDF (rw+): Network Common Data Format
  ...

$ gdalinfo Glb_20111001.nc
Driver: netCDF/Network Common Data Format
Files: Glb_20111001.nc
Size is 512, 512
Coordinate System is `'
Metadata:
  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
(http://www.mpimet.mpg.de/cdo)
  NC_GLOBAL#Conventions=CF-1.0
  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
Glb_20111001.nc
Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
pf50_20111001_FWI.nc
Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
pf50_20111001_20111010_FWI.nc
  NC_GLOBAL#institution=European Centre for Medium-Range Weather Forecasts
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
  ...
[cut]

When I try to open this dataset with QGIS, this is what I get:
Cannot get GDAL raster band.

In the console this is what has been logged:

Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.

Any ideas? Should I open a ticket?
thanks
P

[1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Etienne Tourigny-3
It seems that QGis does not support GDAL raster "subdatasets", I get
this with netcdf and hdf4  files.

Try this:

gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk danger_risk.vrt
qgis danger_risk.vrt

For more information on subdatasets see the GDAL netcdf driver page:
http://www.gdal.org/frmt_netcdf.html


It's a pity this doesn't work directly in QGis - anybody know if this
could be fixed/implemented?
It would be great to support subdatasets by adding a layer for each
subdataset, and perhaps even better with a dialog for selecting a
particular subdataset.

Regards,
Etienne


On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:

> Hi
> sorry if this has been discussed before, but according to what I see
> here [1] there was not an answer.
>
> I need to open a NetCDF file with QGIS.
> I am using QGIS 1.7.2, and GDAL 1.9.0.
> I can successfully manage NetCDF files with GDAL:
>
> $ gdalinfo --formats
> Supported Formats:
>  ...
>  netCDF (rw+): Network Common Data Format
>  ...
>
> $ gdalinfo Glb_20111001.nc
> Driver: netCDF/Network Common Data Format
> Files: Glb_20111001.nc
> Size is 512, 512
> Coordinate System is `'
> Metadata:
>  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
>  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
> (http://www.mpimet.mpg.de/cdo)
>  NC_GLOBAL#Conventions=CF-1.0
>  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
> af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
> pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
> pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
> pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
> pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
> pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
> pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
> pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
> pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
> pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
> pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
> pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
> pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
> Glb_20111001.nc
> Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
> pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
> Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
> pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
> pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
> pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
> pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
> pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
> pf50_20111001_FWI.nc
> Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
> Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
> pf50_20111001_20111010_FWI.nc
>  NC_GLOBAL#institution=European Centre for Medium-Range Weather Forecasts
> Subdatasets:
>  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
>  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
>  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
>  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
>  ...
> [cut]
>
> When I try to open this dataset with QGIS, this is what I get:
> Cannot get GDAL raster band.
>
> In the console this is what has been logged:
>
> Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
> ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
>
> Any ideas? Should I open a ticket?
> thanks
> P
>
> [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Etienne Tourigny-3
Another solution is to have only one variable per file, you can do
that with cdo easily.

Etienne

On Wed, Feb 8, 2012 at 4:59 PM, Etienne Tourigny
<[hidden email]> wrote:

> It seems that QGis does not support GDAL raster "subdatasets", I get
> this with netcdf and hdf4  files.
>
> Try this:
>
> gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk danger_risk.vrt
> qgis danger_risk.vrt
>
> For more information on subdatasets see the GDAL netcdf driver page:
> http://www.gdal.org/frmt_netcdf.html
>
>
> It's a pity this doesn't work directly in QGis - anybody know if this
> could be fixed/implemented?
> It would be great to support subdatasets by adding a layer for each
> subdataset, and perhaps even better with a dialog for selecting a
> particular subdataset.
>
> Regards,
> Etienne
>
>
> On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:
>> Hi
>> sorry if this has been discussed before, but according to what I see
>> here [1] there was not an answer.
>>
>> I need to open a NetCDF file with QGIS.
>> I am using QGIS 1.7.2, and GDAL 1.9.0.
>> I can successfully manage NetCDF files with GDAL:
>>
>> $ gdalinfo --formats
>> Supported Formats:
>>  ...
>>  netCDF (rw+): Network Common Data Format
>>  ...
>>
>> $ gdalinfo Glb_20111001.nc
>> Driver: netCDF/Network Common Data Format
>> Files: Glb_20111001.nc
>> Size is 512, 512
>> Coordinate System is `'
>> Metadata:
>>  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
>>  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
>> (http://www.mpimet.mpg.de/cdo)
>>  NC_GLOBAL#Conventions=CF-1.0
>>  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
>> af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
>> pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
>> pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
>> pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
>> pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
>> pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
>> pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
>> pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
>> pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
>> pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
>> pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
>> pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
>> pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
>> Glb_20111001.nc
>> Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
>> pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
>> Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
>> pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
>> pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
>> pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
>> pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
>> pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
>> pf50_20111001_FWI.nc
>> Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
>> Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
>> pf50_20111001_20111010_FWI.nc
>>  NC_GLOBAL#institution=European Centre for Medium-Range Weather Forecasts
>> Subdatasets:
>>  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
>>  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
>>  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
>>  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
>>  ...
>> [cut]
>>
>> When I try to open this dataset with QGIS, this is what I get:
>> Cannot get GDAL raster band.
>>
>> In the console this is what has been logged:
>>
>> Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
>> ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
>>
>> Any ideas? Should I open a ticket?
>> thanks
>> P
>>
>> [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
>>
>> --
>> Paolo Corti
>> Geospatial software developer
>> web: http://www.paolocorti.net
>> twitter: @capooti
>> skype: capooti
>> _______________________________________________
>> Qgis-user mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Yves Jacolin
In reply to this post by Etienne Tourigny-3
Hello,

I successfully did it. But my email won't help you as I don't know why. I
guess my gdal binaries from my company has something specific.

Y.
Le mercredi 8 février 2012 19:59:06, Etienne Tourigny a écrit :

> It seems that QGis does not support GDAL raster "subdatasets", I get
> this with netcdf and hdf4  files.
>
> Try this:
>
> gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk
> danger_risk.vrt qgis danger_risk.vrt
>
> For more information on subdatasets see the GDAL netcdf driver page:
> http://www.gdal.org/frmt_netcdf.html
>
>
> It's a pity this doesn't work directly in QGis - anybody know if this
> could be fixed/implemented?
> It would be great to support subdatasets by adding a layer for each
> subdataset, and perhaps even better with a dialog for selecting a
> particular subdataset.
>
> Regards,
> Etienne
>
> On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:
> > Hi
> > sorry if this has been discussed before, but according to what I see
> > here [1] there was not an answer.
> >
> > I need to open a NetCDF file with QGIS.
> > I am using QGIS 1.7.2, and GDAL 1.9.0.
> > I can successfully manage NetCDF files with GDAL:
> >
> > $ gdalinfo --formats
> > Supported Formats:
> >  ...
> >  netCDF (rw+): Network Common Data Format
> >  ...
> >
> > $ gdalinfo Glb_20111001.nc
> > Driver: netCDF/Network Common Data Format
> > Files: Glb_20111001.nc
> > Size is 512, 512
> > Coordinate System is `'
> > Metadata:
> >  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
> >  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
> > (http://www.mpimet.mpg.de/cdo)
> >  NC_GLOBAL#Conventions=CF-1.0
> >  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
> > af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
> > pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
> > pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
> > pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
> > pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
> > pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
> > pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
> > pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
> > pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
> > pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
> > pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
> > pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
> > pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
> > Glb_20111001.nc
> > Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
> > pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
> > Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
> > pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
> > pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
> > pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
> > pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
> > pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
> > pf50_20111001_FWI.nc
> > Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
> > Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
> > pf50_20111001_20111010_FWI.nc
> >  NC_GLOBAL#institution=European Centre for Medium-Range Weather Forecasts
> > Subdatasets:
> >  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
> >  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
> >  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
> >  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
> >  ...
> > [cut]
> >
> > When I try to open this dataset with QGIS, this is what I get:
> > Cannot get GDAL raster band.
> >
> > In the console this is what has been logged:
> >
> > Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
> > ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
> >
> > Any ideas? Should I open a ticket?
> > thanks
> > P
> >
> > [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
> >
> > --
> > Paolo Corti
> > Geospatial software developer
> > web: http://www.paolocorti.net
> > twitter: @capooti
> > skype: capooti
> > _______________________________________________
> > Qgis-user mailing list
> > [hidden email]
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user

--
Yves Jacolin
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Etienne Tourigny-3
QGis can open a netcdf file which has only 1 variable (along with
supporting lat/lon or X/Y dimension variables).
Perhaps that is what works for you?

Etienne

On Wed, Feb 8, 2012 at 5:42 PM, Yves Jacolin (free) <[hidden email]> wrote:

> Hello,
>
> I successfully did it. But my email won't help you as I don't know why. I
> guess my gdal binaries from my company has something specific.
>
> Y.
> Le mercredi 8 février 2012 19:59:06, Etienne Tourigny a écrit :
>> It seems that QGis does not support GDAL raster "subdatasets", I get
>> this with netcdf and hdf4  files.
>>
>> Try this:
>>
>> gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk
>> danger_risk.vrt qgis danger_risk.vrt
>>
>> For more information on subdatasets see the GDAL netcdf driver page:
>> http://www.gdal.org/frmt_netcdf.html
>>
>>
>> It's a pity this doesn't work directly in QGis - anybody know if this
>> could be fixed/implemented?
>> It would be great to support subdatasets by adding a layer for each
>> subdataset, and perhaps even better with a dialog for selecting a
>> particular subdataset.
>>
>> Regards,
>> Etienne
>>
>> On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:
>> > Hi
>> > sorry if this has been discussed before, but according to what I see
>> > here [1] there was not an answer.
>> >
>> > I need to open a NetCDF file with QGIS.
>> > I am using QGIS 1.7.2, and GDAL 1.9.0.
>> > I can successfully manage NetCDF files with GDAL:
>> >
>> > $ gdalinfo --formats
>> > Supported Formats:
>> >  ...
>> >  netCDF (rw+): Network Common Data Format
>> >  ...
>> >
>> > $ gdalinfo Glb_20111001.nc
>> > Driver: netCDF/Network Common Data Format
>> > Files: Glb_20111001.nc
>> > Size is 512, 512
>> > Coordinate System is `'
>> > Metadata:
>> >  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
>> >  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
>> > (http://www.mpimet.mpg.de/cdo)
>> >  NC_GLOBAL#Conventions=CF-1.0
>> >  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
>> > af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
>> > pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
>> > pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
>> > pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
>> > pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
>> > pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
>> > pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
>> > pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
>> > pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
>> > pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
>> > pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
>> > pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
>> > pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
>> > Glb_20111001.nc
>> > Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
>> > pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
>> > Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
>> > pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
>> > pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
>> > pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
>> > pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
>> > pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
>> > pf50_20111001_FWI.nc
>> > Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
>> > Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
>> > pf50_20111001_20111010_FWI.nc
>> >  NC_GLOBAL#institution=European Centre for Medium-Range Weather Forecasts
>> > Subdatasets:
>> >  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
>> >  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
>> >  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
>> >  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
>> >  ...
>> > [cut]
>> >
>> > When I try to open this dataset with QGIS, this is what I get:
>> > Cannot get GDAL raster band.
>> >
>> > In the console this is what has been logged:
>> >
>> > Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
>> > ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
>> >
>> > Any ideas? Should I open a ticket?
>> > thanks
>> > P
>> >
>> > [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
>> >
>> > --
>> > Paolo Corti
>> > Geospatial software developer
>> > web: http://www.paolocorti.net
>> > twitter: @capooti
>> > skype: capooti
>> > _______________________________________________
>> > Qgis-user mailing list
>> > [hidden email]
>> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>> _______________________________________________
>> Qgis-user mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> --
> Yves Jacolin
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Yves Jacolin
Etienne,

I don't think so as my netcdf have several subdataset. I have a windows pop up
which allow me to choose the subdataset.

Y.
Le mercredi 8 février 2012 20:55:20, Etienne Tourigny a écrit :
> QGis can open a netcdf file which has only 1 variable (along with
> supporting lat/lon or X/Y dimension variables).
> Perhaps that is what works for you?
>
> Etienne
>
> On Wed, Feb 8, 2012 at 5:42 PM, Yves Jacolin (free) <[hidden email]>
wrote:

> > Hello,
> >
> > I successfully did it. But my email won't help you as I don't know why. I
> > guess my gdal binaries from my company has something specific.
> >
> > Y.
> >
> > Le mercredi 8 février 2012 19:59:06, Etienne Tourigny a écrit :
> >> It seems that QGis does not support GDAL raster "subdatasets", I get
> >> this with netcdf and hdf4  files.
> >>
> >> Try this:
> >>
> >> gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk
> >> danger_risk.vrt qgis danger_risk.vrt
> >>
> >> For more information on subdatasets see the GDAL netcdf driver page:
> >> http://www.gdal.org/frmt_netcdf.html
> >>
> >>
> >> It's a pity this doesn't work directly in QGis - anybody know if this
> >> could be fixed/implemented?
> >> It would be great to support subdatasets by adding a layer for each
> >> subdataset, and perhaps even better with a dialog for selecting a
> >> particular subdataset.
> >>
> >> Regards,
> >> Etienne
> >>
> >> On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:
> >> > Hi
> >> > sorry if this has been discussed before, but according to what I see
> >> > here [1] there was not an answer.
> >> >
> >> > I need to open a NetCDF file with QGIS.
> >> > I am using QGIS 1.7.2, and GDAL 1.9.0.
> >> > I can successfully manage NetCDF files with GDAL:
> >> >
> >> > $ gdalinfo --formats
> >> > Supported Formats:
> >> >  ...
> >> >  netCDF (rw+): Network Common Data Format
> >> >  ...
> >> >
> >> > $ gdalinfo Glb_20111001.nc
> >> > Driver: netCDF/Network Common Data Format
> >> > Files: Glb_20111001.nc
> >> > Size is 512, 512
> >> > Coordinate System is `'
> >> > Metadata:
> >> >  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
> >> >  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
> >> > (http://www.mpimet.mpg.de/cdo)
> >> >  NC_GLOBAL#Conventions=CF-1.0
> >> >  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
> >> > af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
> >> > pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
> >> > pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
> >> > pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
> >> > pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
> >> > pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
> >> > pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
> >> > pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
> >> > pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
> >> > pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
> >> > pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
> >> > pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
> >> > pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
> >> > Glb_20111001.nc
> >> > Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
> >> > pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
> >> > Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
> >> > pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
> >> > pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
> >> > pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
> >> > pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
> >> > pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
> >> > pf50_20111001_FWI.nc
> >> > Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
> >> > Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
> >> > pf50_20111001_20111010_FWI.nc
> >> >  NC_GLOBAL#institution=European Centre for Medium-Range Weather
> >> > Forecasts Subdatasets:
> >> >  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
> >> >  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
> >> >  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
> >> >  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
> >> >  ...
> >> > [cut]
> >> >
> >> > When I try to open this dataset with QGIS, this is what I get:
> >> > Cannot get GDAL raster band.
> >> >
> >> > In the console this is what has been logged:
> >> >
> >> > Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
> >> > ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
> >> >
> >> > Any ideas? Should I open a ticket?
> >> > thanks
> >> > P
> >> >
> >> > [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
> >> >
> >> > --
> >> > Paolo Corti
> >> > Geospatial software developer
> >> > web: http://www.paolocorti.net
> >> > twitter: @capooti
> >> > skype: capooti
> >> > _______________________________________________
> >> > Qgis-user mailing list
> >> > [hidden email]
> >> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> >>
> >> _______________________________________________
> >> Qgis-user mailing list
> >> [hidden email]
> >> http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
> > --
> > Yves Jacolin

--
Yves Jacolin
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

pcav
In reply to this post by Etienne Tourigny-3
Il 08/02/2012 19:59, Etienne Tourigny ha scritto:

> It's a pity this doesn't work directly in QGis - anybody know if this
> could be fixed/implemented?
> It would be great to support subdatasets by adding a layer for each
> subdataset, and perhaps even better with a dialog for selecting a
> particular subdataset.

anything can be fixed or implemented.
please anybody consider sponsoring the development of the functions they need.
all the best.
--
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Etienne Tourigny-3
In reply to this post by Yves Jacolin
You have a custom QGis version then? I don't see how this relates to
gdal... Any chance this modification could be integrated into qgis
trunk?

Etienne

On Wed, Feb 8, 2012 at 6:20 PM, Yves Jacolin (free) <[hidden email]> wrote:

> Etienne,
>
> I don't think so as my netcdf have several subdataset. I have a windows pop up
> which allow me to choose the subdataset.
>
> Y.
> Le mercredi 8 février 2012 20:55:20, Etienne Tourigny a écrit :
>> QGis can open a netcdf file which has only 1 variable (along with
>> supporting lat/lon or X/Y dimension variables).
>> Perhaps that is what works for you?
>>
>> Etienne
>>
>> On Wed, Feb 8, 2012 at 5:42 PM, Yves Jacolin (free) <[hidden email]>
> wrote:
>> > Hello,
>> >
>> > I successfully did it. But my email won't help you as I don't know why. I
>> > guess my gdal binaries from my company has something specific.
>> >
>> > Y.
>> >
>> > Le mercredi 8 février 2012 19:59:06, Etienne Tourigny a écrit :
>> >> It seems that QGis does not support GDAL raster "subdatasets", I get
>> >> this with netcdf and hdf4  files.
>> >>
>> >> Try this:
>> >>
>> >> gdal_translate -of vrt NETCDF:"Glb_20111001.nc":cf_DangerRisk
>> >> danger_risk.vrt qgis danger_risk.vrt
>> >>
>> >> For more information on subdatasets see the GDAL netcdf driver page:
>> >> http://www.gdal.org/frmt_netcdf.html
>> >>
>> >>
>> >> It's a pity this doesn't work directly in QGis - anybody know if this
>> >> could be fixed/implemented?
>> >> It would be great to support subdatasets by adding a layer for each
>> >> subdataset, and perhaps even better with a dialog for selecting a
>> >> particular subdataset.
>> >>
>> >> Regards,
>> >> Etienne
>> >>
>> >> On Wed, Feb 8, 2012 at 3:51 PM, Paolo Corti <[hidden email]> wrote:
>> >> > Hi
>> >> > sorry if this has been discussed before, but according to what I see
>> >> > here [1] there was not an answer.
>> >> >
>> >> > I need to open a NetCDF file with QGIS.
>> >> > I am using QGIS 1.7.2, and GDAL 1.9.0.
>> >> > I can successfully manage NetCDF files with GDAL:
>> >> >
>> >> > $ gdalinfo --formats
>> >> > Supported Formats:
>> >> >  ...
>> >> >  netCDF (rw+): Network Common Data Format
>> >> >  ...
>> >> >
>> >> > $ gdalinfo Glb_20111001.nc
>> >> > Driver: netCDF/Network Common Data Format
>> >> > Files: Glb_20111001.nc
>> >> > Size is 512, 512
>> >> > Coordinate System is `'
>> >> > Metadata:
>> >> >  NC_GLOBAL#CDI=Climate Data Interface version 1.4.3
>> >> >  NC_GLOBAL#CDO=Climate Data Operators version 1.4.3
>> >> > (http://www.mpimet.mpg.de/cdo)
>> >> >  NC_GLOBAL#Conventions=CF-1.0
>> >> >  NC_GLOBAL#history=Wed Oct 12 23:30:47 2011: cdo -s -f nc merge
>> >> > af01_20111001.nc af02_20111001.nc pf01_20111001.nc pf02_20111001.nc
>> >> > pf03_20111001.nc pf04_20111001.nc pf05_20111001.nc pf06_20111001.nc
>> >> > pf07_20111001.nc pf08_20111001.nc pf09_20111001.nc pf10_20111001.nc
>> >> > pf11_20111001.nc pf12_20111001.nc pf13_20111001.nc pf14_20111001.nc
>> >> > pf15_20111001.nc pf16_20111001.nc pf17_20111001.nc pf18_20111001.nc
>> >> > pf19_20111001.nc pf20_20111001.nc pf21_20111001.nc pf22_20111001.nc
>> >> > pf23_20111001.nc pf24_20111001.nc pf25_20111001.nc pf26_20111001.nc
>> >> > pf27_20111001.nc pf28_20111001.nc pf29_20111001.nc pf30_20111001.nc
>> >> > pf31_20111001.nc pf32_20111001.nc pf33_20111001.nc pf34_20111001.nc
>> >> > pf35_20111001.nc pf36_20111001.nc pf37_20111001.nc pf38_20111001.nc
>> >> > pf39_20111001.nc pf40_20111001.nc pf41_20111001.nc pf42_20111001.nc
>> >> > pf43_20111001.nc pf44_20111001.nc pf45_20111001.nc pf46_20111001.nc
>> >> > pf47_20111001.nc pf48_20111001.nc pf49_20111001.nc pf50_20111001.nc
>> >> > Glb_20111001.nc
>> >> > Wed Oct 12 23:30:39 2011: cdo -s -f nc merge
>> >> > pf50_20111001_DangerRisk.nc pf50_20111001_FWI.nc pf50_20111001.nc
>> >> > Wed Oct 12 23:30:37 2011: cdo -s -f nc mergetime
>> >> > pf50_20111001_20111001_FWI.nc pf50_20111001_20111002_FWI.nc
>> >> > pf50_20111001_20111003_FWI.nc pf50_20111001_20111004_FWI.nc
>> >> > pf50_20111001_20111005_FWI.nc pf50_20111001_20111006_FWI.nc
>> >> > pf50_20111001_20111007_FWI.nc pf50_20111001_20111008_FWI.nc
>> >> > pf50_20111001_20111009_FWI.nc pf50_20111001_20111010_FWI.nc
>> >> > pf50_20111001_FWI.nc
>> >> > Wed Oct 12 23:30:36 2011: cdo -s -f nc -R chname,var228,pf50_FWI -copy
>> >> > Work0/20111001_fwi/pf50/20111001_20111010_FWI.grib
>> >> > pf50_20111001_20111010_FWI.nc
>> >> >  NC_GLOBAL#institution=European Centre for Medium-Range Weather
>> >> > Forecasts Subdatasets:
>> >> >  SUBDATASET_1_NAME=NETCDF:"Glb_20111001.nc":cf_DangerRisk
>> >> >  SUBDATASET_1_DESC=[10x640x1280] cf_DangerRisk (32-bit floating-point)
>> >> >  SUBDATASET_2_NAME=NETCDF:"Glb_20111001.nc":cf_FWI
>> >> >  SUBDATASET_2_DESC=[10x640x1280] cf_FWI (32-bit floating-point)
>> >> >  ...
>> >> > [cut]
>> >> >
>> >> > When I try to open this dataset with QGIS, this is what I get:
>> >> > Cannot get GDAL raster band.
>> >> >
>> >> > In the console this is what has been logged:
>> >> >
>> >> > Warning: QgsRasterLayer::setDataProvider: Data provider is invalid.
>> >> > ERROR 10: Pointer 'hObject' is NULL in 'GDALGetMetadata'.
>> >> >
>> >> > Any ideas? Should I open a ticket?
>> >> > thanks
>> >> > P
>> >> >
>> >> > [1] http://www.osgeo.org/pipermail/qgis-user/2011-July/012949.html
>> >> >
>> >> > --
>> >> > Paolo Corti
>> >> > Geospatial software developer
>> >> > web: http://www.paolocorti.net
>> >> > twitter: @capooti
>> >> > skype: capooti
>> >> > _______________________________________________
>> >> > Qgis-user mailing list
>> >> > [hidden email]
>> >> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >>
>> >> _______________________________________________
>> >> Qgis-user mailing list
>> >> [hidden email]
>> >> http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >
>> > --
>> > Yves Jacolin
>
> --
> Yves Jacolin
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Yves Jacolin
Hello Etienne,

Le Jeudi 9 Février 2012 11:48:30 Etienne Tourigny a écrit :
> You have a custom QGis version then?
No, only a custom gdal with NetCDF support.

> I don't see how this relates to
> gdal... Any chance this modification could be integrated into qgis
> trunk?

Y.
--
Yves Jacolin

http://yjacolin.gloobe.org
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Can I open NetCDF files with QGIS?

Neil Best
This post has NOT been accepted by the mailing list yet.
In reply to this post by Paolo Corti
Paolo Corti wrote
When I try to open this dataset with QGIS, this is what I get:
Cannot get GDAL raster band.
This used to work in an older version of QGIS (1.6 according to the other thread that Paolo cites; sounds right to me).  There was a dialog that would ask which subdataset to render.  Someone out there must know something about this.  For sure it can be found in the QGIS source code repository, but I'm not familiar with the layout to know where.  Just a humble user.  Let's bring it back!