diff --git a/CITATION.cff b/CITATION.cff index 7af92146298..e00ef7b29f6 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -120,9 +120,7 @@ authors: - given-names: Eric R. Scott affiliation: University of Arizona orcid: 'https://orcid.org/0000-0002-7430-7879' - - given-names: Harunobu Ishii - affiliation: Boston University Software & Application Innovation Lab(SAIL) - + preferred-citation: type: article title: Facilitating feedbacks between field measurements and ecosystem models diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 38e7cb8663e..94c0b2bdb97 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -2,6 +2,8 @@ # # docker-compose -f docker-compose.yml -f docker-compose.dev.yml +version: '3.2' + services: # web application. This expects the config.php to be copied from docker/web diff --git a/docker-compose.https.yml b/docker-compose.https.yml index a2dd561be14..13214e7cab5 100644 --- a/docker-compose.https.yml +++ b/docker-compose.https.yml @@ -1,4 +1,5 @@ # Use this file to enable https +version: "3.2" services: traefik: diff --git a/docker-compose.yml b/docker-compose.yml index 92af1a03a95..78cc1bac326 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +version: "3.2" + services: # webserver to handle all traffic. This can use let's encrypt to generate a SSL cert. diff --git a/docker/depends/pecan_package_dependencies.csv b/docker/depends/pecan_package_dependencies.csv index fe66050ff8c..271652a48f6 100644 --- a/docker/depends/pecan_package_dependencies.csv +++ b/docker/depends/pecan_package_dependencies.csv @@ -1,3 +1,679 @@ +<<<<<<< HEAD +package,version,needed_by_dir,type,is_pecan +abind,*,modules/assim.batch,Imports,FALSE +abind,>= 1.4.5,base/utils,Imports,FALSE +abind,>= 1.4.5,models/ed,Imports,FALSE +abind,>= 1.4.5,modules/data.atmosphere,Imports,FALSE +amerifluxr,*,modules/data.atmosphere,Imports,FALSE +arrow,*,modules/data.atmosphere,Imports,FALSE +assertthat,*,models/ed,Imports,FALSE +assertthat,*,modules/data.atmosphere,Imports,FALSE +BayesianTools,*,modules/assim.batch,Imports,FALSE +BayesianTools,*,modules/rtm,Imports,FALSE +BioCro,*,models/biocro,Suggests,FALSE +bit64,*,base/db,Suggests,FALSE +BrownDog,*,modules/benchmark,Suggests,FALSE +coda,*,models/maespa,Suggests,FALSE +coda,*,models/sipnet,Suggests,FALSE +coda,*,modules/assim.sequential,Imports,FALSE +coda,*,modules/data.land,Imports,FALSE +coda,*,modules/rtm,Imports,FALSE +coda,>= 0.18,base/utils,Suggests,FALSE +coda,>= 0.18,modules/allometry,Imports,FALSE +coda,>= 0.18,modules/assim.batch,Imports,FALSE +coda,>= 0.18,modules/emulator,Imports,FALSE +coda,>= 0.18,modules/meta.analysis,Imports,FALSE +coda,>= 0.18,modules/photosynthesis,Imports,FALSE +corrplot,*,modules/assim.sequential,Suggests,FALSE +curl,*,base/db,Imports,FALSE +curl,*,base/utils,Imports,FALSE +curl,*,modules/data.atmosphere,Imports,FALSE +curl,*,modules/data.land,Imports,FALSE +curl,*,modules/data.remote,Imports,FALSE +data.table,*,base/db,Suggests,FALSE +data.table,*,base/utils,Suggests,FALSE +data.table,*,base/visualization,Imports,FALSE +data.table,*,models/biocro,Imports,FALSE +data.table,*,modules/data.remote,Suggests,FALSE +dataone,*,modules/data.land,Suggests,FALSE +datapack,*,modules/data.land,Imports,FALSE +DBI,*,base/db,Imports,FALSE +DBI,*,modules/data.remote,Imports,FALSE +dbplyr,>= 2.4.0,base/db,Imports,FALSE +devtools,*,models/ed,Suggests,FALSE +doParallel,*,modules/data.atmosphere,Suggests,FALSE +doParallel,*,modules/data.remote,Imports,FALSE +doSNOW,*,base/remote,Suggests,FALSE +dplR,*,modules/data.land,Imports,FALSE +dplyr,*,base/qaqc,Imports,FALSE +dplyr,*,base/remote,Imports,FALSE +dplyr,*,base/utils,Imports,FALSE +dplyr,*,base/workflow,Imports,FALSE +dplyr,*,models/biocro,Imports,FALSE +dplyr,*,models/ed,Imports,FALSE +dplyr,*,models/ldndc,Imports,FALSE +dplyr,*,models/stics,Imports,FALSE +dplyr,*,modules/assim.sequential,Imports,FALSE +dplyr,*,modules/benchmark,Imports,FALSE +dplyr,*,modules/data.land,Imports,FALSE +dplyr,*,modules/data.remote,Suggests,FALSE +dplyr,*,modules/uncertainty,Imports,FALSE +dplyr,>= 0.8.1,modules/data.atmosphere,Imports,FALSE +dplyr,>= 1.1.2,base/db,Imports,FALSE +ellipse,*,modules/assim.batch,Imports,FALSE +emdbook,*,modules/assim.sequential,Suggests,FALSE +foreach,*,base/remote,Imports,FALSE +foreach,*,modules/data.atmosphere,Suggests,FALSE +foreach,*,modules/data.remote,Imports,FALSE +fs,*,base/db,Imports,FALSE +fs,*,modules/data.land,Imports,FALSE +furrr,*,base/remote,Imports,FALSE +furrr,*,modules/assim.sequential,Imports,FALSE +furrr,*,modules/data.atmosphere,Suggests,FALSE +furrr,*,modules/data.land,Imports,FALSE +furrr,*,modules/data.remote,Imports,FALSE +future,*,modules/assim.sequential,Imports,FALSE +future,*,modules/data.atmosphere,Suggests,FALSE +future,*,modules/data.land,Imports,FALSE +future,*,modules/data.remote,Imports,FALSE +GEDI4R,*,modules/data.remote,Suggests,FALSE +geonames,> 0.998,modules/data.atmosphere,Imports,FALSE +getPass,*,base/remote,Suggests,FALSE +getPass,*,modules/data.land,Suggests,FALSE +getPass,*,modules/data.remote,Suggests,FALSE +ggmcmc,*,modules/meta.analysis,Suggests,FALSE +ggplot2,*,base/utils,Suggests,FALSE +ggplot2,*,base/visualization,Imports,FALSE +ggplot2,*,modules/assim.sequential,Imports,FALSE +ggplot2,*,modules/benchmark,Imports,FALSE +ggplot2,*,modules/data.atmosphere,Imports,FALSE +ggplot2,*,modules/data.remote,Suggests,FALSE +ggplot2,*,modules/meta.analysis,Suggests,FALSE +ggplot2,*,modules/priors,Imports,FALSE +ggplot2,*,modules/uncertainty,Imports,FALSE +ggpubr,*,modules/assim.sequential,Suggests,FALSE +ggrepel,*,modules/assim.sequential,Suggests,FALSE +glue,*,base/db,Imports,FALSE +glue,*,models/ed,Imports,FALSE +glue,*,modules/assim.sequential,Suggests,FALSE +glue,*,modules/data.atmosphere,Imports,FALSE +glue,*,modules/data.land,Suggests,FALSE +glue,*,modules/data.remote,Imports,FALSE +graphics,*,base/qaqc,Imports,FALSE +graphics,*,modules/allometry,Imports,FALSE +graphics,*,modules/assim.batch,Imports,FALSE +graphics,*,modules/photosynthesis,Imports,FALSE +grDevices,*,modules/allometry,Imports,FALSE +grDevices,*,modules/assim.batch,Imports,FALSE +grDevices,*,modules/benchmark,Imports,FALSE +grDevices,*,modules/data.remote,Suggests,FALSE +grid,*,base/visualization,Suggests,FALSE +gridExtra,*,modules/assim.sequential,Suggests,FALSE +gridExtra,*,modules/benchmark,Imports,FALSE +gridExtra,*,modules/uncertainty,Imports,FALSE +hdf5r,*,models/ed,Imports,FALSE +here,*,base/db,Suggests,FALSE +httr,*,base/remote,Imports,FALSE +httr,*,modules/data.atmosphere,Imports,FALSE +httr,*,modules/data.land,Imports,FALSE +httr,*,modules/data.remote,Suggests,FALSE +IDPmisc,*,modules/assim.batch,Imports,FALSE +jsonlite,*,base/remote,Imports,FALSE +jsonlite,*,models/stics,Imports,FALSE +jsonlite,*,modules/data.atmosphere,Imports,FALSE +jsonlite,*,modules/data.remote,Suggests,FALSE +knitr,>= 1.42,base/db,Suggests,FALSE +knitr,>= 1.42,base/qaqc,Suggests,FALSE +knitr,>= 1.42,modules/allometry,Suggests,FALSE +knitr,>= 1.42,modules/assim.batch,Suggests,FALSE +knitr,>= 1.42,modules/meta.analysis,Suggests,FALSE +knitr,>= 1.42,modules/photosynthesis,Suggests,FALSE +knitr,>= 1.42,modules/rtm,Suggests,FALSE +lattice,*,modules/meta.analysis,Imports,FALSE +linkages,*,models/linkages,Suggests,FALSE +lqmm,*,modules/assim.batch,Imports,FALSE +lubridate,*,base/db,Imports,FALSE +lubridate,*,models/basgra,Imports,FALSE +lubridate,*,models/dvmdostem,Imports,FALSE +lubridate,*,models/ed,Imports,FALSE +lubridate,*,models/ldndc,Imports,FALSE +lubridate,*,models/stics,Imports,FALSE +lubridate,*,modules/data.land,Imports,FALSE +lubridate,*,modules/data.remote,Suggests,FALSE +lubridate,>= 1.6.0,base/settings,Imports,FALSE +lubridate,>= 1.6.0,base/utils,Imports,FALSE +lubridate,>= 1.6.0,models/dalec,Imports,FALSE +lubridate,>= 1.6.0,models/fates,Imports,FALSE +lubridate,>= 1.6.0,models/gday,Imports,FALSE +lubridate,>= 1.6.0,models/jules,Imports,FALSE +lubridate,>= 1.6.0,models/linkages,Imports,FALSE +lubridate,>= 1.6.0,models/lpjguess,Imports,FALSE +lubridate,>= 1.6.0,models/maat,Imports,FALSE +lubridate,>= 1.6.0,models/maespa,Imports,FALSE +lubridate,>= 1.6.0,models/preles,Imports,FALSE +lubridate,>= 1.6.0,models/sipnet,Imports,FALSE +lubridate,>= 1.6.0,modules/assim.batch,Imports,FALSE +lubridate,>= 1.6.0,modules/assim.sequential,Imports,FALSE +lubridate,>= 1.6.0,modules/benchmark,Imports,FALSE +lubridate,>= 1.6.0,modules/data.atmosphere,Imports,FALSE +lubridate,>= 1.6.0,modules/rtm,Imports,FALSE +lubridate,>= 1.7.0,models/biocro,Imports,FALSE +Maeswrap,*,models/maespa,Suggests,FALSE +magic,>= 1.5.0,modules/assim.sequential,Suggests,FALSE +magrittr,*,base/db,Imports,FALSE +magrittr,*,base/utils,Imports,FALSE +magrittr,*,models/ed,Imports,FALSE +magrittr,*,modules/assim.sequential,Imports,FALSE +magrittr,*,modules/benchmark,Imports,FALSE +magrittr,*,modules/data.land,Imports,FALSE +magrittr,*,modules/data.remote,Imports,FALSE +markdown,*,modules/allometry,Suggests,FALSE +markdown,*,modules/photosynthesis,Suggests,FALSE +MASS,*,base/utils,Suggests,FALSE +MASS,*,modules/assim.batch,Imports,FALSE +MASS,*,modules/data.atmosphere,Imports,FALSE +MASS,*,modules/meta.analysis,Imports,FALSE +MASS,*,modules/priors,Imports,FALSE +MASS,*,modules/rtm,Imports,FALSE +Matrix,*,modules/assim.sequential,Imports,FALSE +mclust,*,modules/rtm,Suggests,FALSE +MCMCpack,*,modules/allometry,Imports,FALSE +MCMCpack,*,modules/assim.batch,Imports,FALSE +MCMCpack,*,modules/emulator,Imports,FALSE +methods,*,base/db,Imports,FALSE +methods,*,base/settings,Depends,FALSE +methods,*,modules/allometry,Imports,FALSE +methods,*,modules/assim.batch,Imports,FALSE +methods,*,modules/assim.sequential,Suggests,FALSE +methods,*,modules/emulator,Imports,FALSE +mgcv,*,modules/data.atmosphere,Imports,FALSE +minpack.lm,*,modules/rtm,Suggests,FALSE +mlegp,*,modules/assim.batch,Imports,FALSE +mockery,*,base/all,Suggests,FALSE +mockery,*,base/qaqc,Suggests,FALSE +mockery,*,base/remote,Suggests,FALSE +mockery,*,base/settings,Suggests,FALSE +mockery,*,base/utils,Suggests,FALSE +mockery,*,base/visualization,Suggests,FALSE +mockery,*,base/workflow,Suggests,FALSE +mockery,*,modules/data.atmosphere,Suggests,FALSE +mockery,>= 0.3.0,models/biocro,Suggests,FALSE +mockery,>= 0.4.3,base/db,Suggests,FALSE +MODISTools,>= 1.1.0,modules/data.remote,Imports,FALSE +mvbutils,*,base/qaqc,Suggests,FALSE +mvtnorm,*,modules/allometry,Imports,FALSE +mvtnorm,*,modules/assim.batch,Imports,FALSE +mvtnorm,*,modules/assim.sequential,Imports,FALSE +mvtnorm,*,modules/data.land,Imports,FALSE +mvtnorm,*,modules/emulator,Imports,FALSE +ncdf4,*,base/db,Imports,FALSE +ncdf4,*,models/basgra,Imports,FALSE +ncdf4,*,models/dvmdostem,Imports,FALSE +ncdf4,*,models/ldndc,Imports,FALSE +ncdf4,*,models/sibcasa,Imports,FALSE +ncdf4,*,models/stics,Imports,FALSE +ncdf4,*,modules/assim.sequential,Imports,FALSE +ncdf4,*,modules/data.remote,Imports,FALSE +ncdf4,>= 1.15,base/utils,Imports,FALSE +ncdf4,>= 1.15,base/visualization,Imports,FALSE +ncdf4,>= 1.15,models/biocro,Imports,FALSE +ncdf4,>= 1.15,models/clm45,Imports,FALSE +ncdf4,>= 1.15,models/dalec,Imports,FALSE +ncdf4,>= 1.15,models/ed,Imports,FALSE +ncdf4,>= 1.15,models/fates,Imports,FALSE +ncdf4,>= 1.15,models/gday,Imports,FALSE +ncdf4,>= 1.15,models/jules,Imports,FALSE +ncdf4,>= 1.15,models/linkages,Imports,FALSE +ncdf4,>= 1.15,models/lpjguess,Imports,FALSE +ncdf4,>= 1.15,models/maat,Imports,FALSE +ncdf4,>= 1.15,models/maespa,Imports,FALSE +ncdf4,>= 1.15,models/preles,Imports,FALSE +ncdf4,>= 1.15,models/sipnet,Imports,FALSE +ncdf4,>= 1.15,modules/assim.batch,Imports,FALSE +ncdf4,>= 1.15,modules/benchmark,Imports,FALSE +ncdf4,>= 1.15,modules/data.atmosphere,Imports,FALSE +ncdf4,>= 1.15,modules/data.land,Imports,FALSE +neonstore,*,modules/data.land,Imports,FALSE +neonUtilities,*,modules/data.land,Imports,FALSE +nimble,*,modules/assim.sequential,Imports,FALSE +nneo,*,modules/data.atmosphere,Imports,FALSE +optparse,*,base/settings,Imports,FALSE +parallel,*,modules/assim.batch,Imports,FALSE +parallel,*,modules/data.atmosphere,Suggests,FALSE +parallel,*,modules/data.remote,Imports,FALSE +PEcAn.allometry,*,base/all,Suggests,TRUE +PEcAn.assim.batch,*,base/all,Depends,TRUE +PEcAn.assim.batch,*,modules/rtm,Imports,TRUE +PEcAn.benchmark,*,base/all,Depends,TRUE +PEcAn.benchmark,*,modules/assim.batch,Imports,TRUE +PEcAn.benchmark,*,modules/assim.sequential,Suggests,TRUE +PEcAn.benchmark,*,modules/data.land,Imports,TRUE +PEcAn.BIOCRO,*,base/all,Suggests,TRUE +PEcAn.BIOCRO,*,base/qaqc,Suggests,TRUE +PEcAn.DALEC,*,base/all,Suggests,TRUE +PEcAn.data.atmosphere,*,base/all,Depends,TRUE +PEcAn.data.atmosphere,*,base/workflow,Imports,TRUE +PEcAn.data.atmosphere,*,models/basgra,Imports,TRUE +PEcAn.data.atmosphere,*,models/biocro,Imports,TRUE +PEcAn.data.atmosphere,*,models/ed,Imports,TRUE +PEcAn.data.atmosphere,*,models/jules,Imports,TRUE +PEcAn.data.atmosphere,*,models/ldndc,Imports,TRUE +PEcAn.data.atmosphere,*,models/linkages,Imports,TRUE +PEcAn.data.atmosphere,*,models/maat,Imports,TRUE +PEcAn.data.atmosphere,*,models/maespa,Imports,TRUE +PEcAn.data.atmosphere,*,models/preles,Imports,TRUE +PEcAn.data.atmosphere,*,models/sipnet,Depends,TRUE +PEcAn.data.land,*,base/all,Depends,TRUE +PEcAn.data.land,*,base/workflow,Imports,TRUE +PEcAn.data.land,*,models/biocro,Imports,TRUE +PEcAn.data.land,*,models/ed,Imports,TRUE +PEcAn.data.land,*,models/ldndc,Imports,TRUE +PEcAn.data.land,*,modules/assim.sequential,Suggests,TRUE +PEcAn.data.land,*,modules/benchmark,Suggests,TRUE +PEcAn.data.remote,*,base/all,Depends,TRUE +PEcAn.data.remote,*,modules/assim.sequential,Suggests,TRUE +PEcAn.DB,*,base/all,Depends,TRUE +PEcAn.DB,*,base/qaqc,Imports,TRUE +PEcAn.DB,*,base/settings,Imports,TRUE +PEcAn.DB,*,base/workflow,Imports,TRUE +PEcAn.DB,*,models/biocro,Suggests,TRUE +PEcAn.DB,*,models/template,Imports,TRUE +PEcAn.DB,*,modules/allometry,Imports,TRUE +PEcAn.DB,*,modules/assim.batch,Imports,TRUE +PEcAn.DB,*,modules/assim.sequential,Imports,TRUE +PEcAn.DB,*,modules/benchmark,Imports,TRUE +PEcAn.DB,*,modules/data.atmosphere,Imports,TRUE +PEcAn.DB,*,modules/data.land,Imports,TRUE +PEcAn.DB,*,modules/data.remote,Imports,TRUE +PEcAn.DB,*,modules/meta.analysis,Imports,TRUE +PEcAn.DB,*,modules/uncertainty,Imports,TRUE +PEcAn.ED2,*,base/all,Suggests,TRUE +PEcAn.ED2,*,base/qaqc,Suggests,TRUE +PEcAn.ED2,*,modules/rtm,Suggests,TRUE +PEcAn.emulator,*,base/all,Depends,TRUE +PEcAn.emulator,*,modules/assim.batch,Imports,TRUE +PEcAn.emulator,*,modules/uncertainty,Imports,TRUE +PEcAn.LINKAGES,*,base/all,Suggests,TRUE +PEcAn.logger,*,base/all,Depends,TRUE +PEcAn.logger,*,base/db,Imports,TRUE +PEcAn.logger,*,base/qaqc,Imports,TRUE +PEcAn.logger,*,base/remote,Imports,TRUE +PEcAn.logger,*,base/settings,Imports,TRUE +PEcAn.logger,*,base/utils,Imports,TRUE +PEcAn.logger,*,base/visualization,Imports,TRUE +PEcAn.logger,*,base/workflow,Imports,TRUE +PEcAn.logger,*,models/basgra,Imports,TRUE +PEcAn.logger,*,models/biocro,Imports,TRUE +PEcAn.logger,*,models/cable,Imports,TRUE +PEcAn.logger,*,models/clm45,Depends,TRUE +PEcAn.logger,*,models/dalec,Imports,TRUE +PEcAn.logger,*,models/dvmdostem,Imports,TRUE +PEcAn.logger,*,models/ed,Imports,TRUE +PEcAn.logger,*,models/fates,Imports,TRUE +PEcAn.logger,*,models/gday,Imports,TRUE +PEcAn.logger,*,models/jules,Imports,TRUE +PEcAn.logger,*,models/ldndc,Imports,TRUE +PEcAn.logger,*,models/linkages,Imports,TRUE +PEcAn.logger,*,models/lpjguess,Imports,TRUE +PEcAn.logger,*,models/maat,Imports,TRUE +PEcAn.logger,*,models/maespa,Imports,TRUE +PEcAn.logger,*,models/preles,Imports,TRUE +PEcAn.logger,*,models/sibcasa,Imports,TRUE +PEcAn.logger,*,models/sipnet,Imports,TRUE +PEcAn.logger,*,models/stics,Imports,TRUE +PEcAn.logger,*,models/template,Imports,TRUE +PEcAn.logger,*,modules/assim.batch,Imports,TRUE +PEcAn.logger,*,modules/assim.sequential,Imports,TRUE +PEcAn.logger,*,modules/benchmark,Imports,TRUE +PEcAn.logger,*,modules/data.atmosphere,Imports,TRUE +PEcAn.logger,*,modules/data.land,Imports,TRUE +PEcAn.logger,*,modules/data.remote,Imports,TRUE +PEcAn.logger,*,modules/meta.analysis,Imports,TRUE +PEcAn.logger,*,modules/priors,Imports,TRUE +PEcAn.logger,*,modules/rtm,Imports,TRUE +PEcAn.logger,*,modules/uncertainty,Imports,TRUE +PEcAn.MA,*,base/all,Depends,TRUE +PEcAn.MA,*,modules/assim.batch,Imports,TRUE +PEcAn.MA,*,modules/priors,Imports,TRUE +PEcAn.photosynthesis,*,base/all,Suggests,TRUE +PEcAn.priors,*,base/all,Depends,TRUE +PEcAn.priors,*,modules/uncertainty,Imports,TRUE +PEcAn.remote,*,base/all,Depends,TRUE +PEcAn.remote,*,base/db,Imports,TRUE +PEcAn.remote,*,base/settings,Imports,TRUE +PEcAn.remote,*,base/workflow,Imports,TRUE +PEcAn.remote,*,models/biocro,Imports,TRUE +PEcAn.remote,*,models/dalec,Imports,TRUE +PEcAn.remote,*,models/ed,Imports,TRUE +PEcAn.remote,*,models/fates,Imports,TRUE +PEcAn.remote,*,models/gday,Imports,TRUE +PEcAn.remote,*,models/jules,Imports,TRUE +PEcAn.remote,*,models/ldndc,Imports,TRUE +PEcAn.remote,*,models/linkages,Imports,TRUE +PEcAn.remote,*,models/lpjguess,Imports,TRUE +PEcAn.remote,*,models/maat,Imports,TRUE +PEcAn.remote,*,models/maespa,Imports,TRUE +PEcAn.remote,*,models/sipnet,Imports,TRUE +PEcAn.remote,*,models/stics,Imports,TRUE +PEcAn.remote,*,modules/assim.batch,Imports,TRUE +PEcAn.remote,*,modules/assim.sequential,Imports,TRUE +PEcAn.remote,*,modules/data.atmosphere,Imports,TRUE +PEcAn.remote,*,modules/data.land,Imports,TRUE +PEcAn.remote,*,modules/data.remote,Imports,TRUE +PEcAn.settings,*,base/all,Depends,TRUE +PEcAn.settings,*,base/workflow,Imports,TRUE +PEcAn.settings,*,models/biocro,Imports,TRUE +PEcAn.settings,*,models/ed,Imports,TRUE +PEcAn.settings,*,models/maat,Imports,TRUE +PEcAn.settings,*,models/stics,Imports,TRUE +PEcAn.settings,*,modules/assim.batch,Imports,TRUE +PEcAn.settings,*,modules/assim.sequential,Imports,TRUE +PEcAn.settings,*,modules/benchmark,Imports,TRUE +PEcAn.settings,*,modules/data.atmosphere,Suggests,TRUE +PEcAn.settings,*,modules/data.land,Suggests,TRUE +PEcAn.settings,*,modules/meta.analysis,Imports,TRUE +PEcAn.settings,*,modules/uncertainty,Imports,TRUE +PEcAn.SIPNET,*,base/all,Suggests,TRUE +PEcAn.SIPNET,*,base/qaqc,Suggests,TRUE +PEcAn.uncertainty,*,base/all,Depends,TRUE +PEcAn.uncertainty,*,base/workflow,Imports,TRUE +PEcAn.uncertainty,*,modules/assim.batch,Imports,TRUE +PEcAn.uncertainty,*,modules/assim.sequential,Imports,TRUE +PEcAn.utils,*,base/all,Depends,TRUE +PEcAn.utils,*,base/db,Imports,TRUE +PEcAn.utils,*,base/qaqc,Suggests,TRUE +PEcAn.utils,*,base/settings,Imports,TRUE +PEcAn.utils,*,base/workflow,Imports,TRUE +PEcAn.utils,*,models/biocro,Imports,TRUE +PEcAn.utils,*,models/clm45,Depends,TRUE +PEcAn.utils,*,models/dalec,Imports,TRUE +PEcAn.utils,*,models/ed,Imports,TRUE +PEcAn.utils,*,models/fates,Imports,TRUE +PEcAn.utils,*,models/gday,Depends,TRUE +PEcAn.utils,*,models/jules,Imports,TRUE +PEcAn.utils,*,models/linkages,Depends,TRUE +PEcAn.utils,*,models/lpjguess,Imports,TRUE +PEcAn.utils,*,models/maat,Imports,TRUE +PEcAn.utils,*,models/maespa,Imports,TRUE +PEcAn.utils,*,models/preles,Depends,TRUE +PEcAn.utils,*,models/preles,Imports,TRUE +PEcAn.utils,*,models/sipnet,Imports,TRUE +PEcAn.utils,*,modules/assim.batch,Imports,TRUE +PEcAn.utils,*,modules/assim.sequential,Suggests,TRUE +PEcAn.utils,*,modules/benchmark,Imports,TRUE +PEcAn.utils,*,modules/data.atmosphere,Imports,TRUE +PEcAn.utils,*,modules/data.land,Imports,TRUE +PEcAn.utils,*,modules/data.remote,Imports,TRUE +PEcAn.utils,*,modules/meta.analysis,Imports,TRUE +PEcAn.utils,*,modules/rtm,Suggests,TRUE +PEcAn.utils,*,modules/uncertainty,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/basgra,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/cable,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/dvmdostem,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/ldndc,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/sibcasa,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/stics,Imports,TRUE +PEcAn.utils,>= 1.4.8,models/template,Imports,TRUE +PEcAn.visualization,*,modules/assim.sequential,Suggests,TRUE +PEcAn.visualization,*,modules/data.land,Imports,TRUE +PEcAn.visualization,*,modules/priors,Suggests,TRUE +PEcAn.workflow,*,base/all,Depends,TRUE +PEcAn.workflow,*,modules/assim.batch,Imports,TRUE +PEcAn.workflow,*,modules/assim.sequential,Imports,TRUE +plotrix,*,base/qaqc,Imports,FALSE +plotrix,*,modules/assim.sequential,Suggests,FALSE +plyr,>= 1.8.4,base/visualization,Imports,FALSE +plyr,>= 1.8.4,modules/assim.sequential,Suggests,FALSE +plyr,>= 1.8.4,modules/uncertainty,Imports,FALSE +png,*,base/visualization,Suggests,FALSE +prodlim,*,modules/assim.batch,Imports,FALSE +progress,*,modules/data.atmosphere,Suggests,FALSE +purrr,*,base/db,Imports,FALSE +purrr,*,base/settings,Imports,FALSE +purrr,*,base/utils,Imports,FALSE +purrr,*,models/ed,Imports,FALSE +purrr,*,modules/assim.sequential,Imports,FALSE +purrr,*,modules/data.land,Imports,FALSE +purrr,*,modules/data.remote,Imports,FALSE +purrr,*,modules/uncertainty,Imports,FALSE +purrr,>= 0.2.3,base/workflow,Imports,FALSE +purrr,>= 0.2.3,modules/data.atmosphere,Imports,FALSE +pwr,*,modules/rtm,Suggests,FALSE +R.utils,*,base/db,Imports,FALSE +randomForest,*,modules/assim.sequential,Suggests,FALSE +randtoolbox,*,base/utils,Suggests,FALSE +randtoolbox,*,modules/uncertainty,Imports,FALSE +raster,*,base/visualization,Suggests,FALSE +raster,*,modules/assim.sequential,Suggests,FALSE +raster,*,modules/data.atmosphere,Imports,FALSE +raster,*,modules/data.land,Suggests,FALSE +raster,*,modules/data.remote,Suggests,FALSE +rcrossref,*,base/db,Suggests,FALSE +readr,*,models/ldndc,Imports,FALSE +readr,*,modules/assim.sequential,Suggests,FALSE +REddyProc,*,modules/data.atmosphere,Imports,FALSE +redland,*,modules/data.land,Suggests,FALSE +reshape,*,modules/data.remote,Suggests,FALSE +reshape2,*,base/visualization,Imports,FALSE +reshape2,*,modules/benchmark,Imports,FALSE +reshape2,*,modules/data.atmosphere,Imports,FALSE +reshape2,>= 1.4.2,modules/assim.sequential,Suggests,FALSE +reticulate,*,modules/data.atmosphere,Suggests,FALSE +reticulate,*,modules/data.land,Suggests,FALSE +reticulate,*,modules/data.remote,Imports,FALSE +rjags,*,base/utils,Suggests,FALSE +rjags,*,modules/assim.batch,Imports,FALSE +rjags,*,modules/data.land,Imports,FALSE +rjags,*,modules/meta.analysis,Imports,FALSE +rjags,*,modules/photosynthesis,Depends,FALSE +rjson,*,models/dvmdostem,Imports,FALSE +rlang,*,base/db,Imports,FALSE +rlang,*,base/qaqc,Imports,FALSE +rlang,*,base/utils,Imports,FALSE +rlang,*,base/visualization,Imports,FALSE +rlang,*,models/biocro,Imports,FALSE +rlang,*,models/ed,Imports,FALSE +rlang,*,models/ldndc,Imports,FALSE +rlang,*,modules/assim.sequential,Imports,FALSE +rlang,*,modules/benchmark,Imports,FALSE +rlang,*,modules/data.land,Imports,FALSE +rlang,*,modules/data.remote,Imports,FALSE +rlang,*,modules/uncertainty,Imports,FALSE +rlang,>= 0.2.0,modules/data.atmosphere,Imports,FALSE +rlist,*,modules/assim.sequential,Suggests,FALSE +rmarkdown,>= 2.19,base/db,Suggests,FALSE +rmarkdown,>= 2.19,base/qaqc,Suggests,FALSE +rmarkdown,>= 2.19,modules/allometry,Suggests,FALSE +rmarkdown,>= 2.19,modules/assim.batch,Suggests,FALSE +rmarkdown,>= 2.19,modules/meta.analysis,Suggests,FALSE +rmarkdown,>= 2.19,modules/photosynthesis,Suggests,FALSE +roxygen2,== 7.3.2,base/all,Roxygen,FALSE +roxygen2,== 7.3.2,base/db,Roxygen,FALSE +roxygen2,== 7.3.2,base/logger,Roxygen,FALSE +roxygen2,== 7.3.2,base/qaqc,Roxygen,FALSE +roxygen2,== 7.3.2,base/remote,Roxygen,FALSE +roxygen2,== 7.3.2,base/settings,Roxygen,FALSE +roxygen2,== 7.3.2,base/utils,Roxygen,FALSE +roxygen2,== 7.3.2,base/visualization,Roxygen,FALSE +roxygen2,== 7.3.2,base/workflow,Roxygen,FALSE +roxygen2,== 7.3.2,models/basgra,Roxygen,FALSE +roxygen2,== 7.3.2,models/biocro,Roxygen,FALSE +roxygen2,== 7.3.2,models/cable,Roxygen,FALSE +roxygen2,== 7.3.2,models/clm45,Roxygen,FALSE +roxygen2,== 7.3.2,models/dalec,Roxygen,FALSE +roxygen2,== 7.3.2,models/dvmdostem,Roxygen,FALSE +roxygen2,== 7.3.2,models/ed,Roxygen,FALSE +roxygen2,== 7.3.2,models/fates,Roxygen,FALSE +roxygen2,== 7.3.2,models/gday,Roxygen,FALSE +roxygen2,== 7.3.2,models/jules,Roxygen,FALSE +roxygen2,== 7.3.2,models/ldndc,Roxygen,FALSE +roxygen2,== 7.3.2,models/linkages,Roxygen,FALSE +roxygen2,== 7.3.2,models/lpjguess,Roxygen,FALSE +roxygen2,== 7.3.2,models/maat,Roxygen,FALSE +roxygen2,== 7.3.2,models/maespa,Roxygen,FALSE +roxygen2,== 7.3.2,models/preles,Roxygen,FALSE +roxygen2,== 7.3.2,models/sibcasa,Roxygen,FALSE +roxygen2,== 7.3.2,models/sipnet,Roxygen,FALSE +roxygen2,== 7.3.2,models/stics,Roxygen,FALSE +roxygen2,== 7.3.2,models/template,Roxygen,FALSE +roxygen2,== 7.3.2,modules/allometry,Roxygen,FALSE +roxygen2,== 7.3.2,modules/assim.batch,Roxygen,FALSE +roxygen2,== 7.3.2,modules/assim.sequential,Roxygen,FALSE +roxygen2,== 7.3.2,modules/benchmark,Roxygen,FALSE +roxygen2,== 7.3.2,modules/data.atmosphere,Roxygen,FALSE +roxygen2,== 7.3.2,modules/data.land,Roxygen,FALSE +roxygen2,== 7.3.2,modules/data.remote,Roxygen,FALSE +roxygen2,== 7.3.2,modules/emulator,Roxygen,FALSE +roxygen2,== 7.3.2,modules/meta.analysis,Roxygen,FALSE +roxygen2,== 7.3.2,modules/photosynthesis,Roxygen,FALSE +roxygen2,== 7.3.2,modules/priors,Roxygen,FALSE +roxygen2,== 7.3.2,modules/rtm,Roxygen,FALSE +roxygen2,== 7.3.2,modules/uncertainty,Roxygen,FALSE +RPostgres,*,base/db,Suggests,FALSE +RPostgreSQL,*,base/db,Suggests,FALSE +RPostgreSQL,*,models/biocro,Suggests,FALSE +Rpreles,*,models/preles,Suggests,FALSE +RSQLite,*,base/db,Suggests,FALSE +sessioninfo,*,base/all,Suggests,FALSE +sf,*,modules/assim.sequential,Suggests,FALSE +sf,*,modules/data.atmosphere,Imports,FALSE +sf,*,modules/data.land,Imports,FALSE +sf,*,modules/data.remote,Suggests,FALSE +SimilarityMeasures,*,modules/benchmark,Imports,FALSE +sirt,*,modules/data.land,Imports,FALSE +sp,*,base/visualization,Suggests,FALSE +sp,*,modules/assim.sequential,Suggests,FALSE +sp,*,modules/data.atmosphere,Imports,FALSE +sp,*,modules/data.land,Imports,FALSE +sp,*,modules/data.remote,Imports,FALSE +stats,*,base/qaqc,Imports,FALSE +stats,*,modules/allometry,Imports,FALSE +stats,*,modules/assim.batch,Imports,FALSE +stats,*,modules/assim.sequential,Suggests,FALSE +stats,*,modules/photosynthesis,Imports,FALSE +SticsRFiles,*,models/stics,Suggests,FALSE +stringi,*,base/logger,Imports,FALSE +stringi,*,base/utils,Imports,FALSE +stringr,*,models/fates,Imports,FALSE +stringr,*,modules/assim.sequential,Imports,FALSE +stringr,*,modules/benchmark,Imports,FALSE +stringr,*,modules/data.land,Imports,FALSE +stringr,>= 1.1.0,base/visualization,Imports,FALSE +stringr,>= 1.1.0,models/ed,Imports,FALSE +stringr,>= 1.1.0,modules/data.atmosphere,Imports,FALSE +suntools,*,modules/data.atmosphere,Imports,FALSE +swfscMisc,*,modules/data.land,Imports,FALSE +terra,*,modules/assim.sequential,Suggests,FALSE +terra,*,modules/data.atmosphere,Imports,FALSE +terra,*,modules/data.land,Imports,FALSE +terra,*,modules/data.remote,Imports,FALSE +testthat,*,base/all,Suggests,FALSE +testthat,*,base/logger,Suggests,FALSE +testthat,*,base/remote,Suggests,FALSE +testthat,*,base/workflow,Suggests,FALSE +testthat,*,modules/assim.sequential,Suggests,FALSE +testthat,*,modules/priors,Suggests,FALSE +testthat,>= 1.0.2,base/visualization,Suggests,FALSE +testthat,>= 1.0.2,models/basgra,Suggests,FALSE +testthat,>= 1.0.2,models/cable,Suggests,FALSE +testthat,>= 1.0.2,models/clm45,Suggests,FALSE +testthat,>= 1.0.2,models/dalec,Suggests,FALSE +testthat,>= 1.0.2,models/dvmdostem,Suggests,FALSE +testthat,>= 1.0.2,models/ed,Suggests,FALSE +testthat,>= 1.0.2,models/fates,Suggests,FALSE +testthat,>= 1.0.2,models/gday,Suggests,FALSE +testthat,>= 1.0.2,models/jules,Suggests,FALSE +testthat,>= 1.0.2,models/ldndc,Suggests,FALSE +testthat,>= 1.0.2,models/linkages,Suggests,FALSE +testthat,>= 1.0.2,models/lpjguess,Suggests,FALSE +testthat,>= 1.0.2,models/maat,Suggests,FALSE +testthat,>= 1.0.2,models/maespa,Suggests,FALSE +testthat,>= 1.0.2,models/preles,Suggests,FALSE +testthat,>= 1.0.2,models/sipnet,Suggests,FALSE +testthat,>= 1.0.2,models/stics,Suggests,FALSE +testthat,>= 1.0.2,models/template,Suggests,FALSE +testthat,>= 1.0.2,modules/allometry,Suggests,FALSE +testthat,>= 1.0.2,modules/assim.batch,Suggests,FALSE +testthat,>= 1.0.2,modules/data.land,Suggests,FALSE +testthat,>= 1.0.2,modules/data.remote,Suggests,FALSE +testthat,>= 1.0.2,modules/meta.analysis,Suggests,FALSE +testthat,>= 1.0.2,modules/rtm,Suggests,FALSE +testthat,>= 1.0.2,modules/uncertainty,Suggests,FALSE +testthat,>= 2.0.0,base/db,Suggests,FALSE +testthat,>= 2.0.0,base/settings,Suggests,FALSE +testthat,>= 2.0.0,base/utils,Suggests,FALSE +testthat,>= 2.0.0,models/biocro,Suggests,FALSE +testthat,>= 2.0.0,modules/benchmark,Suggests,FALSE +testthat,>= 2.0.0,modules/data.atmosphere,Suggests,FALSE +testthat,>= 3.0.0,models/sibcasa,Suggests,FALSE +testthat,>= 3.0.4,base/qaqc,Suggests,FALSE +tibble,*,base/db,Imports,FALSE +tibble,*,models/ed,Imports,FALSE +tibble,*,models/lpjguess,Imports,FALSE +tibble,*,modules/data.atmosphere,Imports,FALSE +tibble,*,modules/data.remote,Suggests,FALSE +tictoc,*,modules/assim.sequential,Suggests,FALSE +tidyr,*,base/db,Imports,FALSE +tidyr,*,models/ed,Imports,FALSE +tidyr,*,modules/assim.sequential,Suggests,FALSE +tidyr,*,modules/data.atmosphere,Imports,FALSE +tidyr,*,modules/data.land,Imports,FALSE +tidyselect,*,modules/benchmark,Imports,FALSE +tidyselect,*,modules/data.atmosphere,Imports,FALSE +tidyselect,*,modules/data.land,Imports,FALSE +tidyverse,*,base/db,Suggests,FALSE +tools,*,base/remote,Suggests,FALSE +tools,*,modules/allometry,Imports,FALSE +traits,*,modules/data.land,Imports,FALSE +TruncatedNormal,>= 2.2,modules/assim.batch,Imports,FALSE +truncnorm,*,modules/data.atmosphere,Imports,FALSE +units,*,base/db,Imports,FALSE +units,*,base/utils,Imports,FALSE +units,*,modules/benchmark,Imports,FALSE +units,*,modules/data.atmosphere,Imports,FALSE +urltools,*,base/remote,Imports,FALSE +utils,*,base/all,Imports,FALSE +utils,*,base/logger,Imports,FALSE +utils,*,models/ed,Imports,FALSE +utils,*,modules/allometry,Imports,FALSE +utils,*,modules/assim.batch,Imports,FALSE +utils,*,modules/assim.sequential,Suggests,FALSE +utils,*,modules/benchmark,Imports,FALSE +utils,*,modules/data.remote,Suggests,FALSE +utils,*,modules/photosynthesis,Imports,FALSE +vdiffr,>= 1.0.2,base/qaqc,Suggests,FALSE +withr,*,base/db,Suggests,FALSE +withr,*,base/logger,Suggests,FALSE +withr,*,base/qaqc,Suggests,FALSE +withr,*,base/remote,Suggests,FALSE +withr,*,base/settings,Suggests,FALSE +withr,*,base/utils,Suggests,FALSE +withr,*,base/visualization,Suggests,FALSE +withr,*,base/workflow,Suggests,FALSE +withr,*,models/basgra,Suggests,FALSE +withr,*,models/ed,Suggests,FALSE +withr,*,models/sibcasa,Suggests,FALSE +withr,*,modules/allometry,Suggests,FALSE +withr,*,modules/data.atmosphere,Suggests,FALSE +XML,*,base/db,Imports,FALSE +XML,*,base/workflow,Imports,FALSE +XML,*,models/biocro,Imports,FALSE +XML,*,models/maat,Imports,FALSE +XML,*,models/stics,Imports,FALSE +XML,*,modules/assim.batch,Imports,FALSE +XML,*,modules/assim.sequential,Suggests,FALSE +XML,*,modules/data.remote,Imports,FALSE +XML,*,modules/rtm,Suggests,FALSE +XML,>= 3.98-1.3,base/settings,Imports,FALSE +XML,>= 3.98-1.4,models/ed,Imports,FALSE +XML,>= 3.98-1.4,modules/benchmark,Imports,FALSE +XML,>= 3.98-1.4,modules/data.atmosphere,Imports,FALSE +XML,>= 3.98-1.4,modules/data.land,Imports,FALSE +xtable,*,base/utils,Suggests,FALSE +xts,*,modules/data.atmosphere,Imports,FALSE +zoo,*,modules/benchmark,Imports,FALSE +zoo,*,modules/data.atmosphere,Imports,FALSE +======= "package","version","needed_by_dir","type","is_pecan" "abind","*","modules/assim.batch","Imports",FALSE "abind",">= 1.4.5","base/utils","Imports",FALSE @@ -679,3 +1355,4 @@ "xts","*","modules/data.atmosphere","Imports",FALSE "zoo","*","modules/benchmark","Imports",FALSE "zoo","*","modules/data.atmosphere","Imports",FALSE +>>>>>>> bb2cda9dddc97fc39b663de3016d49e0dd682a3a diff --git a/docker/docker-compose.example.yml b/docker/docker-compose.example.yml index 5ef88fc2402..fd649f7bc93 100644 --- a/docker/docker-compose.example.yml +++ b/docker/docker-compose.example.yml @@ -1,3 +1,7 @@ +# you need a version entry, and this should be the same version as the +# docker-compose.yml file. +version: "3" + # if you change any of the services you will need the services header. services: diff --git a/models/fates/R/model2netcdf.FATES.R b/models/fates/R/model2netcdf.FATES.R index 5f0cc66c317..af8e86c8f6e 100644 --- a/models/fates/R/model2netcdf.FATES.R +++ b/models/fates/R/model2netcdf.FATES.R @@ -32,7 +32,7 @@ model2netcdf.FATES <- function(outdir, sitelat, sitelon, start_date, end_date, vars_names, pfts){ ## Tips: matched_var could be expanded for more selected variables matched_var <- tibble::tribble( - ~fatesname, ~pecanname, ~pecanunits, ~longname, + ~fatesname,~pecanname,~pecanunits,~longname, "FATES_GPP_PF","GPP","kgC m-2 s-1","Gross Primary Productivity", "FATES_NPP_PF","NPP","kg m-2 yr-1", "Total PFT-level NPP in kg carbon per m2 land area per second", "NEE","NEE","kgC m-2 s-1", "Net Ecosystem Exchange of carbon, includes fire and hrv_xsmrpool", diff --git a/models/fates/R/test.fates.xml b/models/fates/R/test.fates.xml new file mode 100644 index 00000000000..242e3fdd0d2 --- /dev/null +++ b/models/fates/R/test.fates.xml @@ -0,0 +1,48 @@ + + + pecan + /pecan/models/fates/data + + /pecan/models/fates + /pecan/models/fates/out + + + + PostgreSQL + bety + bety + localhost + bety + FALSE + + + + + temperate.coniferous ## + + + + + /pecan/models/fates/test_oneyear # + FATES + ? + ? + + + + + SOD1 #772 + 26.6385 + 67.3623 + + + /data/sites/niwot/niwot.clim # + + 2002-01-01 00:00:00 + 2005-12-31 00:00:00 + + localhost + + pecan/dbfiles + + diff --git a/models/fates/R/write.configs.FATES.R b/models/fates/R/write.configs.FATES.R index 67b1ddf87ce..dee3c6a83db 100644 --- a/models/fates/R/write.configs.FATES.R +++ b/models/fates/R/write.configs.FATES.R @@ -19,24 +19,40 @@ ##' @return none ##' @export ##' @author Mike Dietze, Shawn Serbin -##-------------------------------------------------------------------------------------------------# +##-------------------------------------------------------------------------------------------------# # nolint + +# example trait.values list +trait.values <- list() +trait.values$temperate.coniferous <- list() +trait.values$env <- list() + +tc_traits <- as.data.frame(matrix(c(9999, 8888), nrow=1, ncol=2)) +colnames(tc_traits) <- c("leaf_turnover_rate", "veg_respiration_Q10") +# Fates names for these params are "fates_leaf_long", "q10_mr" + +trait.values$temperate.coniferous <- tc_traits +settings <- '/pecan/models/fates/R/test.fates.xml' +run.id <- 'test_oneyear' + +# example trait.values list + write.config.FATES <- function(defaults, trait.values, settings, run.id){ ## site information site <- settings$run$site - site.id <- as.numeric(site$id) + site.id <- site$id # change1: 772 -> SOD1 # find out where things are local.rundir <- file.path(settings$rundir, run.id) ## this is on local machine for staging rundir <- file.path(settings$host$rundir, run.id) ## this is on remote machine for execution - casedir <- file.path(rundir,"case") + casedir <- file.path(rundir,run.id) ## /ctsm-api/resources/cases/case_SOD1, change2: 'case' -> site.id outdir <- file.path(settings$host$outdir, run.id) - refcase <- settings$model$binary + refcase <- settings$model$binary # question1: refcase==casedir? bld <- file.path(refcase,"bld") binary <- file.path(bld,"cesm.exe") - indir <- file.path(rundir,"input") ## input directory + indir <- file.path(rundir,"data/shared") ## input directory default <- settings$run$inputs$default$path ## reference inputs file structure - site_name <- paste0(site.id %/% 1000000000, "-", site.id %% 1000000000) + site_name <- paste0(site.id, "_c", run.id) ## change3 ## DATES ## CLM is a bit odd and takes a start date and length, so we need to precompute @@ -53,49 +69,50 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ ## SITE INFO --> DOMAIN FILE (lat/lon) # - should also store this in the refcase directory for PEcAn so we can grab from there, and not the PEcAn package - gridres <- 0.125 ## ultimately this should be a variable - lat <- as.numeric(site$lat) - lon <- (as.numeric(site$lon) + 360) %% 360 ## make sure coords in 0-360 range, not negative - domain.default <- system.file("domain.lnd.1x1pt-brazil_navy.090715.nc",package="PEcAn.FATES") - domain.file <- file.path(local.rundir,paste0("domain.lnd.",site_name,".nc")) - file.copy(domain.default,domain.file) - domain.nc <- ncdf4::nc_open(domain.file,write=TRUE) - ncdf4::ncvar_put(nc=domain.nc, varid='xc', vals=lon) - ncdf4::ncvar_put(nc=domain.nc, varid='yc', vals=lat) - ncdf4::ncvar_put(nc=domain.nc, varid='xv', vals=lon+c(-1,1,1,-1)*gridres) - ncdf4::ncvar_put(nc=domain.nc, varid='yv', vals=lat+c(-1,-1,1,1)*gridres) - ncdf4::ncvar_put(nc=domain.nc, varid='area', vals=(2*gridres*pi/180)^2) - ncdf4::nc_close(domain.nc) + #gridres <- 0.125 ## ultimately this should be a variable + #lat <- as.numeric(site$lat) + #lon <- (as.numeric(site$lon) + 360) %% 360 ## make sure coords in 0-360 range, not negative + #domain.default <- system.file("domain.lnd.360x720_gswp3.0v1.c170606.nc",package="PEcAn.FATES") + #domain.file <- file.path(local.rundir,paste0("domain.lnd.fv0.9x1.25_gx1v7_",site_name,".nc")) + #file.copy(domain.default,domain.file) + #domain.nc <- ncdf4::nc_open(domain.file,write=TRUE) + #ncdf4::ncvar_put(nc=domain.nc, varid='xc', vals=lon) + #ncdf4::ncvar_put(nc=domain.nc, varid='yc', vals=lat) + #ncdf4::ncvar_put(nc=domain.nc, varid='xv', vals=lon+c(-1,1,1,-1)*gridres) + #ncdf4::ncvar_put(nc=domain.nc, varid='yv', vals=lat+c(-1,-1,1,1)*gridres) + #ncdf4::ncvar_put(nc=domain.nc, varid='area', vals=(2*gridres*pi/180)^2) + #ncdf4::nc_close(domain.nc) ## SURF - should also store this in the refcase directory for PEcAn so we can grab from there, and not the PEcAn package - surf.default <- system.file("surfdata_1x1_brazil_16pfts_Irrig_CMIP6_simyr2000_c171214.nc",package = "PEcAn.FATES") - surf.file <- file.path(local.rundir,paste0("surfdata_",site_name,"_simyr2000.nc")) - file.copy(surf.default,surf.file) - Sys.chmod(surf.file) - surf.nc <- ncdf4::nc_open(surf.file,write=TRUE) - ncdf4::ncvar_put(nc=surf.nc, varid='LONGXY', vals=lon) - ncdf4::ncvar_put(nc=surf.nc, varid='LATIXY', vals=lat) - ncdf4::nc_close(surf.nc) + #surf.default <- system.file("surfdata_0.9x1.25_hist_16pfts_Irrig_CMIP6_simyr2000_c190214.nc",package = "PEcAn.FATES") + #surf.file <- file.path(local.rundir,paste0("surfdata_0.9x1.25_hist_16pfts_Irrig_CMIP6_simyr2000_",site_name, ".nc")) + #file.copy(surf.default,surf.file) + #Sys.chmod(surf.file) + #surf.nc <- ncdf4::nc_open(surf.file,write=TRUE) + #ncdf4::ncvar_put(nc=surf.nc, varid='LONGXY', vals=lon) + #ncdf4::ncvar_put(nc=surf.nc, varid='LATIXY', vals=lat) + #ncdf4::nc_close(surf.nc) + ## DATM & DATM Stream?? ## MET HEADERS - if(!is.null(settings$run$inputs$met)){ + #if(!is.null(settings$run$inputs$met)){ ## DATM HEADER: datm_atm_in - datm <- readLines(con=system.file("datm_atm_in.template",package = "PEcAn.FATES"),n=-1) - datm <- gsub('@DOMAIN@', file.path(indir,"share/domains/domain.clm",basename(domain.file)), datm) - datm <- gsub('@START_YEAR@',lubridate::year(start_date), datm) - datm <- gsub('@END_YEAR@',lubridate::year(end_date), datm) - writeLines(datm, con=file.path(local.rundir, "datm_atm_in")) + #datm <- readLines(con=system.file("datm_atm_in.template",package = "PEcAn.FATES"),n=-1) + #datm <- gsub('@DOMAIN@', file.path(indir,"share/domains/domain.clm",basename(domain.file)), datm) + #datm <- gsub('@START_YEAR@',lubridate::year(start_date), datm) + #datm <- gsub('@END_YEAR@',lubridate::year(end_date), datm) + #writeLines(datm, con=file.path(local.rundir, "datm_atm_in")) - ## DATM STREAM MET - met <- readLines(con=system.file("datm.streams.txt.PEcAn_met.template",package = "PEcAn.FATES"),n=-1) - met <- gsub('@INDIR@',indir, met) + ### DATM STREAM MET + #met <- readLines(con=system.file("datm.streams.txt.PEcAn_met.template",package = "PEcAn.FATES"),n=-1) + #met <- gsub('@INDIR@',indir, met) #domain.file.name <- paste0("domain.lnd.",site_name,".nc") #met <- gsub('@DOMAIN@',domain.file.name, met) # attempting to provide correct domain file name - met <- gsub('@MET_PATH@',settings$run$inputs$met$path, met) - met.files <- dir(settings$run$inputs$met$path,"*.nc") - met <- gsub('@MET_FILES@',paste(met.files,collapse = "\n "), met) - writeLines(met, con=file.path(local.rundir, "datm.streams.txt.PEcAn_met")) + #met <- gsub('@MET_PATH@',settings$run$inputs$met$path, met) + #met.files <- dir(settings$run$inputs$met$path,"*.nc") + #met <- gsub('@MET_FILES@',paste(met.files,collapse = "\n"), met) + #writeLines(met, con=file.path(local.rundir, "datm.streams.txt.PEcAn_met")) } # ... need to set this up so that if MET is blank it can run with default CLM met @@ -116,59 +133,53 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ jobsh <- readLines(con=system.file("template.job", package = "PEcAn.FATES"), n=-1) } - # create host specific setttings - hostsetup <- "" - if (!is.null(settings$model$prerun)) { - hostsetup <- paste(hostsetup, sep="\n", paste(settings$model$prerun, collapse="\n")) - } - if (!is.null(settings$host$prerun)) { - hostsetup <- paste(hostsetup, sep="\n", paste(settings$host$prerun, collapse="\n")) - } + # create host specific settings + # hostsetup <- "" + # if (!is.null(settings$model$prerun)) { + # hostsetup <- paste(hostsetup, sep="\n", paste(settings$model$prerun, collapse="\n")) + # } + # if (!is.null(settings$host$prerun)) { + # hostsetup <- paste(hostsetup, sep="\n", paste(settings$host$prerun, collapse="\n")) + # } - hostteardown <- "" - if (!is.null(settings$model$postrun)) { - hostteardown <- paste(hostteardown, sep="\n", paste(settings$model$postrun, collapse="\n")) - } - if (!is.null(settings$host$postrun)) { - hostteardown <- paste(hostteardown, sep="\n", paste(settings$host$postrun, collapse="\n")) - } + # hostteardown <- "" + # if (!is.null(settings$model$postrun)) { + # hostteardown <- paste(hostteardown, sep="\n", paste(settings$model$postrun, collapse="\n")) + # } + # if (!is.null(settings$host$postrun)) { + # hostteardown <- paste(hostteardown, sep="\n", paste(settings$host$postrun, collapse="\n")) + # } # create job.sh jobsh <- gsub('@HOST_SETUP@', hostsetup, jobsh) jobsh <- gsub('@HOST_TEARDOWN@', hostteardown, jobsh) ## Machine configs - # ./create_newcase -case @CASEDIR@ -res 1x1_brazil -compset ICLM45ED -mach @MACHINE@ -compiler @COMPILER@ -project @PROJECT@ + # ./create_newcase –case A –res @RES@ –compset @COMPSET@ –driver @DRIVER@ –machine @MACHINE@ –run-unsupported if (!is.null(settings$model$machine)) { machine <- paste(settings$model$machine, collapse="\n") } else { - machine <- "eddi" + machine <- "container-nlp" } jobsh <- gsub('@MACHINE@', machine, jobsh) - if (!is.null(settings$model$compiler)) { - compiler <- paste(settings$model$compiler, collapse="\n") + if (!is.null(settings$model$driver)) { + driver <- paste(settings$model$driver, collapse="\n") } else { - compiler <- "gnu" + driver <- "nuopc" } - jobsh <- gsub('@COMPILER@', compiler, jobsh) - if (!is.null(settings$model$resolution)) { - resolution <- paste(settings$model$resolution, collapse="\n") - } else { - resolution <- "1x1_brazil" - } - jobsh <- gsub('@RES@', resolution, jobsh) + jobsh <- gsub('@DRIVER@', driver, jobsh) if (!is.null(settings$model$compset)) { compset <- paste(settings$model$compset, collapse="\n") } else { - compset <- "I2000Clm50FatesGs" + compset <- "2000_DATM%GSWP3v1_CLM51%FATES_SICE_SOCN_MOSART_SGLC_SWAV" } jobsh <- gsub('@COMPSET@', compset, jobsh) - if (!is.null(settings$model$project)) { - project <- paste(settings$model$project, collapse="\n") + if (!is.null(settings$model$res)) { + res <- paste(settings$model$res, collapse="\n") } else { - project <- "pecan" + res <- "CLM_USRDAT" } - jobsh <- gsub('@PROJECT@', project, jobsh) + jobsh <- gsub('@RES@', res, jobsh) ## PATHS jobsh <- gsub('@RUNDIR@', rundir, jobsh) @@ -192,7 +203,7 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ writeLines(jobsh, con=file.path(settings$rundir, run.id, "job.sh")) Sys.chmod(file.path(settings$rundir, run.id, "job.sh")) -# + # ## Write PARAMETER file ## COPY AND OPEN DEFAULT PARAMETER FILES @@ -202,103 +213,76 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ # CLM #clm.param.default <- system.file("clm5_params.c171117.nc",package="PEcAn.FATES") #clm.param.file <- file.path(local.rundir,paste0("clm_params.",run.id,".nc")) - clm.param.default <- file.path(refcase,"clm5_params.c171117.nc") # probably need to allow custom param file names here (pecan.xml?) - clm.param.file <- file.path(local.rundir,paste0("clm_params.",run.id,".nc")) - file.copy(clm.param.default,clm.param.file) - clm.param.nc <- ncdf4::nc_open(clm.param.file,write=TRUE) + ## Position of parameters file? + #clm.param.default <- file.path(refcase,"clm5_params.c171117.nc") # probably need to allow custom param file names here (pecan.xml?) + #clm.param.file <- file.path(local.rundir,paste0("clm_params.",run.id,".nc")) + #file.copy(clm.param.default,clm.param.file) + #clm.param.nc <- ncdf4::nc_open(clm.param.file,write=TRUE) # FATES #fates.param.default <- system.file("fates_params_2troppftclones.c171018_sps.nc",package="PEcAn.FATES") # above is a temporary param file corrected for the tropics by lowering freezing tolerace parameters - fates.param.default <- file.path(refcase,"fates_params_2troppftclones.c171018_sps.nc") # probably need to allow custom param file names here (pecan.xml?) - fates.param.file <- file.path(local.rundir,paste0("fates_params.",run.id,".nc")) - file.copy(fates.param.default,fates.param.file) - fates.param.nc <- ncdf4::nc_open(fates.param.file,write=TRUE) + #fates.param.default <- file.path(refcase,"fates_params_2troppftclones.c171018_sps.nc") # probably need to allow custom param file names here (pecan.xml?) + #fates.param.file <- file.path(local.rundir,paste0("fates_params.",run.id,".nc")) + #file.copy(fates.param.default,fates.param.file) + #fates.param.nc <- ncdf4::nc_open(fates.param.file,write=TRUE) ## Loop over PFTS - npft <- length(trait.values) - PEcAn.logger::logger.debug(npft) - PEcAn.logger::logger.debug(dim(trait.values)) - PEcAn.logger::logger.debug(names(trait.values)) + #npft <- length(trait.values) + #PEcAn.logger::logger.debug(npft) + #PEcAn.logger::logger.debug(dim(trait.values)) + #PEcAn.logger::logger.debug(names(trait.values)) #pftnames <- stringr::str_trim(tolower(ncvar_get(param.nc,"pftname"))) - pftnames <- stringr::str_trim(tolower(ncdf4::ncvar_get(clm.param.nc,"pftname"))) - PEcAn.logger::logger.debug(paste0("CLM PFT names: "),pftnames) - for (i in seq_len(npft)) { - pft <- trait.values[[i]] - print(c("PFT",i)) - PEcAn.logger::logger.info(pft) - pft.name <- names(trait.values)[i] - if(is.null(pft.name) | is.na(pft.name)){ - PEcAn.logger::logger.error("pft.name missing") - } else { - PEcAn.logger::logger.info(paste("PFT =",pft.name)) - PEcAn.logger::logger.debug(paste0("fates-clm PFT number: ",which(pftnames==pft.name))) - } - if(pft.name == 'env') next ## HACK, need to remove env from default + #pftnames <- stringr::str_trim(tolower(ncdf4::ncvar_get(clm.param.nc,"pftname"))) + #PEcAn.logger::logger.debug(paste0("CLM PFT names: "),pftnames) + #for (i in seq_len(npft)) { + #pft <- trait.values[[i]] + #print(c("PFT",i)) + #PEcAn.logger::logger.info(pft) + #pft.name <- names(trait.values)[i] + #if(is.null(pft.name) | is.na(pft.name)){ + #PEcAn.logger::logger.error("pft.name missing") + #} else { + #PEcAn.logger::logger.info(paste("PFT =",pft.name)) + #PEcAn.logger::logger.debug(paste0("fates-clm PFT number: ",which(pftnames==pft.name))) + #} + #if(pft.name == 'env') next ## HACK, need to remove env from default ## Match PFT name to COLUMN - ipft <- match(tolower(pft.name),pftnames) - PEcAn.logger::logger.debug(paste0("ipft: ",ipft)) + #ipft <- match(tolower(pft.name),pftnames) + #PEcAn.logger::logger.debug(paste0("ipft: ",ipft)) - if(is.na(ipft)){ - PEcAn.logger::logger.severe(paste("Unmatched PFT",pft.name, - "in FATES. PEcAn does not yet support non-default PFTs for this model")) - } + #if(is.na(ipft)){ + #PEcAn.logger::logger.severe(paste("Unmatched PFT",pft.name, + #"in FATES. PEcAn does not yet support non-default PFTs for this model")) + #} # hard code hack until we can use more than 2 pfts in FATES - ipft <- 2 - PEcAn.logger::logger.debug(paste0("*** PFT number hard-coded to ", ipft," in fates. This will be updated when FATES allows more PFTs")) + #ipft <- 2 + #PEcAn.logger::logger.debug(paste0("*** PFT number hard-coded to ", ipft," in fates. This will be updated when FATES allows more PFTs")) ## Special variables used in conversions # leafC <- pft['leafC']/100 ## percent to proportion - leafC <- NA - if(is.na(leafC)) leafC <- 0.48 + #leafC <- NA + #if(is.na(leafC)) leafC <- 0.48 # determine photo pathway - photo_flag <- ncdf4::ncvar_get(fates.param.nc,varid="fates_c3psn", start = ipft, count = 1) - PEcAn.logger::logger.debug(paste0("Photosynthesis pathway flag value: ", photo_flag)) + #photo_flag <- ncdf4::ncvar_get(fates.param.nc,varid="fates_c3psn", start = ipft, count = 1) + #PEcAn.logger::logger.debug(paste0("Photosynthesis pathway flag value: ", photo_flag)) ## Loop over VARIABLES - for (v in seq_along(pft)) { - var <- names(pft)[v] + #for (v in seq_along(pft)) { + #var <- names(pft)[v] ## THESE NEED SOME FOLLOW UP ### ----- Leaf physiological parameters # Vcmax - if(var == "Vcmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_vcmax25top', start = ipft, count = 1, - vals=pft[v]) ## (umol CO2 m-2 s-1) - } # Ball-Berry slope - if(var == "stomatal_slope.BB"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_BB_slope', start = ipft, count = 1, - vals=pft[v]) - } - + # Ball-Berry intercept - c3. We need to figure out how to set either C3 or C4 values? Based on the PFT? # TODO: allow setting this for C3 and/or C4 PFTs # right now, each are just one dimension, will need to revist this if this changes. - if(var == "cuticular_cond"){ - if (photo_flag==0) { - PEcAn.logger::logger.debug("** Setting C4 cuticular conductance value") - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_bbopt_c4', start = 1, count = 1, - vals=pft[v]) - } else if (photo_flag==1) { - PEcAn.logger::logger.debug("** Setting C3 cuticular conductance value") - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_bbopt_c3', start = 1, count = 1, - vals=pft[v]) - } else { - PEcAn.logger::logger.warn(" ** FATES photosynthesis pathway flag not set. cuticular conductance not set **") - } - } - - ## missing from params.nc - # if(var == "cuticular_cond"){ - # gH2O_per_mol <- 18.01528 - # ncvar_put(nc=param.nc, varid='gsmin', start = ipft, count = 1, - # vals=pft[v]*gH2O_per_mol*1e-12) ### umol H2O m-2 s-1 -> [m s-1] - # } # T response params - modified Arrhenius params for Vcmax, Jmax, and TPU # -- NOT YET IMPLEMENTED IN BETYdb. FATES params: @@ -306,39 +290,17 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ # fates_vcmaxse, fates_jmaxse, fates_tpuse # Ha activation energy for vcmax - FATES units: J/mol - if(var == "Ha_Modified_Arrhenius_Vcmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_vcmaxha', start = ipft, count = 1, - vals=pft[v]*1000) ## convert from kj/mol to J/mol (FATES units) - } - + # Hd deactivation energy for vcmax - FATES units: J/mol - if(var == "Hd_Modified_Arrhenius_Vcmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_vcmaxhd', start = ipft, count = 1, - vals=pft[v]*1000) ## convert from kj/mol to J/mol (FATES units) - } - + # Ha activation energy for Jmax - FATES units: J/mol - if(var == "Ha_Modified_Arrhenius_Jmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_jmaxha', start = ipft, count = 1, - vals=pft[v]*1000) ## convert from kj/mol to J/mol (FATES units) - } # Hd deactivation energy for Jmax - FATES units: J/mol - if(var == "Hd_Modified_Arrhenius_Jmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_jmaxhd', start = ipft, count = 1, - vals=pft[v]*1000) ## convert from kj/mol to J/mol (FATES units) - } - + # deltaS Vcmax - BETY units:J/mol/K; FATES units: J/mol/K - if(var == "deltaS_Vcmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_vcmaxse', start = ipft, count = 1, - vals=pft[v]) ## convert from kj/mol to J/mol (FATES units) - } + # deltaS Jmax - BETY units:J/mol/K; FATES units: J/mol/K - if(var == "deltaS_Jmax"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_jmaxse', start = ipft, count = 1, - vals=pft[v]) ## convert from kj/mol to J/mol (FATES units) - } + ### ----- Leaf physiological parameters @@ -348,56 +310,15 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ # ncvar_put(nc=param.nc, varid='background_mort_rate', start = ipft, count = 1, # vals=pft[v]) # } - if(var == "r_fract"){ ## Fraction of carbon balance remaining after maintenance costs have been met that is dedicated to seed production. [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_seed_alloc', start = ipft, count = 1, - vals=pft[v]) - } - ## This one is currently allpft level but should be pft level - no longer in FATES params, what was this changed to? - if(var == "agf_bs"){ ## The fraction of sapwood and structural biomass that is above ground [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_allom_agb_frac', start = ipft, count = 1, - vals=pft[v]) - } - ## PFT-level variables - if(var == "seed_rain_kgC"){ ## External seed rain from outside site (non-mass conserving) ; - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_seed_rain', start = ipft, count = 1, - vals=pft[v]) - } + ## missing from params.nc # if(var == "cuticular_cond"){ # gH2O_per_mol <- 18.01528 # ncvar_put(nc=param.nc, varid='gsmin', start = ipft, count = 1, # vals=pft[v]*gH2O_per_mol*1e-12) ### umol H2O m-2 s-1 -> [m s-1] # } - if(var == "DBH_at_HTMAX"){ ## note in FATES parameter list about switching to HTMAX - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_allom_dbh_maxheight', start = ipft, count = 1, - vals=pft[v]) ## [cm] - } - if(var == "growth_resp_factor"){ ## r_growth = grperc * (gpp+r_maint) fates_grperc:long_name = "Growth respiration factor" ; - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_grperc', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "SLA"){ ## default 0.012 - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_slatop', start = ipft, count = 1, - vals=PEcAn.utils::ud_convert(pft[v],"m2 kg-1","m2 g-1")/leafC) - } - if(var == "leaf_turnover_rate"){ ## fates_leaf_long:long_name = "Leaf longevity (ie turnover timescale)" ; - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_leaf_long', start = ipft, count = 1, - vals=1/pft[v]) ## leaf_long = 1/leaf_turnover_rate, 1/years -> years - } - if(var == "root_turnover_rate"){ ## fates_root_long:long_name = "root longevity (alternatively, turnover time)" ; - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_root_long', start = ipft, count = 1, - vals=1/pft[v]) ## root_long = 1/root_turnover_rate, 1/years -> years - } - if(var == "c2n_leaf"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_leafcn', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "fineroot2leaf"){ #"Allocation parameter: new fine root C per new leaf C" units = "gC/gC" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_froot_leaf', start = ipft, count = 1, - vals=pft[v]) - } - + # if(var == "sapwood_ratio"){ # leaf to sapwood area ratio. IS THIS NOW fates_sapwood_ratio(fates_pft)?? # ncvar_put(nc=fates.param.nc, varid='latosa', start = ipft, count = 1, # vals=PEcAn.utils::ud_convert(pft[v],"m2 m-2","m2 cm-2")) @@ -413,224 +334,16 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ # fates_allom_latosa_slp:units = "unitless" ; # fates_allom_latosa_int = 0.001, 0.001 ; # fates_allom_latosa_slp = 0, 0 ; - if(var == "sapwood_ratio"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_allom_latosa_int', start = ipft, count = 1, - vals=PEcAn.utils::ud_convert(pft[v],"m2 m-2","m2 cm-2")) - } - if(var == "leaf_width"){ # Characteristic leaf dimension use for aerodynamic resistance - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_dleaf', start = ipft, count = 1, - vals=PEcAn.utils::ud_convert(pft[v],"mm","m")) - #PEcAn.logger::logger.debug(paste0("fates_dleaf: ",PEcAn.utils::ud_convert(pft[v],"mm","m"))) # temp debugging - } - ## Currently not in param.nc file despite being on NGEE-T parameter list - # if(var == "nonlocal_dispersal"){ # Place-holder parameter for important seed dispersal parameters - # ncvar_put(nc=param.nc, varid='seed_dispersal_x', start = ipft, count = 1, - # vals=pft[v]) - # } - if(var == "hgt_min"){ # the minimum height (ie starting height) of a newly recruited plant" ; - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_hgt_min', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "leaf_reflect_nir"){ # Leaf reflectance: near-IR [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_rholnir', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "leaf_reflect_vis"){ # Leaf reflectance: visible [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_rholvis', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "wood_reflect_nir"){ # Stem reflectance: near-IR [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_rhosnir', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "wood_reflect_vis"){ # Stem reflectance: visible [0-1] - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_rhosvis', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "leaf_trans_nir"){ # Leaf transmittance: near-IR - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_taulnir', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "leaf_trans_vis"){ # Leaf transmittance: visible pft - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_taulvis', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "wood_trans_nir"){ # Stem transmittance: near-IR - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_tausnir', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "wood_trans_vis"){ # Stem transmittance: visible - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_tausvis', start = ipft, count = 1, - vals=pft[v]) - } - if(var == "orient_factor"){ # Leaf/stem orientation index [-0/4 SOM 1 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_l1s1_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "rf_l2s1_bgc"){ ## respiration fraction litter 2 to SOM 1 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_l2s1_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "rf_l3s2_bgc"){ ## respiration fraction from litter 3 to SOM 2 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_l3s2_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "rf_s2s1_bgc"){ ## respiration fraction SOM 2 to SOM 1 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_s2s1_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "rf_s2s3_bgc"){ ## Respiration fraction for SOM 2 -> SOM 3 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_s2s3_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "rf_s3s1_bgc"){ ## respiration fraction SOM 3 to SOM 1 - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='rf_s3s1_bgc', start = 1, count = 1, - vals=pft[v]) - } - if(var == "Q10_frozen_soil"){ ## Separate q10 for frozen soil respiration rates - REMOVED FROM FATES PARAMS? - ncdf4::ncvar_put(nc=fates.param.nc, varid='froz_q10', start = 1, count = 1, - vals=pft[v]) - } + #if(var == "veg_respiration_Q10"){ ## Q10 for maintenance respiration. CLM param. q10_mr(allpfts) + #ncdf4::ncvar_put(nc=clm.param.nc, varid='q10_mr', start = 1, count = 1, + #vals=pft[v]) + #} ## NONE indexed ## -- FIRE - if(var == "max_fire_duration"){ ## maximum duration of fire none hours - # fates_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_max_durat',vals=pft[v]) - } - if(var == "nfires"){ ## The number of fires initiated per m2 per year, from lightning and humans - # fates_nignitions:long_name = "number of daily ignitions (nfires = nignitions*FDI*area_scaling)" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_nignitions',vals=pft[v]) - } - if(var == "fuel_energy"){ ## energy content of fuel [kj kg-1] - # fates_fuel_energy:long_name = "pitfire parameter, heat content of fuel" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_fuel_energy',vals=pft[v]) - } - if(var == "fuel_particle_density"){ ## particle density of fuel [kg m-3] - # fates_part_dens:long_name = "spitfire parameter, oven dry particle density, Table A1 Thonicke et al 2010" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_part_dens',vals=pft[v]) - } - if(var == "durat_slope"){ ## SPITFIRE: change in fire duration with fire danger index. from Canadian Forest Service - # fates_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_durat_slope',vals=pft[v]) - } - if(var == "miner_damp"){ ## SPITFIRE mineral dampening coefficient - # fates_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_miner_damp',vals=pft[v]) - } - if(var == "fuel_minerals"){ ## mineral content of fuel - # fates_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_miner_total',vals=pft[v]) - } - if(var == "alpha_scorch_height"){ ## SPITFIRE scorch height parameter - # fates_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_alpha_SH',vals=pft[v]) - } - if(var == "fdi_a"){ ## SPITFIRE Constant in calculation of dewpoint for Fire Danger Index (FDI) - # fates_fdi_a:long_name = "spitfire parameter (unknown) " - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_fdi_a',vals=pft[v]) - } - if(var == "fdi_alpha"){ ## SPITFIRE Constant in calculation of dewpoint for Fire Danger Index (FDI) - # fates_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_fdi_alpha',vals=pft[v]) - } - if(var == "fdi_b"){ ## SPITFIRE Constant in calculation of dewpoint for Fire Danger Index (FDI) - # fates_fdi_b:long_name = "spitfire parameter (unknown) " - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_fdi_b',vals=pft[v]) - } + ## -- CANOPY #if(var == "canopy_max_spread"){ ## Maximum allowable "dynamic ratio of dbh to canopy area" for cohorts in closed canopies. - [cm/m2] # ncdf4::ncvar_put(nc=fates.param.nc, varid='maxspread',vals=pft[v]) @@ -815,32 +384,16 @@ write.config.FATES <- function(defaults, trait.values, settings, run.id){ # SAV Surface Area to Volume Ratio of fuel class litterclass cm-1 ## NCWD dimensioned Size:4 - if(var == "CWD_frac1"){ ##Fraction of coarse woody debris (CWD) that is moved into each of the four woody fuel classes - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_CWD_frac', start = 1, count = 1, - vals=pft[v]) - } - if(var == "CWD_frac2"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_CWD_frac', start = 2, count = 1, - vals=pft[v]) - } - if(var == "CWD_frac3"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_CWD_frac', start = 3, count = 1, - vals=pft[v]) - } - if(var == "CWD_frac4"){ - ncdf4::ncvar_put(nc=fates.param.nc, varid='fates_CWD_frac', start = 4, count = 1, - vals=pft[v]) - } - } ## end loop over VARIABLES - } ## end loop over PFTs + #} ## end loop over VARIABLES + #} ## end loop over PFTs #ncdf4::nc_close(param.nc) - ncdf4::nc_close(clm.param.nc) - ncdf4::nc_close(fates.param.nc) + #ncdf4::nc_close(clm.param.nc) + #ncdf4::nc_close(fates.param.nc) # ## Write SETTINGS file # -} +#} #---------------------------------------------------------------------------------------------------------------------# ### EOF diff --git a/models/fates/inst/template.job b/models/fates/inst/template.job index 724b268d194..eacccba6294 100644 --- a/models/fates/inst/template.job +++ b/models/fates/inst/template.job @@ -40,7 +40,7 @@ cd "@RUNDIR@" ## RECURSIVELY COPY/SYMLINK REFERENCE INPUTS DIRECTORY (DIN_LOC_ROOT) ## create folders and symbolic links. Links will later be deleted when non-default files are specified -mkdir input +mkdir input ## ??? 16.08 echo "PEcAn.FATES::recurse.create('input','@DEFAULT@')" | R --vanilla cd "@CASEDIR@" @@ -63,12 +63,11 @@ echo "*** Modify XMLs ***" ## --- # Modifying : env_build.xml -./xmlchange --file env_build.xml --id GMAKE --val make -./xmlchange --file env_build.xml --id DEBUG --val FALSE +./xmlchange --file env_build.xml --id DEBUG --val FALSE # Modifying : env_run.xml ./xmlchange --file env_run.xml --id REST_N --val 1 ./xmlchange --file env_run.xml --id REST_OPTION --val nyears -./xmlchange --file env_run.xml --id DATM_CLMNCEP_YR_START --val 1974 #Long term, may not want to have these set with a large range. Will require download +./xmlchange --file env_run.xml --id DATM_CLMNCEP_YR_START --val 2004 #Long term, may not want to have these set with a large range. Will require download ./xmlchange --file env_run.xml --id DATM_CLMNCEP_YR_END --val 2004 #Long term, may not want to have these set with a large range. Will require download ./xmlchange --file env_run.xml --id DIN_LOC_ROOT --val '@INDIR@' ./xmlchange --file env_run.xml --id DIN_LOC_ROOT_CLMFORC --val '@INDIR@/atm/datm7' # updated, needed? diff --git a/modules/assim.sequential/DESCRIPTION b/modules/assim.sequential/DESCRIPTION index dfa454384cd..ac31105a6a2 100644 --- a/modules/assim.sequential/DESCRIPTION +++ b/modules/assim.sequential/DESCRIPTION @@ -32,7 +32,6 @@ Imports: stringr Suggests: corrplot, - exactextractr, ggrepel, emdbook, glue, diff --git a/modules/assim.sequential/NAMESPACE b/modules/assim.sequential/NAMESPACE index db21f07876e..5b246d36512 100644 --- a/modules/assim.sequential/NAMESPACE +++ b/modules/assim.sequential/NAMESPACE @@ -22,7 +22,6 @@ export(SDA_downscale_hrly) export(SDA_remote_launcher) export(SDA_timeseries_plot) export(adj.ens) -export(aggregate) export(alltocs) export(alr) export(assessParams) diff --git a/modules/assim.sequential/tests/testthat/test_aggregation.R b/modules/assim.sequential/tests/testthat/test_aggregation.R deleted file mode 100644 index 8595aa8c05d..00000000000 --- a/modules/assim.sequential/tests/testthat/test_aggregation.R +++ /dev/null @@ -1,60 +0,0 @@ -library(testthat) -library(sf) -library(raster) -library(exactextractr) -library(terra) -source("../../R/aggregate.R") -test_that("returns aggregated values for RI", { - # Load the saved polygon data with Massachusetts as an example - us_states <- readRDS("test_aggregation/us_states.rds") - state <- "RI" - polygon_data <- st_transform(us_states[us_states$STUSPS == state, ], crs = "EPSG:4326") - - # Load the downscaled raster output - downscale_output <- list( - maps = list( - ensemble1 = "test_aggregation/ensemble1.tif", - ensemble2 = "test_aggregation/ensemble2.tif", - ensemble3 = "test_aggregation/ensemble3.tif" - ) - ) - - read_raster <- function(file_path) { - rast(file_path) - } - - downscale_output$maps <- lapply(downscale_output$maps, read_raster) - # Aggregate for RI - RI <- aggregate(downscale_output, polygon_data, func = 'mean') - comp <- RI$TTL_mean * 10^9 - comparison_result <- (1.31 < comp & comp < 1.32) - expect_true(comparison_result) -}) - -test_that("returns error of unmatched CRS", { - # Load the saved polygon data with Massachusetts as an example - us_states <- readRDS("test_aggregation/us_states.rds") - state <- "RI" - polygon_data <- st_transform(us_states[us_states$STUSPS == state, ], crs = "EPSG:2222") - - # Load the downscaled raster output - downscale_output <- list( - maps = list( - ensemble1 = "test_aggregation/ensemble1.tif", - ensemble2 = "test_aggregation/ensemble2.tif", - ensemble3 = "test_aggregation/ensemble3.tif" - ) - ) - - read_raster <- function(file_path) { - rast(file_path) - } - - downscale_output$maps <- lapply(downscale_output$maps, read_raster) - expect_error( - aggregate(downscale_output, polygon_data, func = 'mean'), - "CRS of downscale_output and polygon_data must match." - ) -}) - - diff --git a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble1.tif b/modules/assim.sequential/tests/testthat/test_aggregation/ensemble1.tif deleted file mode 100644 index 98e76a1be6d..00000000000 Binary files a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble1.tif and /dev/null differ diff --git a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble2.tif b/modules/assim.sequential/tests/testthat/test_aggregation/ensemble2.tif deleted file mode 100644 index ae01689cdc3..00000000000 Binary files a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble2.tif and /dev/null differ diff --git a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble3.tif b/modules/assim.sequential/tests/testthat/test_aggregation/ensemble3.tif deleted file mode 100644 index 01478ca60d2..00000000000 Binary files a/modules/assim.sequential/tests/testthat/test_aggregation/ensemble3.tif and /dev/null differ diff --git a/modules/assim.sequential/tests/testthat/test_aggregation/us_states.rds b/modules/assim.sequential/tests/testthat/test_aggregation/us_states.rds deleted file mode 100644 index dcecf5835a4..00000000000 Binary files a/modules/assim.sequential/tests/testthat/test_aggregation/us_states.rds and /dev/null differ