How to Get the Data
Introduction
The NAAD data is available through the Data Access Protocol (DAP). The data can be accessed in two ways described below: downloading to local PC or using direct access. Both ways require a NAAD account. If you do not yet have a NAAD account, please create one HERE.
Prerequisites
- Familiarize yourself with the list of available Variables. If you need an access to additional data, please contact Alexander Gavrikov (gavrikov-at-ocean.ru) or Sergey Gulev (gul-at-sail.msk.ru).
- NAAD account — if you do not yet have a NAAD account, please create one HERE
Direct access
This approach to getting the data is preferable. It exploits the full capacity of the Data Access Protocol and avoids downloading huge amounts of data. You access the NAAD inside your script, therefore your programming language of choice must have libraries that implement the Data Access Protocol.
You can learn how to set up NAAD DAP access and see examples for Python HERE.
Download to a local machine
This way of obtaining the data may be more conventional but is not recommended because it is generally slow and takes a lot of storage on a user's machine. Nevertheless, three methods are available:
- web interface
- To access the data you need to login to the NAAD server. You will then be able to see the file structure and to download the NAAD data manually.
- wget
- The example below downloads all files in the folder https://naad.ocean.ru/dap/LoRes/Invariants/. Don't forget to replace
USER_NAME
andUSER_PASSWORD
with your username and password.#!/bin/bash USERNAME="USER_NAME"; PASSWORD="USER_PASSWORD"; LOGIN_PAGE="https://naad.ocean.ru/accounts/login/"; COOKIES_FILE="naadcookies.txt"; CSRF=`wget -qO- --keep-session-cookies --save-cookies $COOKIES_FILE $LOGIN_PAGE \ | grep "csrfmiddlewaretoken"|sed -e's/.*name=\"//;s/value//;s/[\",\>,\ ]//g;'`; wget -qO- --keep-session-cookies --load-cookies $COOKIES_FILE \ --save-cookies $COOKIES_FILE \ --post-data "username=$USERNAME&password=$PASSWORD&$CSRF" \ --referer $LOGIN_PAGE $LOGIN_PAGE wget --keep-session-cookies --load-cookies $COOKIES_FILE \ -r --no-parent https://naad.ocean.ru/dap/LoRes/Invariants/
- curl
Upcoming!
If you have any difficulties accessing the data, please contact the support (naad-at-ocean.ru) or Alexander Gavrikov (gavrikov-at-ocean.ru).