# How can one change an existing definition file or create one from scratch

**URL:** https://forum.atmospherictoolbox.org/t/how-can-one-change-an-existing-definition-file-or-create-one-from-scratch/77
**Category:** CODA
**Created:** [February 14, 2020, 11:57am UTC](https://forum.atmospherictoolbox.org/t/how-can-one-change-an-existing-definition-file-or-create-one-from-scratch/77 "2020-02-14T11:57:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tuinder](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/t/f05b48/32.png) [@tuinder](https://forum.atmospherictoolbox.org/u/tuinder)
#### Post date: [February 14, 2020, 11:57am UTC](https://forum.atmospherictoolbox.org/t/how-can-one-change-an-existing-definition-file-or-create-one-from-scratch/77/1 "2020-02-14T11:57:42Z")

</div>

How can one change an existing definition file (e.g. in case of format changes), or create one from scratch for a new instrument?

I could not find a clear description of that process in the documentation.

O.

---

<div class="post-metadata">

### Author: ![sander.niemeijer](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/sander.niemeijer/32/5_2.png) [@sander.niemeijer](https://forum.atmospherictoolbox.org/u/sander.niemeijer)
#### Post date: [February 14, 2020, 12:57pm UTC](https://forum.atmospherictoolbox.org/t/how-can-one-change-an-existing-definition-file-or-create-one-from-scratch/77/2 "2020-02-14T12:57:05Z")

</div>

The format of the codadef xml files is indeed not documented.  
We do provide some [high level documentation](http://stcorp.github.io/coda/doc/html/codadef/codadef-format.html) and there are plenty of existing definitions available on the [S&T github site](https://github.com/stcorp) to use as example/template.  
You should also make sure that you have a good understanding of the [CODA expression language](http://stcorp.github.io/coda/doc/html/codadef/codadef-expressions.html).

To modify an existing definition, clone the github repository (or unzip the codadef file), make your modifications, and then run the [codadef.sh](https://github.com/stcorp/coda/blob/master/codadef.sh) script to turn the directory back into a codadef file.

Note that some codadef files (such as those included with HARP) only contain product type/format detection rules, but no definitions of the format itself (which is possible if the product files use self-describing formats such as netcdf/hdf).
