Import several netcdf files without having to select the layer / parameter to be displayed

Hello,

I have several netcdf files containing data on current direction and speed. When one of these files is dragged into Global Mapper to be opened, a window appears asking you to select the parameters to be displayed (here Speed or Direction or both to be ticked).

I'd like to be able to make a loop that imports several files of the same type but directly displays the two parameters (Speed and Direction) without displaying this choice dialogue box.

I have a lot of files to import. The advantage is to have a loop that opens all the files directly in Global Mapper without having to tick the parameter to be loaded for each file. In a way, you lose the point of the loop and the import automation...

I can't find a function in the documentation that would allow me to do this. Could you help me achieve what I want ?


My script :

GLOBAL_MAPPER_SCRIPT VERSION=1.00

DIR_LOOP_START DIRECTORY="path" FILENAME_MASKS="*.NC" RECURSE_DIR=NO

IMPORT FILENAME="%FNAME_W_DIR%"

DIR_LOOP_END


My issue :


Best Answer

  • _Camille_
    Answer ✓

    I've figured out how to do it.

    You just need to add the following function to Import :

    IMPORT FILENAME="%FNAME_W_DIR%" LOAD_FLAGS="Vitesse~"

    IMPORT FILENAME="%FNAME_W_DIR%" LOAD_FLAGS="Direction~"