radext_fao56
Compute extraterrestrial radiation for daily periods as described in FAO 56.
Available in version 6.4.0 and later.
Prototype
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl" function radext_fao56 ( jday [*] : integer, lat : numeric, ounit [1] : integer )
Arguments
jdayA integer scalar or one dimensional array containing day of year.
latA scalar or one dimensional array containing latitudes (degrees).
ounitA scalar integer which specifies the units of the returned extraterrestrial radiation:
- ounit=0 yields units of mm/day
- ounit=1 yields units of MJ/(m2-day)
- ounit=2 yields units of W/m2
Return value
If both jday and lat are scalars then a scalar is returned. Otherwise, a two- or three-dimensional array is returned. If jday(ntim) and lat(nlat), The returned array will be (ntim,nlat). If lat(nlat,mlon), the returned array will be (ntim,nlat,mlon). The returned arrays will contain metadata where applicable.
Description
Computes extraterrestrial radiation for daily periods 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 21 of Chapter 3.
Note;
- The FAO 56 equations have limited validity at high latitudes ( > 55 ) due to the approximations used.
- On certain Julian days at high latitudes, the returned values be set to _FillValue
radext = radext_fao56(jday, lat, ounit) radext = where(ismissing(radext), 0, radext) ; set all _FillValue = 0.0
See Also
Crop & Evapotranspiration functions
Examples
After reading the simple examples below,
please see some examples with figures at: here:
Example 1: Replicate example 8 in Chapter 3.
Here tunit=0.
Example 2: Consider lat(lat) and jday(time):
calculate 'radext' with ounit=0 [ mm/day ].
Example 3:
Given julian day and latitude calculate the daily extraterrestrial radiation for every day of the year.
Calculate 'radext' with ounit=2 [ W/m2 ].
The output looks like:
jday = 246 ; 3 September
lat = -20.0
radext = radext_fao56(jday, lat, 0) ; 13.135 mm/day
radext = radext_fao56(jday, lat, 1) ; 32.194 MJ/(m2-day)
radext = radext_fao56(jday, lat, 2) ; 372.617 W/m2
printVarSummary(radext)
The output for 'radext' with ounit=1 [ MJ/(m2-day) ] is
Variable: radext
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
umber Of Attributes: 4
long_name : extraterrestrial radiation: FAO_56
units : MJ/(m2-day)
url : http://www.fao.org/docrep/X0490E/x0490e07.htm
info : FAO 56; EQN 21
(0) 32.194
lat = (/ -20, 0, 45 /)
lat@units = "degrees_north"
lat!0 = "lat"
lat&lat = lat
time = (/ 15, 180, 246, 306 /)
time@long_name = "julian day"
time!0 = "time"
time&time = time
ra = radext_fao56(time, lat, 0)
The output would be
Variable: ra
Type: float
Total Size: 48 bytes
12 values
Number of Dimensions: 2
Dimensions and sizes: [time | 4] x [lat | 3]
Coordinates:
time: [15..306]
lat: [-20..45]
Number Of Attributes: 5
long_name : extraterrestrial radiation: FAO_56
units : mm/day
url : http://www.fao.org/docrep/X0490E/x0490e07.htm
info : FAO 56; EQN 21
jday = ispan(1,365,1) ; every day of year
jday@long_name = "day oy year"
jday!0 = "jday" ; make a coordinate variable
jday&jday = jday
nlat = 73
lat = latGlobeF(nlat, "lat", "latitude", "degrees_north")
radext = radext_fao56(jday, lat, 2) ; [jday | 365] x [lat | 73]
printVarSummary(radext)
print("radext: min="+min(radext)+" max="+max(radext))
Variable: radext
Type: float
Total Size: 262800 bytes
32850 values
Number of Dimensions: 2
Dmensions and sizes: [jday | 365] x [lat | 73]
Coordinates:
jday: [1..365]
lat: [-90..90]
Number Of Attributes: 5
long_name : extra terrestrial radiation: FAO_56
units : W/m2 <=== ounit=2
url : http://www.fao.org/docrep/X0490E/x0490e07.htm
info : FAO 56; EQN 21; radext_fao56
(0) extra terrestrial radiation: FAO_56 (W/m2) : min=0.000519285 max=559.908
Adding the following print statement will print the vales at specified latitudes. The { ... }
is NCL syntax for 'coordinate subscripting.'
radext@_FillValue = -999.9 ; change for a nicer print
print(sprinti("%3.0i", jday)+" "+ \
sprintf("%5.1f", radext(:,{-90}) )+" "+ \
sprintf("%5.1f", radext(:,{-80}) )+" "+sprintf("%5.1f", radext(:,{-70}) )+" "+ \
sprintf("%5.1f", radext(:,{-60}) )+" "+sprintf("%5.1f", radext(:,{-50}) )+" "+ \
sprintf("%5.1f", radext(:,{-40}) )+" "+sprintf("%5.1f", radext(:,{-30}) )+" "+ \
sprintf("%5.1f", radext(:,{-20}) )+" "+sprintf("%5.1f", radext(:,{-10}) )+" "+ \
sprintf("%5.1f", radext(:,{ 0 }) )+" "+ \
sprintf("%5.1f", radext(:,{ 10}) )+" "+sprintf("%5.1f", radext(:,{ 20}) )+" "+ \
sprintf("%5.1f", radext(:,{ 30}) )+" "+sprintf("%5.1f", radext(:,{ 40}) )+" "+ \
sprintf("%5.1f", radext(:,{ 50}) )+" "+sprintf("%5.1f", radext(:,{ 60}) )+" "+ \
sprintf("%5.1f", radext(:,{ 70}) )+" "+sprintf("%5.1f", radext(:,{ 80}) )+" "+ \
sprintf("%5.1f", radext(:,{ 90}) ) )
The (edited) output is here: