- Timestamp:
- Feb 24, 2026, 9:59:11 AM (9 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phygeneric/rad_correlatedk_init_stellar.F90
r4077 r4081 34 34 use callkeys_mod, only: Fat1AU 35 35 use rad_correlatedk_stellar_spectrum_mod, only: rad_correlatedk_stellar_spectrum 36 use mod_phys_lmdz_para, only : is_master, bcast 36 37 37 38 implicit none … … 74 75 endif 75 76 76 !$OMP MASTER77 nb=078 ierr=079 ! check that the file contains the right number of bands80 open(131,file=file_path,form='formatted')81 read(131,*,iostat=ierr) file_entries82 do while (ierr==0)77 if (is_master) then ! only the master needs to read in BWNV(:) from file 78 nb=0 79 ierr=0 80 ! check that the file contains the right number of bands 81 open(131,file=file_path,form='formatted') 82 read(131,*,iostat=ierr) file_entries 83 do while (ierr==0) 83 84 read(131,*,iostat=ierr) dummy 84 85 if (ierr==0) nb=nb+1 85 enddo86 close(131)86 enddo 87 close(131) 87 88 88 write(*,*) 'rad_correlatedk_init_stellar: L_NSPECTV = ',L_NSPECTV, 'in the model '89 write(*,*) ' there are ',nb, 'entries in ',TRIM(file_path)90 if(nb.ne.L_NSPECTV) then89 write(*,*) 'rad_correlatedk_init_stellar: L_NSPECTV = ',L_NSPECTV, 'in the model ' 90 write(*,*) ' there are ',nb, 'entries in ',TRIM(file_path) 91 if(nb.ne.L_NSPECTV) then 91 92 write(*,*) 'MISMATCH !! I stop here' 92 93 call abort_physic("rad_correlatedk_init_stellar","The number of entries in narrowbands_VI.in does not match with L_NSPECTV",1) 93 endif94 endif 94 95 95 ! load and display the data96 open(111,file=file_path,form='formatted')97 read(111,*)98 do M=1,L_NSPECTV-196 ! load and display the data 97 open(111,file=file_path,form='formatted') 98 read(111,*) 99 do M=1,L_NSPECTV-1 99 100 read(111,*) BWNV(M) 100 end do 101 read(111,*) lastband 102 close(111) 103 BWNV(L_NSPECTV) =lastband(1) 104 BWNV(L_NSPECTV+1)=lastband(2) 105 !$OMP END MASTER 106 !$OMP BARRIER 101 end do 102 read(111,*) lastband 103 close(111) 104 BWNV(L_NSPECTV) =lastband(1) 105 BWNV(L_NSPECTV+1)=lastband(2) 107 106 108 print*,'rad_correlatedk_init_stellar: VI band limits:'109 do M=1,L_NSPECTV+1107 print*,'rad_correlatedk_init_stellar: VI band limits:' 108 do M=1,L_NSPECTV+1 110 109 print*,m,'-->',BWNV(M),' cm^-1' 111 end do 112 print*,' ' 110 end do 111 print*,' ' 112 endif ! of if (is_master) 113 114 ! Broadcast BWNV to all cores 115 call bcast(BWNV) 113 116 114 117 ! Set up mean wavenumbers and wavenumber deltas. Units of
Note: See TracChangeset
for help on using the changeset viewer.
