Ignore:
Timestamp:
Oct 19, 2023, 4:02:57 PM (13 months ago)
Author:
idelkadi
Message:

Merged trunk changes -r4488:4726 LMDZ_ECRad branch

Location:
LMDZ6/branches/LMDZ_ECRad
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ_ECRad

  • LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phyetat0_mod.F90

    r4482 r4727  
    2020       qsol, fevap, z0m, z0h, agesno, &
    2121       du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
    22        falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, &
    23        ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, rneb_ancien, radpas, radsol, rain_fall, ratqs, &
    24        rnebcon, rugoro, sig1, snow_fall, solaire_etat0, sollw, sollwdown, &
     22       falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, &
     23       ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, rneb_ancien, radpas, radsol, rain_fall, ratqs, &
     24       rnebcon, rugoro, sig1, snow_fall, bs_fall, solaire_etat0, sollw, sollwdown, &
    2525       solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, &
    2626       wake_deltat, wake_delta_pbl_TKE, delta_tsurf, beta_aridity, wake_fip, wake_pe, &
     
    2828       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, &
    2929       ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, &
    30        dt_ds, ratqs_inter
     30       dt_ds, ratqs_inter_
    3131!FC
    3232  USE geometry_mod,     ONLY: longitude_deg, latitude_deg
     
    3939  USE ocean_slab_mod,   ONLY: nslay, tslab, seaice, tice, ocean_slab_init
    4040  USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy
    41 #ifdef CPP_XIOS
    42   USE wxios, ONLY: missing_val
    43 #else
    44   use netcdf, only: missing_val => nf90_fill_real
    45 #endif
     41  USE wxios, ONLY: missing_val_xios => missing_val, using_xios
     42  use netcdf, only: missing_val_netcdf => nf90_fill_real
    4643  use config_ocean_skin_m, only: activate_ocean_skin
    4744
     
    9289  REAL :: lon_startphy(klon), lat_startphy(klon)
    9390  CHARACTER(LEN=maxlen) :: tname, t(2)
    94 
     91  REAL :: missing_val
     92
     93  IF (using_xios) THEN
     94    missing_val=missing_val_xios
     95  ELSE
     96    missing_val=missing_val_netcdf
     97  ENDIF
     98 
    9599  ! FH1D
    96100  !     real iolat(jjm+1)
     
    300304
    301305!===================================================================
     306! Lecture dans le cas iflag_pbl_surface =1
     307!===================================================================
     308
     309   if ( iflag_physiq <= 1 ) then
     310!===================================================================
    302311  ! Lecture des temperatures du sol profond:
    303312!===================================================================
     
    327336  found=phyetat0_get(snow_fall,"snow_f","snow fall",0.)
    328337  found=phyetat0_get(rain_fall,"rain_f","rain fall",0.)
    329 
     338  IF (ok_bs) THEN
     339     found=phyetat0_get(bs_fall,"bs_f","blowing snow fall",0.)
     340  ELSE
     341     bs_fall(:)=0.
     342  ENDIF
    330343!=======================================================================
    331344! Radiation
     
    374387  ENDIF
    375388
     389  endif ! iflag_physiq <= 1
     390
    376391  ! Lecture de l'age de la neige:
    377392  found=phyetat0_srf(agesno,"AGESNO","SNOW AGE",0.001)
     
    388403  ancien_ok=ancien_ok.AND.phyetat0_get(prlw_ancien,"PRLWANCIEN","PRLWANCIEN",0.)
    389404  ancien_ok=ancien_ok.AND.phyetat0_get(prsw_ancien,"PRSWANCIEN","PRSWANCIEN",0.)
     405
     406  ! cas specifique des variables de la neige soufflee
     407  IF (ok_bs) THEN
     408     ancien_ok=ancien_ok.AND.phyetat0_get(qbs_ancien,"QBSANCIEN","QBSANCIEN",0.)
     409     ancien_ok=ancien_ok.AND.phyetat0_get(prbsw_ancien,"PRBSWANCIEN","PRBSWANCIEN",0.)
     410  ELSE
     411     qbs_ancien(:,:)=0.
     412     prbsw_ancien(:)=0.
     413  ENDIF
    390414
    391415  ! Ehouarn: addtional tests to check if t_ancien, q_ancien contain
     
    401425       (maxval(t_ancien).EQ.minval(t_ancien)) ) THEN
    402426    ancien_ok=.false.
     427  ENDIF
     428
     429  IF (ok_bs) THEN
     430    IF ( (maxval(qbs_ancien).EQ.minval(qbs_ancien))       .OR. &
     431         (maxval(prbsw_ancien).EQ.minval(prbsw_ancien)) ) THEN
     432       ancien_ok=.false.
     433    ENDIF
    403434  ENDIF
    404435
     
    464495
    465496! fisrtilp/Clouds 0.002 could be ratqsbas. But can stay like this as well
    466   found=phyetat0_get(ratqs_inter,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002)
     497  found=phyetat0_get(ratqs_inter_,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002)
    467498
    468499!===========================================
     
    591622  ! Initialize module pbl_surface_mod
    592623
     624  if ( iflag_physiq <= 1 ) then
    593625  CALL pbl_surface_init(fder, snow, qsurf, tsoil)
     626  endif
    594627
    595628  ! Initialize module ocean_cpl_mod for the case of coupled ocean
Note: See TracChangeset for help on using the changeset viewer.