Changeset 2830 for trunk/LMDZ.MARS/util/aeropt_mod.F90
- Timestamp:
- Nov 23, 2022, 4:09:32 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/aeropt_mod.F90
r2817 r2830 12 12 real,dimension(:,:),save,allocatable :: Qext ! Extinction efficiency coefficient [/] 13 13 real,dimension(:,:),save,allocatable :: omeg ! Single scattering albedo [/] 14 15 integer,save :: aeroptlogfileID = 100 ! Log file's unit ID 14 16 15 17 CONTAINS … … 46 48 integer :: read_ok ! to know if the line is well read 47 49 integer :: iwvl,isize ! Wavelength and Particle size loop indices 50 51 !============================================================================== 52 ! aeropt_mod module variables used here: 53 !============================================================================== 54 ! nwvl,nsize,wvl,radiusdyn,Qext,omeg 48 55 49 56 !========================================================================== … … 228 235 real,dimension(2) :: reffQext ! Qext after reff interpolation 229 236 real,dimension(2) :: reffomeg ! omeg after reff interpolation 237 238 !============================================================================== 239 ! aeropt_mod module variables used here: 240 !============================================================================== 241 ! nwvl,nsize,wvl,radiusdyn,Qext,omeg,aeroptlogfileID 230 242 231 243 !========================================================================== … … 262 274 ENDDO 263 275 264 if ((radiusdyn(nsize).lt.reff_val).or.(radiusdyn(1).gt.reff_val)) then 265 write(*,*) "WARNING: the effective radius (",reff_val,"m) is out of the bounds" 266 write(*,*) "of the optical properties' tables" 267 write(*,*) "(reff_inf=",radiusdyn(1),"m ; reff_sup=",radiusdyn(nsize),"m)" 268 write(*,*) "A missing value will be written for opacity." 269 270 ! NB: this should especially handle cases when reff=0 276 if (reff_val.eq.missval) then 277 ! if the effective radius is a missing value, 278 ! put a missing value for the optical properties 279 Qext_val = missval 280 omeg_val = missval 281 ! write(*,*) "reff missing value detected" 282 283 else if ((radiusdyn(nsize).lt.reff_val).or.(radiusdyn(1).gt.reff_val)) then 284 write(aeroptlogfileID,*) "WARNING: the effective radius (",reff_val,"m) is out of the bounds" 285 write(aeroptlogfileID,*) "of the optical properties' tables" 286 write(aeroptlogfileID,*) "(reff_inf=",radiusdyn(1),"m ; reff_sup=",radiusdyn(nsize),"m)" 287 write(aeroptlogfileID,*) "A missing value will be written for optical properties." 288 271 289 Qext_val = missval 272 290 omeg_val = missval … … 333 351 334 352 implicit none 353 354 !============================================================================== 355 ! aeropt_mod module variables used here: 356 !============================================================================== 357 ! wvl,radiusdyn,Qext,omeg 335 358 336 359 if (allocated(wvl)) deallocate(wvl) … … 342 365 343 366 !******************************************************************************* 367 SUBROUTINE create_logfile(filename) 368 !============================================================================== 369 ! Purpose: 370 ! Deallocate module variables 371 !============================================================================== 372 373 implicit none 374 375 !============================================================================== 376 ! Arguments: 377 !============================================================================== 378 character(len=128),intent(in) :: filename ! name of the aeropt log file 379 !============================================================================== 380 ! aeropt_mod module variables used here: 381 !============================================================================== 382 ! aeroptlogfileID 383 384 ! Create output file 385 write(*,*) "Creating aeropt log file: ",trim(filename) 386 write(*,*) "It will overwrite any existing file with the same name." 387 OPEN(UNIT=aeroptlogfileID,FILE=trim(filename),FORM='formatted',STATUS='replace') 388 ! NB: STATUS='replace' will overwrite any existing file with the same name 389 390 END SUBROUTINE create_logfile 391 392 !******************************************************************************* 344 393 345 394 END MODULE aeropt_mod
Note: See TracChangeset
for help on using the changeset viewer.