@@ -228,6 +228,8 @@ def PMJPL(
228228 if Ta_C is None :
229229 raise ValueError ("air temperature (Ta_C) not given" )
230230
231+ check_distribution (Ta_C , "Ta_C" )
232+
231233 if Tmin_C is None and geometry is not None and time_UTC is not None :
232234 Tmin_K = GEOS5FP_connection .Tmin_K (
233235 time_UTC = time_UTC ,
@@ -240,6 +242,8 @@ def PMJPL(
240242 if Tmin_C is None :
241243 raise ValueError ("minimum temperature (Tmin_C) not given" )
242244
245+ check_distribution (Tmin_C , "Tmin_C" )
246+
243247 if RH is None and geometry is not None and time_UTC is not None :
244248 RH = GEOS5FP_connection .RH (
245249 time_UTC = time_UTC ,
@@ -250,9 +254,13 @@ def PMJPL(
250254 if RH is None :
251255 raise ValueError ("relative humidity (RH) not given" )
252256
257+ check_distribution (RH , "RH" )
258+
253259 if elevation_km is None and geometry is not None :
254260 elevation_km = NASADEM .elevation_km (geometry = geometry )
255261
262+ check_distribution (elevation_km , "elevation_km" )
263+
256264 elevation_m = elevation_km * 1000.0
257265
258266 if IGBP is None and geometry is not None :
@@ -264,6 +272,8 @@ def PMJPL(
264272 raise ValueError (f"invalid geometry type for IGBP retrieval: { type (geometry )} " )
265273
266274 IGBP = load_MCD12C1_IGBP (geometry = IGBP_geometry )
275+
276+ check_distribution (np .float32 (IGBP ), "IGBP" )
267277
268278 if regenerate_net_radiation or (Rn_Wm2 is None and albedo is not None and ST_C is not None and emissivity is not None ):
269279 if SWin_Wm2 is None and geometry is not None and time_UTC is not None :
@@ -312,6 +322,8 @@ def PMJPL(
312322 else :
313323 raise ValueError ("net radiation (Rn_Wm2) not given and cannot be calculated" )
314324
325+ check_distribution (Rn_Wm2 , "Rn_Wm2" )
326+
315327 if G_Wm2 is None and Rn_Wm2 is not None and ST_C is not None and NDVI is not None and albedo is not None :
316328 G_Wm2 = calculate_SEBAL_soil_heat_flux (
317329 Rn = Rn_Wm2 ,
0 commit comments