The following program is a typical task with two input images and an output one. The easiest way to create a new task is just to start with this working template and modify what is needed.
Note that this sample task uses integer of kind=4, i.e. 32-bit numbers, to handle some dimensions, so it will be limited to Gbyte data size. Changing to kind=8 (in main program and subroutines...) would remove this limitation.