<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Opening binary file]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=789&amp;type=atom" />
	<updated>2023-05-15T20:17:39Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=789</id>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4118#p4118" />
			<content type="html"><![CDATA[<p>Basically, binary files can be read using the &quot;stream&quot; access keyword:</p><div class="codebox"><pre><code>open(100, file=&#039;binary.dat&#039;, status=&#039;old&#039;, action=&#039;read&#039;, access=&#039;stream&#039;, form=&#039;unformatted&#039;)</code></pre></div><p>It worked in this specific case.&nbsp; The &quot;stream&quot; access was designed to try to add some standard method of binary access that wasn&#039;t compiler-vendor-specific.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2023-05-15T20:17:39Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4118#p4118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4116#p4116" />
			<content type="html"><![CDATA[<p>Can you share the &quot;solution&quot; for this specific problem?</p>]]></content>
			<author>
				<name><![CDATA[baf1]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3660</uri>
			</author>
			<updated>2023-05-15T04:40:06Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4116#p4116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4098#p4098" />
			<content type="html"><![CDATA[<p>I really like it when a group of administrators answer questions right away. You guys are the best!</p>]]></content>
			<author>
				<name><![CDATA[AlphonsoEstrada]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4114</uri>
			</author>
			<updated>2023-04-18T10:33:49Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4098#p4098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4097#p4097" />
			<content type="html"><![CDATA[<p>I sent the examples to Jeff and he found a solution.&nbsp; I appreciate the help.</p>]]></content>
			<author>
				<name><![CDATA[billhutch]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4113</uri>
			</author>
			<updated>2023-04-17T16:03:53Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4097#p4097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4096#p4096" />
			<content type="html"><![CDATA[<p>If you could provide code and data samples, I might be able to help.&nbsp; Binary files tend to be extremely problematic, especially if the routines to read/write them relied on any language extensions implemented by a compiler.&nbsp; </p><p>If you need to send along some data files and code, you can email it directly to <a href="http://mailto:support@approximatrix.com">support@approximatrix.com</a>.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2023-04-13T17:31:17Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4096#p4096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4095#p4095" />
			<content type="html"><![CDATA[<p>I am looking for a new compiler now that Lahey is out of business.&nbsp; I downloaded Simply Fortran to test it with this problem in mind.&nbsp; &nbsp; Using &#039;formatted&#039; as the form does not work as suggested by Jeff (tried it).</p><p>Binary and Unformatted files may not be standard, but are extensively used in the groundwater modeling world (USGS code MODFLOW).</p><p>Is there any way to open and read these binary files and (for older MODFLOW models) unformatted files?</p><p>I can provide examples if needed.</p>]]></content>
			<author>
				<name><![CDATA[billhutch]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4113</uri>
			</author>
			<updated>2023-04-12T17:00:57Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4095#p4095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3644#p3644" />
			<content type="html"><![CDATA[<p>Like the error says, <em>&#039;binary&#039;</em> is not a valid value for <em>FORM</em>.&nbsp; Some compilers may have implemented this in the past, but it definitely isn&#039;t standards-compliant.</p><p>If you have a Fortran binary file, you can instead use:<br /></p><div class="codebox"><pre><code>open(unit=9,file=&#039;data/Grid_3D.dat&#039;,form=&#039;formatted&#039;)</code></pre></div><p>and just read/write as you need.</p><p>More information might be helpful, though.&nbsp; Are you attempting to read or write the file?&nbsp; Do you happen to know what the file should contain?</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2020-11-04T16:42:21Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3644#p3644</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Opening binary file]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3643#p3643" />
			<content type="html"><![CDATA[<p>Dear friends,</p><p>I tried to open binary file with</p><p>open(unit=9,file=&#039;data/Grid_3D.dat&#039;,form=&#039;binary&#039;)</p><p>and got an Error message</p><p>&quot;Form specifier in OPEN statement has invalid value &#039;binary&#039;&quot;.</p><p>Why?</p>]]></content>
			<author>
				<name><![CDATA[Mikhail]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3959</uri>
			</author>
			<updated>2020-11-04T08:13:08Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3643#p3643</id>
		</entry>
</feed>
