/* ========================================================================= /* @(#)etp_trc.aml 2.1 4/05/1999 15:33:41 /* ------------------------------------------------------------------------- /* Lab for synthetic dynamic vegephenomenology /* ------------------------------------------------------------------------- /* Program: ETP_TRC.AML /* Purpose: Calculate monthly values for potential evapotranspiration, /* using the Jensen-Haise empirical formula. This equation was /* specifically designed for the (sub-)humid climate of Western /* Europe (France). The equation is based on the following clim- /* atic variables: /* - monthly mean values of solar radiation (in kJ/m^2/day). /* - monthly mean values for average temperature (in deg.C) /* ------------------------------------------------------------------------- /* Usage: &r etp_trc /* ------------------------------------------------------------------------- /* Notes: ETp(trc) [mm/day] = (.4*((0.0239001*Rs)+50.)*(Ta/(Ta+15))/30.) /* Rs: daily global radiation (monthly avg.) [kJ/mm^2/day] /* Ta: monthly average (daily) temperature [deg. Celsius] /* /* N.B.: The output is in INT(1/10mm) !! /* 4 instead of .4 makes 1/10mm !! /* /* ------------------------------------------------------------------------ /* Input: tave1, tave2, ...., sflux_mm1, sflux_mm2, ... /* Output: etp_trc1, etp_trc2, ... etp_trc12 /* ------------------------------------------------------------------------- /* History: Niklaus E. Zimmermann - 9/18/1997 - Original coding /* Niklaus E. Zimmermann - 1/26/1998 - Modifications /* Niklaus E. Zimmermann - 4/05/1999 - Last modifications /* ========================================================================= &ty '' &ty '' &ty '------------------------------------------------------------------------------' &ty ' Generating grids of pot. evapotranspiration using the Turc eqn. ' &ty '------------------------------------------------------------------------------' &ty '' &ty ' This AML assumes that all radiation grids have the same base name, with an ' &ty ' index number indicating the month (e.g. sflux1, sflux2, ...., sflux12). The' &ty ' same is expected for the temperature grids. The temperature grids are assu-' &ty ' med to by in 1/10 Deg. Celsius, and the radiation grids are assumed to have' &ty ' values in kJ/m^2/day. Please adjust (and rename) the grids prior to running' &ty ' this AML.' &ty '' &ty '------------------------------------------------------------------------------' &ty '' &ty '' &if [show program] ne GRID &then &do &ty Attention: This AML only runs in GRID. Start grid and re-run the program. &ty &goto done &end &sv sel = [response 'Do you want to continue (y/n) '] &if %sel% EQ 'Y' OR %sel% EQ 'y' &then &goto next &else &goto done &label next &sv rad = [response 'Enter path & name (without index# for months) of radiation grids '] &if ^ [exist %rad%1 -grid] &then &return &error Grid %rad%1 does not exist! &sv tav = [response 'Enter path & name (without index# for months) of temperature grids '] &if ^ [exist %tav%1 -grid] &then &return &error Grid %tav%1 does not exist! &sv mm = 1 &label loop if (%tav%%mm% le 0.) etp_trc%mm% = int(0) else etp_trc%mm% = int(4. / 30. * ((0.0239001 * float(%rad%%mm%)) + 50) * ~ (float(%tav%%mm% / 10.) / (float(%tav%%mm% / 10.) + 15.))) endif &if %mm% eq 12 &then &goto done &else &sv mm = %mm% + 1 &goto loop &label done