The m3probe program extracts the time series for a specified variable for a specified set of points from a GRIDDED, BOUNDARY, or CUSTOM input file, and writes the resulting time series as columns to a (human-readable) ASCII REPORT-file. Points to be extracted are specified in terms of grid or CUSTOM-array subscripts.Source code for program
m3probe
is available under the GNU GPL License, Version 2, can be found here, and can be downloaded from the CMAS web site as part of the I/O API (version 3.2 or later) distribution tar-ball from this page, or here from GitHub.
setenv INFILE <path name> setenv REPORT <path name> m3probe [and answer the prompts]where INFILE is the logical name of the input data file, and REPORT is the logical name of the report file to which the ASCII time series report is printed. INFILE must be of typeGRDDED3
,CUSTOM3
, orBNDARY3
. The program will prompt you for the starting and ending date and time and the time step for the report period, the variable to be reported, and (repeatedly) for the grid/vector coordinates for the selected set of points to be reported. End the list of points with a zero (0
) response to the relevant prompt forGRDDED3
orCUSTOM3
files, or-9999
forBNDARY3
files. Default values for the time period are computed from the metadata in the INFILE header, and may be accepted by hitting theRETURN
key. At most 256 points will be accepted for the report (and that will give very long lines :-).If you want to run this program in batch mode (from a script), the recommended way to develop the script is to run the program once interactively noting the pattern of responses to prompts which generate the particular analysis you want. The pattern of responses then becomes either a command-input file which is redirected into the program in the script, or becomes a "here-document" fed into the execution. The following is an excerpt of a script that probes a SMOKE MTMP file (a degenerate GRIDDED file with in this case
NCOLS=1
,NROWS=402768
, andNLAYS=1
, and starting date and time2013239:000000
, time step one hour (10000
, andMXREC3=25
time steps (hence ending date and time2013240:000000
) for variable TSFC:
... setenv INFILE ${data}/mtmp.2011ec_test.base.2013239.ncf setenv REPORT ${data}/SPEED.base.2013239.txt set UI = /tmp/speed.$$ echo "Yes " >& ${UI} # Yes, continue with program echo " " >> ${UI} # default starting date for run echo " " >> ${UI} # default starting time echo " " >> ${UI} # default time step echo " " >> ${UI} # default ending date echo " " >> ${UI} # default ending time echo "TSFC " >> ${UI} # name of the variable to be reported echo "1 " >> ${UI} # col for first point to be reported echo "4000 " >> ${UI} # row for first point... echo "1 " >> ${UI} # col for second point... echo "5000 " >> ${UI} # row for second point... echo "1 " >> ${UI} # col for third point... echo "7000 " >> ${UI} # row for third point... echo "0 " >> ${UI} # no more points to process m3probe < ${UI} set foo = ${status} if ( ${foo} != 0 ) then rm ${UI} echo "### ERROR ${foo} in program M3PROBE" endif exit ( ${foo} )The output file for this run has four columns—the first column for the date and time, and one column for each of the requested points(1,4000)
,(1,5000)
,(1,7000)
as given below. Note that this is purely a "stream" output, with no header labelling:2013239:000000 2.554426E+01 1.913849E+01 4.619951E+01 2013239:010000 1.978079E+01 1.408707E+01 3.635555E+01 2013239:020000 1.551156E+01 1.081431E+01 2.964375E+01 2013239:030000 1.174040E+01 8.181883E+00 2.170146E+01 2013239:040000 8.538472E+00 6.189772E+00 1.476595E+01 2013239:050000 6.546162E+00 4.197662E+00 9.284647E+00 2013239:060000 5.051929E+00 3.770781E+00 6.376203E+00 2013239:070000 4.838467E+00 4.055368E+00 5.705024E+00 2013239:080000 5.051929E+00 4.766836E+00 7.047382E+00 2013239:090000 7.755778E+00 8.039589E+00 1.196936E+01 2013239:100000 1.558271E+01 1.892505E+01 2.886071E+01 2013239:110000 2.974234E+01 4.026909E+01 5.727396E+01 2013239:120000 4.212313E+01 5.385813E+01 7.427718E+01 2013239:130000 4.681928E+01 5.777121E+01 6.879588E+01 2013239:140000 4.411544E+01 4.432446E+01 6.163663E+01 2013239:150000 4.518275E+01 4.268808E+01 6.074173E+01 2013239:160000 4.788659E+01 4.489363E+01 6.309085E+01 2013239:170000 4.838467E+01 4.496478E+01 6.521626E+01 2013239:180000 5.016352E+01 5.129685E+01 6.655861E+01 2013239:190000 5.222698E+01 5.592139E+01 7.304668E+01 2013239:200000 5.400583E+01 5.905185E+01 8.266692E+01 2013239:210000 5.016352E+01 5.165258E+01 8.658212E+01 2013239:220000 4.226543E+01 3.742322E+01 7.975848E+01 2013239:230000 3.251735E+01 2.525712E+01 6.085359E+01 2013240:000000 2.554426E+01 1.913849E+01 4.619951E+01
To: Models-3/EDSS I/O API: The Help Pages