[MITgcm-support] FW: Read NetCDF data (Internal Waves)

Alejandro Jiménez Rico paulexca at hotmail.com
Mon May 2 05:59:56 EDT 2016



From: paulexca at hotmail.com
To: mitgcm-support at mitgcm.org
Subject: RE: [MITgcm-support] Read NetCDF data (Internal Waves)
Date: Mon, 2 May 2016 09:59:24 +0000




Hello Roland,
Thank you for answering me. Actually I am trying to completely understand the Internal Waves model to carry out my own simulations using it.
First of all I would like to get the full matrix data of the .nc output of this model; so I'll can read it in a different ways and more personalized than using ncview (for example, I would like to see the time evolution of velocity in a precise point of the space, like field experiments).
Moreover, I'm trying to get the scale of this model (miles, kilometers, seconds, etc.) and all the information I can find about the performance of the model.
I hope you can help me and - again - really thank you for your help.
Alejandro

From: Roland.Young at physics.ox.ac.uk
To: mitgcm-support at mitgcm.org
Date: Wed, 20 Apr 2016 11:30:55 +0000
Subject: Re: [MITgcm-support] Read NetCDF data (Internal Waves)






Hi Alejandro,



I’m not entirely sure what you are trying to do; ncdump is useful for looking inside a NetCDF file but not for manipulating its contents, which is what I think you are trying to do.



If you want to view the fields themselves I suggest using ncview, which is very useful for doing this quickly. There are other programs that can read in NetCDF files for viewing, such as xconv and Panoply (the second of which is very powerful).



ncdump -c $file should print the values of all the grid variables in the .nc file, typically X, Y, Z, T for longitude, latitude, pressure/height, time. 



ncdump -h $file will just print the headers (i.e. a list of variables in the file).



ncdump -v <variable> $file will print the complete record for a single variable to the screen. For example, ncdump -v U $file will print the entire zonal velocity field in the .nc file to the screen. This is not particularly useful if you want to manipulate
 the data, however.



You can manipulate NetCDF files directly using the NCO library: http://nco.sourceforge.net



However, most useful for manipulating the data itself rather than just view it using ncview is an interpreter such as IDL, Matlab, or Python. Each of these have libraries to read NetCDF files, after which you can do what you like with the data.



Don’t forget that if you are running a parallel model run you will need to stitch the tiles together using gluemncbig, otherwise each .nc file only contains one tile’s worth of data.






Hope that helps,



Roland















On 20 Apr 2016, at 11:52, Alejandro Jiménez Rico <paulexca at hotmail.com> wrote:



Hello, I am trying to figure out how to read all the netcdf data using ncdump. I did $ ndump -c filetoread.nc



But I would want to organize all this data a little bit. How do I do this? I don't find information about the dimensions or the variables of this NetCDF in the mitgcm documentation.



Thank you,
Alejandro

_______________________________________________

MITgcm-support mailing list

MITgcm-support at mitgcm.org

http://mitgcm.org/mailman/listinfo/mitgcm-support








_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mitgcm.org/mailman/listinfo/mitgcm-support 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160502/a246d46c/attachment.htm>


More information about the MITgcm-support mailing list