Weather data

Exercise objective:

·   Manipulating weather data

Suggested reading:

Chapters 2.3 and 7.5 of the book, ORYZA2000: modelling lowland rice.

Exercise: 

Using the file EXPLORE.DAT, we simulate the growth of rice at Los Baños, the Philippines in 1992. The weather data for this location and for this year are contained in the file PHIL1.992, which is stored in the folder (or directory) 'C:\COURSE\WEATHER\'. Remember that the full name of the weather data file is made up of three components: CNTR denotes the (acronym of the) country name (PHIL), ISTN denotes the weather station number (1), and IYEAR supplied earlier in Section 2 Timer data for simulation (1992) of the experimental data file.

 

Ex-I.42. Use the Windows Explorer to check the presence of the file PHIL1.992 in the directory 'C:\COURSE\WEATHER\'. Also note the presence of the file PHIL1.993 that contains the daily weather data for 1993.

 

Ex-I.43. In the Shell, click with your mouse on PHIL1.992 of the input data files. Read Chapter 7.5 of the book ORYZA2000: modelling lowland rice for a detailed explanation of the weather data file. Scroll through the file and examine its contents.

 The file PHIL1.992 contains daily weather data from the IRRI weather station at Los Baños, for 1992. Read in the first line that the weather station is located at 121.25° Eastern Longitude, 14.18° Northern Latitude, and at 21 m altitude (above sea level, asl). The latitude and longitudes are given in decimal codes; compare these values with the values given in the header of the file, which are in degrees. The values for both Ångström parameters (a and b) are set to zero, because the data for solar radiation in the fourth column are given in kJ m-2 d-1. If the data for solar radiation would have been expressed in sunshine hours, then the appropriate values of the Ångström parameters would have to be given, so that the weather system of ORYZA2000 could translate these into the correct units (see Exercise I.48 below).

 

Ex-I.44. Check in CONTROL.DAT that the experimental data file used is EXPLORE.DAT, and check that RUNMOD is in the exploration mode. Run the model and fill out column Sim1 of Table I.4; check that the simulated output is the same as in the column original. Open the file WEATHER.LOG and verify that the simulation was carried out for the Philippines, 1992. In EXPLORE.DAT, change the start time of simulation (STTIME) from 4 to 360, run the model and fill out column Sim2 in Table I.4. Open the file RES.DAT and have a look at the column YEAR. What has happened? A: On day 360, the crop emerged in the seedbed and started to grow. At the end of the year, ORYZA2000 continued in the year 1993, using the weather data of the file PHIL1.993.

 At the end of a year, the model ORYZA2000 automatically closes the open weather data file and looks for a weather data file of the same site for the subsequent year, in the same directory/folder. If this file is not present, simulation stops, generating an error message that no weather data are present.

Table I.4

View ANSWERS from the Tutorial_answer_sheet.pdf file.

 

Ex-I.45. In EXPLORE.DAT, reset the start time of simulation back from 360 to 4. Now, we want to simulate the performance of the rice variety IR72 with exactly the same emergence date and management practices in a different environment, namely East Java (Indonesia). We have daily weather data from a station in East Java (Jakenan) in a file called INDON43.992. Break down the name of this file in station name and station number in the file EXPLORE.DAT, run the model for Indonesia, and fill out column Sim3 in Table I.4. Open WEATHER.LOG and verify that the simulation was carried out for Indonesia, 1992. In EXPLORE.DAT, change the start time of simulation from 4 to 360, and run the model. What has happened (check the file WEATHER.LOG)? A: On day 360, the crop emerged in the seedbed and started to grow. At the end of the year, ORYZA2000 did not find a weather data file for the year 1993 called INDON43.993 in the directory C:\COURSE\WEATHER\ and simulation was halted.

A weather data file does not need to contain records for all 365 days of the year, if the simulation is to be carried out for a limited part of the year only. For example, if a simulation has to cover the period between January and July only, no records are required for the period August-December.

 

Ex-I.46. Look in the file INDON99.992. This file contains daily weather data from day 4 until day 120 only. Reset start time of simulation from 360 to 4. Change the station number ISTN in EXPLORE.DAT from 43 to 99 and run the model. Verify in WEATHER.LOG that indeed the weather file INDON99.992 was used, and verify that the simulated output is still the same as in column Sim3 in Table I.4.

ORYZA2000 has a special facility to deal with missing data in a weather file. If a daily value for a certain variable is missing, the value 99. should be entered and ORYZA2000 will then automatically interpolate or estimate the missing value from the preceding and subsequent daily values. This procedure is followed for all weather characteristics, except for rainfall, as daily interpolation is too inaccurate because of the stochastic nature of rainfall. When such an interpolation or estimation of weather data has been performed, ORYZA2000 generates a warning message on screen and gives exact information through the variable ISTAT in the file WEATHER.LOG. A detailed explanation of the variable ISTAT is given in Box I.1.

 

Ex-I.47. Open the file INDON99.992 and locate the line for day 6:

43  1992     6 11046  24.0  30.5  2.44   0.5  24.0

