# Revision history [back]

This is a complementary answer to Vincent and Gildas. Vincent is right that Qsrc still needs to be defined with the correct vertical shape (Qshape) from Qbar in ana_psource. There is thus a problem in ana_psource with Qbar(is)=rampQbar0(is) because Qbar0 is only given at the start of the simulation. This was done for the constant forcing (analytical) case and was not adapted to the case where a variable Qbar is read in a file (PSOURCE_NCFILE). However, setting Qbar(is)=rampQbar(is) is not the correct fix if ramp is not 1 because Qbar is then wrongly calculated as an iterative procedure (and underestimated). In a development branch that will soon be released, we recently fixed this issue by setting outside of the (iic.eq.ntstart) condition (and before the use of ramp): ! ! If Qbar is read in nc file, update Qbar0 at every time step !

# ifdef PSOURCE_NCFILE

  do is=1,Nsrc
Qbar0(is)=Qbar(is)
enddo


Patrick