[Thread Prev][Thread Next][Index]

Re: [ferret_users] open bin mitgcm output



Hi Estanislao,

I'm not familiar with this file type, but here are some ideas for you in trying to read it with Ferret.

* check that the data type of r4 translates to values that make sense, by just reading a few values


DEFINE AXIS/X=1:10:1 xaxis
DEFINE GRID/X=xaxis xgrid
FILE/VAR=depth/GRID=xgrid/FORMAT=UNF/type=r4 Depth.data
LIST depth

Are the values correct?  If not try FORMAT=stream or other data types

* Ferret grids are all in the order XYZTEF, or some subset of those, so that X varies fastest.  If the file has Y varying fastest, then you'd need to define the grid with

DEFINE AXIS/X=1:3060:1 xaxis
DEFINE AXIS/Y=1:510:1 yaxis
DEFINE GRID/X=xaxis/Y=yaxis xyecco
...

and once you've read the data define a new variable using a TRANSPOSE function to reorder the data to a correct XY grid.



On 10/31/2019 7:30 PM, ESTANISLAO GAVILAN PASCUAL-AHU wrote:
Hi Community,

 I would like to open a data output file from ECCO2 in MITgcm. I have tried the following commands but the conversion is wrong 

DEFINE AXIS/X=1:510:1 x510
DEFINE AXIS/Y=1:3060:1 y3060
DEFINE GRID/X=x510/Y=y3060 xyecco
FILE/VAR=depth/GRID=xyecco/FORMAT=UNF/type=r4 Depth.data
I have also tried 
FILE/VAR=depth/GRID=xyecco/FORMAT=stream/type=r4 Depth.data


 I know I can use the matlab tool called readbin but I would like to learn to do it with FERRET.

 Kind regards,


Estanislao
 

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement