<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br>On Sat, Nov 24, 2018 at 5:07 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>><br>> On samedi 24 novembre 2018 16:27:33 CET Markus Metz wrote:<br>> > I have a NetCDF file with west > east, gdalinfo reports<br>> > Corner Coordinates:<br>> > Upper Left  (     335.257,      70.000)<br>> > Lower Left  (     335.257,      30.000)<br>> > Upper Right (  44.7424710,  69.9999970)<br>> > Lower Right (  44.7424710,  29.9999954)<br>> > Center      (     190.000,      50.000)<br>> ><br>> > west =  335.257 > east = 44.7424710<br>> ><br>> > The reason is that west has been wrapped such that it is in the range [0,<br>> > 360], and GDAL thinks that columns need to be read from right to left<br>> > instead of left to right.<br>> ><br>> > The fix is to convert west with west -= 360, then assign corrected extents<br>> > with gdal_translate -a_ullr<br>> ><br>> > There is a config option GDAL_NETCDF_BOTTOMUP. Could something similar be<br>> > implemented for west > east, something like GDAL_NETCDF_LEFTISLEFT? Or is<br>> > it a corrupted file and manual correction is the only option?<br>><br>> Couldn't find anything related mentionned in the CF convention, but that<br>> doesn't make that file illegal. I guess that could be auto-corrected by<br>> detecting there's a discontinuity in the values of the longitude variable.<br><div><br></div><div>This particular NetCDF file, PM10 analysis from CAMS <a href="http://www.regional.atmosphere.copernicus.eu/">http://www.regional.atmosphere.copernicus.eu/</a>, does not have a longitude variable, also no subdatasets. Resolution should be 0.1 degrees, but GDAL reports</div><div>Pixel Size = (-0.415021467959250,-0.100000003824258)</div><div>because west > east</div><div><br></div><div>full gdalinfo output without band info:</div><div><br></div><div>Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute<br>Driver: netCDF/Network Common Data Format<br>Files: W_fr-meteofrance,MODEL,ENSEMBLE+ANALYSIS+SURFACE+PM10+-24H-1H_C_LFPW_20181120000000.nc<br>Size is 700, 400<br>Coordinate System is `'<br>Origin = (335.257498526948382,69.999996950154312)<br>Pixel Size = (-0.415021467959250,-0.100000003824258)<br>Metadata:<br>  latitude#long_name=latitude<br>  latitude#units=degrees_north<br>  level#long_name=level<br>  level#units=m<br>  longitude#long_name=longitude<br>  longitude#units=degrees_east<br>  NC_GLOBAL#ANALYSIS=Europe, 20181119+[0H_23H]<br>  NC_GLOBAL#comment=Tools used: CDO V1.6.1rc6 and NCO V4.3.7<br>  NC_GLOBAL#history=Model ENSEMBLE ANALYSIS<br>  NC_GLOBAL#institution=Data produced by Meteo France<br>  NC_GLOBAL#nco_openmp_thread_number=1<br>  NC_GLOBAL#project=MACC-RAQ (<a href="http://macc-raq.gmes-atmosphere.eu">http://macc-raq.gmes-atmosphere.eu</a>)<br>  NC_GLOBAL#source=Data from ENSEMBLE model<br>  NC_GLOBAL#summary=ENSEMBLE model hourly ANALYSIS of PM10 concentration at the Surface from 20181119+[0H_23H] on Europe<br>  NC_GLOBAL#title=PM10 Air Pollutant ANALYSIS at the Surface<br>  NETCDF_DIM_EXTRA={time,level}<br>  NETCDF_DIM_level_DEF={1,5}<br>  NETCDF_DIM_level_VALUES=0<br>  NETCDF_DIM_time_DEF={24,5}<br>  NETCDF_DIM_time_VALUES={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}<br>  pm10_conc#species=PM10 Aerosol<br>  pm10_conc#standard_name=mass_concentration_of_pm10_ambient_aerosol_in_air<br>  pm10_conc#units=µg/m3<br>  pm10_conc#value=hourly values<br>  time#long_name=ANALYSIS time from 20181119<br>  time#units=hours<br>Corner Coordinates:<br>Upper Left  (     335.257,      70.000) <br>Lower Left  (     335.257,      30.000) <br>Upper Right (  44.7424710,  69.9999970) <br>Lower Right (  44.7424710,  29.9999954) <br>Center      (     190.000,      50.000) <br>Band 1 Block=700x1 Type=Float32, ColorInterp=Undefined<br>...<br></div><br></div></div></div></div>