Binary file from NEC-SX6

Henrique Barbosa hmjbarbosa at GMAIL.COM
Fri Nov 18 08:02:34 EST 2005


Dear Karina,

You have to set some flags to your program and compiler
in order to get all bits the way you want. Here's how I do it on
our sx6. The result is not only readable in linux, but on all
plataforms I have ever tried: windows, alpha, dec, pc, etc...

In my case, we have a GCM which writes a binary/spectral
output which is then post-processed by another program,
also run under sx6, that write all requested grid-fields in the proper
binary/grads format, with the adequate ctl.

Take a look at the end of this message where I copied part
of the script I use to compile and run the post-processing
program.

Basically you'll need a '-float 0' while compiling the program
and setting a variable F_UFMTADJUST##=TYPE?, to tell sx6
what kind of float it should use for file unit ##.

Hope that it helps,

Henrique

#
#   Set FORTRAN compilation flags
#
#   -pvctl noaltcode either scalar or vector code is generated at compilation
#   -O nodiv         division may not be changed to reciprocal multiplication
#   -O nomove        not move invariant expression outside the loop
#   -float0          floating-point data format IEEE is enabled
#   -ew              sets the basic numeric size to 8 bytes
#
FTNFLAG='-w -Wf" -pvctl noaltcode noassume vwork=stack -O nodiv nomove " '
export FTNFLAG
#
#   Set FORTRAN compiler name
#
#FTN='f90 -float0 -ew -eC'
FTN='f90 -float0 -ew'
export FTN
#
#   Set FORTRAN environment file name
#
#   FFFn is associated with FORTRAN file unit = n
#
FFF=F_FF
export FFF
#
#   Set environmental variables to binary conversion
#
F_UFMTIEEE=10,11,21,30
export F_UFMTIEEE
F_UFMTADJUST10=TYPE2
F_UFMTADJUST11=TYPE2
F_UFMTADJUST21=TYPE2
F_UFMTADJUST30=TYPE2
export F_UFMTADJUST10 F_UFMTADJUST11 F_UFMTADJUST21 F_UFMTADJUST30


On 11/18/05, Karina Lindberg <kli at dmi.dk> wrote:
> Hello!
>
> Are anyone running models on NEC-SX6 creating binary GRADS-files and then
> plotting these with GRADS on a different platform (f.ex. Linux) ?
>
> I am running a model on a NEC-SX6 creating binary GRADS-files which I want
> to look at with GRADS ran from Linux machine.
> The NEC-SX6 creates files with 64-bit and big-endian. The Linux machine has
>  little-endian. I have tried to use the command
> OPTIONS byteswapped
> and/or
> OPTIONS big_endian
> in my .ctl file but with no luck.
>
> Does anyone have any experience with this or some good advise?
>
> Thanks in advance for the help.
> Karina Lindberg
> DMI
> Denmark
>



More information about the gradsusr mailing list