Question

I am working with Regional Climate data that were provided in a rotated pole grid format. Using PROJ4 I can convert these coordinates to lat/lon using this command line $ proj -m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lon_p=83 +o_lat_p=42.5 +lon_0=180 I have created an ASCII file with the coordinates of all the grid cells ifile.txt and an empty file for the output ofile.txt

When I use $ proj -m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lon_p=83 +o_lat_p=42.5 +lon_0=180 ifile.txt ofile.txt

I get the transformed coordinates printing to the screen but not to ofile.txt. Can someone suggest how I can fix my command line?

Thank you for your time

Était-ce utile?

La solution

proj only takes input files as its arguments. You need to redirect the standard output to your file:

$ proj -m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lon_p=83 +o_lat_p=42.5 +lon_0=180 ifile.txt > ofile.txt

If you want to print to standard output AND the file, you can do

$ proj ... | tee ofile.txt
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top