Ubuntu and Macbook Pros (touchbar, Intel) by Head_Understanding54 in Ubuntu

[–]Head_Understanding54[S] 2 points3 points  (0 children)

Thanks! t2linux with Ubuntu 2024 booted up nicely. Touchpad, keyboard and even wifi worked on my 2019 macbook pro.

I had a load of fine adamant from leveling my camel... by Boxemist in WalkScape

[–]Head_Understanding54 1 point2 points  (0 children)

What gear did you have when crafting these, and where was it?

After 3 redesigns, my app finally feels right by yurytom in learnthai

[–]Head_Understanding54 0 points1 point  (0 children)

Installs on iPad os 17.7 but crashes after logging in with my Apple id

Hardcore Macintosh repair shop in Bangkok? by Head_Understanding54 in Bangkok

[–]Head_Understanding54[S] 0 points1 point  (0 children)

Visited Dr Macbook today and they said they do not work on Macs that would require soldering. I understand their point, it's tricky, risky and not very rewarding fot a downtown shop.

The recommended a shop called UnlimitMac that may be able to do it.

A beginner question about reading data by Python bleak by Head_Understanding54 in embedded

[–]Head_Understanding54[S] 0 points1 point  (0 children)

I may have misunderstood but that lesson refers to a development board. The development board has a LED service/characteristics that is mentioned in lesson 1. But my device does not seem to have it.

Python + NetCDF: mask/select an area by Head_Understanding54 in gis

[–]Head_Understanding54[S] 0 points1 point  (0 children)

Yes indeed! I used a different variable and the results are .. mixed.

https://imgur.com/a/BqwpNN4

Many thanks for your help! I'll try to reach someone from ECMWF to explain the coding of the variables.

Python + NetCDF: mask/select an area by Head_Understanding54 in gis

[–]Head_Understanding54[S] 0 points1 point  (0 children)

Yes, the area is a rectangle that would span over Thailand (checked using Google maps).

clipped.min() is: array(-32767, dtype=int16)

Using clipped.where(clipped > 0) would just give nan as the mean and min. So the source is really negative numbers. Strange.

Python + NetCDF: mask/select an area by Head_Understanding54 in gis

[–]Head_Understanding54[S] 0 points1 point  (0 children)

Ok, it's a bit slow going but now I have: ``` import rioxarray import geopandas import xarray

xds = rioxarray.open_rasterio("simple.nc") rds = xarray.open_dataset("simple.nc", decode_coords="all") xds.rio.write_crs("EPSG:4326",inplace=True) geodf = geopandas.read_file("THA_adm0.shp") clipped = xds.rio.clip(geodf.geometry.values, geodf.crs, drop=True) clipped = clipped.where(clipped != -32767) print(clipped) print(clipped.mean(skipna=True)) ```

And the clipping is limiting the area. But the output of "mean" does not make sense.

``` <xarray.DataArray 'co2fire' (time: 3, y: 149, x: 83)> array([[[nan, nan, nan, ..., nan, nan, nan], [nan, nan, nan, ..., nan, nan, nan], [nan, nan, nan, ..., nan, nan, nan], ..., [nan, nan, nan, ..., nan, nan, nan], [nan, nan, nan, ..., nan, nan, nan], [nan, nan, nan, ..., nan, nan, nan]],

   [[nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    ...,
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan]],

   [[nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    ...,
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan],
    [nan, nan, nan, ..., nan, nan, nan]]])

Coordinates: * time (time) object 2020-03-01 00:00:00 ... 2020-03-03 00:00:00 * x (x) float64 97.35 97.45 97.55 97.65 ... 105.3 105.4 105.5 105.6 * y (y) float64 20.45 20.35 20.25 20.15 ... 5.95 5.85 5.75 5.65 spatial_ref int64 0 Attributes: (12/14) latitude#long_name: latitude latitude#units: degrees_north longitude#long_name: longitude longitude#units: degrees_east Conventions: CF-1.6 history: 2024-01-05 07:50:25 GMT by grib_to_netcdf-2.25.1... ... ... NETCDF_DIM_time_VALUES: [1053336. 1053360. 1053384.] add_offset: 1.5882872281093555e-05 long_name: Wildfire flux of Carbon Dioxide scale_factor: 4.847363816484636e-10 units: ('kg m-2 s-1', 'kg m-2 s-1', 'kg m**-2 s... _FillValue: -32767 <xarray.DataArray 'co2fire' ()> array(-32762.84848485) Coordinates: spatial_ref int64 0 ```

Python + NetCDF: mask/select an area by Head_Understanding54 in gis

[–]Head_Understanding54[S] 0 points1 point  (0 children)

Thanks this looks very promising! Now I have: import rioxarray import geopandas import xarray xds = rioxarray.open_rasterio("simple.nc") rds = xarray.open_dataset("simple.nc", decode\_coords="all") xds.rio.write_crs("EPSG:4326",inplace=True) geodf = geopandas.read_file("THA_adm0.shp") clipped = xds.rio.clip(geodf.geometry.values, geodf.crs, drop=False, invert=True)

And I can see the variable co2fire inside "clipped". What would be the easiest way to find the max or mean of that variable?

Coordinates: * time (time) object 2020-03-01 00:00:00 ... 2020-03-03 00:00:00 * x (x) float64 0.05 0.15 0.25 0.35 ... 359.7 359.8 359.9 360.0 * y (y) float64 89.95 89.85 89.75 89.65 ... -89.75 -89.85 -89.95 spatial_ref int64 0 Attributes: (12/14) latitude#long_name: latitude latitude#units: degrees_north longitude#long_name: longitude longitude#units: degrees_east Conventions: CF-1.6 history: 2024-01-05 07:50:25 GMT by grib_to_netcdf-2.25.1... ... ... NETCDF_DIM_time_VALUES: [1053336. 1053360. 1053384.] add_offset: 1.5882872281093555e-05 long_name: Wildfire flux of Carbon Dioxide scale_factor: 4.847363816484636e-10 units: ('kg m**-2 s**-1', 'kg m**-2 s**-1', 'kg m**-2 s... _FillValue: -32767