Hello, I'm currently implementing NetCDF capability for a Julia package, by 
using the excellent [NCDatasets.jl][1] package. The data comes from inversion 
models, and data from more than one model may be present in the file. I use an 
ancillary variable with `standard_name` of `source` to store the model name at 
each coordinate, following the [ancillary variables][2] guidelines. Next, I 
also want to use a global attribute called `source` to store the list of all 
model names.

>From section [2.6.2][3]:

> For readability in ncdump outputs it is recommended to embed newline 
> characters into long strings to break them into lines.

I use an operation like this:

```
"source" => join(unique(table.model), ",\n")
```

where `table.model` is the list of model names (strings). However, in the 
output of `ncdump -h` I see the raw newline codes:

```
                :source = "GSRM v2.1,\nITRF2014 [2016],\nNNR-MORVEL56,\nGEODVEL 
2010,\nMORVEL 2010,\nITRF2008,\nAPKIM2005-DGFI,\nAPKIM2005-IGN,\nGSRM 
v1.2,\nCGPS 2004,\nREVEL 2000,\nITRF2000 (AS&B 
[2002]),\nHS3-NUVEL1A,\nAPKIM2000.0,\nITRF2000 (D&A 
[2001]),\nHS2-NUVEL1A,\nNUVEL 1A,\nNUVEL 1" ;
```

>From another NetCDF file I had on my hardrive (CF 1.0), I get an output like 
>this:

```
                :source = "CCSM3.0, version beta19 (2004): \n",
                        "atmosphere: CAM3.0, T85L26;\n",
                        "ocean     : POP1.4.3 (modified), gx1v3\n",
                        "sea ice   : CSIM5.0, T85;\n",
                        "land      : CLM3.0, gx1v3" ;
```

Any clarification on how this should be done? I'm using `netcdf library version 
4.8.1 of Oct  1 2021 20:26:26`.

[3]: 
https://urldefense.us/v3/__http://cfconventions.org/Data/cf-conventions/cf-conventions-1.9/cf-conventions.html*description-of-file-contents__;Iw!!G2kpM7uM-TzIFchu!gC6LQePXfSetK6yDnTbS-dr3W-XL2Ac1MOph5u68GXtZWXLdeC45aY1TIpt6GCbJ5xtHX60hdFc$
 
[2]: 
https://urldefense.us/v3/__http://cfconventions.org/Data/cf-conventions/cf-conventions-1.9/cf-conventions.html*ancillary-data__;Iw!!G2kpM7uM-TzIFchu!gC6LQePXfSetK6yDnTbS-dr3W-XL2Ac1MOph5u68GXtZWXLdeC45aY1TIpt6GCbJ5xtH9zKYzIU$
 
[1]: 
https://urldefense.us/v3/__https://github.com/Alexander-Barth/NCDatasets.jl__;!!G2kpM7uM-TzIFchu!gC6LQePXfSetK6yDnTbS-dr3W-XL2Ac1MOph5u68GXtZWXLdeC45aY1TIpt6GCbJ5xtH7Hh7JuU$
 


-- 
Reply to this email directly or view it on GitHub:
https://urldefense.us/v3/__https://github.com/cf-convention/cf-conventions/issues/347__;!!G2kpM7uM-TzIFchu!gC6LQePXfSetK6yDnTbS-dr3W-XL2Ac1MOph5u68GXtZWXLdeC45aY1TIpt6GCbJ5xtHGqqdkF0$
 
You are receiving this because you are subscribed to this thread.

Message ID: <cf-convention/cf-conventions/issues/[email protected]>
This list forwards relevant notifications from Github.  It is distinct from 
[email protected], although if you do nothing, a subscription to the 
UCAR list will result in a subscription to this list.
To unsubscribe from this list only, send a message to 
[email protected].

Reply via email to