Changeset 3082


Ignore:
Timestamp:
Oct 11, 2023, 1:40:58 PM (14 months ago)
Author:
jbclement
Message:

PEM:

  • Correction of a bug in the initialization of constants. The correct modules are now used: 'comcstfi_h' (and no longer 'comconst_mod'!) in the general case and 'comcstfi_mod' in the case of generic model;
  • Addition of the variable 'ecritpem' in "run_PEM.def" to set the frequency of outputs in the "diagfi.nc". By default, 'ecritpem = 1' which means there is one output at each PEM year.

JBC

Location:
trunk
Files:
12 edited

Legend:

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

    r2985 r3082  
    1   module adsorption_mod 
     1module adsorption_mod
     2
    23  implicit none
     4
    35  LOGICAL adsorption_pem ! True by default, to compute adsorption/desorption. Read in  pem.def
    46  real, save, allocatable :: co2_adsorbded_phys(:,:,:)  ! co2 that is in the regolith [kg/m^2]
    57  real, save, allocatable :: h2o_adsorbded_phys(:,:,:)  ! h2o that is in the regolith [kg/m^2]
     8
    69  contains
    710
     
    8689
    8790      use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock
    88       USE comconst_mod, only:  pi
    8991      use comslope_mod, only : subslope_dist,def_slope_mean
    9092      use vertical_layers_mod, ONLY: ap,bp
     
    9294                                      m_h2o,m_co2,m_noco2, &
    9395                                      rho_regolith
    94 
     96#ifndef CPP_STD
     97    use comcstfi_h,   only: pi
     98#else
     99    use comcstfi_mod, only: pi
     100#endif
    95101
    96102 implicit none
     
    243249
    244250      use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock,index_breccia
    245       USE comconst_mod, only: pi
    246251      use comslope_mod, only : subslope_dist,def_slope_mean
    247252      use vertical_layers_mod, ONLY: ap,bp
    248253      use constants_marspem_mod, only: m_co2, m_noco2,rho_regolith
     254#ifndef CPP_STD
     255    use comcstfi_h,   only: pi
     256#else
     257    use comcstfi_mod, only: pi
     258#endif
    249259
    250260      IMPLICIT NONE
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3076 r3082  
    9797    - Correction of a bug in "pem.F90" when calling 'recomp_tend_co2_slope'. The arguments were given in disorder and emissivity was missing;
    9898    - Update of "launch_pem.sh" in deftank.
     99
     100== 11/10/2023 == JBC
     101    - Correction of a bug in the initialization of constants. The correct modules are now used: 'comcstfi_h' (and no longer 'comconst_mod'!) in the general case and 'comcstfi_mod' in the case of generic model;
     102    - Addition of the variable 'ecritpem' in "run_PEM.def" to set the frequency of outputs in the "diagfi.nc". By default, 'ecritpem = 1' which means there is one output at each PEM year.
  • trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90

    r3076 r3082  
    2323#endif
    2424
    25 use time_evol_mod,  only: year_bp_ini, dt_pem, water_ice_criterion, co2_ice_criterion, ps_criterion, Max_iter_pem, &
     25use time_evol_mod,    only: year_bp_ini, dt_pem, water_ice_criterion, co2_ice_criterion, ps_criterion, Max_iter_pem, &
    2626                          evol_orbit_pem, var_obl, var_ecc, var_lsp, convert_years
    27 use comsoil_h_pem,  only: soil_pem, fluxgeo, water_reservoir_nom, depth_breccia, depth_bedrock, reg_thprop_dependp
    28 use adsorption_mod, only: adsorption_pem
    29 use glaciers_mod,   only: co2glaciersflow, h2oglaciersflow
    30 use ice_table_mod,  only: icetable_equilibrium, icetable_dynamic
     27use comsoil_h_pem,    only: soil_pem, fluxgeo, water_reservoir_nom, depth_breccia, depth_bedrock, reg_thprop_dependp
     28use adsorption_mod,   only: adsorption_pem
     29use glaciers_mod,     only: co2glaciersflow, h2oglaciersflow
     30use ice_table_mod,    only: icetable_equilibrium, icetable_dynamic
     31use time_phylmdz_mod, only: ecritphy
    3132
    3233implicit none
     
    5051endif
    5152close(100)
     53
     54! #---------- Output parameters
     55! Frequency of outputs for the PEM
     56ecritphy = 1 ! Default value: every year
     57call getin('ecritpem',ecritphy)
    5258
    5359! #---------- Orbital parameters
  • trunk/LMDZ.COMMON/libf/evolution/evol_h2o_ice_s_mod.F90

    r3050 r3082  
    1010  use comslope_mod,           only: subslope_dist, def_slope_mean
    1111  use criterion_pem_stop_mod, only: criterion_waterice_stop
    12   use comconst_mod,           only: pi
     12#ifndef CPP_STD
     13    use comcstfi_h,   only: pi
     14#else
     15    use comcstfi_mod, only: pi
     16#endif
    1317
    1418  IMPLICIT NONE
  • trunk/LMDZ.COMMON/libf/evolution/glaciers_mod.F90

    r3076 r3082  
    1313
    1414contains
    15 
    1615
    1716subroutine co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_PEM,ps_GCM,global_ave_ps_GCM,global_ave_ps_PEM,co2ice,flag_co2flow,flag_co2flow_mesh)
     
    101100
    102101
    103 
    104102subroutine compute_hmaxglaciers(ngrid,nslope,iflat,def_slope_mean,Tice,name_ice,hmax)
    105103
    106 use comconst_mod,  only: pi,g
    107104use abort_pem_mod, only: abort_pem
     105#ifndef CPP_STD
     106    use comcstfi_h,   only: pi, g
     107#else
     108    use comcstfi_mod, only: pi, g
     109#endif
    108110
    109111!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    181183!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    182184
    183 use comconst_mod,  only: pi
    184185use abort_pem_mod, only: abort_pem
    185 
     186#ifndef CPP_STD
     187    use comcstfi_h,   only: pi
     188#else
     189    use comcstfi_mod, only: pi
     190#endif
    186191
    187192implicit none
  • trunk/LMDZ.COMMON/libf/evolution/ice_table_mod.F90

    r3032 r3082  
    146146!!!
    147147!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    148     use comsoil_h_PEM, only: mlayer_PEM   
    149     use comslope_mod, only: subslope_dist,def_slope_mean           
    150     use comconst_mod,only: pi       
     148    use comsoil_h_PEM, only: mlayer_PEM
     149    use comslope_mod, only: subslope_dist,def_slope_mean
    151150    use constants_marspem_mod,only:porosity
     151#ifndef CPP_STD
     152    use comcstfi_h,   only: pi
     153#else
     154    use comcstfi_mod, only: pi
     155#endif
     156
    152157    implicit none
    153158!   inputs
  • trunk/LMDZ.COMMON/libf/evolution/orbit_param_criterion_mod.F90

    r3076 r3082  
    2424#endif
    2525#ifndef CPP_STD
    26     use planete_h,   only: e_elips, obliquit, lsperi
     26    use planete_h,    only: e_elips, obliquit, lsperi
     27    use comcstfi_h,   only: pi
    2728#else
    28     use planete_mod, only: e_elips, obliquit, lsperi
     29    use planete_mod,  only: e_elips, obliquit, lsperi
     30    use comcstfi_mod, only: pi
    2931#endif
    3032use time_evol_mod,  only: year_bp_ini, var_obl, var_ecc, var_lsp, convert_years
    31 use comconst_mod,   only: pi
    3233use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, ini_lask_param_mod, last_ilask
    3334
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3076 r3082  
    8282    use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master
    8383    use planete_h,          only: aphelie, periheli, year_day, peri_day, obliquit
    84     use comcstfi_h,         only: r, mugaz
    8584    use paleoclimate_mod,   only: albedo_perenialco2
     85    use comcstfi_h,         only: pi, rad, g, cpp, mugaz, r
    8686#else
    8787    use tracer_h,           only: noms, igcm_h2o_ice, igcm_co2 ! Tracer names
     
    9191    use aerosol_mod,        only: iniaerosol
    9292    use planete_mod,        only: apoastr, periastr, year_day, peri_day, obliquit
    93     use comcstfi_mod,       only: r, mugaz
     93    use comcstfi_mod,       only: pi, rad, g, cpp, mugaz, r
    9494#endif
    9595
     
    9797    use iniphysiq_mod,            only: iniphysiq
    9898    use control_mod,              only: iphysiq, day_step, nsplit_phys
    99     use comconst_mod,             only: rad, g, cpp, pi
    10099#else
    101100    use time_phylmdz_mod,         only: iphysiq, day_step
    102     use comcstfi_h,               only: pi, rad, g, cpp
    103101    use regular_lonlat_mod,       only: init_regular_lonlat
    104102    use physics_distribution_mod, only: init_physics_distribution
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r3076 r3082  
    155155    enddo ! islope
    156156
    157     write(*,*) 'PEMETAT0: THERMAL INERTIA doNE'
     157    write(*,*) 'PEMETAT0: THERMAL INERTIA done'
    158158
    159159! b. Special case for inertiedat, inertiedat_PEM
     
    254254enddo ! islope
    255255
    256 write(*,*) 'PEMETAT0: SOIL TEMP  doNE'
     256write(*,*) 'PEMETAT0: SOIL TEMP done'
    257257
    258258!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    269269   endif
    270270
    271 write(*,*) 'PEMETAT0: ICE TABLE  doNE'
     271write(*,*) 'PEMETAT0: ICE TABLE done'
    272272
    273273!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    303303       deltam_h2o_regolith_phys(:) = 0.
    304304    endif
    305 write(*,*) 'PEMETAT0: CO2 & H2O adsorption doNE'
     305write(*,*) 'PEMETAT0: CO2 & H2O adsorption done'
    306306    endif
    307307endif ! soil_pem
     
    402402 enddo
    403403
    404 write(*,*) 'PEMETAT0: TI doNE'
     404write(*,*) 'PEMETAT0: TI done'
    405405
    406406!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    441441        enddo
    442442enddo !islope
    443 write(*,*) 'PEMETAT0: TSOIL doNE'
     443write(*,*) 'PEMETAT0: TSOIL done'
    444444
    445445!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    450450         call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope))
    451451       enddo
    452        write(*,*) 'PEMETAT0: Ice table doNE'
     452       write(*,*) 'PEMETAT0: Ice table done'
    453453
    454454!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    465465endif
    466466
    467 write(*,*) 'PEMETAT0: CO2 adsorption doNE'
     467write(*,*) 'PEMETAT0: CO2 adsorption done'
    468468endif !soil_pem
    469469
  • trunk/LMDZ.COMMON/libf/evolution/pemredem.F90

    r3039 r3082  
    2424#else
    2525  use planete_mod,  only: apoastr, emin_turb, lmixmin, obliquit, peri_day, periastr, year_day
    26   use comconst_mod, only: g, omeg, rad
    27   use comcstfi_mod, only: mugaz, rcp
     26  use comcstfi_mod, only: g, mugaz, omeg, rad, rcp
    2827#endif
    2928
  • trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90

    r3076 r3082  
    1818use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, end_lask_param_mod, last_ilask
    1919#ifndef CPP_STD
    20     use comconst_mod, only: pi
     20    use comcstfi_h,  only: pi
    2121    use planete_h,    only: e_elips, obliquit, lsperi, periheli, aphelie, p_elips, peri_day, year_day
    2222#else
     23    use comcstfi_mod, only: pi
    2324    use planete_mod,  only: e_elips, obliquit, lsperi, periastr, apoastr, p_elips, peri_day, year_day
    24     use comcstfi_mod, only: pi
    2525#endif
    2626
  • trunk/LMDZ.MARS/deftank/pem/run_PEM.def

    r3038 r3082  
    33# Run control parameters for the PEM
    44#-------------------------------------
     5
     6#---------- Output parameters ----------#
     7# Frequency of outputs for the PEM? Default = 1
     8ecritpem=1
    59
    610#---------- Orbital parameters ----------#
Note: See TracChangeset for help on using the changeset viewer.