Re : Re: [GMT-HELP] Netcdf file help

"fabien.retif" <[email protected]> Thu, 22 May 2014 16:41:54 +0200
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Sumant,

grd2xyz geoschem_nestedNA_10_20041011.nc?IJ_AVG_S__BCPI[time,lev] &gt; IJ_AVG_S__BCPI_10_20041011.xyz

netcdf.nc?varName[time_index,lev_index,.....,Ndim_index]

Fabien

---- Le jeu., 22 mai 2014 16:27:42 +0200 Sumant Jha&lt;[email protected]&gt; a écrit ---- 


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]&gt;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 &lt;[email protected]&gt; 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 &lt;[email protected]&gt; 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 &lt;[email protected]&gt; wrote:

Hi Sumant, did you tried to use grd2xyz?


2014-05-21 14:01 GMT-03:00 Sumant Jha &lt;[email protected]&gt;:
 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. 



_.-~-._.-~-._.-~-._.-~-._.-~-._ 
PhD. Fabien Rétif
Géosciences Montpellier
UMR 5243 - CC 60
Universite Montpellier II
Bat 22 - Bureau 468
Place Eugène Bataillon
34095 Montpellier Cedex 5
France
Tel : +33 (0)4.67.14.35.85
_.-~-._.-~-._.-~-._.-~-._.-~-._ 



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.