PSUmodeling / Cycles

Cycles agroecosystem model
https://psumodeling.github.io/Cycles/
Other
11 stars 0 forks source link

Add Soil Type #28

Open leonard-psu opened 5 years ago

leonard-psu commented 5 years ago

To keep track whether a web user uploads a custom soil, modify soil etc, I added a "TYPE" attribute to Cycles soil file after CN. For example,

CURVE_NUMBER 75 TYPE 1 SLOPE 5 TOTAL_LAYERS 16

TYPE 1 -> the default gssurgo file TYPE 2 -> means a soil file created via the GUI TYPE 3 -> user uploaded soil file TYPE 4 -> user modified gssurgo file TYPE 5 -> modified gssurgo file (previously submitted)

Existing Cycles users can comment this line out, if they use the soil file generated by Cycles web services.

leonard-psu commented 5 years ago

Suggest code change to ReadSoil.c file is the following after ReadKeyword(cmdstr, "CURVE_NUMBER", &Soil->Curve_Number, 'd', filename, lno);

NextLine(soil_file, cmdstr, &lno); int soil_type; ReadKeyword(cmdstr, "TYPE", &soil_type, 'i', filename, lno);

shiyuning commented 5 years ago

@leonard-psu If this is for the Cycles web services only, shall I create a branch for this in the development repository? That way the existing non-web users won't need to change their files.