JGCRI / an2month

Use CMIP 5 data to approximate monthly data from annual data.
0 stars 0 forks source link

Allow monthly fractions to vary from year to year. #9

Closed rplzzz closed 5 years ago

rplzzz commented 5 years ago

With these changes, an2month now produces monthly fractions that vary from year to year. Instead of specifying a constant set of monthly fractions for each grid cell, we now specify a vector of 12 parameters for a Dirichlet distribution. The monthly downscaling then takes a new random draw from the distribution for each year and applies it to the annual total (variables for which the supplied data is an annual mean rather than an annual total are first multiplied by 12).

What we have not yet done is to convert the data supplied for the ESMs from monthly fractions to Dirichlet parameters. As a result, the ESM data supplied in the package will (probably) run, but it will produce nonsensical results. (A Dirichlet distribution with parameter values < 1 produces combinations of monthly values that tend to avoid the input fractions.)

rplzzz commented 5 years ago

@kdorheim This should be ready for you to use now.

BTW, I forgot to mention earlier that the tests you included in your initial development were comprehensive and very well thought out. They were a great help to me in developing my extensions. Well done, that. 🌟