Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Converting topographic data into binary geogrid format with write_geogrid.c

natalia_c

New member
Hi,
I consider myself new at using WRF. I am currently trying to add new topographic data (because of resolution) from Gebco, by converting it to binary format with the recommended "write_geogrid.c" program. The thing is I am completely new with C, so I've been struggling when trying to use this program, specially regarding to the input data (gebco topography). I don't know which format would be the best to use, or how to properly call the data.
Now I'm working with a netcdf file called "gebco_topo.nc", where "topo" would be the altitud matrix.
How should I run this program? Editing it and writing the values of each argument, or do i specify the values when running it?

I couldn't find information about how to use the write_geogrid.c program, maybe because it is too simple or I don't know how to look for it.
 
This guide may be useful for someone I attached may be useful for someone. It doesn't use de C code given in WPS/geogrid/src. It shows how to convert the data to the geogrid format using GDAL.
 

Attachments

  • Guide-highres-terrain-WRF.pdf
    1.1 MB · Views: 61
This guide may be useful for someone I attached may be useful for someone. It doesn't use de C code given in WPS/geogrid/src. It shows how to convert the data to the geogrid format using GDAL.

Hello Natalia,

Did you succeed to make the geogrid program work properly with your new input binary file ? If so, could you please share your index file for comparison with the one I got from convert_geotiff.

Thanks for your help.
 
Hello Arty,
Yes, I succeeded. The following corresponds to my index file:

type = continuous
signed = no
projection = regular_ll
dx = 0.000277777777777778
dy = 0.000277777777777778
known_x = 1.0
known_y = 1.0
known_lat = -37.9712500
known_lon = -73.9790278
wordsize = 2
tile_x = 10656
tile_y = 10601
tile_z = 1
tile_bdr=0
units="meters MSL"
row_order = top_bottom
endian = little
description="ASTER Global Digital Elevation Model 1 arc second"

---------------------------------------------------
I hope it can be of help!
 
Hello Arty,
Yes, I succeeded.
...
I hope it can be of help!

Thank you, indeed, it helped, giving me some hint concerning my own original data file and its projection. I should check on that.
Also I figured out I misnamed the binary file interverting the - and . separators.
 
Top