Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
  
FluidEarth Portal > FluidEarth Discussions > How to read data from files and write data to files > How to read data from files and write data to files?  

FluidEarth Discussions: How to read data from files and write data to files?

Body

good to hear you're starting to wrap your own models.
 
as with anything, there are lots of different ways to go - in the OpenWEB_Workshop_09.zip i have uploaded is an example called Simple_2D; if you have a look at the Engine.f90 code, i open and read three different files during 'initialisation' and write generic output during 'compute'.
 
in your code, perhaps you might want to have the full file path as a mandatory argument in the omi file, which you would open as normal in initialise and write out in compute.
 
i will quickly rewrite your attached code and post a little later in the day.
 
good luck!

From: ZZhang
Posted: 08 December 2009 22:23
Subject: How to read data from files and write data to files?

I want to wrap my model using OpenWEB SDK. But I am in trouble at the beginning. The model needs to read data from files and calculate, then write the result to files. I tried to modify the TemplateFtn model, but I don’t know how to do.

The attachments are code (a simplified programme) and input data.  

Can someone tell me which files or variables need to modify and how to modify?

Thanks.

Attachments
Content Type: Message
Created at 10/12/2009 12:45  by GGlasgow 
Last modified at 10/12/2009 12:45  by GGlasgow