Closed agnaru closed 4 years ago
Have you edited the configuration ? If I recall correctly the 'Wofost71_NPK.conf' if you haven't changed it uses the SOIL = WaterbalancePP
which is (from the code) :
"""Fake waterbalance for simulation under potential production.
Keeps the soil moisture content at field capacity and only accumulates crop transpiration
and soil evaporation rates through the course of the simulation
"""
If you want it to respond to irrigation, maybe just switch it to SOIL = WaterbalanceFD
?
@S-lac Oh my, I didn't read the soil file properly.
Thanks! Now, Wofost71_NPK responds to irrigation event by just switching SOIL = WaterbalancePP
to SOIL = WaterbalanceFD
No worries ! For the others, obviously I forgot to mention that you need to import the right module beforehands :
from pcse.soil.classic_waterbalance import WaterbalanceFD
. Have nice simulations !
@jjanggu1993 Hello! Can you share your config="Wofost71_NPK.conf
file ?
I met the same problem
I use
SOIL = WaterbalanceFD
and
CROP = WofostNPK
but model doesn't respond to irrigation events, thanks!
# Copyright (c) 2004-2014 Alterra, Wageningen-UR
# Allard de Wit (allard.dewit@wur.nl), April 2014
"""PCSE configuration file for WOFOST Water-limited Production simulation
in PCSE identical to the FORTRAN WOFOST 7.1
This configuration file defines the soil and crop components that
should be used for water-limited production simulation for
freely draining soils.
"""
from pcse.soil.classic_waterbalance import WaterbalanceFD
#from pcse.soil.classic_waterbalance import WaterbalancePP
from pcse.crop.wofost_npk import WofostNPK
from pcse.agromanagement import AgroManagementSingleCrop
from pcse.agromanager import AgroManager
# Module to be used for water balance
SOIL = WaterbalanceFD
# Module to be used for the crop simulation itself
CROP = WofostNPK
# Module to use for AgroManagement actions
AGROMANAGEMENT = AgroManagementSingleCrop
# variables to save at OUTPUT signals
# Set to an empty list if you do not want any OUTPUT
OUTPUT_VARS = ["DVS","LAI","TAGP", "TWSO", "TWLV", "TWST",
"TWRT", "TRA", "RD", "SM", "WWLOW", "NNI",
"KNI", "PNI", "NPKI","NSOIL","PSOIL","KSOIL",
"NAVAIL", "PAVAIL","KAVAIL",
"NDEMLV", "NDEMRT","NDEMSO","NDEMST",
"PDEMLV", "PDEMRT","PDEMSO","PDEMST",
"KDEMLV", "KDEMRT","KDEMSO","KDEMST",
"RNUPTAKE", "RPUPTAKE", "RKUPTAKE", "RNFIX",
"NTRANSLOCATABLE", "PTRANSLOCATABLE", "KTRANSLOCATABLE"]
# interval for OUTPUT signals, either "daily"|"dekadal"|"monthly"
# For daily output you change the number of days between successive
# outputs using OUTPUT_INTERVAL_DAYS. For dekadal and monthly
# output this is ignored.
OUTPUT_INTERVAL = "daily"
OUTPUT_INTERVAL_DAYS = 1
# Weekday: Monday is 0 and Sunday is 6
OUTPUT_WEEKDAY = 0
# Summary variables to save at CROP_FINISH signals
# Set to an empty list if you do not want any SUMMARY_OUTPUT
SUMMARY_OUTPUT_VARS = ["DVS","LAIMAX","TAGP", "TWSO", "TWLV", "TWST",
"TWRT", "CTRAT", "RD", "DOS", "DOE", "DOA",
"DOM", "DOH", "DOV"]
# Summary variables to save at TERMINATE signals
# Set to an empty list if you do not want any TERMINAL_OUTPUT
TERMINAL_OUTPUT_VARS = ["WTRAT", "EVST", "EVWT", "TSR", "RAINT", "TOTINF",
"TOTIRR", "PERCT", "LOSST"]
@mishagrol I'm sorry to check late. this is my Wofost71_NPK.conf
file.
# -*- coding: utf-8 -*-
# Copyright (c) 2004-2014 Alterra, Wageningen-UR
# Allard de Wit (allard.dewit@wur.nl), April 2014
"""PCSE configuration file for WOFOST Water-limited Production simulation
in PCSE identical to the FORTRAN WOFOST 7.1
This configuration file defines the soil and crop components that
should be used for water-limited production simulation for
freely draining soils.
"""
from pcse.soil.classic_waterbalance import WaterbalancePP
from pcse.soil.classic_waterbalance import WaterbalanceFD
from pcse.crop.wofost_npk import WofostNPK
from pcse.agromanager import AgroManager
# Module to be used for water balance
SOIL = WaterbalanceFD
# Module to be used for the crop simulation itself
CROP = WofostNPK
# Module to use for AgroManagement actions
AGROMANAGEMENT = AgroManager
# variables to save at OUTPUT signals
# Set to an empty list if you do not want any OUTPUT
OUTPUT_VARS = ["DVS","LAI","TAGP", "TWSO", "TWLV", "TWST",
"TWRT", "TRA", "RD", "SM", "WWLOW", "NNI",
"KNI", "PNI", "NPKI","NSOIL","PSOIL","KSOIL",
"NAVAIL", "PAVAIL","KAVAIL",
"NDEMLV", "NDEMRT","NDEMSO","NDEMST",
"PDEMLV", "PDEMRT","PDEMSO","PDEMST",
"KDEMLV", "KDEMRT","KDEMSO","KDEMST",
"RNUPTAKE", "RPUPTAKE", "RKUPTAKE", "RNFIX",
"NTRANSLOCATABLE", "PTRANSLOCATABLE", "KTRANSLOCATABLE"]
# interval for OUTPUT signals, either "daily"|"dekadal"|"monthly"
# For daily output you change the number of days between successive
# outputs using OUTPUT_INTERVAL_DAYS. For dekadal and monthly
# output this is ignored.
OUTPUT_INTERVAL = "daily"
OUTPUT_INTERVAL_DAYS = 1
# Weekday: Monday is 0 and Sunday is 6
OUTPUT_WEEKDAY = 0
# Summary variables to save at CROP_FINISH signals
# Set to an empty list if you do not want any SUMMARY_OUTPUT
SUMMARY_OUTPUT_VARS = ["DVS","LAIMAX","TAGP", "TWSO", "TWLV", "TWST",
"TWRT", "CTRAT", "RD", "DOS", "DOE", "DOA",
"DOM", "DOH", "DOV"]
# Summary variables to save at TERMINATE signals
# Set to an empty list if you do not want any TERMINAL_OUTPUT
TERMINAL_OUTPUT_VARS = ["WTRAT", "EVST", "EVWT", "TSR", "RAINT", "TOTINF",
"TOTIRR", "PERCT", "LOSST"]
I'm trying to modify agromanagement file for wofost model and change apply_npk values and irrigation like this:
Wofost71_WLP_FD
doesn't respond to apply_NPK events. (only respond to irrigate events)Howerver, when i use
wofost = Engine(params, weather, agro, config="Wofost71_NPK.conf")
, it doesn't respond to irrigate events, but respond to apply_NPK eventsWofost71_PP
model doesn't react to both events.my question is, is there a wofost model that responds to both events? Or is it not implemented yet? Or is it a bug?