It's noteworthy that ncdump renders an embedded newline as '\n' followed by an 
actual newline.  I'm not sure how this relates to the way that Julia works, but 
when I'm adding embedded newline characters to long strings in NCL, I just add 
a newline, not an escape sequence.  So I write code like this:

```
BR = str_get_nl()
parents = "Parent files had the following history attributes:"+BR
parents = parents + "Specific humidity file "+qfile+":"+BR
parents = parents + finq@history+BR
...
fout@history_of_parent_files = parents
```

and the string that I'm assigning to the netcdf attribute has embedded newline 
characters, not \n escapes. Then when I print it out with ncdump -h, it looks 
like this:

```     :history_of_parent_files = "Parent files had the following history 
attributes:\n",
                        "Specific humidity file 
huss.rcp85.GFDL-ESM2M.WRF.day.NAM-22i.mbcn-Daymet.nc:\n",
                        "Sat Sep 25 22:32:30 MDT 2021: 
huss.rcp85.GFDL-ESM2M.WRF.day.NAM-22i.raw.nc bias-corrected using MBCn with 
Daymet obs\n",
```

I've never worked with the netcdf library directly, so unfortunately I can't 
offer any advice on that front, but maybe this will at least help narrow down 
the nature of the problem.

-- 
Reply to this email directly or view it on GitHub:
https://urldefense.us/v3/__https://github.com/cf-convention/cf-conventions/issues/347*issuecomment-1009229370__;Iw!!G2kpM7uM-TzIFchu!jNMmjZgDCYYRhN-v-G6xumku7z5OXQdGBmDLOj18Ofc7AArm7AToi0Yue6VhweuQG6i0Ioeu9fk$
 
You are receiving this because you are subscribed to this thread.

Message ID: <cf-convention/cf-conventions/issues/347/[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