Ignore:
Timestamp:
Jul 7, 2025, 2:46:43 PM (3 weeks 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.GENERIC/libf/dynphy_lonlat/phystd/newstart.F

    r3621 r3836  
    5050     &                         latitude,  ! latitudes (rad)                       
    5151     &                         cell_area ! physics grid area (m2)
    52       use version_info_mod, only: print_version_info
     52      use parse_args_mod, only: parse_args
    5353                       
    5454      implicit none
     
    192192
    193193
    194       if (command_argument_count() > 0) then ! Get the number of command-line arguments
    195           call get_command_argument(1,txt) ! Read the argument given to the program
    196           select case (trim(adjustl(txt)))
    197               case('version')
    198                   call print_version_info()
    199                   stop
    200               case default
    201                   error stop 'The argument given to the program is '
    202      &//'unknown!'
    203           end select
    204       endif
     194      ! Parse command-line options
     195      call parse_args()
    205196
    206197c sortie visu pour les champs dynamiques
Note: See TracChangeset for help on using the changeset viewer.