Ignore:
Timestamp:
Jan 15, 2025, 1:50:20 PM (8 days ago)
Author:
jbclement
Message:

PEM:
Improvement of the Bash script tools in the deftank with an automatic error detection which ends the script with a message.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90

    r3214 r3579  
    1111!=======================================================================
    1212use netcdf
     13use version_info_mod, only: print_version_info
    1314
    1415implicit none
     
    2324character(1)                          :: str
    2425character(30)                         :: name_, namevar
     26character(100)                        :: arg ! To read command-line arguments
    2527integer                               :: xtype_var, len_, len_1, len_2, len_lat, len_lon, len_time, len_soil
    2628integer                               :: dimid_lon, dimid_lat, dimid_time, dimid_soil, dimid_2, numdims, numatts, numyear
    2729logical                               :: yes
     30
     31
     32if (command_argument_count() > 0) then ! Get the number of command-line arguments
     33    call get_command_argument(1,arg) ! Read the argument given to the program
     34    select case (trim(adjustl(arg)))
     35        case('version')
     36            call print_version_info()
     37            stop
     38        case default
     39            error stop 'The argument given to the program is unknown!'
     40    end select
     41endif
    2842
    2943do numyear = 1,2
Note: See TracChangeset for help on using the changeset viewer.