In column 4, change the value for radiation from 11046 to 99. Run ORYZA2000 and fill out column Sim4 in Table I.4. Did anything change compared to Sim3? A: no, the interpolation of just one variable on one day did not affect crop growth. Check the warning message in WEATHER.LOG: the ISTAT value is attr:211111, indicating that the variable in position 1, i.e., radiation, was estimated. Now also change the values for minimum and maximum temperature, wind speed and vapour pressure to 99. :

43  1992     6  -99.  -99.  -99.  -99.  -99.  24.0

run the model, fill out column Sim5 in Table I.4 and examine WEATHER.LOG (attribute 222221). Compared with Sim3 and Sim4, now five values were interpolated, which did affect the simulation quite a bit.

 

Box I.1. Dealing with missing weather data. Source: van Kraalingen DWG, Stol W, Uithol PWJ, Verbeek M. 1991. User manual of CABO/TPE weather system. Internal communication. Wageningen (Netherlands): CABO/TPE, 27 pp.

 The return variable ISTAT

 The variable ISTAT is an output parameter of both STINFO and WEATHR. Through the value of ISTAT the user is informed  

 about errors or warnings that may have occurred. The user can select writing errors and warnings as text messages to the

 screen and/or to a log file, but these text messages cannot be used in the main program to recognize errors and warnings.

 Therefore, a status variable is supplied whose (integer) value is an indication of the event that occurred. If no irregularity was

 encountered, as is the case when the data file exists and the data for the requested day are all available, the value of ISTAT is

 zero.

 The following general rules apply to the value of ISTAT:

 Summarizing, if an error has occurred (e.g., a data file does not exist), the value of ISTAT is negative but greater than '-111111'.  

 Less than '-111111' is reserved for cases where one or more variables were missing and could not be obtained at all. Positive

 values of ISTAT larger than '111111' indicate situations where all weather variables could be supplied, but one or more values

 were obtained by interpolation or estimated in some way (see below).

 

 Missing data

 Missing data are treated differentially, depending on variable type and timing of occurrence. In general, the reading program

 will try to estimate the missing value by interpolation between adjacent values. There are, however, some exceptions. Rainfall

 is not interpolated because it is too erratic and the results of crop growth models (describing the water-limited situation) are

 very sensitive to rainfall (quantity and distribution). Interpolation is neither applied if data on either side are missing, as at the

 beginning and the end of the year.

 There are, however, some situations where it is possible to provide better estimates of the missing data by careful estimation

 than by simple interpolation. Data from stations in the vicinity may be available, so that missing data can be obtained from

 another station. Missing data may also be replaced by long-term averages. The estimated data are given a special code in the

 data files so that the reading program can recognize them.

 Summarizing, for each weather variable, four different cases can be distinguished (for rainfall three): the weather variable is:

 1) measured, 2) interpolated, 3) estimated or 4) not available (no interpolation or estimation possible). This is reflected in the

 value of ISTAT if its value pertains to some status of the weather data (ISTAT < -111111 or ISTAT > 111111). The six digits of the

 value of ISTAT represent the six weather variables, with the value of each of the digits expressing the status of that particular

 weather variable.

 The value of a digit can be between 1 and 4:

 Examples:

 To facilitate the check on the ISTAT value in the user's program, ISTAT is set to zero if all weather variables are available from

 measurements. So, the value of ISTAT of '111111' is replaced by 0.

ORYZA2000 requires solar radiation values in kJ m-2 d-1. However, many meteorological observation stations record daily sunshine hours instead of radiation. Sunshine hours can be entered in the weather data file instead of radiation values, and these are automatically converted into radiation values if the so-called Ångström parameters a and b are given in the first line of the data file. Indicative values for Ångström parameters for broad ecological environments are given in Box I.2. An example is given for a weather data file from Pantnagar, India, 1992.

 

Ex-I.48. Open the weather data file PANT1.992 and examine its contents. Note that in the first line, the longitude is given (78.47), the latitude (29.0), the elevation (243.84), and then the Ångström parameters a (0.29) and b (0.42). Column 4 gives sunshine hours, and the columns for vapour pressure and wind speed have missing values. Change the station name and station number in the EXPLORE.DAT file to PANT1.992, and change the name of the evapotranspiration module in the top of the file to ETMOD = 'PRIESTLEY TAYLOR' (we will see in Exercises II.15-II.18 in “Chapter II: Potential production” why we do this). Run ORYZA2000 and fill out column Sim6 of Table I.4. Note in WEATHER.LOG the error messages referring the missing data for vapour pressure and wind speed. This has no consequence since these variables are not used in the Priestley-Taylor method to calculate evapotranspiration (nor or they used by ORYZA2000 in any other calculation).

Box I.2. Indicative values for the empirical constants a and b in the Ångström formula, for broad ecological regions used by the Food and Agriculture Organization (FAO). Source: Frère M, Popov GF. 1979. Agrometeorological crop monitoring and forecasting. Plant Production Protection Paper 17. Rome: Food and Agricultural Organization, 64 pp.

 

 

Ex-I.49. Before you continue, reset the weather data file in EXPLORE.DAT to PHIL1.992, change the name of the evapotranspiration module at the top of the file back to ETMOD = 'PENMAN', run the model and check that the same results are obtained as in column Sim1 of Table I.4.