@@ -275,6 +275,7 @@ Program Reducedquintic
275275 if (ntime.eq. 0 .or. (ntime.eq. ntime0 .and. eqsubtract.eq. 1 )) then
276276
277277 if (eqsubtract.eq. 1 ) then
278+ call define_transport_coefficients(0 )
278279 call derived_quantities(0 )
279280 if (iwrite_aux_vars.eq. 1 ) call calculate_auxiliary_fields(0 )
280281 end if
@@ -293,6 +294,7 @@ Program Reducedquintic
293294
294295 ! Calculate all quantities derived from basic fields
295296 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297+ call define_transport_coefficients(1 )
296298 call derived_quantities(1 )
297299
298300
@@ -682,6 +684,7 @@ subroutine derived_quantities(ilin)
682684 use diagnostics
683685 use sparse
684686 use transport_coefficients
687+ use auxiliary_fields
685688
686689 implicit none
687690
@@ -692,10 +695,14 @@ subroutine derived_quantities(ilin)
692695
693696 vectype :: temp
694697
695- ! Density and temperature are now updated within define_transport_coefficients
696- if (myrank.eq. 0 .and. iprint.ge. 2 ) print * , " transport coefficients"
697- call define_transport_coefficients(ilin)
698-
698+ ! Update density and temperature
699+ if (myrank.eq. 0 .and. iprint.ge. 2 ) print * , " Calculate electron density and temperatures"
700+ call calculate_ne(ilin, den_field(ilin), ne_field(ilin), eqsubtract)
701+ if (itemp.eq. 0 .and. (numvar.eq. 3 .or. ipres.gt. 0 ) .and. imp_temp.eq. 0 ) &
702+ call calculate_temperatures(ilin, te_field(ilin), ti_field(ilin), &
703+ pe_field(ilin), p_field(ilin), ne_field(ilin), &
704+ den_field(ilin),eqsubtract)
705+
699706 ! Find lcfs
700707 ! ~~~~~~~~~
701708 if (myrank.eq. 0 .and. iprint.ge. 2 ) print * , " finding lcfs"
0 commit comments