wiki:Documentation/UserGuide/VariableHistory

Version 2 (modified by nvuilsce, 12 years ago) (diff)

Name changed from VariableHistory to HowTo/VairableHistory?

How to add a variable to history.nc

Define the variable in intersurf.f90, check whether the correct operators (i.e. ave) and history level i.e. (4) are defined more information on 'histdef' and 'histwrite' can be found on the documentation page of this wiki

! total living biomass
    CALL histdef (hist_id_stom, &
         &               TRIM("Fruit_M             "), &
         &               TRIM("Fruit biomass                                       "), &
         &               TRIM("gC/m^2/pft          "), iim,jjm, hist_hori_id, &
         &               nvm,1,nvm, hist_PFTaxis_id,32, ave(4), dt, hist_dt)

When the variable has the value that need to written to the history file add a statement to the one below

CALL histwrite (hist_id_stomate, 'FRUIT_M', itime, &
         biomass(:,:,ifruit), npts*nvm, horipft_index)