ostIn.template Parameter Output Format

117 views
Skip to first unread message

Ethan Johnson

unread,
Feb 10, 2021, 11:35:52 AM2/10/21
to Ostrich User Group
Hi all,

I've been trying to get an understanding of how Ostrich writes its parameters out, and have been having trouble doing so. I have an ostIn.txt file whose parameters have a format code following txout, specifying how to write the parameter to the output file. For example:

Para001     extract      0.00001       0.2    none    none    none     F8.4

This format code, F8.4, seems to follow the Fortran style of formatting numbers. With an input value of 0.0009862229, it produces a number formatted like "  0.0010", including the padding spaces. However, using a G-style format, G8.2e1, produces a number formatted like "9.862229E-04", instead of the expected " 0.99E-3". Removing the exponent specifier, and using G8.2, gives the same output. Using an E-style format works, but also doesn't quite give the expected Fortran output: E8.1 produces " 9.9E-04" instead of the expected " 0.1E-02", and E8.2e1 produces the same output.

The documentation doesn't cover these format codes, and I'm not familiar enough with the structure of Ostrich to track down the code that parses these. Does anyone have any resources they could share on how to work with these?

Many thanks,

Ethan Johnson
Reply all
Reply to author
Forward
0 new messages