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.