31 if ((contfp = fopen(
"hecmw_vis.ini",
"r")) ==
NULL) {
33 if ((contfp = fopen(contfile,
"r")) ==
NULL)
59 int visual_id, init_flag, fg_text;
77 "ERROR: HEC-MW-VIS-E0009: Cannot open output directory");
83 for (visual_id = 0; visual_id <
psf->
num_of_psf; visual_id++) {
85 fprintf(stderr,
" Start visualize PSF %d at timestep %d\n",
86 visual_id + 1, timestep);
93 if (timestep >= 1000) {
94 sprintf(outfile1,
"%s_psf%d.%d", outfile, visual_id + 1, timestep);
95 sprintf(body,
"%s_psf%d.%d", buf1, visual_id + 1, timestep);
96 }
else if ((timestep >= 100) && (timestep <= 999)) {
97 sprintf(outfile1,
"%s_psf%d.0%d", outfile, visual_id + 1, timestep);
98 sprintf(body,
"%s_psf%d.0%d", buf1, visual_id + 1, timestep);
99 }
else if ((timestep >= 10) && (timestep <= 99)) {
100 sprintf(outfile1,
"%s_psf%d.00%d", outfile, visual_id + 1, timestep);
101 sprintf(body,
"%s_psf%d.00%d", buf1, visual_id + 1, timestep);
102 }
else if (timestep <= 9) {
103 sprintf(outfile1,
"%s_psf%d.000%d", outfile, visual_id + 1, timestep);
104 sprintf(body,
"%s_psf%d.000%d", buf1, visual_id + 1, timestep);
107 if (timestep >= 1000) {
108 sprintf(outfile1,
"%s_psf.%d", outfile, timestep);
109 sprintf(body,
"%s_psf.%d", buf1, timestep);
110 }
else if ((timestep >= 100) && (timestep <= 999)) {
111 sprintf(outfile1,
"%s_psf.0%d", outfile, timestep);
112 sprintf(body,
"%s_psf.0%d", buf1, timestep);
113 }
else if ((timestep >= 10) && (timestep <= 99)) {
114 sprintf(outfile1,
"%s_psf.00%d", outfile, timestep);
115 sprintf(body,
"%s_psf.00%d", buf1, timestep);
116 }
else if (timestep <= 9) {
117 sprintf(outfile1,
"%s_psf.000%d", outfile, timestep);
118 sprintf(body,
"%s_psf.000%d", buf1, timestep);
122 outfile1, body, VIS_COMM);
129 for (visual_id = 0; visual_id <
pvr->
num_of_pvr; visual_id++) {
131 fprintf(stderr,
" Start visualize PVR %d at timestep %d\n",
132 visual_id + 1, timestep);
138 if (timestep >= 1000)
139 sprintf(outfile1,
"%s_pvr%d.%d", outfile, visual_id + 1, timestep);
140 else if ((timestep >= 100) && (timestep <= 999))
141 sprintf(outfile1,
"%s_pvr%d.0%d", outfile, visual_id + 1, timestep);
142 else if ((timestep >= 10) && (timestep <= 99))
143 sprintf(outfile1,
"%s_pvr%d.00%d", outfile, visual_id + 1,
145 else if (timestep <= 9)
146 sprintf(outfile1,
"%s_pvr%d.000%d", outfile, visual_id + 1,
149 if (timestep >= 1000)
150 sprintf(outfile1,
"%s_pvr.%d", outfile, timestep);
151 else if ((timestep >= 100) && (timestep <= 999))
152 sprintf(outfile1,
"%s_pvr.0%d", outfile, timestep);
153 else if ((timestep >= 10) && (timestep <= 99))
154 sprintf(outfile1,
"%s_pvr.00%d", outfile, timestep);
155 else if (timestep <= 9)
156 sprintf(outfile1,
"%s_pvr.000%d", outfile, timestep);