Skip to content

Updating ERDDAP on gamone for new or changed time series data

Dan Nowacki edited this page Dec 11, 2019 · 6 revisions

Adding new data files

logon to gamone and set the environment:

ssh gamone.whoi.edu
cd /opt/docker/erddap
source activate IOOS # or ensure your python environment has all the necessary modules installed

edit the python script nc_to_datasetsXml-batch.py changing lines:

ipath= '/silt/usgs/Projects/stellwagen/CF-1.6/**/*.nc'
opath = '/opt/docker/erddap/xml_parts/cmg/nc

run the script:

nice python nc_to_datasetsXml-batch.py >& foo.log &

Adding variables or new data files

Option 1: run GenerateDatasetsXml.sh to generate a new XML snippet

Log in to the container

$ docker exec -it erddap bash

then execute

$ cd /usr/local/tomcat/webapps/erddap/WEB-INF
$ bash GenerateDatasetsXml.sh

answering the questions.

Suggested responses

  • Which EDDType (default="EDDGridFromDap"): EDDTableFromMultidimNcFiles

Then you'll get an XML snippet at /opt/docker/erddap/data/logs/GenerateDatasetsXml.out. After logging out of the Docker container, you can then move that XML file to the appropriate directory (i.e. in /opt/docker/erddap/xml_parts/<YOUR_DIR>).

Option 2: Edit the existing XML file directly

Edit /opt/docker/erddap/xml_parts/<YOUR_DIR>/<YOUR_FILE>.xml and add new <dataVariable> elements, using the existing elements as a template.

Both options

After completing either option 1 or option 2 above, look at the script /opt/docker/erddap/do_cat and make sure it's looking in the appropriate directories and getting the correct XML files. Then run the script

$ bash do_cat

from its directory. This will create the new datasets.xml file, which will be read by ERDDAP. If you don't want to wait until the next refresh, you can touch a file to force a reload

$ touch /opt/docker/erddap/data/hardFlag/<YOUR_DATASET_ID>  

Adding the THREDDS catalog link to be harvested by the CSW

Edit the non-NcML list of catalogs. Make the change (quickest to do so via the web interface; click the pencil icon) and submit a pull request.