+ Reply to Thread
Results 1 to 4 of 4

Thread: Military Aspects of Weather - Import grb files

  1. #1
    Nuno Figueiredo
    Join Date
    Dec 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Military Aspects of Weather - Import grb files

    Hi,

    I'm trying to integrate the MAoW template in a METOC project using grib files (different from the template).
    I can inspect and convert the grib files into a raster, however the rasters don't have any spatial reference.

    if I do the same conversion manually (same grib file), using the degrib tool everything goes well and raster fits in the right place.
    Should I change something in the import script?, what could be wrong?

    Thanks,
    Nuno

  2. #2
    David Martin
    Join Date
    May 2010
    Posts
    55
    Points
    12
    Answers Provided
    2


    0

    Default Re: Military Aspects of Weather - Import grb files

    Hi Nuno,

    Are you able to share one of your grib files that exhibits this behaviour?

    David

  3. #3
    Nuno Figueiredo
    Join Date
    Dec 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: Military Aspects of Weather - Import grb files

    Hi David,

    Attached you can find one grib. that have this problem.
    just replace the extention to .grb, seems that the system does not like the grib format.

    Thanks,
    Nuno
    Attached Files

  4. #4
    David Martin
    Join Date
    May 2010
    Posts
    55
    Points
    12
    Answers Provided
    2


    0

    Default Re: Military Aspects of Weather - Import grb files

    Hi Nuno,

    I can reproduce the problem with your GRIB file not importing into the correct space. This can be corrected by adding the parameter “-Interp 0” to the Degrib command in the “Import GRIB Files” Script Tool. This would not adversely affect the import of GRIB files that do not exhibit this behavior, so could happily be left as a permanent change. It appears to be the default in the tkdegrib user interface.

    Note that the Degrib tool does not apply projection information to ascii grid outputs, as used by the MAoW template. So when you add the data to a map, it will simply be given the spatial reference of the map. If your map were in a projection (e.g. British National Grid) the data would be completely mis-located. If your map were in a geographic coordinate system (e.g. WGS84) the data would appear to be in the right place, but there would be a risk of a datum shift.

    Given your data represents a UK forecast, I can’t believe that a datum shift is likely to be significant relative to its precision (!!) but there may be different circumstances in which this would matter. I would suggest that it is important first to make an assessment of whether the datum shift would have a significant impact, before considering doing anything about it. If you decide it could be significant, then the following information could be helpful…

    If you want projection information from your GRIB file, you can alter the Degrib command line in the script and change the parameter “-nMet” to “-Met” such that it also outputs a .txt file beside the .asc file in the scratch folder. This .txt file will include the Grid Description Section (GDS) from the GRIB header, which gives details of the spatial reference system.

    GRIB files use a geographic coordinate system based on a spherical datum. The GRIB specification, version 1, requires a radius of 6,367.47 km. for a spherical Earth. GRIB version 2 defaults to the same radius, but allows the user to specify another radius. NCEP (The National Center for Environmental Prediction) perform their computations on a grid with an Earth radius of 6,371.2 km., even when publishing the results in GRIB format. (see http://www.arl.noaa.gov/faq_ms1.php#Q7B)

    Not in the least confusing, eh?!

    Were your GRIB files to use a radius of 6,371.2km, an appropriate out-of-the-box coordinate system would appear to be “International 1924 Authalic Sphere”, wkid 4053. However, your GRIB file uses a radius of 6,367.47 km. This coordinate system does not appear to come out-of-the-box with ArcGIS (see http://forums.esri.com/Thread.asp?c=93&f=993&t=250107), so you will need to create it. Note that you would also then need to create a new Geographic Transformation to enable ArcGIS to transform your data between your new spatial reference and whatever spatial reference(s) your maps are using.

    You then have 2 choices:

    1/ Ensure your map is in this coordinate system, such that even though the imported data does not advertise its spatial reference, it will nevertheless be positioned appropriately. (This doesn’t sound an ideal option, I know – but it’s worth mentioning simply due to its ease of implementation)

    2/ Create an MAoW “Conversion” tool that applies this coordinate system to the data at the point of import. You can create such a tool in Model Builder. It would use first the Copy Raster tool and then the Define Projection tool to apply the spatial reference to the copied raster. You’d then add the name of this tool to the ForecastUnitConversions table against the name of each individual weather variable that you are importing. When you then run the “Import GRIB files” tool, the correct spatial reference will be applied on-the-fly during import.

    Remember that you set up the MAoW template on the assumption that your data source is uniform – i.e. that the weather variables, units and spatial references don’t change with each import. So you’d want to check with your source (UK Met Office in this case) that you can rely on this for your supply stream.

    I have included screenshots of the model that I would use to “convert” the rasters to the correct coordinate system, and of the
    parameters I would use to create the spatial reference system.

    As for the Geographic Transformation you would need to create… I’m afraid you’d need to do a bit of googling to work that one out!!

    Hope that helps!

    Best wishes

    David

    Click image for larger version

Name:	SpatialReference.jpg
Views:	82
Size:	60.9 KB
ID:	22735
    Click image for larger version

Name:	ConversionTool.jpg
Views:	83
Size:	65.8 KB
ID:	22737

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts