JGCRI / fldgen

Given a global mean temperature pathway, generate random global climate fields consistent with it and with spatial and temporal correlation derived from an ESM
https://jgcri.github.io/fldgen/
GNU General Public License v2.0
12 stars 6 forks source link

revisit warnings - variable labels - units #48

Open abigailsnyder opened 4 years ago

abigailsnyder commented 4 years ago
  1. We add a lot of warning messages that only the package developers really understand, especially around converting units of things from P to logP and back again, while leaving T alone (eg, it prints out a warning message that T didn't change .

A lot of this was because we wrote the code so that it didn't matter whether variable 1 was temperature, or precip, or something else.

If we make firmer assumptions about what each variable is, we can create variable specific warning messages/print statements that are more useful.

  1. Maybe add more explicit unit checks to the read functions (e.g. check if T units are in K or C)
abigailsnyder commented 4 years ago
# The alternative was to write  generate.TP.fullgrids
    # with arguments that expect a user to provide
    # p_convert = emulator$griddataP$pvarconvert_fcn from a stored emulator
    # or to give p_convert = log. This basically opens up the option for
    # users to make more errors.
    # If anything, I'm inclined to remove the arguments
    #  tvarunconvert_fcn = NULL, pvarunconvert_fcn = exp
    # from generate.TP.fullgrids. We initially included things that way
    # so that a user could experiment with variables other than T and P.

comment removed from emulator_reducer in writedata.R