...
Create a new Macro icon and rename it outputs. Write a macro code to read the file z500.grib and visualise it on the screen when executed and saved but saves it to a PNG PDF if run in batch mode . For any other run mode the output should be saved as a PostScript file.and saved somewhere into /tmp.
- Run the code in the Macro Editor and see what happens if your execute the macro.
- Go on the command line and change to the directory where the macro is located. Execute the macro from the command line outside Metview.
Pages and page layout
Some graphical formats, such as PostScript and PDF, allow multiple pages within the documents. Other formats, such as PNG, will contain a single page at the time and therefore contain a number in their filename to indicate which page they contain. You can trigger a new page in Metview Macro with the function
newpage(...)
This function is normally used within loops to generate output of each iteration on a separate page (or file).
...