Changeset 2972 for trunk/LMDZ.GENERIC/libf/phystd/dyn1d
- Timestamp:
- May 29, 2023, 12:41:48 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
r2785 r2972 29 29 USE vertical_layers_mod, ONLY: init_vertical_layers 30 30 USE logic_mod, ONLY: hybrid 31 use radinc_h, only: naerkind 31 32 use regular_lonlat_mod, only: init_regular_lonlat 32 33 use planete_mod, only: ini_planete_mod … … 154 155 c INITIALISATION 155 156 c======================================================================= 157 ! check if 'rcm1d.def' file is around 158 open(90,file='rcm1d.def',status='old',form='formatted', 159 & iostat=ierr) 160 if (ierr.ne.0) then 161 write(*,*) 'Cannot find required file "rcm1d.def"' 162 write(*,*) 'which should contain some input parameters' 163 write(*,*) ' ... might as well stop here ...' 164 stop 165 else 166 close(90) 167 endif 168 169 ! now, run.def is needed anyway. so we create a dummy temporary one 170 ! for ioipsl to work. if a run.def is already here, stop the 171 ! program and ask the user to do a bit of cleaning 172 open(90,file='run.def',status='old',form='formatted', 173 & iostat=ierr) 174 if (ierr.eq.0) then 175 close(90) 176 write(*,*) 'There is already a run.def file.' 177 write(*,*) 'This is not compatible with 1D runs.' 178 write(*,*) 'Please remove the file and restart the run.' 179 write(*,*) 'Runtime parameters are supposed to be in rcm1d.def' 180 stop 181 else 182 call system('touch run.def') 183 call system("echo 'INCLUDEDEF=callphys.def' >> run.def") 184 call system("echo 'INCLUDEDEF=rcm1d.def' >> run.def") 185 endif 156 186 157 187 ! read nq from traceur.def … … 187 217 ! Initialize dimphy module 188 218 call init_dimphy(1,llm) 219 189 220 ! now initialize arrays using phys_state_var_init 221 ! but first initialise naerkind (from callphys.def) 222 naerkind=0 !default 223 call getin("naerkind",naerkind) 224 190 225 call phys_state_var_init(nq) 191 226 … … 221 256 c ------------------------------------------------------ 222 257 223 ! check if 'rcm1d.def' file is around224 open(90,file='rcm1d.def',status='old',form='formatted',225 & iostat=ierr)226 if (ierr.ne.0) then227 write(*,*) 'Cannot find required file "rcm1d.def"'228 write(*,*) 'which should contain some input parameters'229 write(*,*) ' ... might as well stop here ...'230 stop231 else232 close(90)233 endif234 235 ! now, run.def is needed anyway. so we create a dummy temporary one236 ! for ioipsl to work. if a run.def is already here, stop the237 ! program and ask the user to do a bit of cleaning238 open(90,file='run.def',status='old',form='formatted',239 & iostat=ierr)240 if (ierr.eq.0) then241 close(90)242 write(*,*) 'There is already a run.def file.'243 write(*,*) 'This is not compatible with 1D runs.'244 write(*,*) 'Please remove the file and restart the run.'245 write(*,*) 'Runtime parameters are supposed to be in rcm1d.def'246 stop247 else248 call system('touch run.def')249 call system("echo 'INCLUDEDEF=callphys.def' >> run.def")250 call system("echo 'INCLUDEDEF=rcm1d.def' >> run.def")251 endif252 258 253 259 ! check if we are going to run with or without tracers
Note: See TracChangeset
for help on using the changeset viewer.