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 can I obtain the file including dx &dy length of a mom6 model?

bubbleisle

徐文文
New Member
I am trying to calculate the ocean heat transport without any interpolation to a model which consists of mom6 model.
But I need the origional dx and dy data of the grid.
I've tried to download the grid_spec.nc and ocean_grid.nc from a github repo: (GitHub - NOAA-GFDL/MOM6-examples: Example configurations for MOM6 and SIS2). But I cannot open it (There's only one line of it's name in it).
Is there any way that I can obtain the origional dx and dy data (the distance between u &v porints) of a mom6 model? Or do I need to calculate it with any code?
Thanks for any info that you provide!
 

marshallward

Marshall Ward
New Member
The files in the MOM6-examples are symbolic links. (To make things even more confusing, they are symbolic links into other symbolic links.) Binary datasets are not part of the repository, since they are difficult to version control and can severely increase the size of the repository.

You will need to set up the `.datasets` directory in the `MOM6-examples` directory. This is explained in this step of the wiki:


Unfortunately it is using FTP so you will need to navigate this to find the required input datasets.
 

bubbleisle

徐文文
New Member
The files in the MOM6-examples are symbolic links. (To make things even more confusing, they are symbolic links into other symbolic links.) Binary datasets are not part of the repository, since they are difficult to version control and can severely increase the size of the repository.

You will need to set up the `.datasets` directory in the `MOM6-examples` directory. This is explained in this step of the wiki:


Unfortunately it is using FTP so you will need to navigate this to find the required input datasets.
Thank u for ur information!

I've downloaded the mom6 ocean-hgrid file from the ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/ successfully, and it does contain dx and dy variables. However I found that the grid resolution was 720*420, while GFDL-CM4 has a resolutino of 1440*1080. So the file that I might actually need is OM4_025 grid file.

Then I tried to use the code provided from OM4-figures/grids.ipynb at master · NOAA-GFDL/OM4-figures , to download the "OM4_025/mosaic.v20170622.unpacked/ocean_hgrid.nc" file by using "netCDF4.Dataset.()" in python.

But the process continues to fail. It responses with:"OSError: [Errno -51] NetCDF: Unknown file format." I've looked up the reason that it might be because the file was broken (or any other reason that I'm still not aware of).

Is there any other ways that I can obtain the grid file of OM4_025? Or is possible that I can calculate the dx & dy with lat & lon of each x & y point(even if they are not in order)?

Thanks again for you time and patience!
 

marshallward

Marshall Ward
New Member
The OM4_25 is a 0.25-degree ice-ocean model based on CM4. It should have the same ocean grid (1440x1080), but it won't have the CM4 atmosphere. I am not sure if the FTP site contains the datasets required to run CM4.

If you're seeing a different grid (720x420) then you may have downloaded the grid for a different model. Note that there are many separate .tgz files in ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/.

I can't comment on the IPython notebook since I don't use them, but your URL seems to be pointing to the correct file.

BTW I usually just download the individual files with `wget`:

$ wget ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/OM4_025.tgz

You would then need to place it in your .datasets directory and unpack it.

Note that you will also need the CORE.tgz and obs.tgz files to run OM4_25. You can look inside the `OM4_025/INPUT` directory and check the symbolic link paths to see which files are missing.
 

bubbleisle

徐文文
New Member
The OM4_25 is a 0.25-degree ice-ocean model based on CM4. It should have the same ocean grid (1440x1080), but it won't have the CM4 atmosphere. I am not sure if the FTP site contains the datasets required to run CM4.

If you're seeing a different grid (720x420) then you may have downloaded the grid for a different model. Note that there are many separate .tgz files in ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/.

I can't comment on the IPython notebook since I don't use them, but your URL seems to be pointing to the correct file.

BTW I usually just download the individual files with `wget`:

$ wget ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/OM4_025.tgz

You would then need to place it in your .datasets directory and unpack it.

Note that you will also need the CORE.tgz and obs.tgz files to run OM4_25. You can look inside the `OM4_025/INPUT` directory and check the symbolic link paths to see which files are missing.
I found the file! Thanks a lot!
 
Top