[MITgcm-support] Enquiries about the MITgcm tutorials

Takaya Uchida tu22 at fsu.edu
Tue Oct 15 23:21:24 EDT 2024


Hi Juncheng,

It depends on whether the bathy.bin file is written in big endian or small endian but I usually read binary files in Python as the following:
f = open( ‘bathy.bin', ‘r' )
Bathy = np.fromfile( f, '>f4’ ).reshape([ny, nx])
where ny and nx are the number of grid points.

As for modifying the tutorial bottom topography for your new SIZE.h file, I would suggest a linear interpolation.

Best,
Takaya


On Oct 15, 2024, at 11:13 PM, Juncheng Zhang <juncheng.zhang at mail.utoronto.ca> wrote:

Hi,

I hope you are doing well.

I am Juncheng, one of PhD student in University of Toronto, and I am trying to run a tutorial simulation with MITgcm, for example the Baroclinic_ocean_gyre, however, I had several questions:

  *   I want to change the grid numbers, I try to change the grid parameters in SIZE.h and data files, when I run the simulation, I had some error which is related to the bathy.bin file due to the changed grids. I am wondering what is a good way to change the grid numbers.
  *   I try to open the bathy.bin file in Jupyter Notebook, however, it can not be opened,

Error: bathy.bin is not UTF-8 encoded saving disabled. See console for more details

  *   I am also curious about if I want to change the bottom topography, what should I do to modify it.

I hope you can give me some advice to solve the issues.

Thank you very much, and have a good day!

Kind Regards
Juncheng Zhang
PhD Student,
Earth, Atmospheric, and Planetary Physics

Department of Physics
University of Toronto
McLennan Physical Laboratories
60 St Gorge St
Toronto, Ontario, M5S 1A7

juncheng.zhang at mail.utoronto.ca<mailto:juncheng.zhang at mail.utoronto.ca>

<image001.jpg><https://www.physics.utoronto.ca/>

_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20241016/a373a8bc/attachment-0001.html>


More information about the MITgcm-support mailing list