NGEET / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
99 stars 92 forks source link

TemperatureType accumulation function dependent of patch weight? #810

Open mariuslam opened 2 years ago

mariuslam commented 2 years ago

Hi,

I post this here following a discussion on the CESM forum (https://bb.cgd.ucar.edu/cesm/threads/temperaturetype-5year-runmean.6870/#post-42560). I have created a 5 year running mean of single year temperature minimums. When I add a field in the history file from the TemperatureType file, I see that the 5 year running mean behaves weirdly when I plot it (see figure). When I then write it in the history file in Fates or print the temperature index in the fates model, the output is stable throughout years as expected.

CODE: https://github.com/mariuslam/CTSM_single_site_fateshydro/blob/1571e21a39f5de5b432e1169fdec0ab069729a88/src/biogeophys/TemperatureType.F90#L1412-L1442

@olyson suggests it might have something to do with the patch averaging dynamics in fates or something.

Best regards,

Marius

In CLM image In FATES (as wanted) image

mariuslam commented 2 years ago

It is actually not as wanted in Fates either as the 5yr running mean is increasing although I cycle over the same atmospheric forcing. Might this also be a result of patch averaging?

rgknox commented 2 years ago

I think @olyson is right. FATES patches are effemeral; they are created, they dissapear, and they fuse. CLM's averaging doesn't realize this.

Lets say we have space for 16 patches or so. At the beginning of the simulation, 1 patch is in existance. But by year 5, many more are probably in existance, and more as the years progress. One problem is that the patch in the 16th position, doesn't have the same identity from day to day, and the other is that if it didn't exist previously, what is the average using for those past values... zeros? Not sure.

The following PR is designed to address this issue, by enabling running means inside FATES, and applying the copying and fusing rules to those running means. #724