Code Monkey home page Code Monkey logo

translator-dssat's Introduction

#AgMIP DSSAT Translator

This translator is a simple package used to translate from a generic JSON string into a DSSAT readable format. More information to come.

translator-dssat's People

Contributors

frostbytten avatar jainyash avatar mengzhang avatar rolle001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

translator-dssat's Issues

Refactor DSSAT Plugins

We need to refactor this plugin to find more efficient ways of making the translators palpable to people. Good start though, but because DSSAT typically used ICASA variable names, we shouldn't need to do this much work.

user-specified CO2 levels

We need to be able to handle an input of atmospheric CO2. This should be handled in the environmental modifications section of FileX. If a date is not supplied, use the start of simulation date.

CRID, ICPCR

Input translator 2-char -> 3-char
Output translator 3-char -> 2-char

for both variables.

(Maybe already handled - please verify)

#19 continued

The output for simulation control lose order since changed from LinkedHashMap to HashMap. It will be revised by changing to use key to get value instead of order.

DSSAT Batch should keep submitted order.

Since the DSSAT translator receives the entire experiment list in the same order it was generated in, when it processes in parallel the order gets shuffled. Please try to retain the order while still processing quickly.

This could be handled in the following manner:

  1. Received the map
  2. Parse the map, extracting (and maybe setting) only the name of the experiment into an ArrayList.
  3. Process the map.
  4. Loop through the arraylist when generating the DSSAT Batch to set the order.

Just an idea.

CO2Y in Seasonal not applying W to model

The XFileOutput should be changing the Simulation Controls CO2 from M to W. This stopped working even though the code is in there.

This bug may NOT be in this package, but it is the place to start looking.

OOM Issues

Out of memory issues:

When running large numbers of simulations, the system runs out of memory. I will work on profiling this and finding the choke points.

ITEMS OF NOTE:

  • Close all open files
  • Do not create new maps, use references to the current map being passed.
  • Set things to null when you are finished with them.

Observed data needs to be restructured

It looks like the observed section does not match what was discussed in the Gainesville meeting. The new structure should be as follows:

"observed":{
    "hwam":"value",
    ...
    "time_series":[{
        "var":"value",
        ...
    }]
}

Fix file paths for tests

All tests should refer to paths within the src/test/resources directory and be loaded by classloader interface. This will help all the tests to pass without hardcoding the paths.

Multiple Runs Ignored

After applying the latest patch, I find that we still have only one treatment per experiment (vs 30) even with the double underscore being applied. These need to be multiple treatments under the same experiment.

HashMap transition

Need to transition from LinkedHashMap to HashMap for memory performance issues. This should be a simple LinkedHashMap to HashMap search and replace across the entire project.

Subdirectories still in DSSATBatch.v45 file

Moved the files from subdirectories per experiment to all files in the base directory of the zip. Need to make sure that the DSSATBatch.v45 file points to the correct files.

harvest data handling

Problem: a dataset included "hacom" (harvest component). This was correctly put into a harvest event under management in the json. The DSSAT translator created a harvest event, but the model failed because there was no date associated with the event.

Solution: The translator should create a harvest event and give the date of the observed harvest. If there is no observed harvest date, then don't create the event.

daily weather headers

ICASA variable VPRSD = DSSAT variable VPRS

The DSSAT translator is using VPRSD as the weather file header, but should be using VPRS.

Treatment name

For single treatments, use the EXNAME for the treatment name. Right now, we have no way of knowing which experiment is which in the Summary.OUT file because of the problem with the experiment being out of order.

You may have to truncate the name to fit the field.

Weather file metadata format

Data and headers need to be right-justified in the DSSAT weather file. The model parses data by columns based on header locations. Image: file on the left is from Weatherman, file on the right from translator-dssat. We will handle the TAV and AMP variables later, this issue is just about the formatting of the data beneath headers.

WeatherFileFormat

Soil analysis -> multiple soils

This refers to DSSAT experiment GHWA0401.mzx, which is an NxP experiment using the soil analysis section to define initial soil P for each treatment.

When the experiment is converted to aceb using quadui-1.2.1-SNAPSHOT-Beta19, then re-converted to DSSAT, one of the soils is missing from the reconstituted data.

Fallow planting "event"

Input translator:
When fallow treatments are encountered, create a planting event with only CRID:"FAL" (no date, etc.)

Possible issues:
How will the DOME handle an event with no date?

WST_ELEV

Weather station elevation not being picked up from the JSON.

Check for dssat_cul_id

The translator needs to check for dssat_cul_id inside the planting event and if not found, return a -99. Currently, it is using the cul_id.

Missing Fields

When dealing with multiple treatment reductions (such as the Machakos dataset), there is only one field specified when there should be many fields (one per unique combination of weather and soil type).

Soil file output error

When writing the soil file, it seems like the soil file is being written incorrectly and missing a lot of the soils. Please make sure that the .SOL file has all the soils included in the JSON string. It might be occurring because of the transition from multiple directories to a single directory.

wst_id consistency

WST_ID needs to allow more than 4-characters in both field and weather data. DSSAT rules need to rename from non-standard to DSSAT-standard names.

CO2Y handling

When CO2Y is provided in the map, the CO2 switch in Simulation controls should be set to "W" so that the CO2 value in the weather file is used.

When no CO2Y value is provided or if the value is negative, then the CO2 switch in the Simulation controls should be set to "M" (default value).

Naming issue

What happens is a name which does not match the DSSAT specifications gets passed to the translator? Such as an experiment with spaces, commas, or longer than 8 characters?

PLDP - planting depth units

ICASA standards list PLDP as mm
DSSAT uses PLDP = cm

Make sure that the input translator is converting correctly.
Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.