Re: Netcdf file help

Sumant Jha <[email protected]> Thu, 22 May 2014 08:27:42 -0600
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Hi Joaquim,

Thank you for your reply. I read the cookbook and tried both grdreformat and grd2xyz to access variable - both give me the same error:

grd2xyz geoschem_nestedNA_10_20041011.nc?[time,lev,lat,lon,IJ_AVG_S__BCPI]>IJ_AVG_S__BCPI_10_20041011.xyz
grd2xyz: No 2-D variable in file [geoschem_nestedNA_10_20041011.nc?[time,lev,lat,lon,IJ_AVG_S__BCPI]]

grdreformat geoschem_nestedNA_10_20041011.nc?[time,lev,lat,lon,IJ_AVG_S__BCPI] IJ_AVG_S__BCPI_10_20041011.nc
grdreformat: No 2-D variable in file [geoschem_nestedNA_10_20041011.nc]

I am not sure, why I am getting this error. I can access the variables using matlab, but not GMT?

Regards
Sumant



On May 22, 2014, at 2:56 AM, Joaquim Luis <[email protected]> wrote:

> Poleasse read the cookbook. It explains how to access variables/slices of netcdf files. 
> 
> Sent from my iPadiola
> 
> On 21/05/2014, at 19:35, Sumant Jha <[email protected]> wrote:
> 
>> Hi Rodrigo - 
>> Yes, I did and I end up with the following error. 
>> grd2xyz: No 2-D variable in file [geoschem_nestedNA_10_20041011.nc]
>> 
>> Moreover, I just want to extract one of the many variables. I tried doing it in matlab as well, using the nc_varget command, but the result is a 4D double sized matrix, which I am unable to export. 
>> 
>> Any help/suggestion is appreciated.
>> 
>> Sumant
>> 
>> 
>> On May 21, 2014, at 12:27 PM, Rodrigo Arantes <[email protected]> wrote:
>> 
>>> Hi Sumant, did you tried to use grd2xyz?
>>> 
>>> 
>>> 2014-05-21 14:01 GMT-03:00 Sumant Jha <[email protected]>:
>>> Hi,
>>> 
>>> I am trying to extract 4-D variables (time, lev, lat, lon) from netcdf “.nc” file using GMT to plot it as a surface diagram. I am not sure how to proceed. Can anyone guide me to a set of commands which I can use in GMT to extract that variable from the netcdf file? Or if someone has a script that can extract the variable and export it as text file, that would be great.
>>> 
>>> Thank you.
>>> 
>>> Mailing list for GMT discussions of all kinds.  If you are not sure you have found a bug, discuss it here first.
>>> To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]
>>> Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
>>> 
>>> 
>>> 
>>> -- 
>>> Rodrigo Arantes de Oliveira Alves
>>> Graduando em Geofisica - Lagemar-UFF
>>> 
>>> http://lattes.cnpq.br/0987250599080215
>>> http://www.geomargem.org/
>>> P Antes de imprimir pense em sua responsabilidade  e compromisso com o MEIO AMBIENTE. 
>>> Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first. To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu To unsubscribe, send the message "signoff gmt-help" to [email protected] Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
>> 
>> Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first. To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu To unsubscribe, send the message "signoff gmt-help" to [email protected] Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
> Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first. To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu To unsubscribe, send the message "signoff gmt-help" to [email protected] Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.


Mailing list for GMT discussions of all kinds.  If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to [email protected]
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.