Skip to content

Read processed data from xns11 #43

Answered by gedaskir
JulKoch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, JesperGr is right that mikeio1d will not be able to do that out of the box. However, the relevant .NET class instances are available in mikeio1d. For example, it is possible to read the processed data into pandas data frame using such script:

from mikeio1d.xns11 import Xns11

def get_processed_data(xns, print_data_frame=False):
    processed_data = {}
    for xs in xns.file:
        df = pd.DataFrame()
        df['level'] = list(xs.BaseCrossSection.ProcessedLevels)
        df['area'] = list(xs.BaseCrossSection.ProcessedAreas)
        df['radius'] = list(xs.BaseCrossSection.ProcessedRadii)
        df['width'] = list(xs.BaseCrossSection.ProcessedStorageWidths)
        df['add. area'] = l…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gedaskir
Comment options

Answer selected by gedaskir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants