Skip to content
Snippets Groups Projects
Commit 54728f4f authored by Peter Alexander's avatar Peter Alexander
Browse files

Allow year offset for LPJ-GUESS directories, used in GGCMI

parent c3eaa31e
No related branches found
No related tags found
No related merge requests found
......@@ -376,6 +376,7 @@ public class ModelConfig {
public static final double PASTURE_MAX_IRRIGATION_RATE = getDoubleProperty("DEFAULT_MAX_IRRIGATION_RATE", 50.0); // shouldn't need this but some areas crops don't have a value, but was causing them to be selected
public static final int LPJG_TIMESTEP_SIZE = getIntProperty("LPJG_TIMESTEP_SIZE", 5);
public static final int LPJ_YEAR_OFFSET = getIntProperty("LPJ_YEAR_OFFSET", 0);;
public static final int NUM_YIELD_CLUSTERS = getIntProperty("NUM_YIELD_CLUSTERS", 8000);
public static final long RANDOM_SEED = getIntProperty("RANDOM_SEED", 1974329); // any number will do
......
......@@ -98,6 +98,7 @@ public class Timestep {
}
public static String getYearSubDir(String rootDir, int endYear) {
endYear += ModelConfig.LPJ_YEAR_OFFSET;
return rootDir + File.separator + (endYear-ModelConfig.LPJG_TIMESTEP_SIZE+1) + "-" + endYear;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment