{"id":12060,"date":"2024-02-17T00:19:49","date_gmt":"2024-02-16T23:19:49","guid":{"rendered":"https:\/\/www.swissfluxnet.ethz.ch\/?page_id=12060"},"modified":"2024-02-17T00:19:49","modified_gmt":"2024-02-16T23:19:49","slug":"upload-icos-header-file","status":"publish","type":"page","link":"https:\/\/swissfluxnet.ethz.ch\/index.php\/documentation\/upload-icos-header-file\/","title":{"rendered":"Upload ICOS Header File"},"content":{"rendered":"<p>If the variables in an ICOS file changes, e.g. the sequence of variables or when new variables were added or variables removed, it is necessary to upload a new header file via the <a href=\"http:\/\/www.icos-etc.eu\/icos\/icos-login\/\" target=\"_blank\" rel=\"noopener noreferrer\">ICOS PI area<\/a>. It is necessary to submit information via the BADM system, for more info see the <a href=\"https:\/\/docs.google.com\/document\/d\/1f9EK_i9piUQqRFpLRjhtmvYrFRn_4-Rd8S9szS2-M2g\/edit\" target=\"_blank\" rel=\"noopener noreferrer\">BADM FAQs here<\/a>.<\/p>\n<p>In this example, we update the header information for the changed 10_meteo file we transfer to ICOS every day. In this file, some variables were recently removed, therefore this info has to be given to ICOS by uploading a new header file.<\/p>\n<h3>Steps<\/h3>\n<ol>\n<li><strong>Assign a new file number before the first file with the new structure is transferred to ICOS.<\/strong><br \/>\nThis is necessary because the sequence of variables in the file has changed. The new file number has to be assigned in the Python script <code>pp-icos<\/code> that converts our ETH files to the ICOS format. <code>pp-icos<\/code> is running automatically on a virtual PC, currently only LH has access. To find out which file number is free for this logger <code>L02<\/code>, check the table on the SFN HP <a href=\"https:\/\/www.swissfluxnet.ethz.ch\/index.php\/sites\/ch-dav-davos\/data-ch-dav\/files-generated-on-site\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/li>\n<li><strong>Download the newest file that was transferred to ICOS.<br \/>\n<\/strong>In this example, the newest file is <code>\\\\grasslandserver.ethz.ch\\gl-processing\\CH-DAV_Davos\\01_ICOS_TRANSFER\\10_meteo\\2020\\04\\CH-Dav_BM_20200402_L02_F03.zip<\/code><br \/>\nIn this step it is important to use a file that already went through the post-processing script, because during post-processing variable renaming for ICOS is done (not always, but for some variables). For example, the original LoggerNet raw data files add suffices to variable names, such as <code>_Avg<\/code>. The <code>_Avg<\/code> suffix is not allowed in ICOS and is therefore removed from the variable names in our raw data files before the files are uploaded to the Carbon Portal for ICOS.<\/li>\n<li><strong>Unzip the file.<\/strong><br \/>\nSince this is a ZIP file, unzip the file to get the CSV file:<code>CH-Dav_BM_20200402_L02_F03.csv<\/code><\/li>\n<li><strong>Open the CSV file in a text editor.<\/strong><br \/>\nDo not use Excel to open the CSV file, since it may change the info contained in the file when saved via Excel. The best way is to use a text editor to open and display the file.<\/li>\n<li>The first few lines and columns in the file looks like this:<img decoding=\"async\" class=\"aligncenter size-large wp-image-7841 lazyload\" data-src=\"https:\/\/www.swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403-1024x599.jpg\" alt=\"\" width=\"770\" height=\"450\" data-srcset=\"https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403-1024x599.jpg 1024w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403-300x175.jpg 300w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403-768x449.jpg 768w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403-770x450.jpg 770w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_file_20200403.jpg 1141w\" data-sizes=\"(max-width: 770px) 100vw, 770px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 770px; --smush-placeholder-aspect-ratio: 770\/450;\" \/><\/li>\n<li><strong>Delete all rows except the first row from the file.<\/strong><br \/>\nThe ICOS header file must only contain the header information, all the data and also the second header row of the file are not needed.<\/li>\n<li>The file now contains only one row (the first row) that contains the header information and should look like this:<br \/>\n<img decoding=\"async\" class=\"aligncenter size-large wp-image-7843 lazyload\" data-src=\"https:\/\/www.swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1-1024x27.jpg\" alt=\"\" width=\"770\" height=\"20\" data-srcset=\"https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1-1024x27.jpg 1024w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1-300x8.jpg 300w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1-768x20.jpg 768w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1-770x20.jpg 770w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_meteo_header_file_20200403-1.jpg 1188w\" data-sizes=\"(max-width: 770px) 100vw, 770px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 770px; --smush-placeholder-aspect-ratio: 770\/20;\" \/><\/li>\n<li><strong>Save the file following the ICOS guidelines for header files.<br \/>\n<\/strong>The name of the header file in this example is <code>CH-Dav_BMHEADER_202004020000_L02_F03.csv<\/code><br \/>\n&#8211; <code>CH-Dav<\/code> is the official site identifier<br \/>\n&#8211; <code>BMHEADER<\/code> gives the info that this is a header file<br \/>\n&#8211; <code>202004020000<\/code> is the start date and time from when the info in the file is valid<br \/>\n&#8211; <code>L02<\/code> is the ICOS logger number, i.e. the logger that records the file<br \/>\n&#8211; <code>F03<\/code> is the ICOS file number for this logger<\/li>\n<li><strong>Upload the file.<\/strong><br \/>\nGo to the <a href=\"http:\/\/www.icos-etc.eu\/icos\/icos-login\/\" target=\"_blank\" rel=\"noopener noreferrer\">ICOS PI area<\/a> &gt; Button UPLOAD DATA &gt; Drop-down menu Select the site: CH-Dav &gt; Drop-down menu Select data type: Header file &gt; SELECT A FILE &gt; Select the header file that you created &gt; Button SUBMIT DATA<\/li>\n<li><strong>Register the file in the ICOS PI area.<\/strong><br \/>\nGo to the ICOS PI area &gt; Button BADM ON LINE TOOL &gt; Drop-down menu Select site: CH-Dav &gt; DATA RECORD GROUP &gt; FILE MODEL &gt; Button Add new record &gt; Enter the file information.<br \/>\nIn this example:<br \/>\n<img decoding=\"async\" class=\"aligncenter size-large wp-image-7847 lazyload\" data-src=\"https:\/\/www.swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-1024x462.jpg\" alt=\"\" width=\"770\" height=\"347\" data-srcset=\"https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-1024x462.jpg 1024w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-300x135.jpg 300w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-768x347.jpg 768w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-1536x693.jpg 1536w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403-770x347.jpg 770w, https:\/\/swissfluxnet.ethz.ch\/wp-content\/uploads\/2020\/04\/example_icos_badm_online_tool_add_new_record_20200403.jpg 1762w\" data-sizes=\"(max-width: 770px) 100vw, 770px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 770px; --smush-placeholder-aspect-ratio: 770\/347;\" \/><\/li>\n<li><strong>Update the variable info in the ICOS PI area.<br \/>\n<\/strong>Go to the ICOS PI area &gt; Button BADM ON LINE TOOL &gt; Drop-down menu Select site: CH-Dav &gt; METEO MEAS. GROUP &gt; Button Add new record &gt; Enter the updated variable information.Some changes can easily be done with the BADM ON LINE TOOL. However, if there are many variables and for the sake of traceability, <strong>it is recommended to upload BADM info using the <a href=\"http:\/\/www.icos-etc.eu\/icos\/documents\/templates\" target=\"_blank\" rel=\"noopener noreferrer\">BADM templates<\/a> (Excel files) and upload the files via the PI area.<\/strong><\/li>\n<li><strong>Update the info on the SFN HP.<\/strong><br \/>\n&#8211; Update the file info in the table <a href=\"https:\/\/www.swissfluxnet.ethz.ch\/index.php\/sites\/ch-dav-davos\/data-ch-dav\/files-generated-on-site\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<br \/>\n&#8211; Update info about the variables in the file in this table <a href=\"https:\/\/www.swissfluxnet.ethz.ch\/index.php\/sites\/ch-dav-davos\/data-ch-dav\/variables-logged-on-site\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/li>\n<li><strong>Now ICOS has the newest info for the meteo files.<\/strong><br \/>\nCheck the daily error reports if there are issues that need to be addressed.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If the variables in an ICOS file changes, e.g. the sequence of variables or when new variables were added or variables removed, it is necessary to upload a new header file via the ICOS PI area. It is necessary to submit information via the BADM system, for more info see . . . <a class=\"readmore-link\" href=\"https:\/\/swissfluxnet.ethz.ch\/index.php\/documentation\/upload-icos-header-file\/\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":11817,"menu_order":34,"comment_status":"closed","ping_status":"closed","template":"template-full-width.php","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","ngg_post_thumbnail":0,"footnotes":""},"coauthors":[314],"class_list":["post-12060","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/pages\/12060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/comments?post=12060"}],"version-history":[{"count":1,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/pages\/12060\/revisions"}],"predecessor-version":[{"id":12061,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/pages\/12060\/revisions\/12061"}],"up":[{"embeddable":true,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/pages\/11817"}],"wp:attachment":[{"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/media?parent=12060"}],"wp:term":[{"taxonomy":"author","embeddable":true,"href":"https:\/\/swissfluxnet.ethz.ch\/index.php\/wp-json\/wp\/v2\/coauthors?post=12060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}