Changeset 4543 for LMDZ6/trunk


Ignore:
Timestamp:
May 19, 2023, 12:06:10 PM (19 months ago)
Author:
idelkadi
Message:

Configuration of the parameters for the SPARTACUS solver so that they can be modified in the namelist file:

  • addition of the module setup_config_from_lmdz.F90
  • modification of the interface with Ecrad (radiation_scheme.F90)
Location:
LMDZ6/trunk/libf/phylmd/ecrad
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/ecrad/radiation_scheme.F90

    r4489 r4543  
    8787     &  NWEIGHT_PAR, IBAND_PAR, WEIGHT_PAR, &
    8888     &  ITYPE_TROP_BG_AER,  TROP_BG_AER_MASS_EXT, &
    89      &  ITYPE_STRAT_BG_AER, STRAT_BG_AER_MASS_EXT
     89     &  ITYPE_STRAT_BG_AER, STRAT_BG_AER_MASS_EXT, ISolverSpartacus
    9090! Commentes : jour, date de la simulation
    9191!USE YOMRIP0  , ONLY : NINDAT
     
    105105
    106106USE mod_phys_lmdz_para
     107USE setup_config_from_lmdz,   ONLY : driver_config_type
    107108
    108109IMPLICIT NONE
     
    269270! Ratio of cloud overlap decorrelation length for cloud water
    270271! inhomogeneities to that for cloud boundaries (typically 0.5)
    271 REAL(KIND=JPRB)           :: ZDECORR_LEN_RATIO
     272!REAL(KIND=JPRB)           :: ZDECORR_LEN_RATIO = 0.5_jprb
     273
     274!AI mai 2023
     275! A mettre dans namelist
     276!real(jprb) :: high_inv_effective_size
     277!real(jprb) :: middle_inv_effective_size
     278!real(jprb) :: low_inv_effective_size
     279
     280!real(jprb) :: cloud_inhom_separation_factor
     281!real(jprb) :: cloud_separation_scale_surface
     282!real(jprb) :: cloud_separation_scale_toa
     283!real(jprb) :: cloud_separation_scale_power
    272284
    273285! The surface net longwave flux if the surface was a black body, used
     
    290302
    291303! AI ATTENTION
    292 real(jprb), parameter    :: frac_std = 0.75
     304! A mettre dans namelist
     305!real(jprb), parameter    :: frac_std = 0.75
    293306
    294307! Name of file names specified on command line
     
    301314!$OMP THREADPRIVATE(debut_ecrad)
    302315
     316type(driver_config_type) :: driver_config
    303317! Import time functions for iseed calculation
    304318! AI ATTENTION propre a ifs
     
    450464cloud%fraction(KIDIA:KFDIA,:) = PCLOUD_FRAC(KIDIA:KFDIA,:)
    451465
    452 !AI ATTENTION a voir avec JL
    453 ! Compute effective radii and convert to metres
    454 !CALL LIQUID_EFFECTIVE_RADIUS(KIDIA, KFDIA, KLON, KLEV, &
    455 !     &  PPRESSURE, PTEMPERATURE, PCLOUD_FRAC, PQ_LIQUID, PQ_RAIN, &
    456 !     &  PLAND_SEA_MASK, PCCN_LAND, PCCN_SEA, &
    457 !     &  ZRE_LIQUID_UM)
     466!!! ok AI ATTENTION a voir avec JL
     467! Compute effective radi and convert to metres
     468! AI. : on passe directement les champs de LMDZ
    458469cloud%re_liq(KIDIA:KFDIA,:) = ZRE_LIQUID_UM(KIDIA:KFDIA,:)
    459 
    460 !CALL ICE_EFFECTIVE_RADIUS(KIDIA, KFDIA, KLON, KLEV, &
    461 !     &  PPRESSURE, PTEMPERATURE, PCLOUD_FRAC, PQ_ICE, PQ_SNOW, PGEMU, &
    462 !     &  ZRE_ICE_UM)
    463470cloud%re_ice(KIDIA:KFDIA,:) = ZRE_ICE_UM(KIDIA:KFDIA,:)
    464471
     
    468475! decorrelation lengths for cloud water content inhomogeneities and
    469476! cloud boundaries, and set it in the "rad_config" object.
     477! IFS :
    470478!CALL CLOUD_OVERLAP_DECORR_LEN(KIDIA, KFDIA, KLON, PGEMU, YRERAD%NDECOLAT, &
    471479!     &    ZDECORR_LEN_KM, PDECORR_LEN_RATIO=ZDECORR_LEN_RATIO)
    472 
    473 ! AI ATTENTION (valeur lue dans namelist)
    474 !ZDECORR_LEN_RATIO = 0.5_JPRB
    475 !rad_config%cloud_inhom_decorr_scaling = ZDECORR_LEN_RATIO
     480! AI valeur dans namelist
     481! rad_config%cloud_inhom_decorr_scaling = ZDECORR_LEN_RATIO
     482
    476483!AI ATTENTION meme valeur que dans offline
    477 ZDECORR_LEN_KM = 2000.0_JPRB
     484! A mettre dans namelist
     485ZDECORR_LEN_KM = driver_config%overlap_decorr_length
    478486DO JLON = KIDIA,KFDIA
    479487  CALL cloud%set_overlap_param(thermodynamics, &
    480        &                       ZDECORR_LEN_KM(JLON), &
    481        &                       istartcol=JLON, iendcol=JLON)
     488       &                 ZDECORR_LEN_KM(JLON), &
     489       &                 istartcol=JLON, iendcol=JLON)
    482490ENDDO
    483491
     492! IFS :
    484493! Cloud water content fractional standard deviation is configurable
    485494! from namelist NAERAD but must be globally constant. Before it was
     
    487496!CALL cloud%create_fractional_std(KLON, KLEV, YRERAD%RCLOUD_FRAC_STD)
    488497! AI ATTENTION frac_std=0.75 meme valeur que dans la version offline
    489 CALL cloud%create_fractional_std(KLON, KLEV, frac_std)
    490 
     498CALL cloud%create_fractional_std(KLON, KLEV, driver_config%frac_std)
     499
     500if (rad_config%i_solver_sw == ISolverSPARTACUS &
     501      & .or.   rad_config%i_solver_lw == ISolverSPARTACUS) then
    491502! AI ! Read cloud properties needed by SPARTACUS
    492 ! By default mid and high cloud effective size is 10 km
    493 !CALL cloud%create_inv_cloud_effective_size(KLON,KLEV,1.0_JPRB/10000.0_JPRB)
    494 ! But for boundary clouds (eta > 0.8) we set it to 1 km
    495 !DO JLEV = 1,KLEV
    496 !  DO JLON = KIDIA,KFDIA
    497 !    IF (PPRESSURE(JLON,JLEV) > 0.8_JPRB * PPRESSURE_H(JLON,KLEV+1)) THEN
    498 !      cloud%inv_cloud_effective_size(JLON,JLEV) = 1.0e-3_JPRB
    499 !    ENDIF
    500 !  ENDDO
    501 !ENDDO
    502503!AI ATTENTION meme traitement dans le version offline
    503 call cloud%create_inv_cloud_effective_size_eta(KLON, KLEV, &
     504  if (driver_config%low_inv_effective_size >= 0.0_jprb &
     505     & .or. driver_config%middle_inv_effective_size >= 0.0_jprb &
     506     & .or. driver_config%high_inv_effective_size >= 0.0_jprb) then
     507     call cloud%create_inv_cloud_effective_size_eta(klon, klev, &
    504508               &  thermodynamics%pressure_hl, &
    505                &  0.005_JPRB, &
    506                &  0.0001_JPRB, &
    507                &  0.0001, 0.8_jprb, 0.45_jprb)     
     509               &  driver_config%low_inv_effective_size, &
     510               &  driver_config%middle_inv_effective_size, &
     511               &  driver_config%high_inv_effective_size, 0.8_jprb, 0.45_jprb)
     512  else if (driver_config%cloud_separation_scale_surface > 0.0_jprb &
     513         .and. driver_config%cloud_separation_scale_toa > 0.0_jprb) then
     514    call cloud%param_cloud_effective_separation_eta(klon, klev, &
     515               &  thermodynamics%pressure_hl, &
     516               &  driver_config%cloud_separation_scale_surface, &
     517               &  driver_config%cloud_separation_scale_toa, &
     518               &  driver_config%cloud_separation_scale_power, &
     519               &  driver_config%cloud_inhom_separation_factor)
     520  endif
     521endif 
    508522
    509523print*,'******** AEROSOLS (allocate + input) **************************************'
Note: See TracChangeset for help on using the changeset viewer.