ncar_goes_rast
Remaps GOES data
from our NCAR source, does thermal band subtraction, and injects coastlines,
temperature scale, legend, etc., and outputs them as a sunraster
Inputs
- Master file named Master, generated using Terascan command master file.
- Terascan GOES data file in standard format from NCAR
(e.g.) g8.97064.2245.msub where:
- g8=goes 8
- 97064=year and julian date
- 2245=start time of scan
Output
- Registered GOES data file (*.reg) containing all of the bands
of the input file, and a 4m5 temperature difference file.
- A byte scaled sunraster graphic image containing:
- Coastline
- Latitude and Longitude Grid
- Temperature Scale
- Automated Legend
- GIF version of the sunraster output
The script is below between the horizontal rules.
#!/bin/sh
for I in `ls $1*.msub | cut -c1-13 | sort | uniq`
do
echo $I
echo doing registration
fastreg master_file="Master" \
include_vars="*" \
poly_size="" \
$I.msub $I.reg
echo $I.reg is done
echo doing subtraction
emath expr_vars="gvar_ch4 gvar_ch5" \
expression="x1-x2" \
var_name="4m5" \
var_units="" \
var_type="fl" \
$I.reg $I.4m5
echo copying variable 4m5
copyvar include_vars="4m5" \
overwrite_vars="no" \
$I.4m5 $I.reg
\rm $I.4m5
echo Scaling image
imscale include_vars="gvar_ch4" \
image_colors="240" \
max_width="640" \
max_height="480" \
fixed_size="" \
zoom_factor="" \
real_resample="" \
est_range="no" \
min_value="-40" \
max_value="20" \
invert_scale="" \
north_up="" \
$I.reg $I.byte
echo making Coast File
coast master_file="Master" \
reduce_factor="" \
coast_file="" \
Coast
echo making llgrid
llgrid master_file="Master" \
grid_type="lines" \
delta_lat="5" \
delta_lon="5" \
label="yes" \
LLgrid
echo making wedge
wedge master_file="Master" \
wedge_lines="30" \
wedge_samples="640" \
wedge_dir="right" \
text_height="16" \
text_type="bold" \
two_color_text="no" \
line_offset="40" \
sample_offset="0" \
scale_min="-40" \
scale_max="0" \
invert_scale="no" \
label_base="-40" \
label_step="5" \
discrete_steps="no" \
outline="no" \
Wedge
echo making Legend
legend line_1="GOES-8 Band 4 Brightness Temperature (C) %pass_date %start_time UT" \
line_2="Michigan Techological University: Data Courtesy of NCAR" \
line_3="" \
text_height="16" \
text_type="bold" \
line_offset="0" \
sample_offset="0" \
full_width="yes" \
center_text="no" \
outline="yes" \
solid_bg="yes" \
$I.reg Legend
echo injecting!!
xinject bg_var_name="gvar_ch4" \
colors_per="2" \
meta_colors="240 241 242 243 244 245 246 247" \
line_widths="2 2 2 2" \
line_types="solid dotted solid solid" \
marker_types="" \
marker_sizes="" \
image_colors="240" \
$I.byte Coast LLgrid Wedge Legend $I.inject
echo almost there
expim image_format="sunraster" \
image_var="gvar_ch4" \
image_colors="240" \
color_palette="goes_b4" \
draw_indexes="240 241 242 243 244 245 246 247" \
draw_names="red red white white white black black yellow" \
$I.inject $I.ras
\rm $I.byte $I.inject
done
This page maintained by Dave Schneider (djschnei@mt
u.edu)