Changeset 3836 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jul 7, 2025, 2:46:43 PM (8 days ago)
- Location:
- trunk/LMDZ.MARS/libf
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
r3604 r3836 61 61 & ini_paleoclimate_h, end_paleoclimate_h 62 62 use subslope_mola_mod, ONLY: subslope_mola 63 use version_info_mod, only: print_version_info63 use parse_args_mod, only: parse_args 64 64 65 65 implicit none … … 213 213 214 214 215 if (command_argument_count() > 0) then ! Get the number of command-line arguments 216 call get_command_argument(1,txt) ! Read the argument given to the program 217 select case (trim(adjustl(txt))) 218 case('version') 219 call print_version_info() 220 stop 221 case default 222 error stop 'The argument given to the program is ' 223 &//'unknown!' 224 end select 225 endif 215 ! Parse command-line options 216 call parse_args() 226 217 227 218 c sortie visu pour les champs dynamiques -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F
r3576 r3836 41 41 USE surfdat_h, ONLY: phisfi, albedodat, z0, z0_default, 42 42 & zmea, zstd, zsig, zgam, zthe, hmons, summit, base 43 use version_info_mod, only: print_version_info43 use parse_args_mod, only: parse_args, add_sso_fields 44 44 45 45 implicit none … … 117 117 REAL baseS(ip1jmp1) 118 118 119 logical :: add_sso_fields=.false. ! default, don't include SSO fields120 121 119 122 120 c Variables intermediaires : vent naturel, mais pas coord scalaire … … 149 147 INTEGER nid,nid1 150 148 151 C get command line arguments 152 C here we assume and check that if there is an argument #1 then 153 C it should be --add-sso to signal adding SSO fileds to start_archive.nc 154 CALL get_command_argument(1,txt,j,ierr) 155 ! will return ierr==0 if there is an argument #1 to command line 156 IF (ierr==0) THEN 157 ! Check that argument is indeed "--add-sso" or signal the error 158 IF (trim(txt)=="--add-sso") THEN 159 add_sso_fields=.true. 160 write(*,*) "SSO fields will be included in start_archive" 161 ELSE IF (trim(txt) == 'version') then 162 call print_version_info() 163 stop 164 ELSE 165 write(*,*) "start2archive error: unexpected command line "// 166 & "argument: ",trim(txt) 167 write(*,*) " (only --add-sso currently accepted)" 168 write(*,*) "Might as well stop here." 169 stop 170 ENDIF 171 ENDIF ! of IF (ierr==0) 149 ! Parse command-line options 150 ! Option "--add-sso" adds SSO fields to "start_archive.nc" 151 call parse_args() 172 152 173 153 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3831 r3836 18 18 use init_testphys1d_mod, only: init_testphys1d 19 19 use writerestart1D_mod, only: writerestart1D 20 ! Mostly for XIOS outputs: 20 use parse_args_mod, only: parse_args 21 use callkeys_mod, only: water 22 ! Mostly for XIOS outputs 21 23 use mod_const_mpi, only: init_const_mpi 22 24 use parallel_lmdz, only: init_parallel 23 use version_info_mod, only: print_version_info24 use callkeys_mod, only: water25 25 26 26 implicit none … … 68 68 real, dimension(:,:,:), allocatable :: q ! tracer mixing ratio (e.g. kg/kg) 69 69 real, dimension(1) :: wstar = 0. ! Thermals vertical velocity 70 character(100) :: arg ! To read command-line arguments71 70 72 71 ! Physical and dynamical tendencies (e.g. m.s-2, K/s, Pa/s) … … 94 93 ! INITIALISATION 95 94 !======================================================================= 96 if (command_argument_count() > 0) then ! Get the number of command-line arguments 97 call get_command_argument(1,arg) ! Read the argument given to the program 98 select case (trim(adjustl(arg))) 99 case('version') 100 call print_version_info() 101 stop 102 case default 103 error stop 'The argument given to the program is unknown!' 104 end select 105 endif 95 ! Parse command-line options 96 call parse_args() 106 97 107 98 #ifdef CPP_XIOS
Note: See TracChangeset
for help on using the changeset viewer.