Changeset 3650 for trunk


Ignore:
Timestamp:
Feb 26, 2025, 10:41:29 AM (4 months ago)
Author:
afalco
Message:

Pluto: fix bug in aerosol_mod in parallel. Setting deprecated aerohaze=true gives an error.
AF

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90

    r3632 r3650  
    7575            STOP "No filename given for haze profile. Either set hazemmr_file or hazedens_file"
    7676        endif
    77 
    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
     77!$OMP MASTER
     78        if(.not.allocated(levdat)) then
     79            allocate(levdat(Nfine))
     80        endif
     81        if(.not.allocated(densdat)) then
     82            allocate(densdat(Nfine))
     83        endif
    8584
    8685
    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
     86        file_path=trim(datadir)//'/haze_prop/'//file_name
     87        open(224,file=file_path,form='formatted')
     88        do ifine=1,Nfine
     89        read(224,*) levdat(ifine), densdat(ifine)
     90        enddo
     91        close(224)
     92        print*, 'Read Haze profile: ',file_path
     93!$OMP END MASTER
    9594!$OMP BARRIER
    9695      ENDIF
  • TabularUnified trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90

    r3627 r3650  
    8383  REAL SSUM
    8484
     85  ! deprecated parameter
     86  logical aerohaze
     87
    8588  ! Initialize flags lunout, prt_level, debug (in print_control_mod)
    8689  CALL init_print_control
     
    679682     call getin_p("callmufi",callmufi)
    680683     if (is_master) write(*,*)" callmufi = ",callmufi
    681      
     684
    682685     ! sanity check
    683686     if (callmufi.and.(.not.tracer)) then
     
    686689       stop
    687690     endif
    688  
     691
    689692     if (is_master) write(*,*) "Path to microphysical config file?"
    690693     config_mufi='datagcm/microphysics/config.cfg' ! default value
     
    701704     call getin_p("aerfprop_file",aerfprop_file)
    702705     if (is_master) write(*,*) trim(rname)//" aerfprop_file = ",trim(aerfprop_file)
    703  
     706
    704707     if (is_master) write(*,*) "Use haze production from CH4 photolysis or production rate?"
    705708     call_haze_prod_pCH4=.false. ! default value
    706709     call getin_p("call_haze_prod_pCH4",call_haze_prod_pCH4)
    707710     if (is_master) write(*,*)" call_haze_prod_pCH4 = ",call_haze_prod_pCH4
    708  
     711
    709712     if (is_master) write(*,*) "Pressure level of aerosols production (Pa)?"
    710713     haze_p_prod=1.0e-2 ! default value
    711714     call getin_p("haze_p_prod",haze_p_prod)
    712715     if (is_master) write(*,*)" haze_p_prod = ",haze_p_prod
    713      
     716
    714717     if (is_master) write(*,*) "Aerosol production rate (kg.m-2.s-1)?"
    715718     haze_tx_prod=9.8e-14 ! default value
    716719     call getin_p("haze_tx_prod",haze_tx_prod)
    717720     if (is_master) write(*,*)" haze_tx_prod = ",haze_tx_prod
    718  
     721
    719722     if (is_master) write(*,*) "Equivalent radius production (m)?"
    720723     haze_rc_prod=1.0e-9 ! default value
    721724     call getin_p("haze_rc_prod",haze_rc_prod)
    722725     if (is_master) write(*,*)" haze_rc_prod = ",haze_rc_prod
    723  
     726
    724727     if (is_master) write(*,*) "Monomer radius (m)?"
    725728     haze_rm=1.0e-8 ! default value
    726729     call getin_p("haze_rm",haze_rm)
    727730     if (is_master) write(*,*)" haze_rm = ",haze_rm
    728  
     731
    729732     if (is_master) write(*,*) "Aerosol's fractal dimension?"
    730733     haze_df=2.0 ! default value
    731734     call getin_p("haze_df",haze_df)
    732735     if (is_master) write(*,*)" haze_df = ",haze_df
    733  
     736
    734737     if (is_master) write(*,*) "Aerosol density (kg.m-3)?"
    735738     haze_rho=800.0 ! default value
    736739     call getin_p("haze_rho",haze_rho)
    737740     if (is_master) write(*,*)" haze_rho = ",haze_rho
    738  
     741
    739742     if (is_master) write(*,*) "Radius of air molecule (m)?"
    740743     air_rad=1.75e-10 ! default value
    741744     call getin_p("air_rad",air_rad)
    742745     if (is_master) write(*,*)" air_rad = ",air_rad
    743      
     746
    744747     ! Pluto haze model
    745748     ! ~~~~~~~~~~~~~~~~
     
    794797     if (is_master)write(*,*)trim(rname)//&
    795798     "optichaze = ",optichaze
     799
     800     aerohaze=.false. ! default value
     801     call getin_p("aerohaze",aerohaze)
     802     if (aerohaze) then
     803      if (is_master) write(*,*)trim(rname)//": aerohaze is deprecated.",&
     804      "it is now called optichaze=.true."
     805      call abort_physic(rname,"aerohaze is deprecated. It is now called optichaze",1)
     806     endif
    796807
    797808     if (is_master)write(*,*)trim(rname)//&
  • TabularUnified trunk/LMDZ.PLUTO/libf/phypluto/interp_line.F

    r3184 r3650  
    99!  extrapolation, y2() is set to the value y1() corresponding to
    1010!  the nearby x1(:) point
    11 ! 
     11!
    1212c-----------------------------------------------------------------------
    1313!  arguments
     
    2525! local variables:
    2626      integer i,j
    27      
     27
    2828
    2929      do i=1,len2
Note: See TracChangeset for help on using the changeset viewer.