Writing out Temperature variable using *NODE FILE, during *Restart step

When I use *RESTART, READ to define a restart step, I can’t output the Temparature variable using the *NODE FILE card.
The variable NDTEMP doesn’t get written to the .frd file

When running ccx, I get the following warning:

*WARNING in calinput: temperature output
requested, yet no thermal loading
active
Even though I define a load using *TEMPERATURE

To be sure of what is going on, I made a simple example of a 1mm beam undergoing thermal expansion. In the first step, I did nothing and in the second step I applied a thermal load.
These steps are defined in separate files.

File with the first step:
*HEADING
Model: beam Date: 10-Mar-1998
*NODE, NSET=NALL
1, 0, 0, 0
2, 0, 1, 0
*ELEMENT, TYPE=B31, ELSET=EALL
1, 1, 2
*BOUNDARY
1, 1, 3
*INITIAL CONDITIONS,TYPE=TEMPERATURE
NALL, 0
*MATERIAL,NAME=EL
*ELASTIC
210000.0,.3
*DENSITY
7.8E-9
*EXPANSION,ZERO=293.
1.E-6
*BEAM SECTION, ELSET=EALL,MATERIAL=EL, SECTION=RECT
0.25, 0.25
*STEP
*STATIC
*RESTART, WRITE, FREQUENCY=1
*NODE PRINT,NSET=NALL
U, NT
*EL PRINT,ELSET=EALL
S
*NODE FILE
U, NT
*EL FILE
S
*END STEP

File with the Second Step:
*RESTART, READ, STEP=1
*STEP
*STATIC
*RESTART, WRITE, FREQUENCY=1
*TEMPERATURE
NALL, 1000.
*NODE PRINT,NSET=NALL
U, NT
*EL PRINT,ELSET=EALL
S
*NODE FILE
U, NT
*EL FILE
S
*END STEP

The result of the analysis defined in the second file showed a maximum displacement of 0.001, which is to be expected for a successful simulation, since The beam is 1mm long, the thermal expansion is 1E-6 and the temperature difference is 100.

This shows that the temperature load defined in the second file was actually applied, yet somehow the Temparature variable was failed to be outputted.

Does anyone have any idea what is going on here?

I can confirm this, it might be a bug. NT is available when *TEMPERATURE is applied in the first input file.

@Adam
If you can live without the pause between the steps, you can as a workaround put all steps together in a single file. Note the reduced *Restart card, the preceding step is always used as starting point for the following step

*HEADING
Model: beam Date: 10-Mar-1998
*NODE, NSET=NALL
1, 0, 0, 0
2, 0, 1, 0
*ELEMENT, TYPE=B31, ELSET=EALL
1, 1, 2
*BOUNDARY
1, 1, 3
*INITIAL CONDITIONS,TYPE=TEMPERATURE
NALL, 0
*MATERIAL,NAME=EL
*ELASTIC
210000.0,.3
*DENSITY
7.8E-9
*EXPANSION,ZERO=293.
1.E-6
*BEAM SECTION, ELSET=EALL,MATERIAL=EL, SECTION=RECT
0.25, 0.25
*STEP
*STATIC
*RESTART, WRITE
*NODE PRINT,NSET=NALL
U, NT
*EL PRINT,ELSET=EALL
S
*NODE FILE
U, NT
*EL FILE
S
*END STEP
**
** Step 2 starts here, and kan be followed by step 3-4…
**
*RESTART
*STEP
*STATIC
*RESTART, WRITE
*TEMPERATURE
NALL, 1000.
*NODE PRINT,NSET=NALL
U, NT
*EL PRINT,ELSET=EALL
S
*NODE FILE
U, NT
*EL FILE
S
*END STEP

For those who might find it interesting I have been looking little around in the source code and found:

In the fortran modules ithermal(1) is the flag for the *temperature card has been used. ithermal(1) is stored and restored from the restart file.

ithermal(2) is the flag in case *temperature card has been used in the preceding step. When running multiple steps in a single data file ithermal(2) is kept high from one step to another, but ithermal(2) isn’t stored in the restart file and either not set when data is reading from restart file.

So a quick work workaround will be just to add a little modification to module restartshort.f and assign ithermal(2) with ithermal(1)

Add the extra assignment after line 179 in restartshort.f so it will look like this
read(15) ithermal(1)
ithermal(2) = ithermal(1)

and similar after line 324
read(15) ithermal(1)
ithermal(2) = ithermal(1)

Without warranty I believe it should work in all cases but I have only tested the workaround with the data sets from @Adam