Ejemplo n.º 1
0
int MDRainPotETSWGdayDef () {
	if (_MDOutPetID != MFUnset) return (_MDOutPetID);

	MFDefEntering ("Rainfed Potential Evapotranspiration (Shuttleworth - Wallace [day])");
	if (((_MDInDayLengthID     = MDSRadDayLengthDef ()) == CMfailed) ||
	    ((_MDInI0HDayID        = MDSRadI0HDayDef    ()) == CMfailed) ||
	    ((_MDInCParamAlbedoID  = MDCParamAlbedoDef  ()) == CMfailed) ||
	    ((_MDInCParamCHeightID = MDCParamCHeightDef ()) == CMfailed) ||
	    ((_MDInCParamLWidthID  = MDCParamLWidthDef  ()) == CMfailed) ||
	    ((_MDInCParamRSSID     = MDCParamRSSDef     ()) == CMfailed) ||
	    ((_MDInCParamR5ID      = MDCParamR5Def      ()) == CMfailed) ||
	    ((_MDInCParamCDID      = MDCParamCDDef      ()) == CMfailed) ||
	    ((_MDInCParamCRID      = MDCParamCRDef      ()) == CMfailed) ||
	    ((_MDInCParamGLMaxID   = MDCParamGLMaxDef   ()) == CMfailed) ||
	    ((_MDInCParamZ0gID     = MDCParamZ0gDef     ()) == CMfailed) ||
	    ((_MDInLeafAreaIndexID = MDLeafAreaIndexDef ()) == CMfailed) ||
	    ((_MDInStemAreaIndexID = MDStemAreaIndexDef ()) == CMfailed) ||
	    ((_MDInSolRadID        = MDSolarRadDef      ()) == CMfailed) ||
	    ((_MDInAtMeanID  = MFVarGetID (MDVarAirTemperature, "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDInAtMinID   = MFVarGetID (MDVarAirTempMinimum, "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDInVPressID  = MFVarGetID (MDVarVaporPressure,  "kPa",   MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDInWSpeedID  = MFVarGetID (MDVarWindSpeed,      "m/s",   MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDOutPetID    = MFVarGetID (MDVarRainPotEvapotrans,  "mm",    MFOutput, MFFlux,  MFBoundary)) == CMfailed) ||
	    (MFModelAddFunction (_MDRainPotETSWGday) == CMfailed)) return (CMfailed);
	MFDefLeaving  ("Rainfed Potential Evapotranspiration (Shuttleworth - Wallace [day])");
	return(_MDOutPetID);
}
Ejemplo n.º 2
0
int MDRainPotETPsTaylorDef () {
	if (_MDOutPetID != MFUnset) return (_MDOutPetID);

	MFDefEntering ("Rainfed Potential Evapotranspiration (Priestley - Taylor)");
	if (((_MDInDayLengthID     = MDSRadDayLengthDef ()) == CMfailed) ||
	    ((_MDInI0HDayID        = MDSRadI0HDayDef    ()) == CMfailed) ||
	    ((_MDInCParamAlbedoID  = MDCParamAlbedoDef  ()) == CMfailed) ||
	    ((_MDInSolRadID        = MDSolarRadDef      ()) == CMfailed) ||
	    ((_MDInAtMeanID  = MFVarGetID (MDVarAirTemperature, "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDInVPressID  = MFVarGetID (MDVarVaporPressure,  "kPa",   MFInput,  MFState, MFBoundary)) == CMfailed) ||
	    ((_MDOutPetID    = MFVarGetID (MDVarRainPotEvapotrans,  "mm",    MFOutput, MFFlux,  MFBoundary)) == CMfailed) ||
	    (MFModelAddFunction (_MDRainPotETPsTaylor) == CMfailed)) return (CMfailed);
	MFDefLeaving  ("Rainfed Potential Evapotranspiration (Priestley - Taylor)");
	return (_MDOutPetID);
}
Ejemplo n.º 3
0
int MDIrrRefEvapotransFAODef () {
	if (_MDOutIrrRefEvapotransID != MFUnset) return (_MDOutIrrRefEvapotransID);

	MFDefEntering ("Irrigation Reference ETP (FAO)");
	if (((_MDInDayLengthID          = MDSRadDayLengthDef ()) == CMfailed) ||
		 ((_MDInI0HDayID            = MDSRadI0HDayDef    ()) == CMfailed) ||
		 ((_MDInSolRadID            = MDSolarRadDef      ()) == CMfailed) ||
	     ((_MDInElevationID         = MFVarGetID (MDVarMeanElevation,     "m",     MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDInAtMeanID            = MFVarGetID (MDVarAirTemperature,    "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDInAtMinID             = MFVarGetID (MDVarAirTempMinimum,    "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDInAtMaxID             = MFVarGetID (MDVarAirTempMaximum,    "degC",  MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDInVPressID            = MFVarGetID (MDVarVaporPressure,     "kPa",   MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDInWSpeedID            = MFVarGetID (MDVarWindSpeed,         "m/s",   MFInput,  MFState, MFBoundary)) == CMfailed) ||
		 ((_MDOutIrrRefEvapotransID = MFVarGetID (MDVarIrrRefEvapotrans,  "mm",    MFOutput, MFFlux,  MFBoundary)) == CMfailed)) return (CMfailed);
    if (MFModelAddFunction (_MDIrrRefEvapotransFAO)== CMfailed) return (CMfailed);

	MFDefLeaving ("Irrigation Reference ETP (FAO)");
	return(_MDOutIrrRefEvapotransID);
}