Ignore:
Timestamp:
Apr 5, 2016, 10:51:51 AM (9 years ago)
Author:
emillour
Message:

Generic GCM: Towards a cleaner separation between physics and dynamics

  • Got rid of references to "dimensions.h" from physics packages: use nbp_lon (=iim), nbp_lat (=jjp1) and nbp_lev from module mod_grid_phy_lmdz (in phy_common) instead.
  • Removed module "comhdiff_mod.F90", as it is only used by module surf_heat_transp_mod.F90, moved module variables there.
  • Addedin "surf_heat_transp_mod" local versions of some arrays and routines (from dyn3d) required to compute gradient, divergence, etc. on the global dynamics grid. As before, the slab ocean only works in serial.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90

    r1521 r1529  
    88!     water cloud optical properties
    99
    10       use callkeys_mod, only: radfixed,Nmix_co2,                        &
    11                 pres_bottom_tropo,pres_top_tropo,size_tropo,    &
    12                 pres_bottom_strato,size_strato
     10      use callkeys_mod, only: radfixed,Nmix_co2,                    &
     11                pres_bottom_tropo,pres_top_tropo,size_tropo,        &
     12                pres_bottom_strato,size_strato
    1313     
    1414      real, save ::  rad_h2o
     
    2121
    2222
    23       contains
     23contains
    2424
    2525
     
    3838      use ioipsl_getin_p_mod, only: getin_p
    3939      use radinc_h, only: naerkind
    40       use aerosol_mod
    41 !      USE tracer_h
    42       Implicit none
    43 
    44 !      include "dimensions.h"
    45 !      include "dimphys.h"
     40      use aerosol_mod, only: iaero_back2lay, iaero_co2, iaero_dust, &
     41                             iaero_h2o, iaero_h2so4
     42      Implicit none
    4643
    4744      integer,intent(in) :: ngrid
     
    8178               nueffrad(1:ngrid,1:nlayer,iaer) = 0.1
    8279            endif
    83            
    84             if(iaer.eq.iaero_back2lay)then ! Two-layer aerosols
     80           
     81            if(iaer.eq.iaero_back2lay)then ! Two-layer aerosols
    8582               reffrad(1:ngrid,1:nlayer,iaer) = 2.e-6
    8683               nueffrad(1:ngrid,1:nlayer,iaer) = 0.1
     
    10198         if (radfixed) then
    10299
    103             write(*,*)"radius of H2O water particles:"
     100            write(*,*)"radius of H2O water particles:"
    104101            rad_h2o=13. ! default value
    105102            call getin_p("rad_h2o",rad_h2o)
    106103            write(*,*)" rad_h2o = ",rad_h2o
    107104
    108             write(*,*)"radius of H2O ice particles:"
     105            write(*,*)"radius of H2O ice particles:"
    109106            rad_h2o_ice=35. ! default value
    110107            call getin_p("rad_h2o_ice",rad_h2o_ice)
    111108            write(*,*)" rad_h2o_ice = ",rad_h2o_ice
    112109
    113         else
     110        else
    114111
    115112            write(*,*)"Number mixing ratio of H2O water particles:"
     
    122119            call getin_p("Nmix_h2o_ice",Nmix_h2o_ice)
    123120            write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice
    124         endif
     121        endif
    125122
    126123      print*,'exit su_aer_radii'
     
    173170               zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds)
    174171               zfice = MIN(MAX(zfice,0.0),1.0)
    175                zrad_liq  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o*pi*rhowater) )
    176                zrad_ice  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o_ice*pi*rhowaterice) )
     172               zrad_liq  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o*pi*rhowater) )
     173               zrad_ice  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o_ice*pi*rhowaterice) )
    177174               nueffrad(ig,l) = coef_chaud * (1.-zfice) + coef_froid * zfice
    178175               zrad = zrad_liq * (1.-zfice) + zrad_ice * zfice
    179176
    180                reffrad(ig,l) = min(max(zrad,1.e-6),1000.e-6)
     177               reffrad(ig,l) = min(max(zrad,1.e-6),1000.e-6)
    181178               enddo
    182179            enddo     
     
    213210
    214211      if (radfixed) then
    215         reffliq(1:ngrid,1:nlayer)= rad_h2o
    216         reffice(1:ngrid,1:nlayer)= rad_h2o_ice
     212        reffliq(1:ngrid,1:nlayer)= rad_h2o
     213        reffice(1:ngrid,1:nlayer)= rad_h2o_ice
    217214      else
    218         do k=1,nlayer
    219            do i=1,ngrid
    220              reffliq(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o*pi*rhowater))
    221              reffliq(i,k) = min(max(reffliq(i,k),1.e-6),1000.e-6)
    222            
    223              reffice(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o_ice*pi*rhowaterice))
    224              reffice(i,k) = min(max(reffice(i,k),1.e-6),1000.e-6)
    225            enddo
    226         enddo
     215        do k=1,nlayer
     216           do i=1,ngrid
     217             reffliq(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o*pi*rhowater))
     218             reffliq(i,k) = min(max(reffliq(i,k),1.e-6),1000.e-6)
     219           
     220             reffice(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o_ice*pi*rhowaterice))
     221             reffice(i,k) = min(max(reffice(i,k),1.e-6),1000.e-6)
     222           enddo
     223        enddo
    227224      endif
    228225
Note: See TracChangeset for help on using the changeset viewer.