mesh.py 758 Bytes
Newer Older
Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import slimPre
R=6341e3

bath_tiff = slimPre.fetch_ftp('slim_data/bohai/bohai_bathymetry.tif')
coast_prj = slimPre.fetch_ftp('slim_data/bohai/no-intertidal/lines.prj')
coast_dbf = slimPre.fetch_ftp('slim_data/bohai/no-intertidal/lines.dbf')
coast_shx = slimPre.fetch_ftp('slim_data/bohai/no-intertidal/lines.shx')
coast_shp = slimPre.fetch_ftp('slim_data/bohai/no-intertidal/lines.shp')

bath = slimPre.geo_tiff(bath_tiff)
dist = slimPre.distance_shp(coast_shp, 1000, [1,2,20])

def fsize(x, y, z) :
    return 10000/R

physicals = {1:"coast", 2:"coast", 10:"yellow_sea_north", 11:"yellow_sea_center", 12:"yellow_sea_south", 20:"yellow_river"}

slimPre.mesh_shp([coast_shp], 120 , 39, fsize, 500/R, "bohai.msh", "+proj=utm +ellps=WGS84 +zone=51", physicals)