Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

How to open and modify forcing files in .ieeer8 file format?

Laura

Laura
New Member
I barely know this file format, except that it is probably a binary file, and I have no idea how to deal with it. Can Python/MATLAB/NCL... open it? What should I do if I want to modify the values in this files? Is it possible to transform .ieeer8 to .nc?

Any messages about it is appreciated. Thanks at advance.

Laura
 

emaroon

Elizabeth Maroon
New Member
Hi Laura,

I haven't opened the ieeer8 files with python, but I have opened ieeei4 files using numpy. Here's a quick python snippet that I use that might help:

Python:
import numpy as np
topog_fname ='topography_20161215.ieeei4'
kmt_flat = np.fromfile(topog_fname, dtype='>i4', count=-1) #flat array
kmt_reshaped = kmt_flat.reshape([384,320]).astype(np.int32) #2d array, hard-coded for 384x320 resolution

You should be able to modify the dtype for a float (r8); watch out for endianness. I probably figured this out by poking around the pop_tools package or the paleotools. More hints are probably available in those packages.

All the best,
Liz
 
Top