From: Ole N. <ole...@gm...> - 2007-11-15 03:14:05
|
...another thing that I noticed is that since your test script isn't importing any external data, its origin (xllcorner, yllcorner) will be 0,0. I really think it needs to be based on an external ascii file with elevation data in order to reveal the registration problem. Best regards Ole On Nov 14, 2007 11:09 PM, r rajaraman <rra...@gm...> wrote: > Dear Ole, > I did try the 2nd method I mentioned. > ie 1st iteration sets up a grid and also creates the asc file output. > 2nd iteration takes the asc output from 1st one and proceeds. > Though it should have shown the shifting as discussed ( i have not yet > patched dem2pts), > I dont see such effect ( running this script will produce superimposed > profiles of two case along y/2.) > > May be you can have a quick look at the code and my logic. > Sorry for the clumsy code, as I tried to cook up from different anuga > examples. > Cheers > -rajaraman > > > > On Nov 14, 2007 9:30 AM, r rajaraman <rra...@gm...> wrote: > > Dear Ole, > > Now that the issue boiled down to the way "asc" file is converted to > > "pts", one can think of setting up a test to reflect it. But one may > > not look for failure error in this case. > > > > Since the whole grid is being wrongly shifted / clipped we can at the > > maximum expect wrong representation of the elevation at any given > > location, like once Joaquim mentioned the coast seemed to be shifted > > in his case. On finer grid resolution this may not be apparent. but at > > the resolution used by Joaquim (800m), we can clearly see the effect. > > But we need reference pts file to compare. one way to do is use > > Mirone's "conv2anugapts" utility. I did not check it after very recent > > modifications. But I use another route> namely take the "asc" file and > > open in mirone and save it as "grd" file. then use gmt command > > "grd2xyz in.grd >out.xyz" to get xyz file. use the hack from Okushiri > > example to create pts file. This I verified to be free of pixel vs > > grid issueby comparing randum grid locations using mirone. > > > > But another method is also possible > > in 1st iteration use chess board type of elevation setup on ideal test > > bed and derive profiles at say x/2 and y/2 and also derive the asc > > file from it. ( I verified that the anuga produced asc file is > > correctly representing original grid when I use the grd-xyz-pts route) > > > > in 2nd iteration use this asc file and look at the profiles again and > > compare with the reference. > > It should clearly show the displaced step elevations. > > > > May be I can try setting up this ideal method > > > > Does it sound reasonable? > > Cheers > > -rajaraman > > > > > > -- > > On Leave to Qatar University, Qatar > --------------------------------------------------------------- > Dr. R. Rajaraman > Scientific Officer > Materials Science Division > Indira Gandhi Centre for Atomic Research Kalpakkam - 603 102, TN, INDIA > Phone: +91-44-27480500 Ext: 22772 / 22920 > FAX: +91-44-27480081 > email: rr...@ig... / rra...@gm... > home page: http://mmg.igcar.gov.in/msd/mps/rraman > ---------------------------------------------------------------- > |