parameters in depth_GOMb0.08_09m11_landmask.csh (try to create my own model area)

96 views
Skip to first unread message

覃悦

unread,
Jun 24, 2024, 9:10:47 AM (9 days ago) Jun 24
to HYCOM.org Forum
Hi, Alan:
     I'm trying to build a regional model in East China Sea and  stuck with the topo files.
I followed the Wiki, but when it comes to  depth_GOMb0.08_09m11_landmask.csh, I'm confused about some parameters (red in the figure). What is the meaning of these number and what's the relations with idm and jdm in regional.grid.csh?
Here are my log of regional.grid.csh, then how I modify these numbers?微信图片_20240624210723.png
regional.grid.log

Alan Wallcraft

unread,
Jun 24, 2024, 11:19:41 AM (8 days ago) Jun 24
to HYCOM.org Forum, 覃悦
From

topo_landmask.f:

c --- read in a hycom topography file,
c --- convert one or more rectangular sub-regions to all-land,
c --- and write it out.
c
c --- stdin (unit 5) should have:
c      replacement for original 5-th header line
c      number of sub-regions to mask
c      if il jf jl  (extent of sub-region, one sub-region per line)

The number of sub-regions is often set negative to signal that the domain is not "arctic" (i.e. not global tripole)

       read(5,*) nreg
      if     (nreg.lt.0) then
c ---   a signal that the domain is not arctic
        nreg    = -nreg
        larctic = .false.
      else
        larctic = maxval(ip(1:idm,jdm)).eq.1  ! sea at j=jdm
      endif
      write(6,*)
      write(6,*) 'larctic = ',larctic
      write(6,*)

The IF IL JF JL values define a rectangular box that will be set to land.

This is needed because regional models (with or without open boundaries) must have land at i=idm and j=jdm.  Land is then assumed at i=0 and j=0 (i.e. outside the provided grid).

Note that open boundaries must be on horizontal or vertical lines next to land, but they don't have to be on the edge of the model domain.

Alan.

覃悦

unread,
Jun 24, 2024, 10:01:02 PM (8 days ago) Jun 24
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Thanks Alan. I've read the  topo_landmask.f, but still confused.  The IF IL JF JL values define a rectangular box that will be set to land, then '262 262 32 33' defines a grid for GOMb0.08?
Moreover, why '125 128 1 4' defines land? How can I distinguish and assign grid indexes in new area? Last, I'm wondering can the number of subregions (8 in GOMb0.08) be changed?

Alan Wallcraft

unread,
Jun 25, 2024, 9:58:14 AM (7 days ago) Jun 25
to HYCOM.org Forum, 覃悦, Alan Wallcraft
The grid is the "box" 1 idm 1 jdm.  The rectangles to be changed to land will be within this overall box.

First generate a land/sea map. e.g. depth_GOMb0.08_04_map.csh

Look at the map near i=idm and j=jdm.  These last rows and columns *must* be all land and if they are not than identify rectangles to use via landmask to change them.  Note that the rectangle can include existing land points which will be unchanged, with all sea points converted to land.  Use the map and a plot of the actual bathmetry to decide where to locate your open boundaries and make sure all points normal to the boundary and landward of the open boundary are land after invoking landmask.

You can include as many IF IL JF JL lines as you like, with the number of sub-regions read in just before the 1st IF line (make it negative because the automatic Arctic detector often fails)

Alan.

覃悦

unread,
Jun 26, 2024, 10:45:58 PM (6 days ago) Jun 26
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Thank you Alan! I'm getting a little bit clear right now.
But I couldn't fine the file to create 94m, as in Github '94m    is interpolated from GOMb0.01 04bs17m'.
Can you share me the csh file?

Alan Wallcraft

unread,
Jun 27, 2024, 8:43:04 AM (6 days ago) Jun 27
to HYCOM.org Forum, 覃悦, Alan Wallcraft
What is 94m?

Alan.

覃悦

unread,
Jun 30, 2024, 4:59:59 AM (3 days ago) Jun 30
to HYCOM.org Forum, Alan Wallcraft, 覃悦
These files in HYCOM-examples\GOMb0.08/datasets/topo
depth_GOMb0.08_94m.a
depth_GOMb0.08_94m.b

Alan Wallcraft

unread,
8:53 AM (13 hours ago) 8:53 AM
to HYCOM.org Forum, 覃悦, Alan Wallcraft
I have provided example scripts to use GEBCO_2019 to generate a bathymeterty, from README.GOMb0.08.topo:

a) Generate the best possible fine grid bathymetry and coastline everywhere, in this
case GOMb0.08/datasets/topo/depth_GOMb0.08_04.[ab].  This is from 94m which in turn
is depth_GOMb0.01_04bs17m subregioned to GOMb0.08 via isuba_topog.  Normally, the
best bathymetry is from GEBCO (say) and so we also provide depth_GOMb0.08_19.csh
and depth_GOMb0.08_20_fill-shrink-clip-smooth.csh as examples of how to do this.
GEBCO_2019 is the last version that provides sub-meter resolution in shallow
water, so we don't recommend more recent versions.  Note that depth_GOMb0.08_20
may need additional editing (e.g. landfill) and it is provided as an example of
the process, it has not been used in a model run.

I also updated some of the HYCOM-tools/topo/src codes to write out more accurate min and max.  The old versions may fail if the min is too small.

Alan.
Reply all
Reply to author
Forward
0 new messages