Changeset 2893


Ignore:
Timestamp:
Feb 10, 2023, 12:14:50 PM (23 months ago)
Author:
romain.vande
Message:

Mars PEM:
Correction of recomp_tend_co2 formula and make it dependent on the presence of co2_ice.
Add different stopping criterion for water_ice and co2_ice called : water_ice_criterion and co2_ice_criterion.
Add the possibility to output a diagfi.nc each year for the amount of ice, the tendencies, tsurf and ps.
Remove useless variables (not sloped)
Remove useless file
Some cleaning
RV

Location:
trunk
Files:
1 deleted
9 edited

Legend:

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

    r2888 r2893  
    4242    allocate(inertiedat_PEM(ngrid,nsoilmx_PEM))
    4343    allocate(water_reservoir(ngrid))
    44     allocate(water_reservoir(ngrid))
    4544  end subroutine ini_comsoil_h_PEM
    4645
  • trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90

    r2888 r2893  
    1414#endif
    1515 
    16   USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, ice_criterion, ps_criterion, &
     16  USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, water_ice_criterion, co2_ice_criterion, ps_criterion, &
    1717                Max_iter_pem, evol_orbit_pem
    1818  USE comsoil_h_pem, only: soil_pem,fluxgeo,water_reservoir_nom
    1919  USE adsorption_mod,only: adsorption_pem
    2020  CHARACTER(len=20),parameter :: modname ='conf_pem'
     21
    2122!PEM parameter
     23
    2224  year_bp_ini=0.
    2325  CALL getin('year_bp_ini', year_bp_ini)
     
    2628  CALL getin('dt_pem', dt_pem)
    2729
    28   ice_criterion=0.2
    29   CALL getin('ice_criterion', ice_criterion)
     30  water_ice_criterion=0.2
     31  CALL getin('water_ice_criterion', water_ice_criterion)
     32
     33  co2_ice_criterion=0.2
     34  CALL getin('co2_ice_criterion', co2_ice_criterion)
    3035
    3136  ps_criterion = 0.15
     
    5156       print*,'Adsorption must be used when soil_pem = T'
    5257       call abort_physic(modname,"Adsorption must be used when soil_pem = T",1)
    53         endif
     58  endif
    5459 
    55 
    5660  if ((not(soil_pem)).and.fluxgeo.gt.0.) then
    5761       print*,'Soil is not activated but Flux Geo > 0.'
    5862       call abort_physic(modname,"Soil is not activated but Flux Geo > 0.'",1)
    59         endif
     63  endif
    6064 
    61 
    6265   water_reservoir_nom = 1e4
    6366  CALL getin('water_reservoir_nom',water_reservoir_nom)
  • trunk/LMDZ.COMMON/libf/evolution/criterion_pem_stop_mod.F90

    r2888 r2893  
    1515SUBROUTINE criterion_waterice_stop(cell_area,ini_surf,qsurf,STOPPING,ngrid,initial_h2o_ice)
    1616
    17   USE temps_mod_evol, ONLY: ice_criterion
     17  USE temps_mod_evol, ONLY: water_ice_criterion
    1818  use comslope_mod, ONLY: subslope_dist,nslope
    1919
     
    3232  INTEGER, intent(in) :: ngrid                  ! # of grid physical grid points
    3333  REAL,    intent(in) :: cell_area(ngrid)       ! physical point field : Area of the cells
    34   REAL,    intent(in) ::  qsurf(ngrid,nslope)          ! physical point field : Actual density of water ice
     34  REAL,    intent(in) :: qsurf(ngrid,nslope)          ! physical point field : Actual density of water ice
    3535  REAL,    intent(in) :: ini_surf
    3636  REAL,    intent(in) :: initial_h2o_ice(ngrid,nslope)
     
    6060 
    6161!   check of the criterion
    62   if(present_surf.LT.ini_surf*(1-ice_criterion) .OR. &
    63      present_surf.GT.ini_surf*(1+ice_criterion)) then
     62  if(present_surf.LT.ini_surf*(1-water_ice_criterion) .OR. &
     63     present_surf.GT.ini_surf*(1+water_ice_criterion)) then
    6464    STOPPING=.TRUE.
    6565    print *, "Reason of stopping : The surface of water ice sublimating reach the threshold:"
    6666    print *, "Current surface of water ice sublimating=", present_surf
    6767    print *, "Initial surface of water ice sublimating=", ini_surf
    68     print *, "Percentage of change accepted=", ice_criterion*100
    69     print *, "present_surf<ini_surf*(1-ice_criterion)", (present_surf.LT.ini_surf*(1-ice_criterion))
     68    print *, "Percentage of change accepted=", water_ice_criterion*100
     69    print *, "present_surf<ini_surf*(1-water_ice_criterion)", (present_surf.LT.ini_surf*(1-water_ice_criterion))
    7070  endif
    7171
     
    8080SUBROUTINE criterion_co2_stop(cell_area,ini_surf,qsurf,STOPPING_ice,STOPPING_ps,ngrid,initial_h2o_ice,global_ave_press_GCM,global_ave_press_new,nslope)
    8181
    82   USE temps_mod_evol, ONLY: ice_criterion,ps_criterion
     82  USE temps_mod_evol, ONLY: co2_ice_criterion,ps_criterion
    8383  use comslope_mod, ONLY: subslope_dist
    8484
     
    127127 
    128128!   check of the criterion
    129   if(present_surf.LT.ini_surf*(1-ice_criterion) .OR. &
    130      present_surf.GT.ini_surf*(1+ice_criterion)) then
     129  if(present_surf.LT.ini_surf*(1-co2_ice_criterion) .OR. &
     130     present_surf.GT.ini_surf*(1+co2_ice_criterion)) then
    131131    STOPPING_ice=.TRUE.
    132132    print *, "Reason of stopping : The surface of co2 ice sublimating reach the threshold:"
    133133    print *, "Current surface of co2 ice sublimating=", present_surf
    134134    print *, "Initial surface of co2 ice sublimating=", ini_surf
    135     print *, "Percentage of change accepted=", ice_criterion*100
    136     print *, "present_surf<ini_surf*(1-ice_criterion)", (present_surf.LT.ini_surf*(1-ice_criterion))
     135    print *, "Percentage of change accepted=", co2_ice_criterion*100
     136    print *, "present_surf<ini_surf*(1-co2_ice_criterion)", (present_surf.LT.ini_surf*(1-co2_ice_criterion))
    137137  endif
    138138
     
    155155
    156156END MODULE
    157 
    158 
    159 
    160 
    161 
    162 
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r2888 r2893  
    143143
    144144      character (len = *), parameter :: FILE_NAME = "startfi_evol.nc" !Name of the file used for initialsing the PEM
     145      character*2 str2
    145146      integer :: ncid, varid,status                                !Variable for handling opening of files
    146147      integer :: phydimid, subdimid, nlayerdimid, nqdimid          !Variable ID for Netcdf files
     
    158159
    159160! Variable for h2o_ice evolution
    160 
    161       REAL , dimension(:,:), allocatable :: tendencies_h2o_ice     ! LON x LAT field : Tendency of evolution of perenial ice over a year
    162       REAL, dimension(:),allocatable  :: tendencies_h2o_ice_phys   ! physical point field : Tendency of evolution of perenial ice over a year
    163 
    164       REAL , dimension(:,:), allocatable :: tendencies_co2_ice     ! LON x LAT field : Tendency of evolution of perenial co2 ice over a year
    165       REAL, dimension(:),allocatable  :: tendencies_co2_ice_phys   ! physical point field : Tendency of evolution of perenial co2 ice over a year
    166 
    167       REAL :: ini_surf                                             ! Initial surface of sublimating water ice
    168       REAL :: ini_surf_h2o                                             ! Initial surface of sublimating water ice
    169       REAL, dimension(:),allocatable  :: initial_h2o_ice           ! physical point field : Logical array indicating sublimating point
    170 
     161      REAL :: ini_surf_h2o                                         ! Initial surface of sublimating water ice
    171162      REAL :: ini_surf_co2                                         ! Initial surface of sublimating co2 ice
    172       REAL, dimension(:),allocatable  :: initial_co2_ice           ! physical point field : Logical array indicating sublimating point of co2 ice
    173 
    174       REAL , dimension(:,:), allocatable :: min_h2o_ice_s_1        ! LON x LAT field : minimum of water ice at each point for the first year
    175       REAL , dimension(:,:), allocatable :: min_h2o_ice_s_2        ! LON x LAT field : minimum of water ice at each point for the second year
    176 
    177       REAL , dimension(:,:), allocatable :: min_co2_ice_s_1        ! LON x LAT field : minimum of water ice at each point for the first year
    178       REAL , dimension(:,:), allocatable :: min_co2_ice_s_2        ! LON x LAT field : minimum of water ice at each point for the second year
    179163
    180164      REAL :: global_ave_press_GCM           ! constant: global average pressure retrieved in the GCM [Pa]
     
    193177      LOGICAL :: STOPPING_pressure
    194178      INTEGER :: criterion_stop  ! which criterion is reached ? 1= h2o ice surf, 2 = co2 ice surf, 3 = ps, 4 = orb param
    195 
    196179
    197180      REAL, dimension(:,:,:),allocatable  :: q_co2_GCM ! Lon x Lat x Time : mass mixing ratio of co2 in the first layer [kg/kg]
     
    430413   
    431414     call surfini(ngrid,qsurf)
    432      call surfini(ngrid,qsurf)
    433415
    434416#else
     
    452434
    453435if (nslope.eq.1) then
    454 def_slope(1) = 0
    455 def_slope(2) = 0
    456 def_slope_mean=0
    457 subslope_dist(:,1) = 1.
     436 def_slope(1) = 0
     437 def_slope(2) = 0
     438 def_slope_mean=0
     439 subslope_dist(:,1) = 1.
    458440endif
    459441
     
    500482     allocate(flag_co2flow_mesh(ngrid))
    501483
    502        flag_co2flow(:,:) = 0.     
    503        flag_co2flow_mesh(:) = 0.
     484     flag_co2flow(:,:) = 0.     
     485     flag_co2flow_mesh(:) = 0.
    504486
    505487
     
    518500     call nb_time_step_GCM("data_GCM_Y1.nc",timelen)
    519501
    520      allocate(min_h2o_ice_s_1(iim+1,jjm+1))
    521      allocate(min_co2_ice_s_1(iim+1,jjm+1))
    522502     allocate(vmr_co2_gcm(iim+1,jjm+1,timelen))
    523503     allocate(q_h2o_GCM(iim+1,jjm+1,timelen))
     
    552532     print *, "Downloading data Y1..."
    553533
    554      call read_data_GCM("data_GCM_Y1.nc",timelen, iim,jjm, min_h2o_ice_s_1,min_co2_ice_s_1,vmr_co2_gcm,ps_GCM_yr1,min_co2_ice_slope_1,min_h2o_ice_slope_1,&   
     534     call read_data_GCM("data_GCM_Y1.nc",timelen, iim,jjm,vmr_co2_gcm,ps_GCM_yr1,min_co2_ice_slope_1,min_h2o_ice_slope_1,&   
    555535                       nslope,tsurf_ave_yr1,tsoil_ave_yr1, tsurf_GCM_timeseries,tsoil_GCM_timeseries,TI_GCM,q_co2_GCM,q_h2o_GCM,co2_ice_GCM_slope, &     
    556536                       watersurf_density_timeseries,watersoil_density_timeseries)
     
    560540     print *, "Downloading data Y1 done"
    561541
    562      allocate(min_h2o_ice_s_2(iim+1,jjm+1))
    563      allocate(min_co2_ice_s_2(iim+1,jjm+1))
    564542     allocate(min_co2_ice_slope_2(iim+1,jjm+1,nslope))
    565543     allocate(min_h2o_ice_slope_2(iim+1,jjm+1,nslope))
     
    567545     print *, "Downloading data Y2"
    568546
    569      call read_data_GCM("data_GCM_Y2.nc",timelen,iim,jjm ,min_h2o_ice_s_2,min_co2_ice_s_2,vmr_co2_gcm,ps_GCM,min_co2_ice_slope_2,min_h2o_ice_slope_2, &
     547     call read_data_GCM("data_GCM_Y2.nc",timelen,iim,jjm,vmr_co2_gcm,ps_GCM,min_co2_ice_slope_2,min_h2o_ice_slope_2, &
    570548                  nslope,tsurf_ave,tsoil_ave, tsurf_GCM_timeseries,tsoil_GCM_timeseries,TI_GCM,q_co2_GCM,q_h2o_GCM,co2_ice_GCM_slope, &     
    571549                  watersurf_density_timeseries,watersoil_density_timeseries)
     
    639617      deallocate(TI_GCM)
    640618      deallocate(tsurf_GCM_timeseries)
    641 
    642619
    643620   if(soil_pem) then
     
    654631           CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,watersoil_density_timeseries(:,:,l,islope,t),watersoil_density_phys_PEM_timeseries(:,l,islope,t))
    655632           ENDDO
    656 
    657633        ENDDO
    658634        DO l=nsoilmx+1,nsoilmx_PEM
     
    664640        ENDDO
    665641      ENDDO
    666        watersoil_density_phys_PEM_ave(:,:,:) = SUM(watersoil_density_phys_PEM_timeseries(:,:,:,:),4)/timelen
     642      watersoil_density_phys_PEM_ave(:,:,:) = SUM(watersoil_density_phys_PEM_timeseries(:,:,:,:),4)/timelen
    667643      watersurf_density_phys_ave(:,:) = SUM(watersurf_density_phys_timeseries(:,:,:),3)/timelen
    668644      deallocate(watersurf_density_timeseries)
     
    685661
    686662!----- Compute tendencies from the PCM run
    687 
    688      allocate(tendencies_h2o_ice(iim+1,jjm+1))
    689      allocate(tendencies_h2o_ice_phys(ngrid))
    690      allocate(tendencies_co2_ice(iim+1,jjm+1))
    691      allocate(tendencies_co2_ice_phys(ngrid))
    692663     allocate(tendencies_co2_ice_slope(iim+1,jjm+1,nslope))
    693664     allocate(tendencies_co2_ice_phys_slope(ngrid,nslope))
     
    697668
    698669!  Compute the tendencies of the evolution of ice over the years
    699 
    700       call compute_tendencies(tendencies_h2o_ice,min_h2o_ice_s_1,&
    701              min_h2o_ice_s_2,iim,jjm,ngrid,tendencies_h2o_ice_phys)
    702 
    703       call compute_tendencies(tendencies_co2_ice,min_co2_ice_s_1,&
    704              min_co2_ice_s_2,iim,jjm,ngrid,tendencies_co2_ice_phys)
    705670
    706671      call compute_tendencies_slope(tendencies_co2_ice_slope,min_co2_ice_slope_1,&
     
    725690!---------------------------- Save initial PCM situation ---------------------
    726691
    727      allocate(initial_h2o_ice(ngrid))
    728      allocate(initial_co2_ice(ngrid))
    729692     allocate(initial_co2_ice_sublim_slope(ngrid,nslope))
    730693     allocate(initial_co2_ice_slope(ngrid,nslope))
     
    733696! We save the places where water ice is sublimating
    734697! We compute the surface of water ice sublimating
    735   ini_surf=0.
    736698  ini_surf_co2=0.
    737699  ini_surf_h2o=0.
     
    739701  do i=1,ngrid
    740702    Total_surface=Total_surface+cell_area(i)
    741     if (tendencies_h2o_ice_phys(i).LT.0) then
    742          initial_h2o_ice(i)=1.
    743          ini_surf=ini_surf+cell_area(i)
    744     else
    745          initial_h2o_ice(i)=0.         
    746     endif
    747703    do islope=1,nslope
    748704      if (tendencies_co2_ice_phys_slope(i,islope).LT.0) then
     
    767723
    768724     print *, "Total initial surface of co2ice sublimating (slope)=", ini_surf_co2
    769      print *, "Total initial surface of h2o ice sublimating=", ini_surf
    770725     print *, "Total initial surface of h2o ice sublimating (slope)=", ini_surf_h2o
    771726     print *, "Total surface of the planet=", Total_surface
     
    813768      enddo
    814769    enddo
    815 
    816 
    817770
    818771    if(adsorption_pem) then
     
    889842      do i=1,ngrid
    890843        global_ave_press_new = global_ave_press_new -g*cell_area(i)*delta_co2_adsorbded(i)/Total_surface
    891        enddo
     844      enddo
     845      print *, 'Global average pressure old time step',global_ave_press_old
     846      print *, 'Global average pressure new time step',global_ave_press_new
    892847     endif
    893        print *, 'Global average pressure old time step',global_ave_press_old
    894        print *, 'Global average pressure new time step',global_ave_press_new
     848
     849     call WRITEDIAGFI(ngrid,'ps_ave','Global average pressure','Pa',0,global_ave_press_new)
    895850
    896851! II.a.2. Old pressure levels for the timeseries, this value is deleted when unused and recreated each time (big memory consuption)
     
    961916     call evol_h2o_ice_s_slope(qsurf_slope(:,igcm_h2o_ice,:),tendencies_h2o_ice_phys_slope,iim,jjm,ngrid,cell_area,STOPPING_1_water,nslope)
    962917
     918     DO islope=1, nslope
     919       write(str2(1:2),'(i2.2)') islope
     920       call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf_slope(:,igcm_h2o_ice,islope))
     921       call WRITEDIAGFI(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice_phys_slope(:,islope))
     922     ENDDO
    963923
    964924      print *, "Evolution of co2 ice"
     
    976936      print *, "Co2 glacier flows"
    977937
    978 
    979 
    980938    call co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_pem_phys,ps_phys_timeseries,&
    981939                         global_ave_press_GCM,global_ave_press_new,co2ice_slope,flag_co2flow,flag_co2flow_mesh)
    982940
    983 
    984 
    985 
     941     DO islope=1, nslope
     942       write(str2(1:2),'(i2.2)') islope
     943       call WRITEDIAGFI(ngrid,'co2ice_slope'//str2,'CO2 ice','kg.m-2',2,co2ice_slope(:,islope))
     944       call WRITEDIAGFI(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice_phys_slope(:,islope))
     945     ENDDO
    986946
    987947!------------------------
     
    10631023      enddo
    10641024
     1025     DO islope=1, nslope
     1026       write(str2(1:2),'(i2.2)') islope
     1027       call WRITEDIAGFI(ngrid,'tsurf_slope'//str2,'tsurf','K',2,tsurf_slope(:,islope))
     1028     ENDDO
    10651029
    10661030    if(soil_pem) then
     
    10901054         enddo
    10911055       enddo
    1092 
    1093 
    10941056     enddo
    10951057  enddo
    10961058     tsoil_PEM(:,:,:) = SUM(tsoil_phys_PEM_timeseries(:,:,:,:),4)/timelen
    10971059     watersoil_density_phys_PEM_ave(:,:,:)= SUM(watersoil_density_phys_PEM_timeseries(:,:,:,:),4)/timelen
    1098 
    10991060
    11001061  print *, "Update of soil temperature done"
     
    11341095
    11351096      print *, "Adaptation of the new co2 tendencies to the current pressure"
    1136       call recomp_tend_co2_slope(tendencies_co2_ice_phys_slope,tendencies_co2_ice_phys_slope_ini,vmr_co2_gcm_phys,vmr_co2_pem_phys,ps_phys_timeseries,&     
     1097      call recomp_tend_co2_slope(tendencies_co2_ice_phys_slope,tendencies_co2_ice_phys_slope_ini,co2ice_slope,vmr_co2_gcm_phys,vmr_co2_pem_phys,ps_phys_timeseries,&     
    11371098                               global_ave_press_GCM,global_ave_press_new,timelen,ngrid,nslope)
    11381099
     
    11541115
    11551116      year_iter=year_iter+dt_pem
    1156 
    1157      
    11581117
    11591118      print *, "Checking all the stopping criterion."
     
    11911150      endif
    11921151
    1193 
    1194 
    11951152      global_ave_press_old=global_ave_press_new
    11961153
     
    12231180      ENDDO ! of DO ig=1,ngrid
    12241181
    1225 
    12261182! H2O ice
    1227 
    1228 
    1229 
    12301183     DO ig=1,ngrid
    12311184       if(watercaptag(ig)) then
    1232        
    12331185         watercap_sum=0.
    12341186         DO islope=1,nslope
     
    12471199     enddo
    12481200
    1249 
    12501201      DO ig = 1,ngrid
    12511202        qsurf(ig,igcm_h2o_ice) = 0.
     
    12581209
    12591210     DO ig=1,ngrid
    1260 !       DO islope=1,nslope
    1261          if(qsurf(ig,igcm_h2o_ice).GT.500) then
     1211       DO islope=1,nslope
     1212         if(qsurf_slope(ig,igcm_h2o_ice,islope).GT.500) then
    12621213            watercaptag(ig)=.true.
    1263        DO islope=1,nslope
    12641214            qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)-250
    12651215            water_reservoir(ig)=water_reservoir(ig)+250
    1266        ENDDO
    12671216         endif
    1268 !       enddo
     1217       enddo
    12691218     enddo
    12701219
     
    12771226       ENDDO
    12781227         endif
    1279 
    12801228     enddo
    12811229
     
    12891237      ENDDO ! of DO ig=1,ngrid
    12901238
    1291 
    1292 
    1293 
    1294 
    1295      
    1296 
    1297 
    12981239! III_a.2  Tsoil update (for startfi)
    12991240
     
    13041245      TI_GCM_phys(:,:,:)=TI_GCM_start(:,:,:)
    13051246   endif !soil_pem
    1306 
    13071247
    13081248#ifndef CPP_STD
     
    13391279      ENDDO
    13401280    ENDDO
    1341 
    13421281
    13431282      DO ig = 1,ngrid
     
    14101349     DO ig=1,ngrid
    14111350       if(watercaptag(ig)) then
    1412          print *, "INNN"
    14131351         WC_sum=0.
    14141352         DO islope=1,nslope
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r2888 r2893  
    9191write(*,*)'Is start PEM?',startpem_file
    9292
    93 startpem_file = .false.
     93startpem_file = .true.
    9494!1. Run
    9595
     
    317317      do ig=1,ngrid
    318318        if(watercaptag(ig)) then
    319            water_reservoir=water_reservoir_nom
     319           water_reservoir(ig)=water_reservoir_nom
    320320        else
    321            water_reservoir=0.
     321           water_reservoir(ig)=0.
    322322        endif
    323323      enddo
     
    483483endif !soil_pem
    484484
    485 endif ! of if (startphy_file)
    486 
    487 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    488    
    489 
    490 
    491485!. e) water reservoir
    492486
     
    502496
    503497#endif
     498
     499endif ! of if (startphy_file)
     500
     501!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    504502
    505503if(soil_pem) then
  • trunk/LMDZ.COMMON/libf/evolution/read_data_GCM.F90

    r2888 r2893  
    22! $Id $
    33!
    4 SUBROUTINE read_data_GCM(fichnom,timelen, iim_input,jjm_input,min_h2o_ice_s,min_co2_ice_s,vmr_co2_gcm,ps_GCM, &
     4SUBROUTINE read_data_GCM(fichnom,timelen, iim_input,jjm_input,vmr_co2_gcm,ps_GCM, &
    55             min_co2_ice_slope,min_h2o_ice_slope,nslope,tsurf_ave,tsoil_ave,tsurf_gcm,tsoil_gcm,TI_ave,q_co2_GCM,q_h2o_GCM,co2_ice_slope, &
    66             watersurf_density,watersoil_density)
     
    3131
    3232! Ouputs
    33   REAL, INTENT(OUT) ::  min_h2o_ice_s(iim_input+1,jjm_input+1) ! Minimum of h2o ice, mesh averaged of the year  [kg/m^2]
    34   REAL, INTENT(OUT) ::  min_co2_ice_s(iim_input+1,jjm_input+1) ! Minimum of co2 ice, mesh averaged  of the year [kg/m^2]
    3533  REAL, INTENT(OUT) ::  min_co2_ice_slope(iim_input+1,jjm_input+1,nslope) ! Minimum of co2 ice  per slope of the year [kg/m^2]
    3634  REAL, INTENT(OUT) ::  min_h2o_ice_slope(iim_input+1,jjm_input+1,nslope) ! Minimum of h2o ice per slope of the year [kg/m^2]
     
    7876      B=1/m_noco2
    7977
    80       allocate(co2_ice_s(iim+1,jjm+1,timelen))
    8178      allocate(h2o_ice_s_slope(iim+1,jjm+1,nslope,timelen))
    82       allocate(watercap_slope(iim_input+1,jjm_input+1,nslope,timelen))
    83       allocate(h2o_ice_s(iim+1,jjm+1,timelen))
    8479      allocate(watercap_slope(iim_input+1,jjm_input+1,nslope,timelen))
    8580
     
    9085  CALL err(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var)
    9186
    92      print *, "Downloading data for h2oice ..."
    93 
    94 ! Get h2o_ice_s of the concatenated file
    95   CALL get_var3("h2o_ice_s"   ,h2o_ice_s)
    96 
    97      print *, "Downloading data for h2oice done"
    98      print *, "Downloading data for co2ice ..."
    99 
    100   CALL get_var3("co2ice"   ,co2_ice_s)
    101 
    102      print *, "Downloading data for co2ice done"
    10387     print *, "Downloading data for vmr co2..."
    10488
     
    202186
    203187! Compute the minimum over the year for each point
    204   print *, "Computing the min of h2o_ice"
    205   min_h2o_ice_s(:,:)=minval(h2o_ice_s,3)
    206   print *, "Computing the min of co2_ice"
    207   min_co2_ice_s(:,:)=minval(co2_ice_s,3)
    208 
    209188  print *, "Computing the min of h2o_ice_slope"
    210189  min_h2o_ice_slope(:,:,:)=minval(h2o_ice_s_slope+watercap_slope,4)
     
    227206  DO i=1,iim+1
    228207    DO j = 1, jjm+1
    229        if (min_co2_ice_s(i,j).LT.0) then
    230           min_h2o_ice_s(i,j)  = 0.
    231           min_co2_ice_s(i,j)  = 0.
    232        endif
    233208       DO islope=1,nslope
    234209          if (min_co2_ice_slope(i,j,islope).LT.0) then
     
    261236  ENDDO
    262237
    263 
    264       deallocate(co2_ice_s)
    265238      deallocate(h2o_ice_s_slope)
    266       deallocate(h2o_ice_s)
    267 
    268239
    269240  CONTAINS
  • trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_slope.F90

    r2863 r2893  
    22! $Id $
    33!
    4 SUBROUTINE recomp_tend_co2_slope(tendencies_co2_ice_phys,tendencies_co2_ice_phys_ini,vmr_co2_gcm,vmr_co2_pem,ps_GCM_2,global_ave_press_GCM,global_ave_press_new,timelen,ngrid,nslope)
     4SUBROUTINE recomp_tend_co2_slope(tendencies_co2_ice_phys,tendencies_co2_ice_phys_ini,co2ice_slope,vmr_co2_gcm,vmr_co2_pem,ps_GCM_2,global_ave_press_GCM,global_ave_press_new,timelen,ngrid,nslope)
    55
    66      IMPLICIT NONE
     
    2323  REAL, intent(in) :: global_ave_press_new
    2424  REAL, intent(in) ::  tendencies_co2_ice_phys_ini(ngrid,nslope) ! physical point field : Evolution of perenial ice over one year
     25  REAL, intent(in) :: co2ice_slope(ngrid,nslope)
    2526
    2627!   OUTPUT
     
    3940  alpha=23.3494
    4041
    41   coef=669*24*3600*eps*sigma/L
     42  coef=669*88875*eps*sigma/L
    4243
    4344! Evolution of the water ice for each physical point
     
    4546    do islope=1,nslope
    4647      ave=0.
    47       if(abs(tendencies_co2_ice_phys(i,islope)).gt.1e-4) then
     48!      if(abs(tendencies_co2_ice_phys(i,islope)).gt.1e-4) then
     49      if(co2ice_slope(i,islope).gt.1e-4 .and. abs(tendencies_co2_ice_phys(i,islope)).gt.1e-5) then
    4850        do t=1,timelen
    4951           ave=ave+(beta/(alpha-log(vmr_co2_gcm(i,t)*ps_GCM_2(i,t)/100.)))**4  &
    50               -(beta/(alpha-log(vmr_co2_pem(i,t)*ps_GCM_2(i,t)*global_ave_press_GCM/global_ave_press_new/100.)))**4
     52              -(beta/(alpha-log(vmr_co2_pem(i,t)*ps_GCM_2(i,t)*(global_ave_press_new/global_ave_press_GCM)/100.)))**4
    5153         enddo
    5254      endif
  • trunk/LMDZ.COMMON/libf/evolution/temps_mod_evol.F90

    r2888 r2893  
    33IMPLICIT NONE 
    44
    5   INTEGER   year_bp_ini     !     year_bp_ini : Initial year of the simulation of the PEM (in evol.def)
    6   INTEGER   dt_pem          !     dt_pem  : in years, the time step used by the PEM   
    7   REAL      ice_criterion   !     ice_criterion : percentage of change of ice before stopping the PEM
    8   REAL      ps_criterion    !     ice_criterion : percentage of change of ice before stopping the PEM
    9   INTEGER   year_PEM        !     year written in startfiPEM.nc
    10   INTEGER   Max_iter_pem    !     Maximal number of iteration when converging to a steady state, read in evol.def
    11   LOGICAL   evol_orbit_pem  !     True if we want to follow the orbital parameters of ob_ex_lsp.asc, read in evol.def
     5  INTEGER   year_bp_ini         !     year_bp_ini : Initial year of the simulation of the PEM (in evol.def)
     6  INTEGER   dt_pem              !     dt_pem  : in Planetary years, the time step used by the PEM   
     7  REAL      water_ice_criterion !     Percentage of change of the surface of water ice sublimating before stopping the PEM
     8  REAL      co2_ice_criterion   !     Percentage of change of the surface of co2 ice sublimating before stopping the PEM
     9  REAL      ps_criterion        !     Percentage of change of averaged surface pressure before stopping the PEM
     10  INTEGER   year_PEM            !     year written in startfiPEM.nc
     11  INTEGER   Max_iter_pem        !     Maximal number of iteration when converging to a steady state, read in evol.def
     12  LOGICAL   evol_orbit_pem      !     True if we want to follow the orbital parameters of ob_ex_lsp.asc, read in evol.def
    1213
    1314END MODULE temps_mod_evol
  • trunk/LMDZ.MARS/README

    r2892 r2893  
    38603860Change back the modification of r2883 to its original form + Retrocompatibility for icelocation_mode.ne.5 in surfini
    38613861
     3862== 10/02/2023 == RV
     3863Correction of recomp_tend_co2 formula and make it dependent on the presence of co2_ice.
     3864Add different stopping criterion for water_ice and co2_ice called : water_ice_criterion and co2_ice_criterion.
     3865Add the possibility to output a diagfi.nc each year for the amount of ice, the tendencies, tsurf and ps.
     3866Remove useless variables (not sloped)
     3867Remove useless file
     3868Some cleaning
     3869
Note: See TracChangeset for help on using the changeset viewer.