27 #include "sll_working_precision.h"
49 sll_real64,
dimension(nx, ny) :: xcoord
50 sll_real64,
dimension(nx, ny) :: ycoord
51 character(len=*) :: label
59 open (file=label//
'.mtv', &
65 write (file_id,
"(a)")
"$DATA=CURVE2D"
66 write (file_id,
"('% xmin=',f7.3,' xmax=', f7.3)") minval(xcoord), maxval(xcoord)
67 write (file_id,
"('% ymin=',f7.3,' ymax=', f7.3)") minval(ycoord), maxval(ycoord)
68 write (file_id,
"(a)")
"% equalscale=T"
69 write (file_id,
"(a)")
"% spline=1"
70 write (file_id,
"(a)")
"% markertype=2"
71 write (file_id,
"(a)")
"% pointID=F"
72 write (file_id,
"(a)")
"% toplabel='"//label//
"' "
76 write (file_id, *) xcoord(i, j), ycoord(i, j)
82 write (file_id, *) xcoord(i, j), ycoord(i, j)
87 write (file_id,
"(a)")
"$DATA=CURVE2D"
88 write (file_id,
"('% xmin=',f7.3,' xmax=', f7.3)") minval(xcoord), maxval(xcoord)
89 write (file_id,
"('% ymin=',f7.3,' ymax=', f7.3)") minval(ycoord), maxval(ycoord)
90 write (file_id,
"(a)")
"% equalscale=T"
91 write (file_id,
"(a)")
"% spline=1"
92 write (file_id,
"(a)")
"% markertype=2"
93 write (file_id,
"(a)")
"% pointID=F"
94 write (file_id,
"(a)")
"% toplabel='"//label//
" with numbers' "
98 write (file_id, *) xcoord(i, j), ycoord(i, j)
104 write (file_id, *) xcoord(i, j), ycoord(i, j)
112 x1 = 0.25_f64*(xcoord(i, j) + xcoord(i + 1, j) + xcoord(i, j + 1) + xcoord(i + 1, j + 1))
113 y1 = 0.25_f64*(ycoord(i, j) + ycoord(i + 1, j) + ycoord(i, j + 1) + ycoord(i + 1, j + 1))
114 write (file_id,
"(a)", advance=
"no")
"@text x1="
115 write (file_id,
"(g15.3)", advance=
"no") x1
116 write (file_id,
"(a)", advance=
"no")
" y1="
117 write (file_id,
"(g15.3)", advance=
"no") y1
118 write (file_id,
"(a)", advance=
"no")
" z1=0. lc=4 ll='"
119 write (file_id,
"(2i3)", advance=
"no") i, j
120 write (file_id,
"(a)")
"'"
124 write (file_id, *)
"$END"
Create the mtv file to plot a structured mesh (cartesian or curvilinear)
Implements the functions to write data file plotable by Plotmtv.
subroutine sll_plotmtv_curv_2d(nx, ny, xcoord, ycoord, label, error)
write a data file plotable by plotmtv to visualize a 2d curvilinear mesh