*2.3. Characterization of the Activated Carbon*

Thermogravimetric analysis (TGA) was used to estimate the temperature distribution at which the nutshell of argan responds under a latent climate. Thermal analyses were done with STD 2960 TA and SDT Q600 instruments under a nitrogen flow of 100 mL/min. The temperature ramp of 10 ◦C/min from room temperature to 800 ◦C was utilized during the analyses.

The surface functionalities were investigated with FT-IR spectroscopy. A Thermo IS5 Nicolet (USA) spectrophotometer was used for obtaining FT-IR spectra and acquired from 400 to 4000 cm−<sup>1</sup> at room temperature (16 scans and spectral resolution of 4 cm<sup>−</sup>1); the peak positions were determined using Origin software (Version 2021b). Origin Lab Corporation, Northampton, MA, USA.

The textural properties of activated carbons were determined from nitrogen adsorption at 196 ◦C using a Micrometrics ASAP 2420 (V2.09). Specific surface areas (SBET) were determined by applying the Brunauer–Emmett–Teller (BET) equation to the isotherms. Additionally, the total pore volume (VTP), which corresponds to the N2 volume adsorbed at a relative pressure (P/P◦) of 0.95, was calculated. The volume of the micropores (VμP) and external surface area (SEXT) were determined using the t-plot method. The external volume (VEXT) was calculated using the difference between VTP and VμP. The average pore diameter (DAP) was calculated using the 4VTP/SBET ratio.

#### *2.4. Adsorptions Experiments*

Adsorption is a surface phenomenon in which only the adsorbent surface is concerned, and adsorbate should not penetrate inside the structure of the adsorbent. Figure 2 depicts the adsorption process.

**Figure 2.** Adsorption process.

Batch adsorption experiments were performed on IKA Magnetic stirrers (RO 15) with a Digiterm 100 microprocessor-controlled digital immersion thermostat and thermostatic circulating bath. In addition, a magnetic bar was added to stir the solution and a weight circle was added to avoid floating. In order to obtain the adsorption equilibrium time, the evolution of the adsorbate concentration was studied by adding 1 g of activated carbon to adsorbate solutions (Co = 100 mg/L) in 50 mL-flask. The experiments were carried out at controlled shaking (200 rpm) and temperature (30 ◦C) until reaching equilibrium.

The amount of adsorbed compound at equilibrium time, which represents the adsorption capacity, Qe (mg/g), and Qt is the amount of adsorbed compound at random time t, can be determined by the next expressions:

$$\text{Qe} = \frac{(\text{Co} - \text{Ce}) \text{V}}{\text{W}} \tag{1}$$

$$\text{Qt} = \frac{(\text{Co} - \text{Ct}) \text{V}}{\text{W}} \tag{2}$$

where Co, Ct, and Ce (mg/L) are the absorbate concentrations at beginning, at time t, and at equilibrium, respectively; V is the volume of solution (L) and W is the weight of adsorbent (g).

When the adsorption equilibrium was reached, the adsorbent was removed from the solution by filtration with syringe filters (0.45 μm) and the residual adsorbate concentration was analyzed by a VWR UV-1600PC spectrophotometer. All experiments were carried out at a natural pH of the adsorbate solution at the maximum absorbance wavelength (λmax) of 300 nm for diclofenac and 290 nm for caffeine. The obtained data were adjusted to the Langmuir and Freundlich isotherm models. The kinetic models of pseudo-first order and pseudo-second order were evaluated.
