Using the ExtData component: Difference between revisions
Line 57: | Line 57: | ||
==== Refresh Template ==== | ==== Refresh Template ==== | ||
The refresh template allows quite a bit of flexibility in how the data can be distributed in the files and when the data is updated. [[In all cases, ExtData will try to time interpolate to the current model time or the time evaluated by applying the current application time to the | The refresh template allows quite a bit of flexibility in how the data can be distributed in the files and when the data is updated. [[In all cases, ExtData will try to time interpolate to the current model time if it is 0 or the time evaluated by applying the current application time to the refresh template if it is a grads style entry with tokens]]. | ||
If you enter '-' the field will be updated only the first time ExtData runs. It will take the current model time and try to interpolate to that time using the available data. | If you enter '-' the field will be updated only the first time ExtData runs. It will take the current model time and try to interpolate to that time using the available data. | ||
Line 68: | Line 68: | ||
This bracketing data gets updated as time advances in your application. But how does it know where to find this, especially if the data is spread across multiple files? If your file_template has no grads tokens to evaluate then all data you need to span the time span your application will run on needs to be in the file. More likely if you have multiple files you specify a grads style file template. When ExtData tries to find the bracketing times, it takes the time it is trying to interpolate to and applies that to the file template. It looks for data at two times that bracket the current time. If it does not find either the left or right bracket time it looks in the previous file (for the left) or the next file (for the right). How does it know what the next file is. If the user does not specify a reference time and frequency it looks at the right most token and assumes that is the frequency of the files. For example if the right most token is %d2 it assumes that files are daily so to find the right bracket time, it will advance the time by one day and try to look in that file to update the right bracket time. Now what if you have a file every 3 hours for example, this logic would not work. In this case you must specify a reference time and frequency using the optional keyword after the file template to tell it explicitly when the files start and how to advance the time to find the bracketing data. | |||
The following picture illustrates a simple example of how this works. | |||
[[File:Bracketing_data.png]] | [[File:Bracketing_data.png]] | ||
Finally suppose you had data that was | Finally suppose you had data that was arranged in files like below with one time per file: | ||
d591_fpit.tavg3_3d_nav_Ne.20130701_0130z.nc4 | d591_fpit.tavg3_3d_nav_Ne.20130701_0130z.nc4 | ||
Line 92: | Line 94: | ||
and so on . . . | and so on . . . | ||
If the variable PLE was contained in the files and you wanted to do continuous time interpolation you would add line like this to ExtData.rc: | If the variable PLE was contained in the files and you wanted to do continuous time interpolation of PLE you would add line like this to ExtData.rc: | ||
PLE NA xyz e N N 0 none none d591_fpit.tavg3_3d_nav_Ne.%y4%m2%d2_%h2%n2z.nc4 2013-07-01T01:30:00 | PLE NA xyz e N N 0 none none d591_fpit.tavg3_3d_nav_Ne.%y4%m2%d2_%h2%n2z.nc4 2013-07-01T01:30:00P03:00 | ||
=== Special Options === | === Special Options === |