Using the ExtData component: Difference between revisions

Bmauer (talk | contribs)
Bmauer (talk | contribs)
Line 1: Line 1:
== Overview of the ExtData Component ==
== Overview of the ExtData Component ==
MAPL_ExtDataGridCompMod is an internal MAPL gridded component used to fulfill imports fields in a MAPL hierarchy from netcdf files on disk. It is usually one of the three gridded components in the cap or main program of a MAPL application, the others being the root of the MAPL hierarchy it is servicing and MAPL_HistoryGridCompMod. It is instanciated and all its registered methods are run automatically by the CAP. MAPL_ExtDataGridCompMod will provide data to fields in the Import states of MAPL components that are not satisfied by a MAPL_AddConnectivity call in the MAPL
MAPL_ExtDataGridCompMod is an internal MAPL gridded component used to fulfill imports fields in a MAPL hierarchy from NetCDF files containing gridded, geospatial data on disk. It is usually one of the three gridded components in the cap or main program of a MAPL application, the others being the root of the MAPL hierarchy it is servicing and MAPL_HistoryGridCompMod. It is instantiated and all its registered methods are run automatically by the CAP. MAPL_ExtDataGridCompMod will provide data to fields in the Import states of MAPL components that are not satisfied by a MAPL_AddConnectivity call in the MAPL
hierarchy. In a MAPL application fields added to the Import state of a component are passed up the MAPL hierarchy looking for a connectivity to another component that will provide data to fill the import. If a connectivity is not found these fields will eventually reach the cap. At this point any fields that have not have their connectivity satisfied are passed to the MAPL_ExtDataGridCompMod through its Export state. MAPL_ExtDataGridCompMod is in essence a provider of last resort for Import fields that need to be filled with data. Like other components it has a run method that gets called every step in your MAPL application. What actually happens when it is run is determined by the resource file. The graphic below illustrates where ExtData fits in the MAPL application.
hierarchy. In a MAPL application fields added to the Import state of a component are passed up the MAPL hierarchy looking for a connectivity to another component that will provide data to fill the import. If a connectivity is not found these fields will eventually reach the cap. At this point any fields that have not have their connectivity satisfied are passed to the MAPL_ExtDataGridCompMod through its Export state. MAPL_ExtDataGridCompMod is in essence a provider of last resort for Import fields that need to be filled with data. Like other components, it has a run method that gets called every step in your MAPL application. What actually happens when it is run is determined by the resource file. The graphic below illustrates where ExtData fits in the MAPL application.


[[File:ExtData_example.png]]
[[File:ExtData_example.png]]
Line 7: Line 7:
The user provides a resource file available to the MAPL_ExtDataGridCompMod GC.
The user provides a resource file available to the MAPL_ExtDataGridCompMod GC.
At its heart this resource file provides a connection between a field name and a variable name in
At its heart this resource file provides a connection between a field name and a variable name in
a netcdf file on disk. The component receives a list of fields that need to be filled
a NetCDF file on disk. The component receives a list of fields that need to be supplied with data
and parses the resource file to determine if MAPL_ExtDataGridCompMod can fill a variable of that name.
and parses the resource file to determine if MAPL_ExtDataGridCompMod can supply a variable of that name.
We will refer to each field name-file variable combination as a primary export.
We will refer to each field name-file variable combination as a primary export of ExtData.
Each primary export is an
Each primary export is an
announcment that MAPL_ExtDataGridCompMod is capable of filling a field named A with data contained in variable B on file xyz.
announcement that MAPL_ExtDataGridCompMod is capable of filling a field named A with data contained in variable B on file xyz.
Note that the field name in each primary export does not need to actually be a field
Note that the field name in each primary export does not need to actually be a field
that needs to be filled by the model. The component only processes primary exports that are needed
that needs to be filled by the model. The component only processes primary exports that are needed
The resource file should be viewed as an anncountment of what MAPL_ExtDataGridCompMod can provide.
The resource file should be viewed as an announcement of what MAPL_ExtDataGridCompMod can provide, not what it necessarily will provide.
In addition to simply announcing what MAPL_ExtDataGridCompMod can provide
In addition to simply announcing what MAPL_ExtDataGridCompMod can provide
the user can specify other information such as how frequently to update the data from
the user can specify other information such as how frequently to update the data from
disk. This could be at every step, just once when starting the model run, or at a particular
disk and how the data is organized. This update could be at every step, just once when starting the model run, or at a particular
time each days. MAPL_ExtDataGridCompMod also allows data to be shifted and scaled.
time each days. It also allows tremendous flexibility as to how the user chooses to organize the data files. MAPL_ExtDataGridCompMod also allows data to be shifted, scaled, and control what method is used to regrid the file to the application grid.


Using ExtData requires constructing your input files in a logical way. There is one general principal to always remember. <span style="color:#FF0000">Unless the file represents a climatology you must have data that spans the time you intend to run your application.</span> For example if you have data files with dates in 2009 on them and your application tries to run in 2001 it will crash!
Using ExtData requires constructing your input files in a logical way. There is one general principal to always remember. <span style="color:#FF0000">Unless the file represents a climatology you must have data that spans the time you intend to run your application.</span> For example if you have data files with dates in 2009 on them and your application tries to run in 2001 it will crash!