How to use checksum?

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
treble
Posts: 48
Joined: Thu Jan 24, 2008 1:33 pm America/New_York
Answers: 0
Has thanked: 1 time
Been thanked: 1 time

How to use checksum?

by treble » Tue May 23, 2023 7:22 pm America/New_York

How do I use the file_search provides checksum?
Example:
Search for a daily MODIS/Aqua file:

Code: Select all

wget -q --post-data="results_as_file=1&sensor_id=7&dtid=1042&sdate=2023-01-01 00:00:00&edate=2023-01-01 23:59:59&subType=1&addurl=1&search=*L3b.DAY.CHL*" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
Returns:
https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/AQUA_MODIS.20230101.L3b.DAY.CHL.nc

Checksum download:

Code: Select all

wget -q --post-data="results_as_file=1&sensor_id=7&dtid=1042&sdate=2023-01-01 00:00:00&edate=2023-01-01 23:59:59&subType=1&cksum=1&search=*L3b.DAY.CHL*" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
Returns:
35836abcb24a9290aec0926f5fed35c35045c676 AQUA_MODIS.20230101.L3b.DAY.CHL.nc

But after downloading the file I cannot seem to match it with either md5sum, sha512sum nor cksum....:

Code: Select all

server prompt> file AQUA_MODIS.20230101.L3b.DAY.CHL.nc 
AQUA_MODIS.20230101.L3b.DAY.CHL.nc: Hierarchical Data Format (version 5) data
server prompt> ls -al AQUA_MODIS.20230101.L3b.DAY.CHL.nc 
-rw-rw-r--. 1 userid userid 33673912 Mar  1 14:24 AQUA_MODIS.20230101.L3b.DAY.CHL.nc
server prompt> md5sum AQUA_MODIS.20230101.L3b.DAY.CHL.nc 
7c4eedd1f204d9f23c8139739ce983a6  AQUA_MODIS.20230101.L3b.DAY.CHL.nc
server prompt> sha512sum AQUA_MODIS.20230101.L3b.DA
sha512sum: AQUA_MODIS.20230101.L3b.DA: No such file or directory
server prompt> sha512sum AQUA_MODIS.20230101.L3b.DAY.CHL.nc 
6c431a870b746c3fba5317d1a979ea896250435200905d23436210cfd67be612c74c2850c66b2ea16cc336a6e7e07d07d813bd4439fee253bcf1e44e3083a1d1  AQUA_MODIS.20230101.L3b.DAY.CHL.nc
server prompt> cksum AQUA_MODIS.20230101.L3b.DAY.CHL.nc 
630180519 33673912 AQUA_MODIS.20230101.L3b.DAY.CHL.nc
The downloaded file is fine. I tried a couple different ones. What am I missing?

Thanks!

Tags:

OB ODPS - towens
Subject Matter Expert
Subject Matter Expert
Posts: 364
Joined: Fri Feb 05, 2021 9:17 am America/New_York
Answers: 0
Been thanked: 4 times

Re: How to use checksum?

by OB ODPS - towens » Wed May 24, 2023 9:17 am America/New_York

It is a sha1sum
sha1sum AQUA_MODIS.20230101.L3b.DAY.CHL.nc
35836abcb24a9290aec0926f5fed35c35045c676 AQUA_MODIS.20230101.L3b.DAY.CHL.nc

Tommy

treble
Posts: 48
Joined: Thu Jan 24, 2008 1:33 pm America/New_York
Answers: 0
Has thanked: 1 time
Been thanked: 1 time

Re: How to use checksum?

by treble » Wed May 24, 2023 12:27 pm America/New_York

Yes, that matched! Thanks for your quick reply.

Post Reply