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

Setting up bathymetry for experiment

ssmith

Sergio Smith
New Member
Hi, everyone,

I have some questions about setting up my own
experiments, and I was hoping you could help me or direct me to help.

I've run some of the examples, gone through some of the notebooks, and
watched a tutorial or two. I have a pretty good idea of the roles of
different inputs and how to view and interpret outputs, but I'm having
trouble modifying examples for what I need.

Currently I'm trying to adapt the double gyre example to take a
bathymetry file. I think I've modified the MOM_input file correctly, but
I'm getting an error of "field size mismatch" for the depth variable. I
haven't been able to find a usable bathymetry file in the examples for
comparison, but the solution could be as simple as making the format
match. I've also considered that my bathymetry file might be the wrong
netCDF version.
 

adcroft

Alistair Adcroft
Member
The global_ALE model has a bathymetry being read from file as an example. The CDL for that netcdf file is:
netcdf topog {
dimensions:
ntiles = 1 ;
nx = 360 ;
ny = 210 ;
variables:
double depth(ny, nx) ;
depth:standard_name = "topographic depth at T-cell centers" ;
depth:units = "meters" ;
}
Obviously nx and ny most match the size of the model, nx=NIGLOBAL and ny=NJGLOBAL. I think that particular file is in global.tgz at ftp://ftp.gfdl.noaa.gov/perm/Alistair.Adcroft/MOM6-testing/ which should allow you to compare netcdf formats. Hopefully this is enough for you to create a netcdf file. If there's a netcdf versioni thing going on, check the "kind" with `ncdump -k`. I generally recommend using the older formats (netcdf3 or 64-bit) for portability and not using compression or the other hdf features.

The runtime parameters to control topography are:
TOPO_CONFIG = "file"
TOPO_FILE = "topog.nc" ! default = "topog.nc"
! The file from which the bathymetry is read.
TOPO_VARNAME = "depth" ! default = "depth"
! The name of the bathymetry variable in TOPO_FILE.
MAXIMUM_DEPTH = 6000.0 ! [m]
! The maximum depth of the ocean.
MINIMUM_DEPTH = 0.5 ! [m] default = 0.0
! If MASKING_DEPTH is unspecified, then anything shallower than MINIMUM_DEPTH is
! assumed to be land and all fluxes are masked out. If MASKING_DEPTH is
! specified, then all depths shallower than MINIMUM_DEPTH but deeper than
! MASKING_DEPTH are rounded to MINIMUM_DEPTH.
two of which are actually default values.

I hope that helps.
 

ssmith

Sergio Smith
New Member
Thanks very much! My problem turned out to be fairly simple but your post helped me to find it. I'm now getting a separate (seemingly unrelated) error, so I think I'll make a separate post for it.
 
Top