>WP3a:commented (14/06/2002)
>IPSL : comments (02/07/02)
>WP3a:comments (16/07/02 or 24/07/02)
-in green: IPSL last comments
-in red: WP3A new comments or WP3a old comments
that still need to be discussed,
-in orange: modifications that wp3a/wp4a agreed
on.
-in black and small characters: WP3a old comments on
issues that are solved
-in magenta and small character:
text that wp3a/wp4a agreed that should be removed
6.1 Get persistent variables
6.1 Get persistent variables
1) For input parameters that are not "universal" parameters:
>IPSL : As we said above we need a second information to verify the identification of the variable. If there is a unit mismatch then it could either be that the PSMILe mixed up some variables or the user goofed. If we do not have the information we can not warn the user and ask him to check. Keep in mind that it can also be problems in the PSMILe, especially at the beginning, thus the redundancy is also for us !
>WP3a: OK let's keep the units as argument, but we still need to discuss how they will be used in the PSMILe (only check of coherence or not?)
values (OUT) : The value returned by the PSMILe.
PRISM_get_persist(keyword, units, value, ierror)
Responsible: IPSLIPSL : OK
These functions will allow the model to count it's own time in accordance with the PSMILe. The entire interface is based on the assumption that the model provides real time stamps with the data and not relative times. This allows the model to change it's time step at will.
>WP3a: OKThe time interfaces here are only some standards to access the calendar library which will be chosen by PRISM. i.e. the PSMILe will not have it's own calendar, it will just use the standard chosen for PRISM.
>WP3a: OKMost of the information regarding the calendar and the start date will be provided to the model through the PSMILe as it needs to be coordinated between the various models.
>WP3a: OKStill we insist that the model confirms this information by using the functions provided here so that we can be sure that it will be used.
As we have not yet decided on the time representation we wish to choose some of the aspects of this interface are still fuzzy. In the end we might allow different date representations.
Name :
PSMILe_def_cal(calendar_name)
Description :Defines the calendar to be used. It allows the model to impose it's calendar if there is no other constraint. In a coupled mode obviously the constraint will come from the driver or any other higher authority.The problem here is that some models may not be able to use all models. Thus we might instead of a name provide a list of calendars supported by the models. This list would be in order of preference.
A flow diagram for the PSMILe_def_cal function
Arguments :
calendar_name (IN) : Name of the calendar to be used.
>WP3a: We do not agree with this routine. The calendar will be externally defined in the SCC and a PRISM model will have to obtain the calendar by calling a PRISM_get_persist('calendar', value). If the model is not written to run with that calendar then it should abort with an error message.
>IPSL : OK
Description :
This distinction is very important and will be used for regular
time axes to know which period is covered by the data sent to the PSMILe.
It is the assumption of a regular axis which allows the PSMILe to compute
the extra information needed. For irregular axes some extra information
will need to be provided with the put and get functions.
This figure should help understand
why this distinction is needed.
A flow diagram for
the PSMILe_def_startdate function
>WP3a: We had- PRISM_QuerySend (handleId, absoluteTime, ierror) to check if an output variable was requested at that particular aboluteTime, and
- PRISM_QuerySendVar(handleId, ierror) to check if an output variable was ever requested.For variables required by the component, as a simple test on the return code of the PRISM_Get for that date can be done; however, it could be usefull to test, at the beginning of the code for example, if that variable will EVER be provided by an external component or file. For variables provided by the model, it could be usefull to test if the variable for that date will be requested (e.g. to avoid extra computation if it is not needed); it can also be usefull to test if that variable will EVER be requested. The simplest solution is probably to have only one call as proposed here. If the developer wants to test if a variable will EVER be required/provided, he just puts date=0.Therefore, we propose:Name :PRISM_query_var(var_id, date, status, ierror)Arguments:
varId (IN) : ID of variable to be queried.
date (IN) : current date (put 0 if the test is for EVER required/provided)
status (OUT) : This should be a code table which includes the following possibilities : required (at that date or EVER), provided (at that date or EVER)
IPSL : Very well !
6.4 Get error code transcription:
6.5 Interact with the Driver
Name:PRISM_timestamp ( wall_clock_time)Description:
Responsible: CERFACSReturns the wall clock time given by the driver (MPI routine return only local time).
Name:PRISM_restartsaved ( date )Description:
Responsible: CERFACSUsed by the model to notify the driver that it has saved a restart at date 'date'
Name:PRISM_message ( char_string )Description:
Responsible: CERFACSDepending on a output level chosen by the user in the coupled configuration file calls to PRISM_Message implemented by the code developer are activated. This function transfers information on the state of the model to the driver where it is centralised.