Ignore:
Timestamp:
Jan 4, 2021, 6:01:25 PM (4 years ago)
Author:
evignon
Message:

Ajout de INLANDSIS, nouvelle interface entre LMDZ et la neige de SISVAT
Etienne, 04/01/2021

Location:
LMDZ6/trunk/libf/phylmd
Files:
21 added
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.F90

    r3789 r3792  
    8686    CHARACTER (len = 10),SAVE  :: type_veget_omp
    8787    CHARACTER (len = 8), SAVE  :: aer_type_omp
    88     LOGICAL, SAVE       :: ok_snow_omp
     88    INTEGER, SAVE       :: landice_opt_omp
     89    INTEGER, SAVE       :: n_dtis_omp
     90    INTEGER, SAVE       :: iflag_tsurf_inlandsis_omp
     91    INTEGER, SAVE       :: iflag_albzenith_omp   
     92    LOGICAL, SAVE       :: SnoMod_omp,BloMod_omp,ok_outfor_omp
    8993    LOGICAL, SAVE       :: ok_newmicro_omp
    9094    LOGICAL, SAVE       :: ok_all_xml_omp
     
    318322    !
    319323
    320     ! Martin
    321     !Config Key  = ok_snow
    322     !Config Desc = Flag to activate snow model SISVAT
    323     !Config Def  = .FALSE.
    324     ok_snow_omp = .FALSE.
    325     CALL getin('ok_snow', ok_snow_omp)
    326     ! Martin
    327 
     324    ! INLANDSIS
     325    !==================================================================
     326    ! Martin et Etienne
     327    !Config Key  = landice_opt
     328    !Config Desc = which landice snow model (BULK, SISVAT or INLANDSIS)
     329    !Config Def  = 0
     330    landice_opt_omp = 0
     331    CALL getin('landice_opt', landice_opt_omp)
     332    ! Martin et Etienne
     333
     334    !Etienne
     335    !Config Key  = iflag_tsurf_inlandsis
     336    !Config Desc = which method to calculate tsurf in INLANDSIS
     337    !Config Def  = 0
     338    iflag_tsurf_inlandsis_omp = 0
     339    CALL getin('iflag_tsurf_inlandsis', iflag_tsurf_inlandsis_omp)
     340
     341    !Etienne
     342    !Config Key  = iflag_albzenith
     343    !Config Desc = method to account for albedo sensitivity to solar zenith angle
     344    !Config Def  = 0
     345    iflag_albzenith_omp = 0
     346    CALL getin('iflag_albzenith', iflag_albzenith_omp)
     347
     348    !Etienne
     349    !Config Key  = n_dtis
     350    !Config Desc = number of subtimesteps for INLANDSIS
     351    !Config Def  = 1
     352    n_dtis_omp = 1
     353    CALL getin('n_dtis', n_dtis_omp)
     354
     355    !Etienne
     356    !Config Key  = SnoMod
     357    !Config Desc = activation of snow modules in inlandsis
     358    !Config Def  = 1
     359    SnoMod_omp = .TRUE.
     360    CALL getin('SnoMod', SnoMod_omp)
     361
     362    !Etienne
     363    !Config Key  = BloMod
     364    !Config Desc = activation of blowing snow in inlandsis
     365    !Config Def  = 1
     366    BloMod_omp = .FALSE.
     367    CALL getin('BloMod', BloMod_omp)
     368
     369    !Etienne
     370    !Config Key  = ok_outfor
     371    !Config Desc = activation of output ascii file in inlandsis
     372    !Config Def  = 1
     373   ok_outfor_omp = .FALSE.
     374    CALL getin('ok_outfor', ok_outfor_omp)
     375
     376
     377
     378    !==================================================================
     379   
    328380    !Config Key  = OK_journe
    329381    !Config Desc = Pour des sorties journalieres
     
    22912343       ok_veget=.FALSE.
    22922344    ENDIF
    2293     ! Martin
    2294     ok_snow = ok_snow_omp
    2295     ! Martin
    2296 
     2345    ! SISVAT and INLANDSIS
     2346    !=================================================
     2347    landice_opt = landice_opt_omp
     2348    iflag_tsurf_inlandsis = iflag_tsurf_inlandsis_omp
     2349    iflag_albzenith = iflag_albzenith_omp
     2350    n_dtis=n_dtis_omp
     2351    SnoMod=SnoMod_omp
     2352    BloMod=BloMod_omp
     2353    ok_outfor=ok_outfor_omp
     2354    !=================================================
    22972355    ok_all_xml = ok_all_xml_omp
    22982356    ok_lwoff = ok_lwoff_omp
     
    25542612    WRITE(lunout,*) ' Version ocean = ', version_ocean
    25552613    WRITE(lunout,*) ' Config veget = ', ok_veget,type_veget
    2556     WRITE(lunout,*) ' Snow model SISVAT : ok_snow = ', ok_snow
     2614    WRITE(lunout,*) ' Snow model landice : landice_opt = ', landice_opt
    25572615    WRITE(lunout,*) ' Config xml pour XIOS : ok_all_xml = ', ok_all_xml
    25582616    WRITE(lunout,*) ' Sortie journaliere = ', ok_journe
     
    27532811    WRITE(lunout,*) ' carbon_cycle_rad = ', carbon_cycle_rad
    27542812    WRITE(lunout,*) ' level_coupling_esm = ', level_coupling_esm
     2813    WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis
     2814    WRITE(lunout,*) ' iflag_albzenith = ', iflag_albzenith
     2815    WRITE(lunout,*) ' n_dtis = ', n_dtis
     2816    WRITE(lunout,*) ' SnoMod = ', SnoMod
     2817    WRITE(lunout,*) ' BloMod = ', BloMod
     2818    WRITE(lunout,*) ' ok_outfor = ', ok_outfor
     2819
    27552820
    27562821    !$OMP END MASTER
  • LMDZ6/trunk/libf/phylmd/dimsoil.h

    r1907 r3792  
    44      INTEGER nsoilmx
    55      PARAMETER (nsoilmx=11)
     6
     7! For Inlandsis, Etienne Vignon:
     8
     9      INTEGER nsnowmx
     10      PARAMETER (nsnowmx=35)
     11     
     12      INTEGER nsismx
     13      PARAMETER (nsismx=46)
     14
     15! nsismx should be equal to nsoilmx+nsnowmx
     16
     17
     18
     19
     20
  • LMDZ6/trunk/libf/phylmd/phys_output_mod.F90

    r3666 r3792  
    4040    USE mod_phys_lmdz_para
    4141    !Martin
    42     USE surface_data, ONLY : ok_snow
     42    USE surface_data, ONLY : landice_opt
    4343    USE phys_output_ctrlout_mod
    4444    USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r3787 r3792  
    361361    USE infotrac_phy, ONLY: nqtot, nqo, type_trac, tname, niadv
    362362    USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
    363     USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow
     363    USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt
    364364    USE aero_mod, ONLY: naero_tot, id_STRAT_phy
    365365    USE ioipsl, ONLY: histend, histsync
     
    10011001       CALL histwrite_phy(o_tauy, zx_tmp_fi2d)
    10021002
    1003        IF (ok_snow) THEN
     1003       IF (landice_opt .GE. 1) THEN
    10041004          CALL histwrite_phy(o_snowsrf, snow_o)
    10051005          CALL histwrite_phy(o_qsnow, qsnow)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r3784 r3792  
    6565    USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz
    6666    USE regr_pr_time_av_m, only: regr_pr_time_av
    67     USE surface_data,     ONLY : type_ocean, ok_veget, ok_snow
     67    USE surface_data,     ONLY : type_ocean, ok_veget, landice_opt
    6868    USE time_phylmdz_mod, only: annee_ref, current_time, day_ini, day_ref, &
    6969          day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time
  • LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90

    r3780 r3792  
    2525
    2626    USE dimphy
    27     USE surface_data,     ONLY : type_ocean, calice, calsno, ok_snow
     27    USE surface_data,     ONLY : type_ocean, calice, calsno, landice_opt, n_dtis
    2828    USE fonte_neige_mod,  ONLY : fonte_neige, run_off_lic
    2929    USE cpl_mod,          ONLY : cpl_send_landice_fields
     
    3636    USE surf_sisvat_mod,  ONLY : surf_sisvat
    3737#endif
     38
     39#ifdef CPP_INLANDSIS
     40    USE surf_inlandsis_mod,  ONLY : surf_inlandsis
     41#endif
     42
    3843    USE indice_sol_mod
    3944
     
    8691!    REAL, DIMENSION(klon), INTENT(OUT)            :: alb1  ! new albedo in visible SW interval
    8792!    REAL, DIMENSION(klon), INTENT(OUT)            :: alb2  ! new albedo in near IR interval
    88     REAL, DIMENSION(6), INTENT(IN)              ::SFRWL
    89     REAL, DIMENSION(klon,nsw), INTENT(OUT)        ::alb_dir,alb_dif
     93    REAL, DIMENSION(6), INTENT(IN)                :: SFRWL
     94    REAL, DIMENSION(klon,nsw), INTENT(OUT)        :: alb_dir,alb_dif
    9095!albedo SB <<<
    9196    REAL, DIMENSION(klon), INTENT(OUT)            :: evap, fluxsens, fluxlat
     
    108113    REAL, DIMENSION(klon)    :: zfra, alb_neig
    109114    REAL, DIMENSION(klon)    :: radsol
    110     REAL, DIMENSION(klon)    :: u0, v0, u1_lay, v1_lay
    111     INTEGER                  :: i,j
     115    REAL, DIMENSION(klon)    :: u0, v0, u1_lay, v1_lay, ustar
     116    INTEGER                  :: i,j,nt
    112117
    113118    REAL, DIMENSION(klon)    :: emis_new                  !Emissivity
    114119    REAL, DIMENSION(klon)    :: swdown,lwdown
    115120    REAL, DIMENSION(klon)    :: precip_snow_adv, snow_adv !Snow Drift precip./advection
    116     REAL, DIMENSION(klon)    :: bl_height, wind_velo      !height boundary layer, wind spd
     121    REAL, DIMENSION(klon)    :: zsl_height, wind_velo      !surface layer height, wind spd
    117122    REAL, DIMENSION(klon)    :: dens_air,  snow_cont_air  !air density; snow content air
    118123    REAL, DIMENSION(klon)    :: alb_soil                  !albedo of underlying ice
    119124    REAL, DIMENSION(klon)    :: pexner                    !Exner potential
    120125    REAL                     :: pref
    121     REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi
     126    REAL, DIMENSION(klon,nsoilmx) :: tsoil0               !modif
     127    REAL                          :: dtis                ! subtimestep
     128    LOGICAL                       :: debut_is, lafin_is  ! debut and lafin for inlandsis
    122129
    123130    CHARACTER (len = 20)                      :: modname = 'surf_landice'
     
    139146  LOGICAL, SAVE :: firstcall = .TRUE.
    140147  !$OMP THREADPRIVATE(firstcall)
    141 !FC
    142 
    143 
     148
     149
     150!FC firtscall initializations
     151!******************************************************************************************
    144152  IF (firstcall) THEN
    145153  alb_vis_sno_lic=0.77
     
    149157  CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic)
    150158           PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic
     159 
     160!  z0m=1.e-3
     161!  z0h = z0m
    151162  firstcall=.false.
    152163  ENDIF
    153 !
     164!******************************************************************************************
     165
    154166! Initialize output variables
    155167    alb3(:) = 999999.
     
    166178
    167179!****************************************************************************************
    168 !   ok_snow = TRUE  : prepare and call SISVAT snow model
    169 !   ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ...
    170 !
    171 !****************************************************************************************
    172     IF (ok_snow) THEN
     180!  landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ... 
     181!  landice_opt = 1  : prepare and call SISVAT snow model
     182!  landice_opt = 2  : prepare and call INLANDSIS snow model
     183!****************************************************************************************
     184
     185
     186    IF (landice_opt .EQ. 1) THEN
     187   
     188!****************************************************************************************
     189! CALL to SISVAT interface
     190!****************************************************************************************
     191
    173192#ifdef CPP_SISVAT
    174193       ! Prepare for calling SISVAT
     
    192211          pexner(i)        = (p1lay(i)/pref)**(RD/RCPD)
    193212          dens_air(i)      = p1lay(i)/RD/temp_air(i)  ! dry air density
    194           bl_height(i)     = pphi1(i)/RG             
     213          zsl_height(i)     = pphi1(i)/RG             
    195214       END DO
    196215
    197 !****************************************************************************************
    198 ! CALL to SISVAT interface
    199 !
    200 !****************************************************************************************
     216
    201217       ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs
    202218       DO i = 1, knon
     
    209225            rmu0, swdown, lwdown, pexner, ps, p1lay, &
    210226            precip_rain, precip_snow, precip_snow_adv, snow_adv, &
    211             bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &
     227            zsl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &
    212228            rugoro, snow_cont_air, alb_soil, slope, cloudf, &
    213229            radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, &
     
    232248            flux_u1, flux_v1)
    233249#else
    234        abort_message='Pb de coherence: ok_snow = .true. mais CPP_SISVAT = .false.'
     250       abort_message='Pb de coherence: landice_opt = 1 mais CPP_SISVAT = .false.'
    235251       CALL abort_physic(modname,abort_message,1)
    236252#endif
    237     ELSE ! ok_snow=FALSE
     253
     254!****************************************************************************************
     255! CALL to INLANDSIS interface
     256!****************************************************************************************
     257
     258    ELSE IF (landice_opt .EQ. 2) THEN
     259#ifdef CPP_INLANDSIS
     260
     261        debut_is=debut
     262        lafin_is=.false.
     263        ! Suppose zero surface speed
     264        u0(:)            = 0.0
     265        v0(:)            = 0.0
     266
     267
     268        CALL calcul_flux_wind(knon, dtime, &
     269         u0, v0, u1, v1, gustiness, cdragm, &
     270         AcoefU, AcoefV, BcoefU, BcoefV, &
     271         p1lay, temp_air, &
     272         flux_u1, flux_v1)
     273
     274       
     275       ! Set constants and compute some input for SISVAT
     276       ! = 1000 hPa
     277       ! and calculate incoming flux for SW and LW interval: swdown, lwdown
     278       swdown(:)        = 0.0
     279       lwdown(:)        = 0.0
     280       snow_adv(:)      = 0.  ! no snow blown in for now
     281       snow_cont_air(:) = 0.       
     282       alb_soil(:)      = 0.4 ! before albedo(:) but here it is the ice albedo that we have to set
     283       ustar(:)         = 0.
     284       pref             = 100000.       
     285       DO i = 1, knon
     286          swdown(i)        = swnet(i)/(1-albedo(i))
     287          lwdown(i)        = lwdownm(i)
     288          wind_velo(i)     = u1(i)**2 + v1(i)**2
     289          wind_velo(i)     = wind_velo(i)**0.5
     290          pexner(i)        = (p1lay(i)/pref)**(RD/RCPD)
     291          dens_air(i)      = p1lay(i)/RD/temp_air(i)  ! dry air density
     292          zsl_height(i)    = pphi1(i)/RG     
     293          tsoil0(i,:)      = tsoil(i,:) 
     294          ustar(i)= (cdragm(i)*(wind_velo(i)**2))**0.5   
     295       END DO
     296       
     297
     298       ! Subtimestepping
     299       
     300        dtis=dtime/n_dtis
     301
     302        DO nt=1,n_dtis
     303
     304          IF (lafin .and. nt.eq.n_dtis) THEN
     305            lafin_is=.true.
     306          END IF
     307
     308        !PRINT*,'RENTRE DANS INLANDSIS','itime',itime,'dtime',dtime,'dtis',dtis
     309        CALL surf_inlandsis(knon, rlon, rlat, knindex, itime, dtis, debut_is, lafin_is, &
     310            rmu0, swdown, lwdown, albedo, pexner, ps, p1lay, &
     311            precip_rain, precip_snow, precip_snow_adv, snow_adv, &
     312            zsl_height, wind_velo, ustar, temp_air, dens_air, spechum, tsurf, &
     313            rugoro, snow_cont_air, alb_soil, slope, cloudf, &
     314            radsol, qsol, tsoil0, snow, zfra, snowhgt, qsnow, to_ice,sissnow, agesno, &
     315            AcoefH, AcoefQ, BcoefH, BcoefQ, cdragm, cdragh, &
     316            run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, &       
     317            tsurf_new, alb1, alb2, alb3, &
     318            emis_new, z0m, z0h, qsurf)     
     319
     320         debut_is=.false.
     321
     322        END DO
     323
     324
     325#else
     326       abort_message='Pb de coherence: landice_opt = 2 mais CPP_INLANDSIS = .false.'
     327       CALL abort_physic(modname,abort_message,1)
     328#endif
     329
     330
     331
     332    ELSE
    238333
    239334!****************************************************************************************
     
    261356!
    262357!****************************************************************************************
    263  !   beta(:) = 1.0
    264  !   dif_grnd(:) = 0.0
     358!    beta(:) = 1.0
     359!    dif_grnd(:) = 0.0
    265360
    266361! Suppose zero surface speed
     
    287382!   
    288383!****************************************************************************************
    289     CALL fonte_neige( knon, is_lic, knindex, dtime, &
     384    CALL fonte_neige(knon, is_lic, knindex, dtime, &
    290385         tsurf, precip_rain, precip_snow, &
    291386         snow, qsol, tsurf_new, evap)
     
    323418    z0m = SQRT(z0m**2+rugoro**2)
    324419
    325     END IF ! ok_snow
     420
     421
     422
     423   
     424
     425    END IF ! landice_opt
    326426
    327427
     
    340440 
    341441!****************************************************************************************
    342        snow_o=0.
    343        zfra_o = 0.
    344        DO j = 1, knon
    345            i = knindex(j)
    346            snow_o(i) = snow(j)
    347            zfra_o(i) = zfra(j)
    348        ENDDO
    349 
     442! Etienne: comment these lines because of duplication just below
     443!       snow_o=0.
     444!       zfra_o = 0.
     445!       DO j = 1, knon
     446!           i = knindex(j)
     447!           snow_o(i) = snow(j)
     448!           zfra_o(i) = zfra(j)
     449!       ENDDO
     450!
    350451!****************************************************************************************
    351452       snow_o=0.
  • LMDZ6/trunk/libf/phylmd/surface_data.F90

    r3327 r3792  
    1515  !$OMP THREADPRIVATE(type_veget)
    1616
    17   LOGICAL, SAVE          :: ok_snow       ! true for coupling to snow model SISVAT
    18   !$OMP THREADPRIVATE(ok_snow)
    19 
    2017  CHARACTER(len=6), SAVE :: type_ocean    ! force/slab/couple
    2118  !$OMP THREADPRIVATE(type_ocean)
     
    3027  !$OMP THREADPRIVATE(t_coupl)
    3128
     29  ! FOR INLANDSIS:
     30  !===============
     31
     32   INTEGER, SAVE          :: landice_opt       ! 1 for coupling with SISVAT, 2 for coupling with INLANDSIS
     33  !$OMP THREADPRIVATE(landice_opt)
     34
     35   INTEGER, SAVE          :: iflag_tsurf_inlandsis ! 0 SISVAT method, 1 LMDZ method
     36  !$OMP THREADPRIVATE(iflag_tsurf_inlandsis)
     37
     38   INTEGER, SAVE          :: iflag_albzenith ! dependency of albedo to zenith angle
     39  !$OMP THREADPRIVATE(iflag_albzenith) 
     40
     41   INTEGER, SAVE          :: n_dtis           ! number of subtimesteps for INLANDSIS
     42  !$OMP THREADPRIVATE(n_dtis)
     43
     44  ! with or without snow module/ blowing snow, ascii outfile
     45   LOGICAL, SAVE           :: SnoMod,BloMod,ok_outfor
     46  !$OMP THREADPRIVATE(SnoMod,BloMod,ok_outfor)   
     47
    3248END MODULE surface_data
Note: See TracChangeset for help on using the changeset viewer.