Data entry API¶
- subroutine imas_open(uri, mode, pulseCtx, retstatus, retmesg)¶
Open or create the Data Entry at the provided URI.
- Parameters:
uri [character(*),in] :: Data entry URI
mode [integer,in] :: One of
OPEN_PULSE,FORCE_OPEN_PULSE,CREATE_PULSE,FORCE_CREATE_PULSEpulseCtx [integer,out] :: Opened data entry context
- Options:
retstatus [integer,out] :: Status code:
0on success,<0on failureretmesg [character(:),out] :: Status message
- Example :
- subroutine imas_close(pulseCtx, retstatus)¶
Close the Data Entry at the provided content.
:param integer pulseCtx [in] : Closed data entry context :option integer retstatus [out]: Status code:
0on success,<0on failure
- subroutine imas_open_env(name, pulse, run, pulseCtx, user, tokamak, version, retstatus)¶
Open the Data Entry defined by the provided parameters.
- Parameters:
name [character(*),in] :: Unused
pulse [integer,in] :: Pulse number
run [integer,in] :: Run number
pulseCtx [integer,out] :: Opened data entry context
user [character(*),in] :: User name
tokamak [character(*),in] :: Tokamak name, also known as Database name
version [character(*),in] :: Major version of the data dictionary, e.g.
"3"
- Options:
retstatus [integer,out] :: Status code:
0on success,<0on failure
- subroutine imas_create_env(name, pulse, run, refPulse, refRun, pulseCtx, user, tokamak, version, retstatus)¶
Create the Data Entry defined by the provided parameters.
- Parameters:
name [character(*),in] :: Unused
pulse [integer,in] :: Pulse number
run [integer,in] :: Run number
refPulse [integer,in] :: Unused
refRun [integer,in] :: Unused
pulseCtx [integer,out] :: Opened data entry context
user [character(*),in] :: User name
tokamak [character(*),in] :: Tokamak name, also known as Database name
version [character(*),in] :: Major version of the data dictionary, e.g.
"3"
- Options:
retstatus [integer,out] :: Status code:
0on success,<0on failure
- subroutine list_all_occurrences(idx, ids_name, node_path, node_content_list, occurrence_list)¶
Return the occurrence index list and the node content list of the IDS in the provided db entry.
- Parameters:
idx [integer,in] :: Pulse number
ids_name [character(*),in] :: IDS name
node_path [character(*),in] :: Node path
node_content_list [character(len=:),out] :: Occurrence node content array (must be allocatable)
occurrence_list [integer(:),out] :: Occurrence index array (must be allocatable)
- Example :
program prog_list_all_occurrences ! Make the Access Layer available use ids_routines implicit none integer :: data_entry, status character(len=:), allocatable :: node_content_list(:) integer, allocatable :: occurrence_list(:) ! Open the database entry by providing an IMAS URI call imas_open( & "imas:mdsplus?user=public;pulse=131024;run=41;database=ITER;version=3", & OPEN_PULSE, data_entry, status) call list_all_occurrences(data_entry, "core_profiles", "ids_properties/comment", node_content_list, occurrence_list) if(allocated(occurrence_list)) then write(*,*) "i occurrence_list(i) node_content_list(i)" do i = 1, size(occurrence_list) write(*,*) i,occurrence_list(i),"'"//node_content_list(i)//"'" end do else write(*,*) "node_content_list, occurrence_list are empty" end if end program prog_list_all_occurrences
- subroutine al_build_uri_from_legacy_parameters(beid, pulse, run, usr, tok, ver, opt, uri, retstatus, retmesg)¶
Returns the URI built based on legacy parameters
- Parameters:
beid [integer,in] :: backend ids_name
pulse [integer,in] :: Pulse number
run [integer,in] :: Run number
usr [character(*),in] :: User name
tok [character(*),in] :: Tokamak name, also known as Database name
ver [character(*),in] :: Major version of the data dictionary, e.g.
"3"opt [character(*),in] :: Options
uri [character(STRMAXLEN),out] :: Data entry URI
- Options:
retstatus [integer,out] :: Status code:
0on success,<0on failureretmesg [character(:),out] :: Status message