calculate depth in i,j

43 views
Skip to first unread message

samad r

unread,
Aug 25, 2017, 1:40:33 AM8/25/17
to HYCOM.org Forum
hi hycom expert

do you have any program to calculate depth in idm, jdm from regional.depth.[ab]?

thanks in advance

alan.wa...@hycom.org

unread,
Aug 25, 2017, 9:30:43 AM8/25/17
to HYCOM.org Forum
If you want the depth at a single point, the easiest way is probably to add the point as 2 extra arguments to hycom_range:

ajax 96> hycom_range depth_GLBb0.08_11.a 4500 3298 1324 1505
min, max =    5.0000000       7199.9800        (1324,1505) =    5255.7783   

Another option is hycom_print, which can print a rectangle as well as a point:

ajax 97> hycom_print depth_GLBb0.08_11.a 4500 3298 1 "(2i5,f12.4)" 1324 1324 1505 1505
# hycom_print file.a idm jdm k cfmt if il id jf jl jd
# hycom_print depth_GLBb0.08_11.a
#               4500  3298     1
#             (2i5,f12.4)
#               1324  1324     1  1505  1505     1
 1324 1505   5255.7783

Or hycom_sample, which can print a list of points:

ajax 100> hycom_sample depth_GLBb0.08_11.a 4500 3298 "(f12.4)" 1324 1505
 idm,jdm,npad,nrec =          4500         3298         2904     59375616
# hycom_sample file.a idm jdm cfmt ip,jp
# hycom_sample depth_GLBb0.08_11.a
#              4500 3298
#             (f12.4)
#              1324 1505
   5255.7783

Alan.
Reply all
Reply to author
Forward
0 new messages