Q:

Longitude range NETCDF vs ASCII

I am trying to preprocess a netcdf dataset with arcgis such that it has the same extent, cellsize and format as an ascii dataset I am using. Both are visualized in the image below:

The big one in grey is the netcdf dataset, it has a longitude range of 0-360. The small dataset in Black is ascii, it has a range of -180-+180 decimal degrees. Problem is, the netcdf dataset is split right at the greenwich meridian, which splits africa, my region of interest. Now, i can change the prime meridian in the dataset to -180°, which makes the image look right, and both layers are congruent. Problem is, I want to clip the large dataset with the extent of the small dataset (rectangular), but since the minimal X is -30, the clipped image is cut exactly at 0 degrees. I tried to shift the whole dataset to the left (X-180°) but then again, it cuts off at 0°
Thanks for the help

A:

Ok, so here is what did the trick. I used this approach:
http://eloiribeiro.wordpress.com/2009/07/08/coverter-imagens-0%C2%BA-360%C2%BA-a-180-180%C2%BA-com-gdal/
It swaps the hemispheres via gdal_translate, and therefore transforms the longitude range from 0°-360° to -180°-+180°. A quick english summary:
gdal_translate -srcwin 0 0 360 360 -a_ullr 0 90 180 -90 input output
gdal_translate -srcwin 360 0 360 360 -a_ullr -180 90 0 -90 input output

The -srcwin variables are the outer limits of the hemisphere you want to swap, the unit here is the number of cells in your source image. In my case, the left hemisphere starts in the origin with 0/0. The lower right corner is at 360/360, with 360 being half the cellcount in x direction and the entire cell count in y direction (the image has 720*360 cells). The -a_ullr coordinates are the extent of your destination (the right hemispere in this case), but this time the unit is decimal degrees. Once the images are swapped, they can be merged with gdal_merge.py, the exact input being:
python gdal_merge.py -o output input1 input2

One quick addition: The whole process messed with my NoData values, and I had to replace them manually with arcpy setnull, so please don't lose it if the images look strange/black at first glance.
Thx for all the effort guys!

