Extract only specific layer

Hi I have 35 layers CONC output file but I want to extract 1-15 layers only.

Is there any other ways to extract 1-15 layers only?
I am trying with combine or m3tool but I was not able to find the good method.

combine can indeed only extract a single layer or all layers but not a subset of layers, so it is not suitable for this task.

m3tools program m3xtract can be used to extract a user-specified layer range from a 3D file.

I am trying to use m3xtract but there is no option to choose multiple layers.
Choosing only 1 layer might be possible to extract and then the layer change to 2D file.
It is not possible to loop as well.

After entering “-1” at the prompt “Enter layer to extract, 0 for all layers, -1 for subrange [1]”, you should then see follow-up prompts to enter the first and last layer you want to extract:

You can certainly write shell scripts that loop over input files and call m3xtract or other m3tools programs in each iteration. From the I/O API documentation:

With the exception of programs designed specifically for manipulating dates and times in scripts (greg2jul, jul2greg, juldiff, julshift, timeshift), these programs are designed for easy interactive use. They begin by displaying a “splash screen” displaying the name, usage, and version for the program, and then prompt the user for the specifications for the program-run. Most of these prompts have default values computed from the metadata in input-file headers; defaults may be accepted by hitting the RETURN key. To develop scripts for them, it is generally best to run them interactively once, recording all the responses you give to the prompts, and then use that information to develop a command-file which redirect into the program within the script.

An example (without looping) csh script calling m3tshift is provided in this CMAQ boundary condition tutorial, you could use it as a starting point for developing your m3xtract script following the general approach described above.

It is working now! Thank you so much