Opened 8 years ago

#328 new task

Add information about model version in netcdf files or Script_output

Reported by: jgipsl Owned by: somebody
Priority: minor Milestone:
Component: system Version:
Keywords: Cc:

Description

Users wants to have automatically the information about model version used for the simulation written in the netcdf files. The demand comes from ORCHIDEE but it seems to be common need. I think the information needed would be version(path/branche on svn) and revision of all components included in the executable.

XIOS can add global attributes in the output files. The information needs to be added in the file_def_xxxx.xml files.

For example in v6 configurations, the LongName in config.card is written as global attribute in the netcdf XIOS output files. All drivers add in there file_def_xxx.xml files the LongName. For exemple in lmdz.driver :

    #Long Name as global attribute (if LongName is not empty)
    if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then
        listfile=$(ls file_def*lmdz.xml)
        echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp
        for file in ${listfile}
        do
            cp ${file} ${file}.tmp
            sed -e "/<file id/r add.tmp" \
                ${file}.tmp > ${file}
            rm ${file}.tmp
        done
        rm add.tmp
    fi

Change History (0)

Note: See TracTickets for help on using tickets.