Changeset 3181 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Jan 25, 2024, 2:33:52 PM (10 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3178 r3181 204 204 gathered in an unique Tsoil module. 205 205 (cosmetic commit) 206 207 == 09/01/2023 == JBC 208 - Addition of a script "inipem_orbit.sh" in the deftank to modify the orbital parameters of a file "startfi.nc" according to the date set in the file "run_PEM.def" and data found in "obl_ecc_lsp.asc"; 209 - Flow of glaciers is now computed only when there are slopes; 210 - Reversion to the name "diagpem.nc" for the PEM outputs (as decided) which was modified in r3171; 211 - Some small cleanings. -
trunk/LMDZ.COMMON/libf/evolution/constants_marspem_mod.F90
r3161 r3181 3 3 implicit none 4 4 5 ! Duration of a year and day 5 ! Duration of a year and day 6 6 integer, parameter :: sols_per_my = 669 ! Number of Sols per year 7 7 real, parameter :: sec_per_sol = 88775. ! Duration of a sol, in seconds 8 8 9 ! Molecular masses for CO2,H2O and non condensible gaz, following Franz et al. 2017 10 real, parameter :: m_co2 = 44.01e-3 ! CO2 molecular mass (kg/mol) 11 real, parameter :: m_noco2 = 33.37e-3 ! Non condensible mol mass (kg/mol) 9 ! Molecular masses for CO2,H2O and non condensible gaz, following Franz et al. 2017 10 real, parameter :: m_co2 = 44.01e-3 ! CO2 molecular mass (kg/mol) 11 real, parameter :: m_noco2 = 33.37e-3 ! Non condensible mol mass (kg/mol) 12 12 real, parameter :: m_h2o = 18.01528e-3 ! Molecular weight of h2o (kg/mol) 13 13 … … 20 20 real, parameter :: beta_clap_h2o = -6143.7 ! Kelvin, Murphy and Koop 2005 21 21 22 ! Density of the regolith (Zent et al., 1995, Buhler and Piqueux 2021) 22 ! Density of the regolith (Zent et al., 1995, Buhler and Piqueux 2021) 23 23 real, parameter :: rho_regolith = 2000. ! kg/m^3 24 24 … … 32 32 33 33 ! Stefan Boltzmann constant 34 real, parameter :: sigmaB = 5.678e-8 34 real, parameter :: sigmaB = 5.678e-8 35 35 36 36 ! Latent heat of CO2 -
trunk/LMDZ.COMMON/libf/evolution/deftank/launch_orb_1Dchained.sh
r3173 r3181 31 31 #------------------ Modify here the name of PCM exe -------------------- 32 32 ## fill in the name of executable for PCM: 33 exePCM= testphys1d_29_phymars_para.e33 exePCM="testphys1d_29_phymars_para.e" 34 34 35 35 #----------- Modify here the name of the orbital data file ------------- 36 36 ## fill in the name of executable for PCM: 37 orb_data= obl_ecc_lsp.asc37 orb_data="obl_ecc_lsp.asc" 38 38 39 39 #------ Check if files/directories necessary for the script exist ------ -
trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh
r3145 r3181 32 32 #------------------ Modify here the name of PEM exe -------------------- 33 33 ## fill in the name of executable for PEM: 34 exePEM= pem_29_phymars_seq.e34 exePEM="pem_29_phymars_seq.e" 35 35 36 36 #-------------- Modify here the name of reshape XIOS exe --------------- 37 37 ## fill in the name of executable for reshape XIOS: 38 exeReshape= reshape_XIOS_output_64x48x29_phymars_seq.e38 exeReshape="reshape_XIOS_output_64x48x29_phymars_seq.e" 39 39 40 40 #------ Check if files/directories necessary for the script exist ------ -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3178 r3181 68 68 use recomp_tend_co2_slope_mod, only: recomp_tend_co2_slope 69 69 use compute_soiltemp_mod, only: compute_tsoil_pem 70 use writediagpem_mod, only: writediag fipem, writediagsoilpem70 use writediagpem_mod, only: writediagpem, writediagsoilpem 71 71 72 72 #ifndef CPP_STD … … 219 219 logical :: bool_sublim ! logical to check if there is sublimation or not 220 220 real, dimension(:,:), allocatable :: porefillingice_thickness_prev_iter ! ngrid x nslope: Thickness of the ice table at the previous iteration [m] 221 real, dimension(:), allocatable :: delta_h2o_icetablesublim (:)! ngrid x Total mass of the H2O that has sublimated / condenses from the ice table [kg]221 real, dimension(:), allocatable :: delta_h2o_icetablesublim ! ngrid x Total mass of the H2O that has sublimated / condenses from the ice table [kg] 222 222 223 223 ! Some variables for the PEM run … … 725 725 ! II_c Flow of glaciers 726 726 !------------------------ 727 if (co2ice_flow ) call flow_co2glaciers(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_PEM_phys,ps_timeseries, &727 if (co2ice_flow .and. nslope > 1) call flow_co2glaciers(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_PEM_phys,ps_timeseries, & 728 728 global_avg_press_PCM,global_avg_press_new,co2_ice,flag_co2flow,flag_co2flow_mesh) 729 if (h2oice_flow ) call flow_h2oglaciers(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,tsurf_ave,h2o_ice,flag_h2oflow,flag_h2oflow_mesh)729 if (h2oice_flow .and. nslope > 1) call flow_h2oglaciers(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,tsurf_ave,h2o_ice,flag_h2oflow,flag_h2oflow_mesh) 730 730 731 731 !------------------------ … … 776 776 do t = 1,timelen 777 777 if (co2_ice_PCM(ig,islope,t) > 1.e-3) then 778 ave = ave + beta_clap_co2/(alpha_clap_co2 -log(vmr_co2_PEM_phys(ig,t)*ps_timeseries(ig,t)/100.))778 ave = ave + beta_clap_co2/(alpha_clap_co2 - log(vmr_co2_PEM_phys(ig,t)*ps_timeseries(ig,t)/100.)) 779 779 else 780 780 ave = ave + tsurf_PCM_timeseries(ig,islope,t) … … 874 874 ! II_e Outputs 875 875 !------------------------ 876 call writediag fipem(ngrid,'ps_ave','Global average pressure','Pa',0,(/global_avg_press_new/))876 call writediagpem(ngrid,'ps_ave','Global average pressure','Pa',0,(/global_avg_press_new/)) 877 877 do islope = 1,nslope 878 878 write(str2(1:2),'(i2.2)') islope 879 call writediag fipem(ngrid,'h2o_ice_slope'//str2,'H2O ice','kg.m-2',2,h2o_ice(:,islope))880 call writediag fipem(ngrid,'co2_ice_slope'//str2,'CO2 ice','kg.m-2',2,co2_ice(:,islope))881 call writediag fipem(ngrid,'tend_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tend_h2o_ice(:,islope))882 call writediag fipem(ngrid,'tend_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tend_co2_ice(:,islope))883 call writediag fipem(ngrid,'Flow_co2ice_slope'//str2,'CO2 ice flow','Boolean',2,flag_co2flow(:,islope))884 call writediag fipem(ngrid,'tsurf_slope'//str2,'tsurf','K',2,tsurf(:,islope))879 call writediagpem(ngrid,'h2o_ice_slope'//str2,'H2O ice','kg.m-2',2,h2o_ice(:,islope)) 880 call writediagpem(ngrid,'co2_ice_slope'//str2,'CO2 ice','kg.m-2',2,co2_ice(:,islope)) 881 call writediagpem(ngrid,'tend_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tend_h2o_ice(:,islope)) 882 call writediagpem(ngrid,'tend_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tend_co2_ice(:,islope)) 883 call writediagpem(ngrid,'Flow_co2ice_slope'//str2,'CO2 ice flow','Boolean',2,flag_co2flow(:,islope)) 884 call writediagpem(ngrid,'tsurf_slope'//str2,'tsurf','K',2,tsurf(:,islope)) 885 885 if(icetable_equilibrium) then 886 call writediag fipem(ngrid,'ssi_depth_slope'//str2,'ice table depth','m',2,porefillingice_depth(:,islope))887 call writediag fipem(ngrid,'ssi_thick_slope'//str2,'ice table depth','m',2,porefillingice_thickness(:,islope))886 call writediagpem(ngrid,'ssi_depth_slope'//str2,'ice table depth','m',2,porefillingice_depth(:,islope)) 887 call writediagpem(ngrid,'ssi_thick_slope'//str2,'ice table depth','m',2,porefillingice_thickness(:,islope)) 888 888 endif 889 889 if(soil_pem) then … … 985 985 tsoil = tsoil_phys_PEM_timeseries(:,1:nsoilmx,:,timelen) 986 986 #ifndef CPP_STD 987 flux_geo (:,:)= fluxgeo987 flux_geo = fluxgeo 988 988 #endif 989 989 endif -
trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
r3152 r3181 35 35 !======================================================================= 36 36 ! Arguments: 37 38 37 character(*), intent(in) :: filename ! File name 39 38 integer, intent(in) :: timelen ! number of times stored in the file 40 39 integer, intent(in) :: iim_input, jjm_input, ngrid, nslope ! number of points in the lat x lon dynamical grid, number of subgrid slopes 41 40 ! Ouputs 42 real, dimension(ngrid,nslope), intent(out) :: min_co2_ice ! Minimum of co2 ice 41 real, dimension(ngrid,nslope), intent(out) :: min_co2_ice ! Minimum of co2 ice per slope of the year [kg/m^2] 43 42 real, dimension(ngrid,nslope), intent(out) :: min_h2o_ice ! Minimum of h2o ice per slope of the year [kg/m^2] 44 real, dimension(ngrid,timelen), intent(out) :: vmr_co2_PCM_phys ! Physics x Times 43 real, dimension(ngrid,timelen), intent(out) :: vmr_co2_PCM_phys ! Physics x Times co2 volume mixing ratio retrieve from the PCM [m^3/m^3] 45 44 real, dimension(ngrid,timelen), intent(out) :: ps_timeseries ! Surface Pressure [Pa] 46 45 real, dimension(ngrid,timelen), intent(out) :: q_co2 ! CO2 mass mixing ratio in the first layer [kg/m^3] -
trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_slope_mod.F90
r3149 r3181 24 24 ! INPUT 25 25 integer, intent(in) :: timelen, ngrid, nslope 26 real, dimension(ngrid,timelen), intent(in) :: vmr_co2_PCM ! physical point field 27 real, dimension(ngrid,timelen), intent(in) :: vmr_co2_pem ! physical point field 28 real, dimension(ngrid,timelen), intent(in) :: ps_PCM_2 ! physical point field 26 real, dimension(ngrid,timelen), intent(in) :: vmr_co2_PCM ! physical point field: Volume mixing ratio of co2 in the first layer 27 real, dimension(ngrid,timelen), intent(in) :: vmr_co2_pem ! physical point field: Volume mixing ratio of co2 in the first layer 28 real, dimension(ngrid,timelen), intent(in) :: ps_PCM_2 ! physical point field: Surface pressure in the PCM 29 29 real, intent(in) :: global_avg_press_PCM ! global averaged pressure at previous timestep 30 30 real, intent(in) :: global_avg_press_new ! global averaged pressure at current timestep 31 real, dimension(ngrid,nslope), intent(in) :: tendencies_co2_ice_phys_ini ! physical point field 31 real, dimension(ngrid,nslope), intent(in) :: tendencies_co2_ice_phys_ini ! physical point field: Evolution of perennial ice over one year 32 32 real, dimension(ngrid,nslope), intent(in) :: co2ice_slope ! CO2 ice per mesh and sub-grid slope (kg/m^2) 33 33 real, dimension(ngrid,nslope), intent(in) :: emissivity_slope ! Emissivity per mesh and sub-grid slope(1) 34 34 ! OUTPUT 35 real, intent(inout) :: tendencies_co2_ice_phys(ngrid,nslope) ! physical point field: Evolution of perennial ice over one year35 real, dimension(ngrid,nslope), intent(inout) :: tendencies_co2_ice_phys ! physical point field: Evolution of perennial ice over one year 36 36 37 37 ! local: 38 ! ---- 38 ! ------ 39 39 integer :: i, t, islope 40 40 real :: coef, ave -
trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90
r3106 r3181 30 30 write(*,*) 'numyear',numyear 31 31 write(str(1:1),'(i1.1)') numyear 32 !nf90_open ! open existing netCDF dataset 33 !integer :: ncid, state 34 !... 32 35 33 state = nf90_open(path = "data2reshape"//str//".nc", mode = nf90_nowrite, ncid = ncid1) 36 34 if (state /= nf90_noerr) call handle_err(state) … … 69 67 len_lon = len_ 70 68 len_ = len_ + 1 71 else if (name_ == "lat".or. name_ == "latitude") then69 else if (name_ == "lat".or. name_ == "latitude") then 72 70 dimid_lat=dimids(i) 73 71 len_lat=len_ 74 else if (name_ == "time_counter".or. name_ == "Time") then72 else if (name_ == "time_counter".or. name_ == "Time") then 75 73 dimid_time=dimids(i) 76 74 len_time=len_ 77 else if (name_ == "soil_layers".or. name_ == "subsurface_layers") then75 else if (name_ == "soil_layers".or. name_ == "subsurface_layers") then 78 76 dimid_soil=dimids(i) 79 77 len_soil = len_ … … 161 159 deallocate(tempvalues_2d) 162 160 endif 163 else if (numdims == 3) then161 else if (numdims == 3) then 164 162 allocate(tempvalues_3d(len_lon,len_lat,len_time)) 165 163 allocate(values_3d(len_lon + 1,len_lat,len_time)) … … 210 208 211 209 END PROGRAM reshape_XIOS_output 212 -
trunk/LMDZ.COMMON/libf/evolution/writediagpem.F90
r3171 r3181 7 7 !======================================================================= 8 8 9 SUBROUTINE writediag fipem(ngrid,nom,titre,unite,dim,px)9 SUBROUTINE writediagpem(ngrid,nom,titre,unite,dim,px) 10 10 11 11 ! Ecriture de variables diagnostiques au choix dans la physique … … 86 86 integer :: idim, varid 87 87 integer :: nid 88 character(*), parameter :: fichnom = "diag fipem.nc"88 character(*), parameter :: fichnom = "diagpem.nc" 89 89 integer, dimension(4) :: id 90 90 integer, dimension(4) :: edges, corner … … 578 578 if (is_master) ierr= NF_CLOSE(nid) 579 579 580 END SUBROUTINE writediag fipem580 END SUBROUTINE writediagpem 581 581 582 582 subroutine writediagsoilpem(ngrid,name,title,units,dimpx,px)
Note: See TracChangeset
for help on using the changeset viewer.