The script diag_table_tk is a GUI written in Perl/Tk for building diagnostics tables, which are used by the Diagnostics Manager for run-time specification of diagnostics.
The diagnostics table allows users to specify sampling rates and the choice of fields at run time. The table consists of comma-separated ASCII values and may be hand-edited. The preferred method of building a table is to use the provided GUI interface diag_table_tk. A default diag table is provided with each runscript.
The table is separated into three sections. Sign # is used for comment in diag_table.
"file_name",output_freq,"output_freq_units",format,"time_units","time_long_name","new_file_freq","new_file_freq_unit","start_time" output_freq: > 0 output frequency in "output_units" = 0 output frequency every time step =-1 output frequency at end of run output_freq_units = units used for output frequency (years, months, days, minutes, hours, seconds) format: 1 NetCDF (this is the ONLY supported format) time_units = units used to label the time axis (days, minutes, hours, seconds) new_file_freq: frequency for closing existing file and creating a new file. new_file_freq_unit: time units for new_file_freq (from seconds to years) start_time: time to start the file for the first time
Note: "new_file_freq","new_file_freq_unit","start_time" are optional
"module_name", "field_name", "output_name", "file_name" "time_sampling", time_avg, "other_opts", packing module_name : e.g. "atmos_mod", "land_mod" time_avg = .true. or .false. packing = 1 double precision = 2 float = 4 packed 16-bit integers = 8 packed 1-byte (not tested?) other_opts is used to specify bounds of a region in regional output
"diag manager test" 1999 1 1 0 0 0 #output files 10_days, 10, "days",1,"hours","Time" temp_local, 1, "days",1,"hours","Time" "file1_hr%hr3", 5, "days",1,"hours","Time", 15, "days" "file2_yr_dy%yr1%dy3", 5, "days",1,"hours","Time", 10, "days", "1 1 7 0 0 0" #output variables "ice_mod","ice","ice","10_days","all",.false.,"none", 2 "ocean_mod","temp", "temp","temp_local", "all",.false., "5 259.5 -59.5 59.5 1 1", 2
use English; use Tk; use Cwd; require Tk::FileSelect; require Tk::Text; use Tk::widgets qw/Dialog ErrorDialog ROText/; use Tk::FileDialog; use Tk::Balloon; use File::Find;
Most of these are built by default in perl 5.004 and above; however, you may need to install the perl Tk modules.
Obtain Tk and Tk-FileDialog from:
http://www.cpan.org
Obtain Tk and Tk-FileDialog in RPM (red hat package manager) format
from:
http://rpmfind.net/linux/rpm2html/search.php?query=perl-Tk
http://rpmfind.net/linux/rpm2html/search.php?query=perl-Tk-FileDialog
The Show Table window should be opened by default when you click "modify table a" or "modify table b". Visual feedback is good.
It should warn you if you make changes and quit without saving.