NCL Home > Documentation > Functions > Meteorology, Crop

refevt_hargreaves_fao56

Use the Hargreaves ETo equation to derive reference evapotranspiration as described in FAO 56.

Available in version 6.4.0 and later.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl"  ; This library is automatically loaded
                                                      ; from NCL V6.5.0 onward.
                                                      ; No need for user to explicitly load.

	function refevt_hargreaves_fao56 (
		tmin       : numeric,  
		tmax       : numeric,  
		rex        : numeric,  
		iounit [3] : integer   
	)

Arguments

tmin
tmax

Scalars or arrays of the same size, shape and size containing minimum and maximum temperatures. The units may be derees Celcius, Kelvin or Farenheit. See the iounit argument.

rex

A variable containing extraterrestrial radiation (mm/day. It must have the same dimension sizes as the tmin and tmax variables. See radext_fao56

iounit

An integer array of length 3 indicating the units of input arguments tmin, tmax, rex and the units of the returned argument.

  • iounit(0)=0 ; input tmin and tmax are in degrees C (degC).
  • iounit(0)=1 ; input tmin and tmax are in degrees K (degK).
  • iounit(0)=2 ; input tmin and tmax are in degrees F.
  • iounit(1)=0 ; input radext are in mm/day
  • iounit(1)=1 ; input radext are in MJ/(m2-day)
  • iounit(1)=2 ; input radext are in W/m2
  • iounit(2)=0 ; output units => mm/day
  • iounit(2)=1 ; output units => MJ/(m2-day)
  • iounit(2)=2 ; output units => W/m2

Return value

An array the same size as tmin containg the estimated evapotranspiration.

Description

Estimates evapotranspiration vis the simple "Hargreaves ETo" equation as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled: Crop evapotranspiration - Guidelines for computing crop water requirement . Specifically, see equation 52 of Chapter 3.

See Also

Crop & Evapotranspiration functions

Examples

Example 1: See Example 20 in Chapter 4 for Lyon, France in mid July. The FAO-56 example 20 returns an estimate of 5.0 mm/day using the Hargreaves method. For illustration, the refevt_turc estimates are shown..


  jday   = 196               ; 15 July
  lat    = 45.72             ; Lyon, France
  ra_0   = radext_fao56(jday, lat, 0)   ;  16.5463 mm/day 
  ra_1   = radext_fao56(jday, lat, 1)   ;  40.5546 MJ/(m2-day) 
  ra_2   = radext_fao56(jday, lat, 2)   ; 469.378  W/m2   

  print(ra_0 )          ; print with meta data
  print(ra_1 )
  print(ra_2 )

  tmin   = 14.8              ; degC
  tmax   = 26.6
                             ; HARGREAVES
  evtH_0 = refevt_hargreaves_fao56( tmin, tmax, ra_0, (/0,0,0/) ) ;   5.03 mm/day
  evtH_1 = refevt_hargreaves_fao56( tmin, tmax, ra_1, (/0,1,1/) ) ;  12.33 MJ/(m2-day) 
  evtH_2 = refevt_hargreaves_fao56( tmin, tmax, ra_2, (/0,2,2/) ) ; 141.92 W/m2   

  print("evtH_0="+evtH_0)   ;   5.03 mm/day         This agrees with Example 20, Chapter 4
  print("evtH_1="+evtH_1)   ;  12.33 MJ/(m2-day) 
  print("evtH_0="+evtH_2)   ; 141.92 W/m2   

; ---------------------------------------------------------------------
;                           ; Thornthwaite 
; ---------------------------------------------------------------------

  tavg  = 0.5*(tmin+tmax)
  evtT  = thornthwaite( tavg, lat, False, 0)   ; mm/month; returns 12 values (one/month) 
  evtT_july = evtT(6)/31                ; mm/day; index 6 => July
  print("evtT(July)="+evtT_july)               ; 3.2243 mm/day  

; ---------------------------------------------------------------------
;                           ; TURC (requires 'radsol')
; ---------------------------------------------------------------------
                                        ; http://www.lyon.climatemps.com/
  nsun   = 9.2                          ; 'observed' hrs/sun day for Lyon, Juy
  sunhrx = daylight_fao56(jday, lat)    ; max daylight/sun; hr per day
  print(sunhrx)                         ; 15.2  (matches web site)

  rs_0   = radsol_fao56(ra_0, sunhrx, nsun, (/0,0/), False)   ;    9.15 mm/day
  rs_1   = radsol_fao56(ra_1, sunhrx, nsun, (/1,1/), False)   ;   22.44 MJ/(m2-day)
  rs_2   = radsol_fao56(ra_2, sunhrx, nsun, (/2,2/), False)   ; 2596.72 W/m2

  print(rs_0 )                          ; print with meta data
  print("rs_1="+rs_1 )
  print("rs_2="+rs_2 )

  tmean     = (tmin+tmax)*0.5           ; Turc requires 'tmean'

  evturc_0  = refevt_turc( tmean, rs_0, (/0,0,0/) ) ;    7.87 mm/day
  evturc_1  = refevt_turc( tmean, rs_1, (/0,1,1/) ) ;   19.31 MJ/(m2-day) 
  evturc_2  = refevt_turc( tmean, rs_2, (/0,2,2/) ) ; 223.692 W/m2  

  print(evturc_0)               ;    7.87 mm/day    will print with meta data
  print("evturc_1="+evturc_1)   ;   19.31 MJ/(m2-day) 
  print("evturc_2="+evturc_2)   ;  223.69 W/m2   

Example 2: Read netCDF files (each > 4GB) containing daily minimum and maximum temperatures (degC) and compute the reference evapotranspiration (mm/day) using refevt_hargreaves_fao56. NOTE: Due to the size of the arrays, the computation of the radext and refevt variables took 186 sec and 113 seconds, respectively.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl"

;----------------------------------------------------------------------------
;                             MAIN
;----------------------------------------------------------------------------
  diri   = "./"
  filmin = "E-OBS_tasmin.nc"           ; file with daily minimum; (time,latitude,longitude)
  filmax = "E-OBS_tasmax.nc"           ;   "    "    "      "

  fmin   = addfile(diri+filmin, "r") 
  fmax   = addfile(diri+filmax, "r") 

;---Create 'day_of_year' [jday] using 'time'
  time   = fmin->time                  ; "days since 1949-12-1 00:00:00" , [10958] 
  ntim   = dimsizes(time)

  TIME   = cd_calendar(time, 0)        ; convert to yyyy,mm,dd
  yyyy   = toint( TIME(:,0) )           ; clarity; explicitly extract/assign to variables
  mm     = toint( TIME(:,1) )
  dd     = toint( TIME(:,2) )

  jday   = day_of_year( yyyy, mm, dd )
;;jday   = day_of_year( toint(TIME(:,0)), toint(TIME(:,1)), toint(TIME(:,2)) )

;---Create multi-dimensional latitude array
;---Broadcast (replicate) lat at each longitude via conform_dims
  lat    = fmin->latitude               ; [*]
  lon    = fmin->longitude              ; [*]
  nlat   = dimsizes(lat)                ; [201]    
  mlon   = dimsizes(lon)                ; [464]
  lat2d  = conform_dims( (/nlat,mlon/), lat, 0)  ; (nlat,mlon); replicate lat

  print("ntim="+ntim+"  nlat="+nlat+"  mlon="+mlon)
  print("---")

;---Calculate 'radext'
  radunit= 0                             ; return units: mm/day
  radext = radext_fao56(jday, lat2d, radunit)       ; (ntim,nlat,mlon)
  radext = where(radext.lt.0.001, 0.0, radext)
  printVarSummary(radext)
  printMinMax(radext,0)

;---Read daily min & max: (time,lat,lon)
  tmin = fmin->tasmin
  tmax = fmax->tasmax 

;---Hargreaves reference evapotranspiration
  refevt = refevt_hargreaves_fao56( tmin, tmax, radext, (/0,0,0/) ) 
  printVarSummary(refevt)
  printMinMax(refevt,0)

;===================================================================
;---Write to netCDF: 'simple' way
;---http://www.ncl.ucar.edu/Applications/o-netcdf.shtml
;===================================================================

  dir_nc = "./"
  fil_nc = "E-OBS.refevt_hargreaves.nc"
  pth_nc = dir_nc + fil_nc

  system("/bin/rm -f "+pth_nc)   ; remove any pre-existing file
  ncdf = addfile(pth_nc ,"c")  ; open output netCDF file

;---Create global attributes of the file (optional)

  fAtt               = True            ; assign file attributes
  fAtt@title         = "Reference Evapotranspiration: E-OBS"
  fAtt@source_files  = filmin +" , "+filmax
  fAtt@NCL           = get_ncl_version()
  fAtt@Conventions   = "None"
  fAtt@creation_date = systemfunc("date")
  fileattdef( ncdf, fAtt )            ; copy file attributes

;---Make time an UNLIMITED dimension; recommended  for most applications

  filedimdef(ncdf,"time",-1,True)

;---Output variable(s) directly; NCL will call appropriate functions
;---to write the meta data associated with each variable

  ncdf->REFEVT =  refevt

The printed output is:

(0)	ntim=10958  nlat=201  mlon=464
(0)	---
(0)	


     Variable: radext
     Type: float
     Total Size: 4087947648 bytes
                 1021986912 values
     Number of Dimensions: 3
     Dimensions and sizes:	[10958] x [201] x [464]
     Coordinates: 
     Number Of Attributes: 5
       _FillValue :	1e+20
       long_name :	extra terrestrial radiation: FAO_56
       units :	mm/day
       url :	http://www.fao.org/docrep/X0490E/x0490e07.htm
       info :	FAO 56; EQN 21; radext_fao56
     (0)	extra terrestrial radiation: FAO_56 (mm/day) : min=0   max=17.9267
     (0)	
     
     
     Variable: refevt
     Type: float
     Total Size: 4087947648 bytes
                 1021986912 values
     Number of Dimensions: 3
     Dimensions and sizes:	[time | 10958] x [latitude | 201] x [longitude | 464]
     Coordinates: 
                 time: [7701..18658]
                 latitude: [25.375..75.375]
                 longitude: [-40.375..75.375]
     Number Of Attributes: 5
       _FillValue :	-999
       long_name :	reference evapotranspiration: Hargreaves 
       units :	mm/day
       url :	http://www.fao.org/docrep/X0490E/x0490e07.htm
       info :	FAO 56; EQN 52; refevt_hargreaves_fao56
     (0)	reference evapotranspiration: Hargreaves  (mm/day) : min=0   max=10.8763