# A Problem when using “Initial temperature model/Spherical gaussian perturbation” option

**URL:** <https://community.geodynamics.org/t/a-problem-when-using-initial-temperature-model-spherical-gaussian-perturbation-option/1978>\
**Category:** ASPECT\
**Created:** [September 2, 2021, 3:20am UTC](https://community.geodynamics.org/t/a-problem-when-using-initial-temperature-model-spherical-gaussian-perturbation-option/1978 "2021-09-02T03:20:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qyunian](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/qyunian/32/757_2.png) [@Qyunian](https://community.geodynamics.org/u/Qyunian)\
**Post date:** [September 2, 2021, 3:20am UTC](https://community.geodynamics.org/t/a-problem-when-using-initial-temperature-model-spherical-gaussian-perturbation-option/1978/1 "2021-09-02T03:20:29Z")

</div>

I set the .prm file parameters as follows:

```auto
subsection Geometry model
  set Model name = spherical shell
  subsection Spherical shell
    set Outer radius = 1740000
    set Inner radius = 400000
    set Opening angle = 360
  end
end

subsection Boundary temperature model
  set Fixed temperature boundary indicators = bottom, top
  set List of model names = spherical constant 
  subsection Spherical constant
    set Inner temperature = 1843
    set Outer temperature = 273
  end
end

subsection Initial temperature model
  set List of model names = ascii profile , spherical gaussian perturbation
  set List of model operators = add
  subsection Ascii profile
    set Data directory = data/
    set Data file name = Temperature.txt
  end
end

```

and the error information is:

```auto
An error occurred in line <301> of file </THL7/home/maqz2/.spack/stage/spack-stage-aspect-develop-p2hfes7wazqttrpllhwuax4iohoxsxap/spack-src/source/initial_temperature/spherical_shell.cc> in function
    void aspect::InitialTemperature::SphericalGaussianPerturbation<dim>::parse_parameters(dealii::ParameterHandler&) [with int dim = 2]
The violated condition was: 
    this->has_boundary_temperature()
Additional information: 
    This initial condition can only be used if a boundary temperature is prescribed.

```

As mentioned above, I have set the boundary temperature as Fixed temperature boundary, so I couldn’t find out how to set the perturbation next. I’d be grateful to you for answering my question.

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [September 2, 2021, 3:44am UTC](https://community.geodynamics.org/t/a-problem-when-using-initial-temperature-model-spherical-gaussian-perturbation-option/1978/2 "2021-09-02T03:44:44Z")

</div>

Liu:  
Ah, this is unfortunate. It’s a bug in ASPECT. I’m not sure how this ever worked, because we are initializing the initial temperature models _before_ the boundary temperature models, and as a consequence, when we get to the point where you get the error, the temperature model has not yet been set up. What happens if you choose only the spherical gaussian perturbation as initial temperature, i.e., not add it together with the ascii profile? Does that work?

Best  
Wolfgang

---

<div class="post-metadata">

**Author:** ![Qyunian](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/qyunian/32/757_2.png) [@Qyunian](https://community.geodynamics.org/u/Qyunian)\
**Post date:** [September 2, 2021, 6:15am UTC](https://community.geodynamics.org/t/a-problem-when-using-initial-temperature-model-spherical-gaussian-perturbation-option/1978/3 "2021-09-02T06:15:44Z")

</div>

Hi, Wolfgang  
Sorry for replying you late. I’ve tested four .prm files in “Initial temperature model” option: (1)My .prm file with only gaussian perturbation, (2)My .prm file with only hexagonal perturbation, (3) “shell\_simple\_2d.prm” in cookbooks (with only hexagonal perturbation), (4) “shell\_simple\_2d.prm” with only gaussian perturbation.  
And only case1, i.e. My .prm file with only gaussian perturbation can’t work , the error message is the same as before. Is this means spherical gaussian perturbation doesn’t work in ASPECT? Maybe I should use spherical hexagonal perturbation next.

Best  
Liu
