Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Accessing data from UAL requires some modification to your code. In this part of tutorial, we will take a closer look on how to access IDS via UAL.

 

Table of Contents

 

Warning

Warning

Stop here for a moment. Make sure you have followed the configuration setup before proceeding any further!

Configuration related tutorial is here -> Click me! <-

...

get() CPO vs IDS
Code Block
titleITM
linenumberstrue
program diagnostic
    use euitm_schemas
    use euitm_routines
    implicit none

    integer :: idx, i, arraySize
    type (type_equilibrium), pointer :: cpoArray(:) ! <= Array !!!


	! Open a database
    call euitm_open('euitm', 14, 4, idx)
  
    ! Get data
    call euitm_get(idx, 'equilibrium', cpoArray)
   
	! Check array size
	arraySize = size(cpoArray)   ! <= array of CPOs
   
    
	! SCALARS (!)
	do i=1, arraySize
    	write (*,*) "Time : ", cpoArray(i)%time
        write (*,*) "Value: ", cpoArray(i)%x%y
    enddo
    




    ! Close a pulse file
    call euitm_close(idx)
end program
Code Block
titleIMAS
linenumberstrue
program diagnostic
    use ids_schemas
    use ids_routines
    implicit none

    integer :: idx, i, arraySize
    type (ids_core_profiles) :: ids ! <= Single object !!!


	! Open a database
    call imas_open('ids', 14, 4, idx)
  
    ! Get data
    call imas_get(idx, 'core_profiles', ids)

	! Check array size
    arraySize = size(ids%time)  ! <= time vector
    
    
	! SCALARS (!)
	do i=1, arraySize
    	write (*,*) "Time : ", ids%time(i)
        write (*,*) "Value: ", ids%x%y(i)
    enddo

	! VECTORS
    	write (*,*) "Time : ", ids%time
        write (*,*) "Value: ", ids%x%y
	
	! Close a pulse file
    call imas_close(idx)
end program

...