Changeset 3632
- Timestamp:
- Feb 19, 2025, 2:26:32 PM (5 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90
r3572 r3632 29 29 use tracer_h 30 30 use comcstfi_mod, only: r, pi 31 use mod_phys_lmdz_para, only : is_master 31 32 32 33 !----------------------------------------------------------------------- … … 46 47 integer :: iaer,l,ig,ifine 47 48 48 LOGICAL firstcall 49 SAVE firstcall 50 DATA firstcall/.true./ 49 LOGICAL,SAVE :: firstcall=.true. 50 !$OMP THREADPRIVATE(firstcall) 51 51 52 52 !!read altitudes and haze mmrs … … 56 56 character(len=100) :: file_path 57 57 character(len=100) :: file_name 58 real,save :: levdat(Nfine),densdat(Nfine) 58 ! real,save :: levdat(Nfine),densdat(Nfine) 59 real,save,allocatable :: levdat(:) 60 real,save,allocatable :: densdat(:) 59 61 60 62 !---------------- INPUT ------------------------------------------------ … … 74 76 endif 75 77 76 file_path=trim(datadir)//'/haze_prop/'//file_name 77 open(224,file=file_path,form='formatted') 78 do ifine=1,Nfine 79 read(224,*) levdat(ifine), densdat(ifine) 80 enddo 81 close(224) 82 print*, 'Read Haze profile: ',file_path 78 if (is_master) then 79 if(.not.allocated(levdat)) then 80 allocate(levdat(Nfine)) 81 endif 82 if(.not.allocated(densdat)) then 83 allocate(densdat(Nfine)) 84 endif 85 86 87 file_path=trim(datadir)//'/haze_prop/'//file_name 88 open(224,file=file_path,form='formatted') 89 do ifine=1,Nfine 90 read(224,*) levdat(ifine), densdat(ifine) 91 enddo 92 close(224) 93 print*, 'Read Haze profile: ',file_path 94 endif 95 !$OMP BARRIER 83 96 ENDIF 84 97 -
trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90
r3613 r3632 2 2 use datafile_mod 3 3 use comcstfi_mod, only: pi 4 use mod_phys_lmdz_para, only : is_master , bcast4 use mod_phys_lmdz_para, only : is_master 5 5 6 6 implicit none … … 43 43 integer ifine 44 44 character(len=100) :: file_path 45 real,save :: lsdat(Nfine),fluxdat(Nfine) 46 !$OMP THREADPRIVATE(lsdat,fluxdat) 45 ! real,save :: lsdat(Nfine),fluxdat(Nfine) 46 real,save,allocatable :: lsdat(:) 47 real,save,allocatable :: fluxdat(:) 47 48 48 49 … … 50 51 51 52 IF (firstcall) then 52 firstcall=.false. 53 file_path=trim(datadir)//'/sol_uv_flux.txt' 54 if (is_master) print*,file_path 55 open(222,file=file_path,form='formatted') 53 firstcall=.false. 56 54 57 if (is_master) then 58 do ifine=1,Nfine 59 read(222,*) lsdat(ifine), fluxdat(ifine) 60 enddo 61 close(222) 62 endif ! is_master 55 !$OMP MASTER 56 file_path=trim(datadir)//'/sol_uv_flux.txt' 57 if (is_master) print*,file_path 63 58 64 call bcast(lsdat) 65 call bcast(fluxdat) 59 open(222,file=file_path,form='formatted') 60 61 if(.not.allocated(lsdat)) then 62 allocate(lsdat(Nfine)) 63 endif 64 if(.not.allocated(fluxdat)) then 65 allocate(fluxdat(Nfine)) 66 endif 67 68 do ifine=1,Nfine 69 read(222,*) lsdat(ifine), fluxdat(ifine) 70 enddo 71 close(222) 72 73 !$OMP END MASTER 74 !$OMP BARRIER 66 75 ENDIF 67 68 76 69 77 CALL interp_line(lsdat,fluxdat,Nfine,pls*180./pi,pflux,1) -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3627 r3632 116 116 ! II.2.b Option 2 : Atmosphere has no radiative effect. 117 117 ! 118 ! III. Vertical diffusion (turbulent mixing) 118 ! III. Vertical diffusion (turbulent mixing) 119 119 ! 120 120 ! IV. Convection : … … 476 476 477 477 ! local variables for skin depth check 478 real :: therm_inertia(ngrid,nsoilmx) 478 real :: therm_inertia(ngrid,nsoilmx) 479 ! real :: tidat_out(ngrid,nsoilmx) 479 480 real :: inertia_min,inertia_max 480 481 real :: diurnal_skin ! diurnal skin depth (m) … … 1301 1302 qsurf(:,igcm_ch4_ice),dqsurf(:,igcm_ch4_ice), & 1302 1303 ptimestep,pplev,zdqch4fast,zdqsch4fast,'CH4',' vdifc ') 1303 else 1304 else 1304 1305 call testconserv(ngrid,nlayer,nq,pq,pdq,qsurf,dqsurf, & 1305 1306 igcm_ch4_gas,igcm_ch4_ice, & … … 1404 1405 qsurf(:,igcm_ch4_ice),dqsurf(:,igcm_ch4_ice), & 1405 1406 ptimestep,pplev,zdqch4fast,zdqsch4fast,'CH4',' n2cond') 1406 else 1407 else 1407 1408 call testconserv(ngrid,nlayer,nq,pq,pdq,qsurf,dqsurf, & 1408 1409 igcm_ch4_gas,igcm_ch4_ice, & … … 1504 1505 1505 1506 pdqmufi(:,:,:) = 0. 1506 1507 1507 1508 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,pq,pdq,pdqmufi_prod,pdqmufi) 1508 1509 1509 1510 pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:) 1510 1511 1511 1512 ELSE 1512 1513 IF (haze) THEN … … 1690 1691 1691 1692 ! ! For output : 1692 !tidat_out(:,:)=0.1693 ! DO l=1,min(nlayermx,nsoilmx)1694 ! tidat_out(:,l)=inertiedat(:,l)1695 !ENDDO1693 ! tidat_out(:,:)=0. 1694 ! DO l=1,nsoilmx 1695 ! tidat_out(:,l)=therm_inertia(:,l) 1696 ! ENDDO 1696 1697 1697 1698 ! Test energy conservation … … 2142 2143 call write_output("capcal","capcal","W.s m-2 K-1",capcal) 2143 2144 call write_output("tsoil","tsoil","K",tsoil) 2144 endif 2145 call write_output("therm_inertia","therm_inertia","S.I.",therm_inertia) 2146 endif 2145 2147 2146 2148 ! Total energy balance diagnostics … … 2347 2349 call write_output("rcs","Spherical mode characteristic radius","m",mp2m_rc_sph(:,:)) 2348 2350 call write_output("rcf","Fractal mode characteristic radius","m",mp2m_rc_fra(:,:)) 2349 2351 2350 2352 if (optichaze) then 2351 2353 call write_output("tau_col",&
Note: See TracChangeset
for help on using the changeset viewer.