You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the average temperature to calculate potential evapotranspiration, there are nulls in some areas in the north, even though the average temperature does not have a null in that location
importnumpyasnpimportxarrayasxrimportnetCDF4asncimportmatplotlib.pyplotasplt# Original files downloaded from the websitefile=xr.open_dataset('cru_ts4.07.2011.2020.tmp.dat.nc.nc')
# Convert the data dimensions to ('lat', 'lon', 'time') and set the units to celsius (original units are degrees Celsius)file['tmp'].attrs['units'] ='celsius'file['tmp'] =file['tmp'].transpose('lat', 'lon', 'time')
file.to_netcdf('tmp_lat_lon_time.nc')
# visualizationtmp=xr.open_dataset('tmp_lat_lon_time.nc')['tmp']
plt.imshow(tmp[::-1, :, 10])
Currently it looks like there are no exception nulls in the red box
When the calculation is complete, read the pet file and again randomly visualize the values for one day
# visualization of the petpet=xr.open_dataset('out/_pet_thornthwaite.nc')['pet_thornthwaite']
plt.imshow(pet[::-1, :, 10])
Null values in the same places.
Desktop (please complete the following information):
OS: Win1064
climate-indices:2.0.0
numpy: 1.25.2
xarray:2013.1.0
matplotlib:3.8.3
netCDF4:1.6.5
I notice the CRU lats are [-89.75 -89.25 -88.75 -88.25 ... 88.75 89.25 89.75],lons are [-179.8 -179.2 -178.8 -178.2 ... 178.8 179.2 179.8].I don't understand why there are null values here, could it have something to do with the way pet is calculated?
The text was updated successfully, but these errors were encountered:
@yheng0821 Yes, Thornthwaite's algorithm for calculating potential evapotranspiration (PET) has limitations based on latitude because it relies heavily on temperature data and day length, which are influenced by latitude. Typically, the algorithm is most reliable between 20° and 55° latitude. Beyond these limits, especially in polar regions, the method becomes less accurate due to extreme variations in day length and temperature, which are not well accounted for in the model.
Describe the bug
When I use the average temperature to calculate potential evapotranspiration, there are nulls in some areas in the north, even though the average temperature does not have a null in that location
To Reproduce
temperature:https://crudata.uea.ac.uk/cru/data/hrg/cru_ts_4.07/cruts.2304141047.v4.07/tmp/cru_ts4.07.2011.2020.tmp.dat.nc.gz
Since the data dimension of the CRU is (time, lat, lon), I performed the following operation:
Currently it looks like there are no exception nulls in the red box
Next, we begin to calculate the pet
process_climate_indices --index pet --periodicity monthly --netcdf_temp tmp_lat_lon_time.nc --var_name_temp tmp --output_file_base out/ --multiprocessing all_but_one
When the calculation is complete, read the pet file and again randomly visualize the values for one day
Null values in the same places.
Desktop (please complete the following information):
I notice the CRU lats are [-89.75 -89.25 -88.75 -88.25 ... 88.75 89.25 89.75],lons are [-179.8 -179.2 -178.8 -178.2 ... 178.8 179.2 179.8].I don't understand why there are null values here, could it have something to do with the way pet is calculated?
The text was updated successfully, but these errors were encountered: