Converting the monthly average file to netCDF format: wrong bathymetry for this archive file.

187 views
Skip to first unread message

zhong minglei

unread,
Nov 11, 2024, 9:46:00 AM11/11/24
to fo...@hycom.org
Dear Alan,
I am currently facing an issue where I am using archv2ncdf3z to convert the monthly average file into netCDF format, and I am encountering an error: "error - wrong bathymetry for this archive file." However, I am certain that I used the same bathymetry file to generate the monthly average file. So, how can I resolve this issue?I have attached my relevant files, including the bathymetry file and the grid file. The `017.log` is the log file from my run.
I would be extremely grateful if you could provide a response.
Best regards

017.log
regional.depth.a
regional.grid.a
regional.depth.b
regional.grid.b

Alan Wallcraft

unread,
Nov 11, 2024, 1:11:57 PM11/11/24
to HYCOM.org Forum, zhong minglei
We added this check because sometimes there are two or more bathymetries with the same land/sea boundary (coastline) but different ocean depths. typically a small region has been edited for some reason.  The sum of the archive file layer thicknesses (in m) should be exactly depth from the bathymetry file, but because both files are REAL*4 the sum does not have to be exactly depth and we add a "close enough" test that generates an error stop if they differ by more than one cm.  In your case they differ by 3 cm.  This is a fixed difference criteria, but 1 cm in 10 m is 0.1% error and 1 cm in 5000 m is .002% error - so perhaps it should be a significant digits test instead.

For the GOFS 3.1 bathymetry, with depths from  5 to 7200 m, we get:

 archive depth mismatch range = -9.7656250E-04  9.7656250E-04

So 3 cm is a larger than normal mismatch.

I have just added hycom_archive_sea_ok to HYCOM-tools, see Add hycom_subsample and hycom_archive_sea_ok.

This allows you to directly test your bathymetry against an archive file, and it prints out some of the large mismatches.  If you have more than one bathymetry, try all of them.

Alan.

Alan Wallcraft

unread,
Nov 11, 2024, 4:25:20 PM11/11/24
to HYCOM.org Forum, Alan Wallcraft, zhong minglei
In general, if a computer program checks for errors and finds them believe the program.  There is always a small chance it is wrong, but only a small chance.

In this case, I would check that the bathymetry in the scratch directory where the model was run and in the directory where the means were formed is identical to the original version in your topo directory.  A simple way to do this is the Linux cmp command.

Alan.

Luana F. Bueno

unread,
Mar 13, 2025, 8:10:22 AM3/13/25
to HYCOM.org Forum, Alan Wallcraft, zhong minglei
Hi Alan, 

I have just used   hycom_archive_sea_ok and I got the following results:

" ...
large archive depth mismatch:    321   409   -0.28826237    2.71173763
large archive depth mismatch:    226   411   -0.89835429    2.10164571
large archive depth mismatch:    225   412   -0.84973168    2.15026832

ARCHIVE LAND/SEA is OK


 error - wrong bathymetry for this archive file
 number of depth mismatches =          137

Depth anomaly: min,max =   -1.00000000    0.00024414"

How is the best way to correct these mismatches? 
The anomaly is so small, that maybe a way out would be just commenting the bathymetry check within arhv2ncdf3z original script. 


Kind regards, 
Luana F Bueno 

Alan Wallcraft

unread,
Mar 13, 2025, 9:01:53 AM3/13/25
to HYCOM.org Forum, Luana F. Bueno, Alan Wallcraft, zhong minglei
Luana,

A mismatch of 0.85 m in 2.1 m of water is huge.  This is definitely not the bathymetry used to create the archive files.

Do you have any other bathymetry files?  Check all of them with  hycom_archive_sea_ok.

 Alan.

Luana F. Bueno

unread,
Mar 13, 2025, 9:10:32 AM3/13/25
to HYCOM.org Forum, Alan Wallcraft, Luana F. Bueno, zhong minglei
Hi Alan, 

Totally, I get it. 
Well, I just have one bathymetry file because I'm rerunning a model in which the setup was already ready. 
But I did notice the following message on the log file:

 step 56804460 day  39447.54167 -- archiving completed --
 56804463 i,j,mn =  289  121  1 clipped oneta after barotp call  0.100000
 56804463 i,j,mn =  289  121  2 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  289  121  1 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  284  166  1 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  282  169  1 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  289  121  2 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  284  166  2 clipped oneta after barotp call  0.100000
 56804466 i,j,mn =  282  169  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  289  121  1 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  284  166  1 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  267  169  1 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  278  170  1 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  282  169  1 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  289  121  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  267  169  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  284  166  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  282  169  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  278  170  2 clipped oneta after barotp call  0.100000
 56804469 i,j,mn =  275  172  2 clipped oneta after barotp call  0.100000
... 

So I believe this might be the issue, and when creating the archv files the bathymetry end up being different. 
What do you think?

Regards, 
Luana

Alan Wallcraft

unread,
Mar 13, 2025, 9:59:39 AM3/13/25
to HYCOM.org Forum, Luana F. Bueno, Alan Wallcraft, zhong minglei
Did you start from a restart file obtained from someone else?  if so, it was created with a different bathymetry and that is what you are seeing in the archive files.

If not, point me to an archive file and your regional.grid and regional.depth and I'll take a look.

Alan.
Reply all
Reply to author
Forward
0 new messages