iMOD Forum

select as batch function?

Kristina Gumgowski, modified 3 Years ago.

select as batch function?

Youngling Posts: 13 Join Date: 3/18/21 Recent Posts
Hi,
I am wondering if there is a way to use the idf edit window in batch mode. I would like to select a part of an IDF file using a GEN file. I could not find anything in the user manual chpt "8.2 IDF-Functions". I think it might be possible to realize it with the IDFCALC Function but I would have to do a small work around, therefore I wanted to check first if there is also sth like IDFSELECT oder IDFEDIT ?
Thanks!
Frans Roelofsen, modified 3 Years ago.

RE: select as batch function?

Padawan Posts: 51 Join Date: 11/11/13 Recent Posts
Hi Kristina,
You are correct,  not all the options of the IDF Edit window are represented in an iMOD Batch function.
There are 3 remark I can make on your issue. 

1. My suggestion would also be to use IDFCALC-Function. There is no function IDFSELECT or IDFEDIT.  However..... I tried to test the IDFCALC function in adding the keyword GENFILE but it seems that the function does not work correctly. Therefor I placed an official issue for the iMOD development team. 

> let me know if this is your experience to with IDFCALC 

2. In the next release of iMOD a new function is added: IDFMATH. With this function logical operations are possible like IF((A-emoticon * C>50.0,SQRT(C),0.0). The function only uses IDF files (no GEN files) so your GEN file must be transformed into an IDF file, e.g. by using  the function CREATEIDF.
3. More and more I use Python for pre- and postprocessing. e.g. with iMOD-Python (see https://imod.xyz/).
By using Python you need to do the following actions (I might have some examples available) :
- read several IDF files into a 'data array' 
- read shp/gen file and rasterize to a 'data array' 
- apply a logical calculation on all of the data arrays by using the command  xarray.where(...)
- save the results in an IDF file. 
Hope this will help you.
Kind regards, 

Frans