Changeset 2998


Ignore:
Timestamp:
Jul 18, 2023, 2:23:06 PM (16 months ago)
Author:
llange
Message:

MARS PEM

  • Fix some bug in water conservations (transfer from watercap to waterreservoir was wrong)
  • Add the H2O glaciers in the main program.
  • Add the distinction between co2 frost (qsurf) and perenial co2 ice. Will be developed in the Mars PCM in a future commit
  • Thickness thresolhd to pass from frost to glaciers is now not harcoded but a constant fixed in the mars_pem_constants

LL

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/constants_marspem_mod.F90

    r2965 r2998  
    3737      REAL,PARAMETER ::  Lco2 =  5.71E5                ! Pilorget and Forget 2016
    3838
     39! Conversion H2O/CO2 frost to perenial frost and vice versa
     40      REAL,PARAMETER :: threshold_water_frost2perenial = 1000. !~ 1m
     41      REAL,PARAMETER :: threshold_co2_frost2perenial = 3200.   !~ 2m
     42
    3943
    4044     
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r2995 r2998  
    4545                           albedodat, zmea, zstd, zsig, zgam, zthe, &
    4646                           hmons, summit, base,albedo_h2o_frost, &
    47                            frost_albedo_threshold,emissiv,watercaptag
     47                           frost_albedo_threshold,emissiv,watercaptag,perenial_co2ice
    4848      use dimradmars_mod, only: totcloudfrac, albedo
    4949      use dust_param_mod, only: tauscaling
     
    9393      use conf_pem_mod,     only: conf_pem
    9494      use pemredem,         only:  pemdem0,pemdem1
    95       use glaciers_mod,        only: co2glaciers_evol,h2oglaciersflow,co2glaciersflow,h2oglaciersflow
     95      use glaciers_mod,        only: co2glaciers_evol,h2oglaciers_evol,co2glaciersflow,h2oglaciersflow
    9696      use criterion_pem_stop_mod, only: criterion_waterice_stop,criterion_co2_stop
    9797      use constants_marspem_mod,  only: alpha_clap_co2,beta_clap_co2, alpha_clap_h2o,beta_clap_h2o, &
    98                                       m_co2,m_noco2
     98                                      m_co2,m_noco2,threshold_water_frost2perenial,threshold_co2_frost2perenial
    9999      use evol_co2_ice_s_mod, only: evol_co2_ice_s
    100100      use evol_h2o_ice_s_mod, only: evol_h2o_ice_s
     
    209209
    210210!!!!!!!!!!!!!!!!!!!!!!!! SLOPE
    211       REAL                               :: watercap_saved          ! Value saved at the previous time step
    212211      REAL, dimension(:,:),  allocatable :: min_co2_ice_1           ! ngrid field : minimum of co2 ice at each point for the first year [kg/m^2]
    213212      REAL, dimension(:,:),  allocatable :: min_co2_ice_2           ! ngrid field : minimum of co2 ice at each point for the second year [kg/m^2]
     
    221220      REAL, dimension(:,:),  allocatable :: tendencies_co2_ice_ini  ! physical point x slope field x nslope: Tendency of evolution of perenial co2 ice over a year in the GCM
    222221      REAL, dimension(:,:),  allocatable :: tendencies_h2o_ice      ! physical pointx slope  field : Tendency of evolution of perenial h2o ice
    223       REAL, dimension(:,:),  allocatable :: flag_co2flow(:,:)       !(ngrid,nslope): Flag where there is a glacier flow
    224       REAL, dimension(:),    allocatable :: flag_co2flow_mesh(:)    !(ngrid)       : Flag where there is a glacier flow
     222      REAL, dimension(:,:),  allocatable :: flag_co2flow(:,:)       !(ngrid,nslope): Flag where there is a CO2 glacier flow
     223      REAL, dimension(:),    allocatable :: flag_co2flow_mesh(:)    !(ngrid)       : Flag where there is a CO2 glacier flow
     224      REAL, dimension(:,:),  allocatable :: flag_h2oflow(:,:)       !(ngrid,nslope): Flag where there is a H2O glacier flow
     225      REAL, dimension(:),    allocatable :: flag_h2oflow_mesh(:)    !(ngrid)       : Flag where there is a H2O glacier flow
    225226
    226227!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SURFACE/SOIL
     
    255256    REAL :: timestep                     ! timestep [s]
    256257    REAL :: watercap_sum                 ! total mass of water cap [kg/m^2]
     258    REAL :: water_sum                    ! total mass of water in the mesh [kg/m^2]
    257259
    258260#ifdef CPP_STD
     
    444446              tsurf,tsoil,albedo,emis,   &
    445447              q2,qsurf,tauscaling,totcloudfrac,wstar,     &
    446               watercap,def_slope,def_slope_mean,subslope_dist)
     448              watercap,perenial_co2ice,def_slope,def_slope_mean,subslope_dist)
    447449
    448450! Remove unphysical values of surface tracer
     
    545547     allocate(flag_co2flow(ngrid,nslope))
    546548     allocate(flag_co2flow_mesh(ngrid))
    547 
    548        flag_co2flow(:,:) = 0.     
    549        flag_co2flow_mesh(:) = 0.
    550 
     549     allocate(flag_h2oflow(ngrid,nslope))
     550     allocate(flag_h2oflow_mesh(ngrid))
     551
     552     flag_co2flow(:,:) = 0     
     553     flag_co2flow_mesh(:) = 0
     554     flag_h2oflow(:,:) = 0     
     555     flag_h2oflow_mesh(:) = 0
    551556!---------------------------- READ GCM data ---------------------
    552557
     
    909914
    910915! II.b. Evolution of the ice
    911       print *, "Evolution of h2o ice"
    912      
     916     print *, "Evolution of h2o ice"
    913917     call evol_h2o_ice_s(qsurf(:,igcm_h2o_ice,:),tendencies_h2o_ice,iim,jjm_value,ngrid,cell_area,STOPPING_1_water,nslope)
    914918     
     919     print *, "Evolution of co2 ice"
     920     call evol_co2_ice_s(qsurf(:,igcm_co2,:),tendencies_co2_ice,iim,jjm_value,ngrid,cell_area,nslope)
     921
    915922     DO islope=1, nslope
    916923       write(str2(1:2),'(i2.2)') islope
    917924       call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf(:,igcm_h2o_ice,islope))
    918925       call WRITEDIAGFI(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice(:,islope))
     926       call WRITEDIAGFI(ngrid,'c2ice_slope'//str2,'CO2 ice','kg.m-2',2,qsurf(:,igcm_co2,islope))
     927       call WRITEDIAGFI(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice(:,islope))
    919928     ENDDO
    920 
    921       print *, "Evolution of co2 ice"
    922      call evol_co2_ice_s(qsurf(:,igcm_co2,:),tendencies_co2_ice,iim,jjm_value,ngrid,cell_area,nslope)
    923929
    924930!------------------------
     
    927933!    II_a update pressure, ice and tracers
    928934!    II_b Evolution of the ice
    929 !    II_c CO2 glaciers flows
     935!    II_c CO2  & H2O glaciers flows
    930936
    931937!------------------------
     
    936942       call co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_pem_phys,ps_timeseries,&
    937943                         global_ave_press_GCM,global_ave_press_new,qsurf(:,igcm_co2,:),flag_co2flow,flag_co2flow_mesh)
     944      endif
     945
     946      print *, "H2O glacier flows"
     947
     948      if (h2oglaciersflow) then
     949        call h2oglaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,tsurf_ave,qsurf(:,igcm_h2o_ice,:),flag_h2oflow,flag_h2oflow_mesh)
    938950      endif
    939951
     
    11671179         watercap_sum=0.
    11681180         DO islope=1,nslope
    1169            watercap_saved = watercap(ig,islope)
    1170            if(qsurf(ig,igcm_h2o_ice,islope).GT. (watercap(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.))) then
    1171              qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope)-(watercap(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.))
     1181           if(qsurf(ig,igcm_h2o_ice,islope).GT. (watercap(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.))) then ! water_reservoir and water cap have not changed since PCM call: here we check if we have accumulate frost or not. 1st case we have more ice than initialy
     1182             qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope)-(watercap(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.)) ! put back ancien frost
    11721183           else
     1184!             2nd case: we have sublimate ice: then let's put qsurf = 0. and add the difference in watercap
    11731185             watercap(ig,islope)=watercap(ig,islope)+qsurf(ig,igcm_h2o_ice,islope)-(watercap(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.))
    11741186             qsurf(ig,igcm_h2o_ice,islope)=0.
    11751187           endif
    1176            watercap_sum=watercap_sum+(watercap(ig,islope)-watercap_saved)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)
     1188           watercap_sum=watercap_sum+watercap(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)
    11771189           watercap(ig,islope)=0.
    11781190         enddo
     
    11821194
    11831195     DO ig=1,ngrid
     1196       water_sum = 0.
    11841197       DO islope=1,nslope
    1185          if(qsurf(ig,igcm_h2o_ice,islope).GT.500) then
     1198         water_sum = water_sum + qsurf(ig,igcm_h2o_ice,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)
     1199       ENDDO
     1200       if(watercaptag(ig).eqv..false.) then ! let's check if we have an 'infinite' source of water that has been forming.
     1201         if(water_sum.gt.threshold_water_frost2perenial) then ! the overall mesh can be considered as an infite source of water. No need to change the albedo: done in II.d.1
    11861202            watercaptag(ig)=.true.
    1187             qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope)-250
    1188             water_reservoir(ig)=water_reservoir(ig)+250
     1203            water_reservoir(ig)=water_reservoir(ig)+threshold_water_frost2perenial/2. ! half of the excess ices goes to the reservoir, we let the rest to be frost
     1204            DO islope = 1,nslope
     1205              qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope) - threshold_water_frost2perenial/2.*cos(pi*def_slope_mean(islope)/180.)
     1206            ENDDO   
    11891207         endif
    1190        enddo
    1191      enddo
     1208       else ! let's check that the infinite source of water disapear
     1209         if((water_sum + water_reservoir(ig)).lt.threshold_water_frost2perenial) then
     1210           watercaptag(ig)=.false.
     1211           DO islope = 1,nslope
     1212              qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.)
     1213           ENDDO
     1214           water_reservoir(ig) = 0.
     1215         endif
     1216       endif
     1217     enddo
     1218
     1219! CO2 ice
    11921220
    11931221     DO ig=1,ngrid
    1194        if(water_reservoir(ig).LT. 10) then
    1195          watercaptag(ig)=.false.
    1196          DO islope=1,nslope
    1197            qsurf(ig,igcm_h2o_ice,islope)=qsurf(ig,igcm_h2o_ice,islope)+water_reservoir(ig)
    1198          ENDDO
    1199        endif
    1200      enddo
     1222       DO islope=1,nslope
     1223         if(qsurf(ig,igcm_co2,islope).gt.threshold_co2_frost2perenial) then
     1224           perenial_co2ice(ig,islope) = 0.5*qsurf(ig,igcm_co2,islope)
     1225           qsurf(ig,igcm_co2,islope)  = 0.5*qsurf(ig,igcm_co2,islope)
     1226         endif
     1227       ENDDO
     1228     ENDDO
     1229       
    12011230
    12021231! III_a.2  Tsoil update (for startfi)
     
    13091338                     tsurf,tsoil,inertiesoil,albedo,             &
    13101339                     emis,q2,qsurf,tauscaling,totcloudfrac,wstar,&
    1311                      watercap)
     1340                     watercap,perenial_co2ice)
    13121341#else
    13131342     call physdem0("restartfi_evol.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, &
Note: See TracChangeset for help on using the changeset viewer.