null

Message Boards

How to create the pointer***.asc file

Javier García Alba, modified 4 Years ago.

How to create the pointer***.asc file

Youngling Posts: 12 Join Date: 1/4/12 Recent Posts
Hi,
I have to simulate the water quality with a curvilinear grid. In order to generate the dispersion array file (*.dsp file) I need the pointer**.asc file. However, I don't know how to obtain this file from the hydrodynamic. I thought that this file was automatically generated.

Could anybody help me?


Thank you in advance
Christophe Thiange, modified 4 Years ago.

RE: How to create the pointer***.asc file

Jedi Knight Posts: 125 Join Date: 11/15/12 Recent Posts
Hello Javier,

The *.poi is produced by the coupling code, either during your FLOW simulation if you are using a direct coupling or when manually running the coupling module in the D-WAQ GUI (offline coupling).
In both cases you will end up with a *.poi file in binary format that you will have to convert to ascii. The binary *.poi file is a sequence of n integers where n = number of exchanges x 4. You can find the number of exchanges in the input file generated by the D-WAQ GUI after loading the hydrodynamics.
The four integers per exchange represent: n_from; n_to; n_from - 1; n_to - 1. Where n is a segment number. See section 4.4 of the input file description manual for more info their meaning.


Good luck!
Michel Jeuken, modified 4 Years ago.

RE: How to create the pointer***.asc file

Jedi Knight Posts: 156 Join Date: 1/21/13 Recent Posts
Hi Javier,

Attached is a simple fortran code that can do the translation from binary to asc for you.

cheers,
Michel

Attachments:

Javier García Alba, modified 4 Years ago.

RE: How to create the pointer***.asc file

Youngling Posts: 12 Join Date: 1/4/12 Recent Posts
Thank you Michel,

The program help me partially due to this code only gives the fields "FROM TO FROM-1 TO+1". This code missed to give information about the 3 directions and length between exchanges.


According to the "D-Water Quality User Manual" section A.2.4 Dispersion array <*.dsp> the pointer.asc looks like:
NO. FROM TO FROM-1 TO+1 FROM-LEN TO-LEN
....
111 111 112 110 113 773.186 760.346


Attached to this message I send to you an example of the file I would like to get.

Thank you in advance
Michel Jeuken, modified 4 Years ago.

RE: How to create the pointer***.asc file

Jedi Knight Posts: 156 Join Date: 1/21/13 Recent Posts
Hi Javier,

I think I know where this files comes from. Currently FLOW writes the input for delwaq directly, but previously we would use the communication file and the seperate coupling program found in the Water Quality - Coupling menu. I think this separate program can create this pointer-*.asc file for you (I saw it in some old runs), but that the gereration of this file was not included in the direct coupling anymore.

What you could do is run your flow model again for a short period (and turn of WAVE if you used that), and than convert the com-*dat file that is generated with the separate coupling program. Now you should have a pointer-*.asc that also applies to the run you already have.

cheers,
Michel
Christophe Thiange, modified 4 Years ago.

RE: How to create the pointer***.asc file

Jedi Knight Posts: 125 Join Date: 11/15/12 Recent Posts
The length information is still available in the com-*.len file.

Here's an example script to read direction nr, exchange nr, length-from and length-to out of it.

Attachments:

Javier García Alba, modified 4 Years ago.

RE: How to create the pointer***.asc file

Youngling Posts: 12 Join Date: 1/4/12 Recent Posts
Thank you very much Christophe,

This script helps me a lot. However, I still have a doubt. How do you know the value of variables noq1 to noq3 (the number of exchanges in each direction)?

I supose noq1 = 82145, noq2 = 83755 and noq3 = 89556 are arbitrary values in your script.

Thank you in advance
Christophe Thiange, modified 4 Years ago.

RE: How to create the pointer***.asc file

Jedi Knight Posts: 125 Join Date: 11/15/12 Recent Posts
Indeed, you should use your own noq values.
You can find these values in block 4 of your input file. Search for "exchanges".
Javier García Alba, modified 4 Years ago.

RE: How to create the pointer***.asc file

Youngling Posts: 12 Join Date: 1/4/12 Recent Posts
Hi Christophe and Michel,
I used your python script to build my own .dsp file (as a previous step) and it works well!!

Thanks again and cheers!!