-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_meta_generator_norway.py
executable file
·43 lines (32 loc) · 1.3 KB
/
run_meta_generator_norway.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# create all meta
import parse_c4i_catalog
import clipc_metadata_wizard
# generates metadata inspire compliant xmls
# output: metadata dir
#climate4impact catalogue used to extract clipc meta
#catalog_url = 'http://opendap.knmi.nl/knmi/thredds/catalog/CLIPC/tier1_indicators/icclim_cerfacs/catalog.xml'
#catalog_url_head = "http://opendap.knmi.nl/knmi/thredds/catalog/CLIPC/tier1_indicators/icclim_cerfacs/"
catalog_url_head = "http://thredds.met.no/thredds/dodsC/"
catalog_url_proj = "arcticdata/met.no/CLIPC"
catalog_url = catalog_url_head+catalog_url_proj
# template based on inspire compliant metadata xml used.
#
template_inspire_metadata = 'xml.template_inspire_metadata'
target = "metadata/"
count = 0
# http://thredds.met.no/thredds/catalog/arcticdata/met.no/catalog.xml
# this may change...
jname = catalog_url+"/catalog.xml"
title= (catalog_url_proj.replace("/","_").replace(".","_"))
print " cat: ", jname
print " tit: ", title
#def createCSW2( template_xml, opendap , c4iurl, template_xmlNew, title ):
layers = [''];
for layer in layers:
clipc_metadata_wizard.createCSW2( template_xml=template_inspire_metadata,
opendap=catalog_url_head,
url=jname,
template_xmlNew=target+title+"_"+layer+".xml",
title=title,
layer=layer )
print "end."