<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>using GDAL to view netcdf files in GRASS</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hello. I'm trying to use GDAL to convert my netcdf file into a GTiff so it can be read into GRASS. I tried using "gdal_translate -of GTiff -b 1 NETCDF:FILE.nc:Outfile Outfile.tiff"<BR>
but this won't geolocate my file. I ran the same command, adding -a_ullr -90.32483 42.5327 -58.66088 26.8966, with the coordinates corresponding with the max/min of the lat/lon coordinates of the netcdf file. This is a bit better, with the resulting raster image now being in the general correct area. But the projection is wrong. The file is a Lambert conformal projection. Is there an "easy" way to tell GDAL how to geolocate this file (and for it to get the correct projection)? Or can I geolocate the file after the fact, in GRASS? Any suggestions would be appreciated, I'm getting quite frustrated with displaying netcdf files in GRASS.<BR>
<BR>
Thanks,<BR>
Katie<BR>
<BR>
For more information, here is the header to the netcdf file I'm trying to visualize in GRASS:<BR>
netcdf d03_heat_stress_2060_08 {<BR>
dimensions:<BR>
Time = UNLIMITED ; // (1 currently)<BR>
DateStrLen = 19 ;<BR>
west_east = 198 ;<BR>
south_north = 198 ;<BR>
bottom_top = 27 ;<BR>
bottom_top_stag = 28 ;<BR>
soil_layers_stag = 4 ;<BR>
west_east_stag = 199 ;<BR>
south_north_stag = 199 ;<BR>
variables:<BR>
char Times(Time, DateStrLen) ;<BR>
float HSI(Time, south_north, west_east) ;<BR>
HSI:FieldType = 104 ;<BR>
HSI:MemoryOrder = "XY " ;<BR>
HSI:description = "HEAT STRESS INDEX" ;<BR>
HSI:units = "deg C" ;<BR>
HSI:stagger = "" ;<BR>
HSI:coordinates = "XLONG XLAT" ;<BR>
float XLAT(Time, south_north, west_east) ;<BR>
XLAT:FieldType = 104 ;<BR>
XLAT:MemoryOrder = "XY " ;<BR>
XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;<BR>
XLAT:units = "degree_north" ;<BR>
XLAT:stagger = "" ;<BR>
float XLONG(Time, south_north, west_east) ;<BR>
XLONG:FieldType = 104 ;<BR>
XLONG:MemoryOrder = "XY " ;<BR>
XLONG:description = "LONGITUDE, WEST IS NEGATIVE" ;<BR>
XLONG:units = "degree_east" ;<BR>
XLONG:stagger = "" ;<BR>
<BR>
// global attributes:<BR>
:TITLE = " OUTPUT FROM WRF V3.1.1 MODEL" ;<BR>
:START_DATE = "2060-10-01_00:00:00" ;<BR>
:SIMULATION_START_DATE = "2059-01-01_00:00:00" ;<BR>
:WEST-EAST_GRID_DIMENSION = 199 ;<BR>
:SOUTH-NORTH_GRID_DIMENSION = 199 ;<BR>
:BOTTOM-TOP_GRID_DIMENSION = 28 ;<BR>
:DX = 12000.f ;<BR>
:DY = 12000.f ;<BR>
:GRIDTYPE = "C" ;<BR>
:DIFF_OPT = 1 ;<BR>
:KM_OPT = 4 ;<BR>
:DAMP_OPT = 0 ;<BR>
:DAMPCOEF = 0.01f ;<BR>
:KHDIF = 0.f ;<BR>
:KVDIF = 0.f ;<BR>
:MP_PHYSICS = 4 ;<BR>
:RA_LW_PHYSICS = 3 ;<BR>
:RA_SW_PHYSICS = 3 ;<BR>
:SF_SFCLAY_PHYSICS = 1 ;<BR>
:SF_SURFACE_PHYSICS = 2 ;<BR>
:BL_PBL_PHYSICS = 1 ;<BR>
:CU_PHYSICS = 1 ;<BR>
:SURFACE_INPUT_SOURCE = 1 ;<BR>
:SST_UPDATE = 1 ;<BR>
:GRID_FDDA = 0 ;<BR>
:GFDDA_INTERVAL_M = 360 ;<BR>
:GFDDA_END_H = 744000 ;<BR>
:GRID_SFDDA = 0 ;<BR>
:SGFDDA_INTERVAL_M = 0 ;<BR>
:SGFDDA_END_H = 0 ;<BR>
:SF_URBAN_PHYSICS = 0 ;<BR>
:FEEDBACK = 0 ;<BR>
:SMOOTH_OPTION = 0 ;<BR>
:SWRAD_SCAT = 1.f ;<BR>
:W_DAMPING = 1 ;<BR>
:MOIST_ADV_OPT = 1 ;<BR>
:SCALAR_ADV_OPT = 1 ;<BR>
:TKE_ADV_OPT = 1 ;<BR>
:DIFF_6TH_OPT = 0 ;<BR>
:DIFF_6TH_FACTOR = 0.12f ;<BR>
:OBS_NUDGE_OPT = 0 ;<BR>
:WEST-EAST_PATCH_START_UNSTAG = 1 ;<BR>
:WEST-EAST_PATCH_END_UNSTAG = 198 ;<BR>
:WEST-EAST_PATCH_START_STAG = 1 ;<BR>
:WEST-EAST_PATCH_END_STAG = 199 ;<BR>
:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;<BR>
:SOUTH-NORTH_PATCH_END_UNSTAG = 198 ;<BR>
:SOUTH-NORTH_PATCH_START_STAG = 1 ;<BR>
:SOUTH-NORTH_PATCH_END_STAG = 199 ;<BR>
:BOTTOM-TOP_PATCH_START_UNSTAG = 1 ;<BR>
:BOTTOM-TOP_PATCH_END_UNSTAG = 27 ;<BR>
:BOTTOM-TOP_PATCH_START_STAG = 1 ;<BR>
:BOTTOM-TOP_PATCH_END_STAG = 28 ;<BR>
:GRID_ID = 3 ;<BR>
:PARENT_ID = 2 ;<BR>
:I_PARENT_START = 18 ;<BR>
:J_PARENT_START = 24 ;<BR>
:PARENT_GRID_RATIO = 3 ;<BR>
:DT = 40.f ;<BR>
:CEN_LAT = 35.79343f ;<BR>
:CEN_LON = -76.1796f ;<BR>
:TRUELAT1 = 33.f ;<BR>
:TRUELAT2 = 45.f ;<BR>
:MOAD_CEN_LAT = 40.f ;<BR>
:STAND_LON = -97.f ;<BR>
:POLE_LAT = 90.f ;<BR>
:POLE_LON = 0.f ;<BR>
:GMT = 0.f ;<BR>
:JULYR = 2060 ;<BR>
:JULDAY = 275 ;<BR>
:MAP_PROJ = 1 ;<BR>
:MMINLU = "USGS" ;<BR>
:NUM_LAND_CAT = 24 ;<BR>
:ISWATER = 16 ;<BR>
:ISLAKE = -1 ;<BR>
:ISICE = 24 ;<BR>
:ISURBAN = 1 ;<BR>
:ISOILWATER = 14 ;<BR>
data:<BR>
<BR>
Times =<BR>
"" ;<BR>
<BR>
HSI =<BR>
-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999,<BR>
-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999,<BR>
-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999,<BR>
-999, -999, -999, </FONT>
</P>
</BODY>
</HTML>