Changeset 3504 for trunk/LMDZ.PLUTO/libf/phypluto/ave_stelspec.F90
- Timestamp:
- Nov 8, 2024, 10:57:14 AM (13 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/ave_stelspec.F90
r3184 r3504 2 2 3 3 !================================================================== 4 ! 4 ! 5 5 ! Purpose 6 6 ! ------- 7 7 ! Average the chosen high resolution stellar spectrum over the 8 8 ! visible bands in the model. 9 ! 9 ! 10 10 ! Authors 11 ! ------- 11 ! ------- 12 12 ! Robin Wordsworth (2010). 13 13 ! Generalized to very late spectral types (and Brown dwarfs) Jeremy Leconte (2012) … … 16 16 ! --------- 17 17 ! setspv.F 18 ! 18 ! 19 19 ! Calls 20 20 ! ----- 21 21 ! none 22 ! 22 ! 23 23 !================================================================== 24 24 … … 28 28 use callkeys_mod, only: stelbbody,stelTbb,startype 29 29 use ioipsl_getin_p_mod, only: getin_p 30 use mod_phys_lmdz_para, only : is_master 30 31 31 32 implicit none 32 33 33 34 real*8 STELLAR(L_NSPECTV) 34 ! integer startype 35 ! integer startype 35 36 36 37 integer Nfine … … 48 49 real lam_temp 49 50 double precision stel_temp 50 51 51 52 integer :: ios ! file opening/reading status 52 53 53 54 STELLAR(:)=0.0 54 55 55 print*,'enter ave_stellspec'56 if (is_master) print*,'enter ave_stellspec' 56 57 if(stelbbody)then 57 58 tstellar=stelTbb … … 65 66 call blackl(dble(lam_temp*1e-6),dble(tstellar),stel_temp) 66 67 STELLAR(band)=STELLAR(band)+stel_temp*dl 67 enddo 68 enddo 68 69 end do 69 70 STELLAR(1:L_NSPECTV)=STELLAR(1:L_NSPECTV)/sum(STELLAR(1:L_NSPECTV)) … … 99 100 Case(6) 100 101 file_id='/stellar_spectra/BD_Teff-1600K.txt' 101 tstellar=1600. 102 tstellar=1600. 102 103 file_id_lam='/stellar_spectra/lamBD.txt' 103 104 Nfine=5000 104 105 Case(7) 105 106 file_id='/stellar_spectra/BD_Teff-1000K.txt' 106 tstellar=1000. 107 tstellar=1000. 107 108 file_id_lam='/stellar_spectra/lamBD.txt' 108 109 Nfine=5000 109 110 Case(8) 110 111 file_id='/stellar_spectra/Flux_K5_Teff4700_logg4.5_Met-0.5_BTsettle.dat' 111 tstellar=4700. 112 tstellar=4700. 112 113 file_id_lam='/stellar_spectra/lambda_K5_Teff4700_logg4.5_Met-0.5_BTsettle.dat' 113 114 Nfine=3986 114 115 Case(9) 115 116 file_id='/stellar_spectra/Flux_TRAPPIST1.dat' 116 tstellar=2550. 117 tstellar=2550. 117 118 file_id_lam='/stellar_spectra/lambda_TRAPPIST1.dat' 118 119 Nfine=5000 119 120 Case(10) 120 121 file_id='/stellar_spectra/Flux_Proxima.dat' 121 tstellar=3050. 122 tstellar=3050. 122 123 file_id_lam='/stellar_spectra/lambda_Proxima.dat' 123 124 Nfine=5000 … … 139 140 stop 140 141 end if 141 142 142 143 ! Opening file 143 144 file_path = trim(datadir)//'/stellar_spectra/'//stelspec_file 144 145 print*, 'stellar flux : ', file_path 145 146 OPEN(UNIT=110,FILE=file_path,STATUS='old',iostat=ios) 146 147 147 148 if (ios /= 0) THEN 148 149 write(*,*)'Error: cannot open stelspec_file file ', trim(stelspec_file) … … 219 220 !$OMP END MASTER 220 221 !$OMP BARRIER 221 222 222 223 ! sum data by band 223 224 band=1 … … 236 237 STELLAR(band)=STELLAR(band)+stel_f(ifine)*dl 237 238 end do 238 239 239 240 240 241 STELLAR(1:L_NSPECTV)=STELLAR(1:L_NSPECTV)/sum(STELLAR(1:L_NSPECTV)) 241 242 !$OMP BARRIER … … 244 245 if (allocated(stel_f)) deallocate(stel_f) 245 246 !$OMP END MASTER 246 !$OMP BARRIER 247 !$OMP BARRIER 247 248 endif 248 249
Note: See TracChangeset
for help on using the changeset viewer.