Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have nc files. from the metadata ,the projection is cylindrical and the resolution is 25 km:

           indrical
                 NC_GLOBAL#ease_resolution=25
                 NC_GLOBAL#history=none
                 NC_GLOBAL#institution=SMOS CATDS Processing Chain
                 NC_GLOBAL#netcdf_version_id=3.6.2
                 NC_GLOBAL#product_version=1.0
                 NC_GLOBAL#references=DDI CATDS - Ref. CAT-DDI-CT-00020-CG
                 NC_GLOBAL#source=CATDS L3 SM Filtrering Processor
             NC_GLOBAL#title=L3-SM P11p : Preliminary Daily Retrieval Map
                               Corner Coordinates:
                    Upper Left  (    0.0,    0.0)
                    Lower Left  (    0.0,  586.0)
                    Upper Right ( 1383.0,    0.0)
                    Lower Right ( 1383.0,  586.0)
                    Center      (  691.5,  293.0)

I want to reproject it to WGS84 with a resolution of 0.25 * 0.25 degree. I used this code:

                    import os
              for doy in range(1,367):
inputFile='D:\\358\\2010SMOSl3_sm'+str(doy)+'.nc'
inputDataset='NETCDF:\"'+inputFile+'\":Soil_Moisture'
    outputFile='D:\\SMOS\\RE01\\MIR_CLF31D\\2010_sm'+str(doy)+'.img'
    gdalcmd='gdalwarp -of "ENVI" -ot Float32  -srcnodata -32768 -dstnodata -9999   -te -180 -90 180 90 -overwrite  '+inputDataset+' '+outputFile
     os.system( gdalcmd)

but I got an error:

        ERROR 1: Unable to compute a transformation between pixel/line
     and georeferenced coordinates for NETCDF:D:\SMOS\RE01\MIR_CLF31D\SM-D-RE-renamed-                   daily-2010-from day 14 to day 358\2010SMOSl3_sm307.nc:Soil_Moisture.
           There is no affine transformation and no GCPs.
share|improve this question
    
The data is probably in the EASE Global grid. The problem is that there are two. One is based upon WGS84 while the other using an authalic sphere based on International 1924 ellipsoid. Can you find any info in the metadata? If it's WGS84, try using 3975 as the input CRS and 4326 as the output. If it's the sphere, try 3410 for the input. –  mkennedy Jan 14 '13 at 19:41
    
Thanks MKENNEDY ,it is based on authalic sphere based on International 1924 ellipsoid, where to add 3410? –  Jonsson Jan 15 '13 at 14:42

1 Answer 1

I would suggest to try such conversions with QGIS, giving you a visual impact on what your data looks like. The gdalwarp command basically looks something like

gdalwarp -s_srs EPSG:31466 -t_srs "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" Aerowest.jpg utmtest3.tif

where source and target coordinate reference systems are defined by EPSG codes (the numbers mkennedy provided) or a proj command string.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.