wrong bathymetry for this archive file

24 views
Skip to first unread message

yilong lyu

unread,
Nov 14, 2022, 7:03:28 PM11/14/22
to HYCOM.org Forum
Hi Alan,

When I use the archv2ncdf3z to convert [ab] files to netcdf format. In the last few months of the files, I encountered the following error: error - wrong bathymetry for this archive file.

But the 3z files of the past few years and  all the 2d files have no such problems. 

Thanks in advance.
Yilong

截屏2022-11-15 08.01.12.jpg

Alan Wallcraft

unread,
Nov 15, 2022, 1:54:21 PM11/15/22
to HYCOM.org Forum, lyuy...@gmail.com
Do you have two or more bathymetry files?   If so, your are using the wrong one for the 3z program, i.e. a different bathymetry than the model run.  The land/sea mask is correct, but the bathymery differs by 9.5 cm from the sum of the layer thicknesses (which should add up to the depth).  The thickness sum has round off so the depth and sum are not the same but usually differ by less than 1 mm.  If you have a 3z .log file that worked, see what it reported for the archive depth mismatch range.

This check it designed to catch using the wrong bathymetry, but 9.5 cm isn't a huge difference and usually two different bathymetries would differ by more than this.  If it isn't obvious what is wrong, you can try editing  archv2data3z.f to produce more printout.  There is already some debugging code commented out which you can use as a starting point:

            if     (abs(q).gt.onecm) then
              ibads = ibads + 1
*             write(lp,*) 'large archive depth mismatch: ',i,j,q
*             if     (i+iorign-1.le.idm) then
*               write(lp,*) 'large archive depth ORIGINAL: ',
*    &                      i+iorign-1,    j+jorign-1,depths(i,j)
*             else
*               write(lp,*) 'large archive depth ORIGINAL: ',
*    &                      i+iorign-1-idm,j+jorign-1,depths(i,j)
*             endif !iorign
            endif !large mismatch

If you are sure that the bathymetry is the correct one, then replace onecm in the 1st line above with tencm (or 15.0*onecm to be safe) and the check should pass.

Alan.
Reply all
Reply to author
Forward
0 new messages