[gradsusr] Writing to a world file as a text file
Stephen Woodbridge
stephenwoodbridge37 at gmail.com
Fri Mar 26 20:33:26 EDT 2021
Hi,
I have a script that creates images and I want to create a *.wld file to
go with the image, but all the examples that I try interactively in
grads don't work. I currently just display the values from the script like:
say 'CREATING WORLD FILE:'
say lonpixelsize
say '0.0'
say '0.0'
say latpixelsize
say xwld
say ywld
say '---------------------'
But testing interactively with:s
grads -bl
sdfopen ./a.nc
Scanning self-describing file: ./a.nc
SDF file ./a.nc is open as file 1
LON set to -100 -50
LAT set to 0 55
LEV set to 0 0
Time values set: 2021:3:25:18 2021:3:25:18
E set to 1 1
ga-> say '0.0'
Unknown command: say
ga-> set gxout print
ga-> set prnopts %10.6f 1 1
ga-> d 10.1
Printing Grid -- 1 Values -- Undef = -9.99e+08
10.100000
ga-> write(test.txt,result,append)
Unknown command: write(test.txt,result,append)
ga-> write('test.txt',result,append)
Unknown command: write('test.txt',result,append)
My idea here is to create the world file which in basically 6 floats
written one per line in the file.
I'm obviously not doing something wrong here.
Thanks,
-Steve
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the gradsusr
mailing list