Ignore:
Timestamp:
Mar 28, 2025, 5:52:58 PM (3 months ago)
Author:
mmaurice
Message:

Generic PCM

Change default reactfile from chemnetwork/reactfile to network.def.
You can still specify it callphys.def using the flag reactfile.

MM

Location:
trunk/LMDZ.GENERIC/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/aeronostd/photochemistry_asis.F90

    r3312 r3701  
    783783use tracer_h, only: nesp
    784784use chimiedata_h
    785 use callkeys_mod, only: jonline
     785use callkeys_mod, only: jonline, reactfile
    786786
    787787implicit none
     
    797797integer :: iq, ireact
    798798
    799 character(len = 128)              :: reactfile       ! reactions table file name
    800799integer                           :: nbq             ! number of species in reactions file
    801800integer                           :: nlines          ! number of lines in reactions file
     
    828827qnreact        = 0
    829828
    830 write(*,*) "Read reaction file"
    831 reactfile = "reactfile" ! default
    832 call getin_p("reactfile",reactfile) ! default path
    833 write(*,*) " reactfile = ",trim(reactfile)
    834 
    835 call count_react(reactfile,nlines,nreact,nb_phot,nb_reaction_4,nb_reaction_3,nb_hv,nb_pfunc1,nb_pfunc2,nb_pfunc3)
     829call count_react(nlines,nreact,nb_phot,nb_reaction_4,nb_reaction_3,nb_hv,nb_pfunc1,nb_pfunc2,nb_pfunc3)
    836830
    837831!!!!!!!!!!! Hard coding reaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    885879jparamline(:)   = ''
    886880
    887 call get_react(reactfile,nlines,nreact,specheck,specheckr,specheckp,nbq,nb_phot,nb_reaction_4,nb_reaction_3)
     881call get_react(nlines,nreact,specheck,specheckr,specheckp,nbq,nb_phot,nb_reaction_4,nb_reaction_3)
    888882
    889883! rewrite jlabel corretly for output
     
    11611155!*****************************************************************
    11621156
    1163     subroutine count_react(reactfile,nlines,nreact,nb_phot,nb_reaction_4,nb_reaction_3,nb_hv,nb_pfunc1,nb_pfunc2,nb_pfunc3)
     1157    subroutine count_react(nlines,nreact,nb_phot,nb_reaction_4,nb_reaction_3,nb_hv,nb_pfunc1,nb_pfunc2,nb_pfunc3)
    11641158
    11651159!*****************************************************************
     
    11681162
    11691163        implicit none
    1170         character(*), intent(in)     :: reactfile     ! name of the file to read
    11711164        integer,      intent(inout)  :: nlines        ! number of lines in the file
    11721165        integer,      intent(out)    :: nreact        ! real number of reaction
     
    11931186
    11941187        open(402, form = 'formatted', status = 'old',                &
    1195               file ='chemnetwork/'//trim(reactfile),iostat=ierr)
     1188              file =trim(reactfile),iostat=ierr)
    11961189
    11971190        if (ierr /= 0) THEN
    1198            write(*,*)'Error : cannot open chemical reaction file : chemnetwork/'//trim(reactfile)
    1199            write(*,*)'It should be in your simulation directory in chemnetwork directory'
    1200            write(*,*)'   You can change the input chemical reactions file name in'
    1201            write(*,*)'   callphys.def with:'
    1202            write(*,*)'   monoreact=filename or bimolreact=filename or quadrareact=filename'
    1203            write(*,*)'   depending on what chemical reaction type it is'
     1191           write(*,*)'Error : cannot open chemical reaction file : '//trim(reactfile)
     1192           write(*,*)'28/03/2025: New default value is network.def (in simulation folder)'
     1193           write(*,*)'Former default is chemnetwork/reactfile'
    12041194           call abort
    12051195        end if
     
    12571247            else
    12581248              print*, 'Error in indice: wrong index coefficient rate line ',nlines
    1259               print*, 'in file : chemnetwork/'//trim(reactfile)
     1249              print*, 'in file : '//trim(reactfile)
    12601250              print*, 'It should be 0 for photolysis reations and 1 or 2 for the others'
    12611251              print*, 'And not : ', typerate
     
    12731263!*****************************************************************
    12741264
    1275     subroutine get_react(reactfile,nlines,nreact,specheck,specheckr,specheckp, &
     1265    subroutine get_react(nlines,nreact,specheck,specheckr,specheckp, &
    12761266                         nbq,nb_phot,nb_reaction_4,nb_reaction_3)
    12771267
     
    12841274
    12851275        implicit none
    1286         character(*), intent(in)     :: reactfile          ! name of the file to read
    12871276        integer,      intent(in)     :: nlines             ! number of lines in the file
    12881277        integer,      intent(in)     :: nreact             ! real number of reaction in the file
     
    13191308
    13201309        open(402, form = 'formatted', status = 'old',                &
    1321               file ='chemnetwork/'//trim(reactfile),iostat=ierr)
     1310              file =trim(reactfile),iostat=ierr)
    13221311
    13231312        if (ierr /= 0) THEN
    1324            write(*,*)'Error : cannot open chemical reaction file : chemnetwork/'//trim(reactfile)
    1325            write(*,*)'It should be in your simulation directory in chemnetwork directory'
    1326            write(*,*)'   You can change the input chemical reactions file name in'
    1327            write(*,*)'   callphys.def with:'
    1328            write(*,*)'   monoreact=filename or bimolreact=filename or quadrareact=filename'
    1329            write(*,*)'   depending on what chemical reaction type it is'
     1313           write(*,*)'Error : cannot open chemical reaction file : '//trim(reactfile)
     1314           write(*,*)'28/03/2025: New default value is network.def (in simulation folder)'
     1315           write(*,*)'Former default is chemnetwork/reactfile'
    13301316           call abort
    13311317        end if
  • trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90

    r3662 r3701  
    9090      logical,save :: haze
    9191      logical,save :: output_writediagspecUV
     92      character(len = 128),save :: reactfile
    9293!$OMP THREADPRIVATE(photochem,photoheat,jonline,depos,output_writediagspecUV)
    9394      logical,save :: calllott_nonoro
  • trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90

    r3663 r3701  
    570570     if (is_master) write(*,*)trim(rname)//": output_writediagspecUV = ",output_writediagspecUV
    571571
     572     if (is_master) write(*,*)trim(rname)//": Chemical network file ?"
     573     reactfile = 'network.def' ! default value
     574     call getin_p("reactfile",reactfile)
     575     if (is_master) write(*,*)trim(rname)//": chemical network file = ",trim(reactfile)
     576
    572577! Global1D mean and solar zenith angle
    573578
Note: See TracChangeset for help on using the changeset viewer.