@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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
type(PROFILES), | intent(inout) | :: | P |
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