Ignore:
Timestamp:
Jul 7, 2025, 2:46:43 PM (4 days ago)
Author:
jbclement
Message:

COMMON:
Rework related to the command-line parsing:

  • Replace ad-hoc argument parsing with a unified 'parse_args' subroutine, allowing easier extension to other programs and options across models;;
  • Use of '--version' (with ab optional output file) to print compilation/version details;
  • Addition of 'job_timelimit_mod' module to handle SLURM/PBS job time-limit via '--jobid' (currently only used in the PEM), allowing easier extension to other programs;
  • Replace manual SSO handling with 'parse_args' for the Mars start2archive;
  • Clean-up related legacy code in the programs supporting the version option.

JBC

File:
1 edited

Legend:

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

    r3786 r3836  
    1111
    1212use netcdf
    13 use version_info_mod, only: print_version_info
     13use parse_args_mod, only: parse_args
    1414
    1515implicit none
     
    3939integer                            :: i, j, k
    4040integer                            :: numDimsVar, numAttsVar
    41 character(100)                     :: varName, arg
     41character(100)                     :: varName
    4242integer                            :: xtypeVar
    4343integer, allocatable, dimension(:) :: dimids_var_in
     
    7272
    7373! CODE
    74 ! Handle command‐line argument "version"
    75 if (command_argument_count() > 0) then ! Get the number of command-line arguments
    76     call get_command_argument(1,arg) ! Read the argument given to the program
    77     select case (trim(adjustl(arg)))
    78         case('version')
    79             call print_version_info()
    80             stop
    81         case default
    82             error stop 'The argument given to the program is unknown!'
    83     end select
    84 endif
     74! Parse command-line options
     75call parse_args()
    8576
    8677! Main loop: two PCM years
Note: See TracChangeset for help on using the changeset viewer.