伙计们。我正在尝试读取由 VAX FORTRAN 代码存储的科学数据文件。数据以结构形式存储,其文件和代码说明如下。我用谷歌搜索了 FORTRAN 77 可能会读取该文件,但我经常使用的语言不是 FORTRAN。那么有人可以告诉我如何将数据读入 FORTRAN 或 C/IDL/等。变量?例如,结构的 N 个单元存储在文件“pxm.mos”中,如何将数据读入我的变量中?非常感谢!以下是说明。
c FILE name is "pxm.mos"
c FILE AND RECORD STRUCTURE
c The files were created with form='unformatted', organization='sequential',
c access='sequential', recordtype='fixed', recordsize=512.
c The following VAX FORTRAN code specifies the record structure:
structure /PXMstruc/
union
map
integer*4 buffer(512)
end map
map
integer*4 mod16
integer*4 mod60
integer*4 line
integer*4 sct
integer*4 mfdsc
integer*4 spare(3)
real*4 datamin
real*4 datamax
real*4 data(0:427)
end map
end union
end structure
record /PXMstruc/ in