Hi,
I am trying to add a site_pft variable in FatesHistoryInterfaceMod.F90.
Unfortunately, when I ncdump the 12 hourly outputed variable it does not correspond to the value it should be.
However, the value is right when I print it in at the place where it is weighted. Exemple, if there is only one cohort and one pft, then number_fraction_pft=1, hio_hard_level_pft=ccohort%hard_level=-2, but in the output file, HARDINESS=-1
I copied below a part of the relevant code but the github file can be found here:
I also added a picture of an ncdump on the variable and a the log file with the corresponding prints.
I would be very thankful if anyone has suggestions to explore or a clue of what is going on.
Thanks in advance,
Marius Lambert, University of Oslo
!____________________________CODE in History file____________________
ipft = ccohort%pft
number_fraction_pft = (ccohort%n / ncohort_pft(ipft))
hio_hard_level_pft(io_si,ipft) = hio_hard_level_pft(io_si,ipft) + ccohort%hard_level * number_fraction_pft
write(fates_log(),*) 'check1',number_fraction_pft
write(fates_log(),*) 'check2',ccohort%hard_level ,hio_hard_level_pft(io_si,ipft)
!----------------------------------------------------------------------------------------------------------------
I am trying to add a site_pft variable in FatesHistoryInterfaceMod.F90.
Unfortunately, when I ncdump the 12 hourly outputed variable it does not correspond to the value it should be.
However, the value is right when I print it in at the place where it is weighted. Exemple, if there is only one cohort and one pft, then number_fraction_pft=1, hio_hard_level_pft=ccohort%hard_level=-2, but in the output file, HARDINESS=-1
I copied below a part of the relevant code but the github file can be found here:
I also added a picture of an ncdump on the variable and a the log file with the corresponding prints.
I would be very thankful if anyone has suggestions to explore or a clue of what is going on.
Thanks in advance,
Marius Lambert, University of Oslo
!____________________________CODE in History file____________________
ipft = ccohort%pft
number_fraction_pft = (ccohort%n / ncohort_pft(ipft))
hio_hard_level_pft(io_si,ipft) = hio_hard_level_pft(io_si,ipft) + ccohort%hard_level * number_fraction_pft
write(fates_log(),*) 'check1',number_fraction_pft
write(fates_log(),*) 'check2',ccohort%hard_level ,hio_hard_level_pft(io_si,ipft)
!----------------------------------------------------------------------------------------------------------------