|
|
NCX, Matlab NetCDF eXplorer,
Dec 2005
In this tutorial are used three NCEP NetCDF files.
• After installing NCX (installation instruction are available in the next section, download,
basically you just need to unpack it!) execute ncx at the matlab prompt, you will get the NCX interface (click on the image to enlarge).
• Load one NetCDF file: menu file -- load
In the first popupmenu you can select on the files loaded. In the next popupmenu, select the variable
to use. After this the rows with the dimension's names and values will be generated. The three edit boxes per
dimension indicate the extraction range: ind1:ind2:ind3. They can be edited or changes in the buttons >
and <. Now you can select between pcolor or contour in the rediobuttons. If your choice was contour,
you can also specify the contour values in the edit box contours. Now just press disp and the slice
will be plotted. if the disp radiobutton is checked, when the dimensions are changed the plot is done
automatically.
• Select X and Y: bottom frames
Use again the popupmenus to choose the files and variables to be used as X and Y.
The change in the dimensions of the main variable will also occur fo these variables, in the same
dimensions names.
In the figure were used contours and added contour labels (button clab at the main frame).
When using X and Y, a coastline is added by default. To remove it, uncheck the menu file -- add coastline.
If you don't want to use X and Y, select the first option at the variables popupmenu (--select--).
• Plot current fields
First you need to use two variables as u and v. For this add another frame at the menu ncx -- two vars.
Now, load another file and select the desired file and variable at the second frame.
Other options are now available at the second frame:
⇒ Choose between current field and contour: the second variables can be used as v in a current field or just be added as
contours over the main variable plot.
⇒ In case of using contours the contour values can be selected, clabels can be added and the contours color can be chosen
(button c)
⇒ In case of using uv field, by defaul the arrows color are scaled with the current speed, sqrt(u^2+v^2),
but you can choose one color for the arrows. In the last line at right there are one check box, on button c and one edit box.
The checkbox means you will use color chosen by c, and the edit box is the scale used for the arrows.
⇒ At the first time you plot the currents field the scale is automatic, in the current case, the value is 170. This value means
that one arrow with intensity 170 will have length of one inch, so the higher value you edit, the smaller arrows will be!
• Zooming
At the bottom left of the interface there are the checkbox ref, the buttons + and - and one edit box between.
When ref is checked, one cross is added at the centre of the axes. This cross is the zoom reference point. It can be dragged
to any other point and the axes limits change automatically so that the cross remain always at the centre.
The zooming is done with the buttons + and - and the zoom value is shown at the edit box.
In the figure at right, the current zoom is value is 2.
• Add one third variable
Add another frame at the menu ncx -- three vars
In the example at right, another file was loaded and th pcolor on the third variable is done together with the arrows field.
The color of the arrows was now changed to white.
• If you wanna use only tow variables again, you can change the number of frames in the menu ncx or simply select
the first item at the variables popupmenu. In the image is used pcolor for the first variable and the same variable
is used in the second frame, but plotted as contour, with white lines. The zoom value is now 1.
• Important:
⇒ The edit fields, namely, the caxis (under the axes) and the contours are used as try-catch-end. It means they are used
if they have values in a correct form, for instance if you use caxis as -10 10, it is used but to use the default caxis
you should write something wrong at this edit box, like the string "anything".
⇒ you edit the dimensions range edit boxes, but the values written are not verified, so edit something valid!
⇒ The variables X and Y are used if they have valid values, for instance if pcolor(x,y,v) is not valid, then pcolor(v)
is done!
|