Ignore:
Timestamp:
Apr 15, 2025, 11:56:45 AM (3 months ago)
Author:
aborella
Message:

Merge with trunk testing r5597. We have convergence in prod and debug in NPv7.0.1c

Location:
LMDZ6/branches/contrails
Files:
1 deleted
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/contrails

  • LMDZ6/branches/contrails/libf/phylmdiso/phyetat0_mod.F90

    r5536 r5618  
    549549     it = 0
    550550     DO iq = 1, nqtot
    551         IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     551        IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    552552        it = it+1
    553553        tname = tracers(iq)%name
  • LMDZ6/branches/contrails/libf/phylmdiso/phyredem.F90

    r5536 r5618  
    370370       it = 0
    371371       DO iq = 1, nqtot
    372           IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     372          IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    373373          it = it+1
    374374          CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it))
  • LMDZ6/branches/contrails/libf/phylmdiso/physiq_mod.F90

    r5536 r5618  
    3939    USE ioipsl_getin_p_mod, ONLY : getin_p
    4040    USE indice_sol_mod
    41     USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac,addPhase, ivap, iliq, isol
     41    USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac,addPhase, ivap, iliq, isol, ibs, icf, irvc
    4242    USE strings_mod,  ONLY: strIdx
    4343    USE iophy
     
    8383    USE lmdz_atke_turbulence_ini, ONLY : atke_ini
    8484    USE lmdz_thermcell_ini, ONLY : thermcell_ini, iflag_thermals_tenv
     85    USE calltherm_mod, ONLY : calltherm
    8586    USE lmdz_thermcell_dtke, ONLY : thermcell_dtke
    8687    USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs
     
    133134    USE lmdz_xios, ONLY: xios_set_current_context
    134135    use wxios_mod, ONLY: missing_val, using_xios
     136    USE lmdz_spla_ini, ONLY : spla_ini
    135137
    136138#ifndef CPP_XIOS
     
    290292       cldh, cldl,cldm, cldq, cldt,      &
    291293       JrNt,                             &
    292        dthmin, evap, snowerosion,fder, plcl, plfc,   &
     294       dthmin, evap, snowerosion, icesub_lic, fder, plcl, plfc,   &
    293295       prw, prlw, prsw, prbsw, water_budget,         &
    294296       s_lcl, s_pblh, s_pblt, s_therm,   &
     
    579581    !======================================================================
    580582    !
    581     ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional)
    582 !    INTEGER,SAVE :: ivap, iliq, isol, irneb, ibs
    583 !!$OMP THREADPRIVATE(ivap, iliq, isol, irneb, ibs)
    584 ! Camille Risi 25 juillet 2023: ivap,iliq,isol deja definis dans infotrac_phy.
    585 ! Et ils sont utiles ailleurs que dans physiq_mod (ex:
    586 ! reevap -> je commente les 2 lignes au dessus et je laisse la definition
    587 ! plutot dans infotrac_phy
    588     INTEGER,SAVE :: irneb, ibs, icf,irvc
    589 !$OMP THREADPRIVATE(irneb, ibs, icf,irvc)
    590 !
    591583    !
    592584    ! Variables argument:
     
    11211113
    11221114    REAL picefra(klon,klev)
    1123     REAL zrel_oro(klon)
     1115    REAL nm_oro(klon)
    11241116    !IM cf. AM 081204 END
    11251117    !
     
    14591451
    14601452    IF (first) THEN
    1461        ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g'))
    1462        iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
    1463        isol = strIdx(tracers(:)%name, addPhase('H2O', 's'))
    1464        ibs  = strIdx(tracers(:)%name, addPhase('H2O', 'b'))
    1465        icf  = strIdx(tracers(:)%name, addPhase('H2O', 'f'))
    1466        irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c'))
    14671453!       CALL init_etat0_limit_unstruct
    14681454       IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed)
     
    20312017IF (CPPKEY_DUST) THEN
    20322018       ! Quand on utilise SPLA, on force iflag_phytrac=1
     2019       CALL spla_ini(is_oce,RNAVO,RG,RD,RCPD,RLVTT,RLSTT,RETV,RTT,              &
     2020               R2ES,R3LES,R3IES,R4LES,R4IES,R5LES,R5IES,RVTMP2)
    20332021       CALL phytracr_spl_out_init()
    20342022       CALL phys_output_write_spl(itap, pdtphys, paprs, pphis,                  &
     
    33183306                                !albedo SB >>>
    33193307                                ! albsol1,   albsol2,   sens,    evap,      &
    3320             albsol_dir,   albsol_dif,   sens,    evap, snowerosion,
     3308            albsol_dir,   albsol_dif,   sens,    evap, snowerosion, icesub_lic,
    33213309                                !albedo SB <<<
    33223310            albsol3_lic,runoff,   snowhgt,   qsnow, to_ice, sissnow, &
     
    47484736          endif
    47494737
    4750           CALL calltherm(pdtphys &
     4738          CALL calltherm(itap, pdtphys &
    47514739               ,pplay,paprs,pphi,weak_inversion &
    47524740                        ! ,u_seri,v_seri,t_seri,q_seri,zqsat,debut & !jyg
     
    62836271    ! a l'echelle sous-maille:
    62846272    !
     6273   
     6274    ! calculation of nm_oro
     6275    DO i=1,klon
     6276          ! nm_oro is a proxy for the number of subgrid scale mountains
     6277          ! -> condition on nm_oro can deactivate the lifting on tilted planar terrains
     6278          !    such as ice sheets (work by V. Wiener)
     6279          ! in such a case, the SSO scheme should activate only where nm_oro>0 i.e. by setting
     6280          ! nm_oro_t=0.
     6281          nm_oro(i)=zsig(i)*sqrt(cell_area(i)*(pctsrf(i,is_ter)+pctsrf(i,is_lic)))/(4.*MAX(zstd(i),1.e-8))-1.
     6282    END DO
     6283
    62856284    IF (prt_level .GE.10) THEN
    62866285       print *,' call orography ? ', ok_orodr
    62876286    ENDIF
    6288     !
     6287
    62896288    IF (ok_orodr) THEN
    62906289       !
     
    62936292       DO i=1,klon
    62946293          itest(i)=0
    6295           zrel_oro(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i)))
    6296           !zrel_oro: relative mountain height wrt relief explained by mean slope
    6297           ! -> condition on zrel_oro can deactivate the drag on tilted planar terrains
    6298           !    such as ice sheets (work by V. Wiener)
    62996294          ! zpmm_orodr_t and zstd_orodr_t are activation thresholds set by F. Lott to
    63006295          ! earn computation time but they are not physical.
    6301           IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(zrel_oro(i).LE.zrel_oro_t)) THEN
     6296          IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN
    63026297             itest(i)=1
    63036298             igwd=igwd+1
     
    63526347       DO i=1,klon
    63536348          itest(i)=0
    6354           !zrel_oro: relative mountain height wrt relief explained by mean slope
    6355           ! -> condition on zrel_oro can deactivate the lifting on tilted planar terrains
    6356           !    such as ice sheets (work by V. Wiener)
    6357           zrel_oro(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i)))
    6358           IF (((zpic(i)-zmea(i)).GT.zpmm_orolf_t).AND.(zrel_oro(i).LE.zrel_oro_t)) THEN
     6349          IF (((zpic(i)-zmea(i)).GT.zpmm_orolf_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN
    63596350             itest(i)=1
    63606351             igwd=igwd+1
     
    66306621! car on peut s'attendre a ce que les petites echelles produisent aussi de la TKE
    66316622! Mais attention, cela ne va pas dans le sens de la conservation de l'energie!
    6632           IF ((zstd(i).GT.1.0) .AND.(zrel_oro(i).LE.zrel_oro_t)) THEN
     6623          IF ((zstd(i).GT.1.0) .AND.(nm_oro(i).GT.nm_oro_t)) THEN
    66336624             itest(i)=1
    66346625             igwd=igwd+1
     
    66426633       DO i=1,klon
    66436634          itest(i)=0
    6644         IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(zrel_oro(i).LE.zrel_oro_t)) THEN
     6635        IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN
    66456636             itest(i)=1
    66466637             igwd=igwd+1
Note: See TracChangeset for help on using the changeset viewer.