Skip to content
Snippets Groups Projects
Commit a3799efa authored by Lars Kaleschke's avatar Lars Kaleschke
Browse files

preliminary version for submission, still needs to be cleaned

parent 2423ed51
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -53,11 +53,14 @@ grdfile2='/tmp/tmp_grid2.nc'
# GMT gridding
def blockgrid(time, dname, dst_fn):
"""tabfiles and grdfiles global"""
def blockgrid(time, dname, dst_fn,**kw):
"""tabfiles and grdfiles global
option blockmethod=blockmean or blockmode
"""
blockmethod=kw.get('blockmethod','blockmean')
cmd='gmt '+blockmethod+' '+tabfile1+rx+' -V -r -I'+str(cs)+' >'+tabfile2
cmd='gmt blockmean '+tabfile1+rx+' -V -r -I'+str(cs)+' >'+tabfile2
#cmd='gmt blockmode '+tabfile1+rx+' -V -r -I'+str(cs)+' >'+tabfile2
print(cmd)
os.system(cmd)
......@@ -77,7 +80,7 @@ def blockgrid(time, dname, dst_fn):
os.system('rm -f '+tabfile2)
# Report number of points
cmd='gmt blockmean '+tabfile1+rx+' -Sn -V -r -I'+str(cs)+' >'+tabfile2
cmd='gmt '+blockmethod+' '+tabfile1+rx+' -Sn -V -r -I'+str(cs)+' >'+tabfile2
#cmd='gmt blockmode '+tabfile1+rx+' -Sn -V -r -I'+str(cs)+' >'+tabfile2
os.system(cmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment