ALLOCATE_2D_PROFILES_ARRAYS Subroutine

private subroutine ALLOCATE_2D_PROFILES_ARRAYS(params, P)

@brief Subroutine that allocates the mesh information and 2-D arrays for keeping the data of pre-computed plasma profiles.

@param[out] P An instance of KORC's derived type PROFILES containing all the information about the plasma profiles used in the simulation. See korc_types.f90 and korc_profiles.f90.

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(PROFILES), intent(inout) :: P

Called by

proc~~allocate_2d_profiles_arrays~~CalledByGraph proc~allocate_2d_profiles_arrays ALLOCATE_2D_PROFILES_ARRAYS proc~load_profiles_data_from_hdf5 load_profiles_data_from_hdf5 proc~load_profiles_data_from_hdf5->proc~allocate_2d_profiles_arrays proc~initialize_profiles initialize_profiles proc~initialize_profiles->proc~allocate_2d_profiles_arrays proc~initialize_profiles->proc~load_profiles_data_from_hdf5 program~main main program~main->proc~initialize_profiles

Contents


Source Code

  subroutine ALLOCATE_2D_PROFILES_ARRAYS(params,P)
    TYPE(KORC_PARAMS), INTENT(IN)  :: params
    TYPE(PROFILES), INTENT(INOUT) :: P

    ALLOCATE(P%X%R(P%dims(1)))
    ALLOCATE(P%X%Z(P%dims(3)))
    ALLOCATE(P%FLAG2D(P%dims(1),P%dims(3)))
    ALLOCATE(P%ne_2D(P%dims(1),P%dims(3)))
    ALLOCATE(P%Te_2D(P%dims(1),P%dims(3)))
    ALLOCATE(P%Zeff_2D(P%dims(1),P%dims(3)))

    if (params%profile_model(10:10).eq.'H') then
       ALLOCATE(P%RHON(P%dims(1),P%dims(3)))
       ALLOCATE(P%nRE_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nAr0_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nAr1_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nAr2_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nAr3_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nD_2D(P%dims(1),P%dims(3)))
       ALLOCATE(P%nD1_2D(P%dims(1),P%dims(3)))
    end if
    
  end subroutine ALLOCATE_2D_PROFILES_ARRAYS