Blame view

specs/CDF_spec.md 9.11 KB
ef9a8767   Nathanael Jourdane   Add the CDF specs
1
2
3
4
5
6
7
8
9
10
11
12
# Formating CDF files for AMDADB

This specification follows the ISTP guidelines, see [the ISTP guide](https://spdf.gsfc.nasa.gov/istp_guide/).

---

## Global CDF attributes

See [the ISTP guidelines for global attributes](https://spdf.gsfc.nasa.gov/istp_guide/gattributes.html).

### Acknowledgement

dd534f05   Nathanael Jourdane   Improve documenta...
13
14
Value of node `NumericalData/ResourceHeader/Acknowledgement` from SPASE file *NumericalData* corresponding to the
granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
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

> **Ex:**
>
>     NASA, Prof. Henri Reme, European Space Agency

### Data_type

Dataset name

> **Ex:**
>
>     PRP

### Data_version

    1

### Descriptor

Instrument name

> **Ex:**
>
>     CIS

### Discipline

e4f62df8   Baptiste Cecconi   fixed Discipline ...
42
- If target name is `Sun` or `Earth` : ***Space Physics***
dd534f05   Nathanael Jourdane   Improve documenta...
43
44
- otherwise, look for node value of `NumericalData/ObservedRegion` from the *NumericalData* SPASE file corresponding
to the granule:
e4f62df8   Baptiste Cecconi   fixed Discipline ...
45
46
47
	- if it contains `Magnetosphere`: ***Space Physics>Magnetospheric Science***;
	- if it contains `NearSurface`: ***Space Physics>Ionospheric Science***;
	- if it contains `Heliosphere`: ***Space Physics>Interplanetary Studies***.
ef9a8767   Nathanael Jourdane   Add the CDF specs
48
49
50
51
52
53
54

### Generated_by

    CDPP>Centre de Donnees de la Physique des Plasmas

### Generation_date

dd534f05   Nathanael Jourdane   Improve documenta...
55
56
Value of node `NumericalData/ResourceHeader/ReleaseDate` from the *NumericalData* SPASE file corresponding to the
granule, formated as *yyyymmdd*.
ef9a8767   Nathanael Jourdane   Add the CDF specs
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

> **Ex:**
>
>     20151019

### HTTP_LINK

    http://amda.cdpp.eu

### Instrument_type

Value of node `Instrument/InstrumentType` from the *Instrument* SPASE file corresponding to the granule.

> **Ex:**
>
>     ElectrostaticAnalyser

### LINK_TEXT

dd534f05   Nathanael Jourdane   Improve documenta...
76
77
Value of node `NumericalData/ResourceHeader/AlternateName` from the *NumericalData* SPASE file corresponding to the
granule **+** ` data are available at `.
ef9a8767   Nathanael Jourdane   Add the CDF specs
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

> **Ex:**
>
>     Cluster 1 Prime Parameter CIS data data are available at

### LINK_TITLE

    CDPP AMDA DATABASE

### Logical_file_id

Dataset name **+** `_` **+** `start_time` epn-core value, formated as `YYYYMMDDHHMMSS`.

Note: This is actually the file name without extension.

> **Ex**
>
>     CLUST1_CIS_PRP_19900302040000

### Logical_source

Dataset name

> **Ex:**
>
>     CLUST1_CIS_PRP

### Logical_source_description

dd534f05   Nathanael Jourdane   Improve documenta...
107
108
Value of node `NumericalData/ResourceHeader/Description` from the *NumericalData* SPASE file corresponding to the
granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
109
110
111

> **Ex:**
>
dd534f05   Nathanael Jourdane   Improve documenta...
112
113
>     This instrument (CIS: Cluster Ion Spectrometry) is capable of obtaining full 3D ion distributions with high time
> resolution (in one spacecraft spin) and mass-per-charge resolution. The experiment consists of [...]
ef9a8767   Nathanael Jourdane   Add the CDF specs
114
115
116

### Mission_group

dd534f05   Nathanael Jourdane   Improve documenta...
117
118
- Last element of the value of node `Observatory/ObservatoryGroupID` from the *Observatory* SPASE file corresponding to
the granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
- if the node doesn't exist: value of node `Observatory/ResourceName`.

> **Ex:**
>
>     Cluster

### MODS

    Extracted from NetCDF AMDA internal data.

### Parents

The NetCDF file name.

> **Ex**
>
>     CLUST1_CIS_PRP_19900302040000.nc

### PI_affiliation

Value of node `Person/OrganisationName` from the *Person* SPASE file corresponding to the granule.

> **Ex**
>
>     ESTEC, ESA

### PI_name

dd534f05   Nathanael Jourdane   Improve documenta...
147
148
Value of node `NumericalData/Contact/PersonID` where `Role` node value is `PrincipalInvestigator`, from the
*NumericalData* SPASE file corresponding to the granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

> **Ex:**
>
>     Henri.Reme

### Project

A list with:

- `CDPP>Centre de Donnees de la Physique des Plasmas`
- the value of node `NumericalData/ProviderName`, from the *NumericalData* SPASE file corresponding to the granule.

> **Ex:**
>
>     - CDPP>Centre de Donnees de la Physique des Plasmas
>     - CSDS-CNES

### Rules_of_use

    System Use Policy

dd534f05   Nathanael Jourdane   Improve documenta...
170
171
172
    Thank you for acknowledging the use of AMDA in publications with wording like "Data analysis was performed with the
    AMDA science analysis system provided by the Centre de Données de la Physique des Plasmas (CDPP) supported by CNRS,
    CNES, Observatoire de Paris and Université Paul Sabatier, Toulouse."
ef9a8767   Nathanael Jourdane   Add the CDF specs
173
174
175
176

	Data use policy from originating <NAME> data center: <URL>

where :
dd534f05   Nathanael Jourdane   Improve documenta...
177
178
- <NAME> is the value of node `NumericalData/ProviderName` from the SPASE file *NumericalData* corresponding to the
granule, or CDPP if the value doesn't exist.
ef9a8767   Nathanael Jourdane   Add the CDF specs
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
- and <URL> is kept from this dictionary (according to <NAME>).

- CDPP: http://amda.irap.omp.eu/help/licenceAction.do.html
- CDAWEB: http://spdf.gsfc.nasa.gov/new_users.html
- PDS: http://ppi.pds.nasa.gov/citations_policy.jsp
- MAPSKP: http://mapskp.cesr.fr/use_policy
- THEMIS: http://themis.ssl.berkeley.edu/roadrules.shtml
- MAVEN: http://lasp.colorado.edu/home/maven/files/2014/09/MAVEN_public-rules-of-the-road-v3.pdf
- CASSINI/RPWS/SKR: http://amda.irap.omp.eu/help/SKR.html
- VEXGRAZ: http://amda.irap.omp.eu/help/VEXGRAZ.html
- CAA: http://caa.estec.esa.int/caa/ror.xml
- CSA: http://www.cosmos.esa.int/web/csa/rules-of-the-road
- STEREO: http://amda.irap.omp.eu/help/STEREO.html
- CCMC: http://ccmc.gsfc.nasa.gov/PubPolicy.php


> **Ex:**
>
>     System Use Policy
dd534f05   Nathanael Jourdane   Improve documenta...
198
199
200
201
>
>     Thank you for acknowledging the use of AMDA in publications with wording like "Data analysis was performed with
>     the AMDA science analysis system provided by the Centre de Données de la Physique des Plasmas (CDPP) supported by
>     CNRS, CNES, Observatoire de Paris and Université Paul Sabatier, Toulouse."
ef9a8767   Nathanael Jourdane   Add the CDF specs
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
>     Data use policy from originating CDPP data center: http://amda.irap.omp.eu/help/licenceAction.do.html

### Software_version

Version of the NetCDF to CDF converter.

### Source_name

The mission name

> **Ex:**
>
>     clust1

### TEXT

dd534f05   Nathanael Jourdane   Improve documenta...
218
219
The value of node `NumericalData/ResourceHeader/InformationURL/Name` **+** `, ` **+** the value of node
`NumericalData/ResourceHeader/InformationURL/URL`, from the SPASE file *NumericalData* corresponding to the granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
220
221
222

> **Ex:**
>
dd534f05   Nathanael Jourdane   Improve documenta...
223
224
>     NSSDC Master Catalog listing for Cluster II Rumba Cluster Ion Spectrometry (CIS),
>     http://nssdc.gsfc.nasa.gov/nmc/experimentDisplay.do?id=2000-045A-02
ef9a8767   Nathanael Jourdane   Add the CDF specs
225
226
227
228
229
230
231
232
233
234
235

### Time_resolution

`time_sampling_step` value of epn-core, in seconds + ` seconds`.

> **Ex:**
>
>     3 seconds

### TITLE

dd534f05   Nathanael Jourdane   Improve documenta...
236
237
The value of node `NumericalData/ResourceHeader/AlternateName`, from the SPASE file *NumericalData* corresponding to the
granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

> **Ex:**
>
>     Cluster 1 Prime Parameter CIS data

### PDS_Start_time

`time_min` value of epn-core, in ISO time.

> **Ex:**
>
>     2007-02-13T09:08:43Z

### PDS_Stop_time

`time_max` value of epn-core, in ISO time.

> **Ex:**
>
>     2007-02-14T09:08:43Z

### PDS_Observation_target

`target_name` value of epn-core. Use a list of values if necessary (split the `#` character).

> **Ex:**
>
>     Saturn

48b0a52e   Baptiste Cecconi   smala other fixes
267
### PDS_Observation_type
ef9a8767   Nathanael Jourdane   Add the CDF specs
268

dd534f05   Nathanael Jourdane   Improve documenta...
269
270
Look for the child node in `NumericalData/Parameter` node, from the SPASE file *NumericalData* corresponding to the
granule.
ef9a8767   Nathanael Jourdane   Add the CDF specs
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294

It is one of: `Field`, `Particules`, `Wave`, `Mixed`, `Support`.

> **Ex:**
>
>     Particle

### Other epn-core parameters

Add other epn-core parameters, with `VESPA_` prefix, only if:
- the value is not empty;
- this is not the same value as the other element of a tuple (ie min/max).

> **Ex:**
>
>     - VESPA_spase_measurement_type: EnergeticParticles
>     - VESPA_spatial_frame_type: cartesian

---

## Variable attributes (TBC)

See [the ISTP guidelines for variables](https://spdf.gsfc.nasa.gov/istp_guide/variables.html).

dd534f05   Nathanael Jourdane   Improve documenta...
295
296
To create new variables with [spacepy.pycdf](http://pythonhosted.org/SpacePy/pycdf.html), use
[cdf.new()](http://pythonhosted.org/SpacePy/autosummary/spacepy.pycdf.CDF.html#spacepy.pycdf.CDF.new) and not `attr[]`.
ef9a8767   Nathanael Jourdane   Add the CDF specs
297
298
299

To name variables, use the `NumericalData/Parameter/ParameterKey` parameter from the SPASE file.

c628de07   Nathanael Jourdane   Small changes on ...
300
301
302
303
304
305
### Metadata variable

## Variable attributes



ef9a8767   Nathanael Jourdane   Add the CDF specs
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
### `CATDESC`

type: CDF_CHAR

The value of node `NumericalData/Parameter/Description`.

> **Ex**
>
>     Flux density spectrogram measured on the RH polarized array.

### DEPEND_0

type : CDF_CHAR

    Epoch

### LABL_PTR_1

dd534f05   Nathanael Jourdane   Improve documenta...
324
325
Note: Only if the node value of `NumericalData/Parameter/RenderingHints` is `time series` and the node
`NumericalData/Parameter/Structure` exist.
ef9a8767   Nathanael Jourdane   Add the CDF specs
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444

Note 2: `LABL_PTR_1` and `DEPEND_1` can not are both presents.

**Step 1:** Get the labels, which are the nodes value of `NumericalData/Parameter/Structure/Element/Name`.

> **Ex (for skr151150000.nc.gz):**
>
>     - RH 100-400kHz
>     - LH 100-400kHz
>     - RH 10-1000kHz
>     - RH 10-1000kHz

**Step 2:** Create a new variable stored with these labels. Then `LABL_PTR_1` is the ID of this variable.

### DEPEND_1

Note: Only if the node value of `NumericalData/Parameter/RenderingHints` is `spectrogram`.

Note 2: `LABL_PTR_1` and `DEPEND_1` can not are both presents.

type : CDF_CHAR

From the file `<dataset_name>_info` from the dataset directory, look for `energy` or `frequency` variables value.

### DICT_KEY

type: CDF_CHAR

> **Ex:**
>
>     electric_field>power

### DISPLAY_TYPE

type: CDF_CHAR

> **Ex:**
>
>     time_series

### FIELDNAM

type: CDF_CHAR

> **Ex:**
>
>     RR

### FILLVAL

type: CDF_UINT1

> **Ex:**
>
>     255

### LABLAXIS

type: CDF_CHAR

> **Ex:**
>
>     RH flux density

### UNITS

type: CDF_CHAR

> **Ex:**
>
>     dB

### VALIDMIN

type: CDF_UINT1

> **Ex:**
>
>     0

### VALIDMAX

type: CDF_UINT1

> **Ex:**
>
>     255

### VAR_TYPE

type: CDF_CHAR

> **Ex:**
>
>     data

### SCALETYP

type: CDF_CHAR

> **Ex:**
>
>     lin

### SCALEMIN

type: CDF_UINT1

> **Ex:**
>
>     0

### SCALEMAX

> **Ex:**
>
>     255

### UCD
48b0a52e   Baptiste Cecconi   smala other fixes