Using the ExtData component: Difference between revisions
Line 25: | Line 25: | ||
The ExtData resource file can have 3 types of entries, a Primary Export section, a Derived Export section, and a Mask section. The file itself is processed sequentially so that it can have any number of Primary, Derived, and Mask sections. Each of these sections is a list of single line entries. Each entry describes how to supply a variable of a given name with data. The tables currently use %% instead of the standard :: identifiers because of an odd behaviour in ESMF. | The ExtData resource file can have 3 types of entries, a Primary Export section, a Derived Export section, and a Mask section. The file itself is processed sequentially so that it can have any number of Primary, Derived, and Mask sections. Each of these sections is a list of single line entries. Each entry describes how to supply a variable of a given name with data. The tables currently use %% instead of the standard :: identifiers because of an odd behaviour in ESMF. | ||
=== Primary Exports === | === Primary Exports === | ||
The first is | The first table the user can define is a PrimaryExports table. Below is an example of a PrimaryExport table. This may have as many entries as the user desires. Note that only the last entry in a line is optional. | ||
<pre> | <pre> | ||
PrimaryExports%% | PrimaryExports%% | ||
Line 37: | Line 37: | ||
</pre> | </pre> | ||
The following is an explanation of each entry in a line. | The following is an explanation of each entry in a line. | ||
:Export Name - This is the actual name of the | :Export Name - This is the actual name of the import in the application this entry will satisfy. | ||
:Units - Units not currently used, just a placeholder for now | :Units - Units not currently used, just a placeholder for now, hopefully someday it might be used for automatic unit conversion for example. | ||
:Dimensions - xy for 2D or xyz for 3D | :Dimensions - xy for 2D or xyz for 3D | ||
:Vertical location - c for center, e for edge, if 2d enter c or e but this will obviously not be used | :Vertical location - c for center, e for edge, if 2d enter c or e but this will obviously not be used | ||
Line 45: | Line 45: | ||
:Refresh template - you have 3 choices | :Refresh template - you have 3 choices | ||
::1.) Enter '-'. In this case the field will only be updated once the first time ExtData runs | ::1.) Enter '-'. In this case the field will only be updated once the first time ExtData runs | ||
::2.) Enter a refresh template of the form %y4-%m2-%h2T%h2:%n2:00 to set the recurring time to update the file. The file will be updated when the evaluated template changes. For example a template of the form %y4-%m2-%d2T12:00:00 will cause the variable to be updated at the start of a new day. Note that ExtData | ::2.) Enter a refresh template of the form %y4-%m2-%h2T%h2:%n2:00 to set the recurring time to update the file. The file will be updated when the evaluated template changes. For example a template of the form %y4-%m2-%d2T12:00:00 will cause the variable to be updated at the start of a new day. Note that ExtData will use the evaluated template as the working time for reading the file and will try to interpolate to that time. So in the example of %y4-%m2-%d2T12:00:00, when the clock hits 2007-08-02T00:00:00 it will update the variable but the time it will use for reading and interpolation is 2007-08-02T12:00:00 | ||
::3.) Enter '0' to update the variable at every step. ExtData will do a linear interpolation using the available | ::3.) Enter '0' to update the variable at every step. ExtData will do a linear interpolation to the current time using the available data. | ||
::4.) Enter Phr:mn where hr is a two digit hour and mn is a two digit minute or enter Pyear-mm-ddThr:mn where now year, mm, and dd are a year, month and day, this is an interval at which to update the variable from the start time of the clock used in the program. | ::4.) Enter Phr:mn where hr is a two digit hour and mn is a two digit minute or enter Pyear-mm-ddThr:mn where now year, mm, and dd are a year, month and day, this is an interval at which to update the variable from the start time of the clock used in the program. | ||
:Offset - This is a factor the variable will be shifted by, if you enter "none", no shifting will be performed, [[If you do not want to shift do not put 0.0 as you will be wasting time since it will multiply by 0.0 instead of skipping the shifting]]. | :Offset - This is a factor the variable will be shifted by, if you enter "none", no shifting will be performed, [[If you do not want to shift do not put 0.0 as you will be wasting time since it will multiply by 0.0 instead of skipping the shifting]]. | ||
Line 65: | Line 65: | ||
If you enter '0' for the refresh template the field gets updated every step and ExtData will try to interpolate to the application time using the data on file. | If you enter '0' for the refresh template the field gets updated every step and ExtData will try to interpolate to the application time using the data on file. | ||
<span style="color:#FF0000"> | <span style="color:#FF0000">ExtData always tries to interpolate to the current model time or evaluated time from the template using the data files you provide via the file template. To do the interpolation at any time ExtData must be able to find two times on the data series that bracket this time. These need not be on the same file as it can interpolate between data on different files. Also you should not have time on a file that lies outside the range indicated by the file name. For example if the yearly files so your file template looks like myfile_%y4.nc4 and you have a 2008 file, the 2008 file should not have any time in it that falls outside of 2008. This defeats the entire purpose of ExtData and will cause unpredictable behaivor. This as it is key to understanding how ExtData functions.</span> | ||