%isolat1; %isolat2; %isogrk3; %isopub; %isotech; %isonum; ] >
Mini Guide for Basic Commands in the XXX Program Sébastien Masson Sebastien.Masson_at_locean-ipsl.upmc.fr Albert Fisher Françoise Pinsard Francoise.Pinsard_at_locean-ipsl.upmc.fr Steve Navarro IDL SAXO xxx 0.0 May 29, 2000 French release by Sébastien Masson 0.1 July, 2002 Translation by Albert Fisher 0.2 July 20, 2006 HTML to XML/Docbook migration by Françoise Pinsard 1.0 August, 2006 Major update by Steve Navarro 1.1 September, 2006 Review by Sébastien Masson 1.2 April 2008 migration from DocBook 4.2 to Docbook 5.0 $Id$ Launching XXX There is several ways to launch XXX which we will detail in the next sections: &promptidl; xxx &promptidl; xxx, /separate &promptidl; xxx, restore = 'file.dat' &promptidl; xxx, 'file.nc' &promptidl; xxx, 'file.nc', keywd1 = …, keywd2 = … &promptidl; xxx, 'file.nc', 'initgrid' &promptidl; xxx, 'file.nc', 'initgrid', keywd1 = …, keywd2 = … &promptidl; xxx, 'file.nc', 'initgrid', 'arg1, arg2, …' <prompt>&promptidl;</prompt> <userinput><command>xxx</command></userinput> A window will open with 3 parts to consider.
Window xxx 1 Data file name Grid initialization method Grid initialization parameters
Data file name The name of the data file. It can be typed directly in the window provided, or selected with the help of the browse button. Grid initialization method For visualising grilled data, you need to define the grid on which are located the data. By default, automatic grid construction with initncdf.pro is checked. This means that the grid will be defined by using the informations contained in the data file (through the IDL prodecure initncdf) without needing any other auxiliary file. If you checked grid construction with other IDL batch or procedure, this means that you don't want to use the default initncdf procedure to define the grid and you will provide your own IDL procedure or the so-called IDL batch file (a file which is called by using @, see IDL documentation). Grid initialization parameters This third part allows you to specify the name, the argument and the keywords of the routine you want to use to initialize the grid. By default the name of the procedure is initncdf, its argument will be automatically defined so you cannot change them. If you checked grid construction with other IDL batch or procedure, you have to select the name of the IDL procedure or batch file and its suitable arguments and keywords. Note that if you select an IDL batch file you cannot give any parameter or keyword.
Window xxx 1
Once these two lines have been completed, click on let's go. For example, we choose the IDL batch file tst_initlev. Compare the result with automatic grid construction with initncdf.pro checked. Cf
Oceania at 125 meters of depth with proper grid initialization
<prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>/separate</parameter></userinput> This is the same as the simple except that once the xxx window open, you will have 2 separate windows (command and plotting window) instead of one. <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>restore = 'file.dat'</parameter></userinput> In that case xxx window will open directly in the same state as it was when the file file.dat was created. see . <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>'file.nc'</parameter></userinput> In this case, the xxx window directly open the data file file.nc and build the grid automatically with the IDL procedure initncdf. For example: &promptidl; xxx, 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>'file.nc'</parameter>, <parameter>keywd1 = …</parameter>, <parameter>keywd2 = …</parameter></userinput> In this case, the xxx window directly open the data file file.nc, build the grid automatically with the IDL procedure initncdf and use the keywords keywd1 = …, keywd2 = … in the call of initncdf. For example: &promptidl; xxx, 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc', useasmask = 'votemper', missing_value = 31.0720 <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>'file.nc'</parameter>, <parameter>'initgrid'</parameter></userinput> In this case, the xxx window directly open the data file file.nc and build the grid directly with the IDL procedure or batch file initgrid &promptidl; xxx, 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc', 'tst_initorca2' <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>'file.nc'</parameter>, <parameter>'initgrid'</parameter>, <parameter>keywd1 = …</parameter>, <parameter>keywd2 = …</parameter></userinput> In this case, the xxx window directly open the data file file.nc, build the grid directly with the IDL procedure initgrid and use the keywords keywd1 = …, keywd2 = … in the call of initgrid. <prompt>&promptidl;</prompt> <userinput><command>xxx</command>, <parameter>'file.nc'</parameter>, <parameter>'initgrid'</parameter>, <parameter>'arg1, arg2, …'</parameter></userinput> In this case, the xxx window directly open the data file file.nc, build the grid directly with the IDL procedure initgrid and use the string 'arg1, arg2, …' to specify the input arguments in the call of initgrid.
Description of XXX window
Window xxx 2 Plot type Menu OK Page layout Variables list Files list Command text Calendar Domdef Spefications
Plot type list Allows specification of the type of plot desired.
Different plot types available
If the type plt is selected, the selection of plot type is made by mouse. Cf
The menu bar made up of 3 sub-menus <guibutton>File</guibutton> sub-menu
The File menu
Open: to open a new file. Same procedure as during the . The new file can be on a different grid, with different variables, with a different time base … New XXX: to open a second XXX window identical to the first one. Quit: to close the XXX window.
<guibutton>Save As</guibutton> sub-menu
The Save As menu
Postscript: to save the plotting window in Postscript format Animated gif: to create an animation of the plotting window. The creation of an animation is only possible if none of the plots have a time axis, and if the plots are all on the same time base (calendar). On the other hand, animations of horizontal and vertical plots, with different color palettes (for those not on an X-terminal), are possible. The creation of animations has a tendency to saturate the video memory of X-terminals, crashing the entire program … Gif: to save a gif of the plotting window. IDL procedure: to save the command history that has created the plot in an IDL procedure that can be re-executed later. For example if I save the commands in xxx_figure.pro file, when ever I want, I can then launch a new IDL session and type: &promptidl; @init &promptidl; xxx_figure and I'll obtain the saved figure. &promptidl; xxx_figure,/post or &promptidl; @ps will then create a Postscript file of the figure. RESTORE kwd of xxx: to save the xxx widget (all buttons and parameters stored in memory …) in a binary file in order to quit xxx and relaunch it later like in and get exactly the same configuration. Print to prompt: lists in the IDL window the command history that created the last plot. Useful primarily for debugging…
<guisubmenu>Flag options</guisubmenu> sub-menu
The <guisubmenu>Flag option</guisubmenu> menu
Portrait/Landscape: changes the configuration of the plot. Overlay: to plot contours of a different field on top the one represented as color-filled contours. It is necessary to relaunch the entire plot to make this work! Vecteur: to plot a vector field on top of contours. Only works on horizontal plots (plt.pro). As for Overlay, a relaunch of the entire plot is necessary. Longitude / x index: switches longitude labeling of the plot sub-domain from degrees to indexes following i. Latitude / y index: switches latitude labeling of the plot sub-domain from degrees to indexes following j. Careful, a selected option remains selected until it is re-clicked.
OK button Click on this OK button is required to make a new plot appear Page Layout Specify the number of columns and rows for plots on the sheet of paper.
Number of Column
Example: For 2 columns and 2 rows
List of variables You can choose the variable to work on.
Example of different variables available
List of open files You can choose the file to work on.
Example of list of open files
<guimenuitem>Command text</guimenuitem><!--++ textarea--> To specify in the widget part number 7 the computation you want to do on the data In all cases bellow, the name given to a field (a, b, c, …) is of no importance. Linear calculation If you want to make basic linear computation (like difference between fields, add/multiply by a constant …), you can simply put the following commands: a - bnumb1*aa + numb or any command with the following format numb1*a + numb2*b + numb3*c … + numb where numb1, numb2, … correspond to numbers and a, b, c … will be the data to read. Any kind of computation If you want to make a computation more complicated than a basic linear you must designate the data you want to read between "" (with anything in between the "). For example: "a"^2"a" - abs("b")grad("a", 'x') Calendar The calendar is made up of two drop-lists, which allow specification of two dates, the beginning and end of a time series, or the period over which to average before plotting.
Example: first plot in January, second plot is from January to December
Define the domain A series of widgets that allow specification of the min/max limits of the domain in longitude/x-index, latitude/y-index, and depth in levels or meters.
Domain by default
Change Domain area: zoom on Oceania
This configuration give us:
Change depth area: between depth 125 and 126
temperature of the ocean at depth 125 meters without proper land/sea mask
As you can see, at this depth, we better define a land/sea mask when loading the grid. Cf
Specify your plot Specify min, max and contour interval
min, max, and contour interval specifications
You can restore configuration by default by pressing the Default button. The path of the file definedefaultextra.pro that defines the default values for each variable names is displayed when the cursor hovers over the button Default. This file contains a case statement based on the name of the variable and defining the min, max, contour interval and other keywords that should be used as default for the specified variable. You can copy this file in your own ${HOME}/My_IDL/ directory and easily modify it to suit your favorite default values.
Specify the palette to be used For the color palette, you can either specify the name or go search for one among the palettes available.
The Color menu
Add any keyword The keywords window allows specification of all desired keywords. There is a few examples of the use of this keywords window.
Without any additional keyword
Add <varname>/realcont</varname> keyword
Graphic with <varname>/realcont</varname> keyword
Add <userinput>/realcont, map=[90,0,0], /ortho, cell_fill=2</userinput> keywords
Graphic with <literal>/realcont, map=[90,0,0], /ortho, cell_fill=2</literal> keywords
Mouse Actions In the graphics window on a horizontal plot Select a domain and select the horizontal plot (plt), vertical plot (pltz), or the hovmoeller plot (pltt): The domain we'd like to select for the plot is determined by one of its diagonals, defined therefore by two points. The first point is defined when the mouse button is pushed, then the mouse is moved, and the second point is defined as the mouse button is released (click-drag). The domains are thus defined by a long click (LC). To determine which type of plot should be made of selection, use: If the plot selector is on plt the left mouse button to create horizontal plots (plt) the middle mouse button to create vertical plots (pltz) the right mouse button to create common hovmoellers for xt and yt cuts (pltt) In summary:
<abbrev>LCL</abbrev>---><constant>plt</constant>
Horizontal Plot
<abbrev>LCM</abbrev>---><constant>pltz</constant>
Vertical Plot
<abbrev>LCR</abbrev>---><constant>pltt</constant>
Common hovmoeller for xt and yt cuts
If the plot selector is on something other than plt the indicated plot type is made.
Create multiple plots on the same sheet and make them interact Select the number of columns and rows for the page. Create a first plot. It will appear in the first frame. To create a plot in another frame double-click in the frame with the middle button (DCM). A black dotted frame will surround the designated frame, the target frame. A black frame will surround the first plot. This is the reference frame, in other words the one that all the XXX widgets refer to. Change for example the date and create a new plot. With a left button double-click in the first frame, all the widgets change and refer again to the first plot. A double-click with the right button in the second frame will erase the plot. In summary:
<abbrev>DCL</abbrev>---><quote>reference</quote> frame
The <quote>reference</quote> frame is selected
<abbrev>DCM</abbrev>---><quote>target</quote> frame
The <quote>target</quote> frame is selected
<abbrev>DCR</abbrev>--->erase the frame
Here's a series of commands to show how this works. Load xxx with the command: &promptidl; xxx, 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc', 'tst_initorca05' Select a 3-D field and create 6 frames for the sheet of paper. Create a horizontal plot in Frame 1 DCM in frame 2, LCL on the plot in frame 1 to create a horizontal zoom in frame 2. DCM in frame 3, LCM on the plot in frame 1 to create a vertical cut in frame 3. DCM in frame 4, LCR on the plot in frame 1 to create a hovmoeller in frame 4.
Frame with four plot
To redo the hovmoeller with the keyword /nocontour DCL in frame 4 which now becomes the reference and target frame. Add the keyword /nocontour
Command text area
Click OK, and the plot is redone.
The fourth plot with the keyword "nocontour"
In frame 5, let's create the same plot as in frame 2 except we use pltv instead of plt DCL on frame 2 DCM on frame 5 Change plt for pltv Click on OK
Frame with five plot
What should I do when it breakdown In the IDL window type (as many time you click on a button since a problem occurs in xxx !!!), &promptidl; retall In the IDL window, type &promptidl; domdef DCR to erase the problem frame. change the orientation of the plot by pressing Flag options Portrait/Landscape. Cf quit XXX cleanly using quit from the File menu. Cf Always avoid if at all possible closing and killing the XXX window, but rather select quit from the File menu. XXX uses a large number of pointers, and want only killing the window will leave a large number of unused variables in memory, which could in the end overflow. To clean up this memory: &promptidl; ptr_free, ptr_valid()