fwrite

enrico pisoni enrico.pisoni at ING.UNIBS.IT
Thu Dec 21 10:11:53 EST 2006


Dear gradsUsers,

I discovered now the command
---
'set gxout fwrite'
---
very useful...but I have 2 doubts:

1) how to read in fortran the binary file that I can create in this way
(I think I have to open it in particular way, but I don't know)...
2) is it possible to write files directly in ascii format?

thanks
Bye
Enrico

Maluta Mbedzi wrote:

> Hi
>
> I am trying to save data into a new file using “fwrite”, all the
> variables that the model outputs are displaying without any problem in
> this new file, but I am experiencing problems with the variable I
> calculated from the output fields, specifically “vorticity” that I
> calculated using hcurl (u, v).U and V themselves are displaying
> correctly, but Vorticity is wrong. What do you think could be the
> problem? I have attached my control file.
>
> My script looks as follows:
>
> 'reinit'
>
> 'open PLEV_VAR.ctl'
>
> 'set gxout fwrite'
>
> 'set x 1 133'
>
> 'set fwrite tropcyr.dat'
>
> number=1
>
> while(number<=124)
>
> 'set t 'number’’
>
> 'set lev 850'
>
> 'd hcurl(u,v)'
>
> 'd u'
>
> 'd v'
>
> 'set lev 500'
>
> 'd t'
>
> 'set lev 400'
>
> 'd t'
>
> 'set lev 300'
>
> 'd t'
>
> 'set lev 250'
>
> 'd t'
>
> 'set lev 200'
>
> 'd t'
>
> 'd h'
>
> 'set lev 850'
>
> 'd h'
>
> 'd slp'
>
> number=number+1
>
> endwhile
>
> 'disable fwrite'
>
> 'close 1'
>
> Regards
>
> Pennington
>
>
> ------------------------------------------------------------------------
>
> This e-mail is subject to South African Weather Service e-mail legal
> notice, to view click here
> <http://www.weathersa.co.za/Legal/EmailLegalNotice.jsp>
> ------------------------------------------------------------------------
>



More information about the gradsusr mailing list