SRTM Data in WPS

Any WPS problems/questions that might not fall into the other topics in this category

SRTM Data in WPS

Postby bviner » Wed May 20, 2009 7:26 pm

I have a question regarding the use of external terrain data in geogrid. I'm trying to read in SRTM data but I'm getting strange values of terrain, including values ranging from -17000 to 20000 and large changes between grid points. The SRTM data (in ascii format) reads properly, but it does not seem to be converting to the binary format properly or is not being read by geogrid properly.

I'm currently using the file srtm_38_03.asc in geogrid/src and converting it to binary by compiling and running asc2bin.f and write_geogrid.c located in geogrid/src to get the necessary 00001-06000.00001-06000 file. I've double checked to make sure the lat and lon in the index files and the namelist are specified properly and updated the GEOGRID.TBL file (as listed below). If anyone has any thoughts, I'd really appreciate any suggestions.

Index file:
type = continuous
signed = yes
projection = regular_ll
dx = 0.000833333
dy = 0.000833333
known_x = 1.0
known_y = 1.0
known_lat = 45
known_lon = 5
wordsize = 2
tile_x = 6000
tile_y = 6000
tile_z = 1
tile_bdr=0
units="meters MSL"
description="Topography height"


Namelist.wps
&geogrid
parent_id = 1,
parent_grid_ratio = 1,
i_parent_start = 1,
j_parent_start = 1,
e_we = 50,
e_sn = 50,
geog_data_res = '3s',
dx = 1000,
dy = 1000,
map_proj = 'lambert',
ref_lat = 47,
ref_lon = 7,
truelat1 = 47,
truelat2 = 47,
stand_lon = 7,
geog_data_path = '/ptmp/wrf/geog'
/


Geogrid.TBL (all variables have been updated, but here is an example)
name = HGT_M
priority = 1
dest_type = continuous
df_dx=SLPX
df_dy=SLPY
smooth_option = smth-desmth_special; smooth_passes=1
fill_missing=0.
interp_option = 3s:average_gcell(4.0)+four_pt+average_4pt
interp_option = 30s:average_gcell(4.0)+four_pt+average_4pt
interp_option = 2m:four_pt
interp_option = 5m:four_pt
interp_option = 10m:four_pt
interp_option = default:four_pt
rel_path= 3s:topo_3s/
rel_path= 30s:topo_30s/
rel_path= 2m:topo_2m/
rel_path= 5m:topo_5m/
rel_path= 10m:topo_10m/
rel_path= default:topo_2m/
bviner
 
Posts: 2
Joined: Wed May 20, 2009 6:10 pm

Re: SRTM Data in WPS

Postby bviner » Thu May 21, 2009 2:00 pm

Just some further info-

I've narrowed down the problem some. The terrain values are being fed into the write_geogrid routine properly (I've printed out values in "iarray" to check), but are incorrect when read_geogrid gets them (in rarray). This implies the problem is somewhere between writing and reading the binary file. Would this be a compiler problem? Perhaps I'm missing a particular flag? Just in case, I'm compiling the write_geogrid.c using teh same command the compiler program uses to compile read_geogrid.c:
pgcc -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF-DIO_BINARY -DIO_GRIB1 -DBIT32 -D_GEOGRID -O -c write_geogrid.c

and compiling asc2bin.f as:
pgf90 -c -o asc2bin.exe asc2bin.f write_geogrid.o
bviner
 
Posts: 2
Joined: Wed May 20, 2009 6:10 pm

Re: SRTM Data in WPS

Postby colopolo70 » Wed Jul 29, 2009 6:21 am

Hi guys

I am so newbie of GIS data.

I totally have no idea how to convert *.asc file to wps input file.

1. where is asc2bin.f file under WPS? I could not find it and how to compile write_geogrid.c with srtm file?

Could you please tell me how to convert STEP by STEP?

I am so frustrated to deal with data..

Have a good day.

JY
colopolo70
 
Posts: 47
Joined: Thu Jan 15, 2009 10:38 am

Re: SRTM Data in WPS

Postby drmarcoguevara » Wed Jul 03, 2019 2:52 pm

You can try to use the app convert_geotiff, I am trying to use it for a similar task.

just be careful to install the master, other way you wont be able to compile it.

https://github.com/openwfm/convert_geotiff
Regards.

colopolo70 wrote:Hi guys

I am so newbie of GIS data.

I totally have no idea how to convert *.asc file to wps input file.

1. where is asc2bin.f file under WPS? I could not find it and how to compile write_geogrid.c with srtm file?

Could you please tell me how to convert STEP by STEP?

I am so frustrated to deal with data..

Have a good day.

JY
drmarcoguevara
 
Posts: 3
Joined: Wed May 11, 2016 2:55 pm


Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 3 guests

cron