null

Message Boards

How to view parameter (*.par) file?

JI
Justin Ibershoff, modified 5 Years ago.

How to view parameter (*.par) file?

Youngling Posts: 1 Join Date: 1/6/15 Recent Posts
Hi. I am looking for a way to open and view the contents of the parameter (*.par) file. Can any of the Delft3D utilities do this?

Thanks!

Justin
MC
Mathieu Chatelain, modified 5 Years ago.

RE: How to view parameter (*.par) file?

Padawan Posts: 28 Join Date: 12/13/12 Recent Posts
Hi Justin,
To add to Arjen's answer, here is some information to build/adapt your own tool.
The PAR-file created by default by DelWAQ GUI contains information regarding 2 space-varying parameters: SURF and BOTTOMDEPT.
Both parameters are (usually?) constant over time, and identical for all layers. Therefore in the PAR-file, only their values at TIME=0 and LAYER=1 is given, yielding:
  • 4bytes INTEGER containing a (dummy zero) timer
  • 4bytes FLOAT for SURF in segment 1
  • 4bytes FLOAT for BOTTOMDEPT in segment 1
  • 4bytes FLOAT for SURF in segment 2
  • 4bytes FLOAT for BOTTOMDEPT in segment 2
  • etc.
    for as many segments as you have in one layer (NB: the number of segments can be deduced from the file size). FYI, see attached an example written in MATLAB to convert the PAR-file into an ASC-file.

    @Arjen: I would also be interested in getting this tool you mentioned to easily convert the PAR-file into a MAP-file. Many thanks!

    Cheers,
    -Mathieu.
  • Attachments:

    AM
    Arjen Markus, modified 5 Years ago.

    RE: How to view parameter (*.par) file?

    Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
    I have attached the source code of the program - it is undocumented as I said, but it is not that difficult to read. It is part of the broad collection of tools that have been written over the years, especially by Jan van Beek, We should perhaps make an effort in standardising, modernising and documenting them.

    Attachments:

    AM
    Arjen Markus, modified 5 Years ago.

    RE: How to view parameter (*.par) file?

    Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
    Not that I am aware of - at least not directly. The thing is that these files do not contain any meta-information such as the number of grid cells and parameters contained in them. However, if you know these things you could add a header to the file and turn it into a map file, which can be viewed with the regular graphical programs.

    As it happens, we do have a utility that will do just that emoticon. Are you on a Windows platform? Then I can send it directly to you, otherwise I can send you the source code. Mind you: there is no documentation beyond the source code for this.