GithubHelp home page GithubHelp logo

Comments (6)

Alexander-Barth avatar Alexander-Barth commented on July 25, 2024

Can you try using relative file names?
Have you seen this explanation?
https://github.com/gher-ulg/DIVAnd.jl/blob/master/src/SDNMetadata.jl#L702

How can we make it clearer?

from divand.jl.

meliezer avatar meliezer commented on July 25, 2024

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on July 25, 2024

The idea is to the have a similar directory tree locally than on the remote server so that the pathname match.
Can you try to do the following?

  • in your work-directory /home/menashe/netcdf/ (for example), can you create the following sub-directories
    • Baltic Sea/Autumn (September-November) - 6-years running averages
    • Baltic Sea/Summer (June-August) - 6-years running averages
    • Baltic Sea/Spring (March-May) - 6-years running averages
    • Baltic Sea/Winter (December-February) - 6-years running averages
  • move the files Water_body_silicate.4Danl.nc in the corresponding directory
  • Note the tools rsync allows you to easily mirror a directory structure from a remote server:
rsync -avzu [email protected]:"/production/apache/data/emodnet-domains/Baltic\ Sea" /home/menashe/netcdf/
  • In julia, change to directory "Baltic Sea" in your work directory:
cd("/home/menashe/netcdf/Baltic Sea")
files = ["Winter (December-February) - 6-years running averages/Water_body_silicate.4Danl.nc","Spring (March-May) - 6-years running averages/Water_body_silicate.4Danl.nc","Summer (June-August) - 6-years running averages/Water_body_silicate.4Danl.nc","Autumn (September-November) - 6-years running averages/Water_body_silicate.4Danl.nc"]
@show files
DIVAnd.divadoxml(files,"Water_body_silicate","EMODNET-chemistry","export.zip","test.xml";
    ignore_errors = true,
    additionalvars = Dict("abstract" => "Here goes the abstract"),
    WMSlayername = ["winter","spring","summer","autumn"]
)

Double-check that the file names are relative files (i.e. not starting with /home ...)

The issue with the multi-season XML files is that we must tell divadoxml also the part about Autumn (September-November) - 6-years running averages to construct correct URLs.

from divand.jl.

meliezer avatar meliezer commented on July 25, 2024

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on July 25, 2024

To override the NetCDF_URL use the following:

 DIVAnd.divadoxml(files,"Water_body_silicate","EMODNET-chemistry","export.zip","test2.xml";
           ignore_errors = true,
           additionalvars = Dict("abstract" => "Here goes the abstract", "NetCDF_URL" => "http://hostname/path/to/the/zip/file"),
           WMSlayername = ["winter","spring","summer","autumn"]
       )

By the way, do not use the function glob that I mentioned earlier because the order of the season is then alphabetical and not chronological.

The resulting XML file has:

  • 1 NetCDF link
  • 4 OpenDAP links (1 per season)
  • 8 WMS links (4 seasons and for the maps "observations" and "masked analysis")

This is committed to the master 4f4ba08 . CI checks are running https://travis-ci.org/gher-ulg/DIVAnd.jl/builds/460271579.
Attached is the produced XML file.
test2.xml.txt

from divand.jl.

meliezer avatar meliezer commented on July 25, 2024

Thank you!

from divand.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.