Ignore:
Timestamp:
Jan 13, 2025, 4:52:20 PM (2 weeks ago)
Author:
jbclement
Message:

COMMON:
The compilation generates a Fortran subroutine to track compilation and version (SVN or Git) details through the executable file. Put the argument 'version' as an option when executing the code to display these information and create a file "version_diff.txt" containing the diff result.
It can work with every program but it has been implemented only for: 'gcm', 'parallel gcm', 'pem', '1D Mars PCM', 'Mars newstart', 'Mars start2archive' and '1D Generic PCM'.
JBC

Location:
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r3336 r3574  
    6161     &             ini_paleoclimate_h, end_paleoclimate_h
    6262      use subslope_mola_mod, ONLY: subslope_mola
     63      use version_info_mod, only: print_version_info
    6364     
    6465      implicit none
     
    8182c et autres:
    8283c----------
     84      character(100) :: arg ! To read command-line arguments
    8385
    8486c Variables pour les lectures NetCDF des fichiers "start_archive"
     
    211213
    212214
     215
     216if (command_argument_count() > 0) then ! Get the number of command-line arguments
     217    call get_command_argument(1,arg) ! Read the argument given to the program
     218    select case (trim(adjustl(arg)))
     219        case('version')
     220            call print_version_info()
     221            stop
     222        case default
     223            error stop 'The argument given to the program is unknown!'
     224    end select
     225endif
    213226
    214227c sortie visu pour les champs dynamiques
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F

    r3491 r3574  
    4141      USE surfdat_h, ONLY: phisfi, albedodat, z0, z0_default,
    4242     &    zmea, zstd, zsig, zgam, zthe, hmons, summit, base
     43      use version_info_mod, only: print_version_info
     44
    4345      implicit none
    4446
     
    141143      integer :: nq,numvanle
    142144      character(len=30) :: txt ! to store some text
     145      character(100) :: arg ! To read command-line arguments
    143146
    144147c Netcdf
     
    150153C here we assume and check that if there is an argument #1 then
    151154C it should be --add-sso to signal adding SSO fileds to start_archive.nc
    152 
    153155      CALL get_command_argument(1,txt,j,ierr)
    154156      ! will return ierr==0 if there is an argument #1 to command line
     
    158160          add_sso_fields=.true.
    159161          write(*,*) "SSO fields will be included in start_archive"
     162        ELSE IF (trim(txt) == 'version') then
     163            call print_version_info()
     164            stop
    160165        ELSE
    161166          write(*,*) "start2archive error: unexpected command line "//
Note: See TracChangeset for help on using the changeset viewer.