Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Naming problem with "TableFile" instruction eddy-covariance


Chakir Oct 3, 2017 10:58 AM

Bonjour tous le mode,

I use the following instruction  TableFile("CRD:8071.Station_20hz_"&year&"_"&day_of_year&"_"&rTime(4)&rtime(5)&"_",64,-1,0,1,Day,0,0) to have daily data of an eddy-covariance station, in this format     TOB1_8071.Bour_20hz_year_day_of_year_HHMM.dat

the problem is that year and day of the year as well as rtime (4) & rtime (5) does not change in the new files names

for exemple :

instead of having on three days two files that have the following name:

TOB1_8071.Station_20hz_2017_207_0000.dat

TOB1_8071.Station_20hz_2017_208_0000.dat

TOB1_8071.Station_20hz_2017_209_0000.dat

I find myself with files that have the following name:

TOB1_8071.Station_20hz_2017_207_0000_0.dat

TOB1_8071.Station_20hz_2017_207_0000_1.dat

TOB1_8071.Station_20hz_2017_207_0000_2.dat

here is how I declared the rtimes

public rtime(9)
Public HM(1)
Public Id (1)
Alias rtime (1)= year
Alias rtime (4)= Hour
Alias rtime (5)= Minute
Alias rtime (9)=day_of_year
Alias HM(1)= Hmn

how can i solve this


JDavis Oct 3, 2017 03:06 PM

TableFile works with a static base name. You will have to use FileRename() to rename the file after it is created.

Use the OutStat variable to trigger when to rename, and use the LastFileName to find the file you need to rename.


Chakir Oct 3, 2017 04:09 PM

Thank you JDavis for this information but can i have more explanation please ?


JDavis Oct 3, 2017 04:14 PM

This thread has a working example:

https://www.campbellsci.com/forum?forum=1&l=thread&tid=2380

Log in or register to post/reply in the forum.