PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 235 forks source link

ED2 Soil Input #1643

Open tonygardella opened 7 years ago

tonygardella commented 7 years ago

Add capability to write to ED2 soil parameters.

Description

Extend ED2 coupling scripts to be able to read in a PEcAn processed soil parameters and write out ED2 parameters.

Possible Implementation

Examples of implementation can be found here from other model coupling scripts: Jules

ashiklom commented 7 years ago

Starting to work on this now. My understanding is that I need to set the following in the ED2IN:

Parameters:

Initial conditions:

There is an alternative mechanism whereby soil data and initial conditions are provided through database files (SOIL_DATABASE, SOILSTATE_DB, SOILDEPTH_DB), but that seems less flexible...? @mdietze @serbinsh and other ED users -- thoughts? Anything critical I'm missing?

ashiklom commented 7 years ago

Here's the first pass at ED soil inputs: https://github.com/ashiklom/pecan/commit/11bf5fa520a8998836dc6b6b23e4332fa791b4f2

mdietze commented 7 years ago

@ashiklom what you've posted is probably a useful case, but it's a partial solution since by default we typically run under ED init mode 3 (i.e. including site files, not just pss/css). In that mode, the soil parameters in the site file override the values in the ED2IN (which is particularly important when soil properties vary with depth and for regional runs, since we don't want one single soil type everywhere). I think there's a previous note in the various do.conversions discussions that this is a place where the order of conversions matters -- we'll need to make sure that we do the veg IC step before the soil2model step otherwise there won't be 'site' files in place to update. That update probably requires a copy and new db record since it would be easy to envision a single veg IC being run with multiple alternative soil products or an ensemble over soil uncertainties.

An important additional consideration is whether we also want to update the soil physical (thermal and hydraulic) parameters in the ED param xml. This might not be necessary for a 'first pass' solution, but I think it'd be pretty critical if we're going to include soil parameters in ensemble error propagation, uncertainty analyses. and potentially in site-scale or hierarchical PDA.

ashiklom commented 7 years ago

OK, so to be clear, the ED soil workflow should do the following:

  1. Check for existing .site file for the given site. If it exists, copy it, adding some kind of soil data-specific tag. If it doesn't exist, create them.
  2. Update the new .site file with the soil information.
  3. Add a new database record for the modified .site file.
  4. Add the input ID to the settings file, and continue the workflow.

Does that sound right? Am I missing anything critical?

mdietze commented 7 years ago

For "If it doesn't exist, create them" if you went that route then you'd also have to work with @istfer to make sure that veg2model.ED2 also checks to see if the site file already exists before creating it, otherwise if veg is called after soils it will overwrite the soils file.

There's also been serious discussion (and I think actually a decision, but one that I don't think has been implemented yet) to no longer tracking site/pss/css separately for ed, but to track the directory and prefix of all 3 as the Input, because they generally operate as a unit (you can't mix-and-match) and it would work better with the more general IC logic.

serbinsh commented 7 years ago

I like the approach of tracking the dir and prefix rather than individually

On Sep 26, 2017, at 12:15 PM, Michael Dietze notifications@github.com<mailto:notifications@github.com> wrote:

For "If it doesn't exist, create them" if you went that route then you'd also have to work with @istferhttps://github.com/istfer to make sure that veg2model.ED2 also checks to see if the site file already exists before creating it, otherwise if veg is called after soils it will overwrite the soils file.

There's also been serious discussion (and I think actually a decision, but one that I don't think has been implemented yet) to no longer tracking site/pss/css separately for ed, but to track the directory and prefix of all 3 as the Input, because they generally operate as a unit (you can't mix-and-match) and it would work better with the more general IC logic.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/PecanProject/pecan/issues/1643#issuecomment-332252065, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC7N6QqS7FvjT1W0SoEVgGco47cbCGpMks5smSMsgaJpZM4PTrtf.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 365 days with no activity.