Changeset 2985
- Timestamp:
- Jun 28, 2023, 4:05:56 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90
r2980 r2985 36 36 subroutine regolith_adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,tsoil_PEM,TI_PEM,ps,q_co2,q_h2o, & 37 37 m_h2o_completesoil,delta_mh2oreg, m_co2_completesoil,delta_mco2reg) 38 #ifndef CPP_STD 38 39 39 ! inputs 40 40 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! size dimension: physics x subslope x soil x timeseries … … 59 59 ! ------------- 60 60 61 61 62 ! Compute H2O adsorption, then CO2 adsorption 62 63 … … 68 69 tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mco2reg) 69 70 70 #endif71 71 RETURN 72 72 end subroutine … … 85 85 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 86 86 87 #ifndef CPP_STD88 87 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock 89 USE comc stfi_h, only: pi88 USE comconst_mod, only: pi 90 89 use comslope_mod, only : subslope_dist,def_slope_mean 91 90 use vertical_layers_mod, ONLY: ap,bp … … 93 92 m_h2o,m_co2,m_noco2, & 94 93 rho_regolith 95 #endif 94 96 95 97 96 implicit none … … 123 122 124 123 ! local variables 125 #ifndef CPP_STD126 124 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 127 #endif128 125 real :: K ! Used to compute theta 129 126 integer ig,iloop, islope,isoil,it ! for loops … … 140 137 141 138 ! 0. Some initializations 142 #ifndef CPP_STD 139 143 140 144 141 allocate(mass_mean(ngrid,timelen)) … … 150 147 theta_h2o_adsorbded(:,:,:) = 0. 151 148 dm_h2o_regolith_slope(:,:,:) = 0. 149 150 #ifndef CPP_STD 152 151 153 152 !0.1 Look at perenial ice … … 184 183 pvapor(:,:) = mass_mean(:,:)/m_h2o*q_h2o(:,:)*zplev_mean(:,:) 185 184 pvapor_avg(:) = sum(pvapor(:,:),2)/timelen 185 #endif 186 186 deallocate(pvapor) 187 187 deallocate(zplev_mean) 188 188 deallocate(mass_mean) 189 #ifndef CPP_STD 189 190 190 191 ! 1. we compute the mass of H2O adsorded in each layer of the meshes … … 240 241 SUBROUTINE regolith_co2adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,& 241 242 tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mreg) 242 #ifndef CPP_STD 243 243 244 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock,index_breccia 244 USE comc stfi_h, only: pi245 USE comconst_mod, only: pi 245 246 use comslope_mod, only : subslope_dist,def_slope_mean 246 247 use vertical_layers_mod, ONLY: ap,bp 247 248 use constants_marspem_mod, only: m_co2, m_noco2,rho_regolith 248 #endif249 249 250 250 IMPLICIT NONE … … 278 278 INTEGER :: ispermanent_co2glaciers(ngrid,nslope) ! Check if the co2 glacier is permanent 279 279 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) ! Check if the h2o glacier is permanent 280 #ifndef CPP_STD281 280 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 282 #endif283 281 REAL :: deltam_reg_slope(ngrid,nslope) ! Difference in the mass per slope (kg/m^3) 284 282 REAL :: m_h2o_adsorbed(ngrid,nsoil_PEM,nslope) ! Density of CO2 adsorbed (kg/m^3) … … 298 296 allocate(pco2_avg(ngrid)) 299 297 300 #ifndef CPP_STD 298 301 299 302 300 m_h2o_adsorbed(:,:,:) = 0. … … 306 304 dm_co2_regolith_slope(:,:,:) = 0 307 305 delta_mreg(:) = 0. 306 307 #ifndef CPP_STD 308 308 309 309 !0.1 Look at perenial ice -
trunk/LMDZ.COMMON/libf/evolution/co2glaciers_mod.F90
r2944 r2985 63 63 subroutine compute_hmaxglaciers_co2(ngrid,nslope,iflat,Tcond,def_slope_mean,hmax) 64 64 65 USE comconst_mod, ONLY: pi 66 use comcstfi_h, only: g 65 USE comconst_mod, ONLY: pi,g 67 66 68 67 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
trunk/LMDZ.COMMON/libf/evolution/ice_table_mod.F90
r2980 r2985 51 51 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 52 52 use math_mod,only: findroot 53 #ifndef CPP_STD54 53 USE comsoil_h_PEM, only: mlayer_PEM,layer_PEM ! Depth of the vertical grid 55 54 USE soil_thermalproperties_mod, only: ice_thermal_properties … … 134 133 135 134 RETURN 136 #endif137 135 END 138 136 -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r2982 r2985 30 30 PROGRAM pem 31 31 32 !module needed for INITIALISATION 32 ! 1: Modules needed for reading and writting startfi: 33 use phyetat0_mod, only: phyetat0 34 use phyredem, only: physdem0, physdem1 35 use netcdf, only: nf90_open,NF90_NOWRITE,nf90_noerr,nf90_strerror, & 36 nf90_get_var, nf90_inq_varid, nf90_inq_dimid, & 37 nf90_inquire_dimension,nf90_close 38 ! netcdf is needed to read info like lat and lon in the physiq file 39 use turb_mod, only: q2, wstar 40 ! 1a: Modules specific from the Marsian physiq 33 41 #ifndef CPP_STD 34 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h,inertiedat, mlayer,volcapa,inertiesoil35 use surfdat_h, only: tsurf, emis,&42 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h,inertiedat, mlayer,volcapa,inertiesoil 43 use surfdat_h, only: tsurf, emis,& 36 44 qsurf,watercap, ini_surfdat_h, & 37 45 albedodat, zmea, zstd, zsig, zgam, zthe, & … … 40 48 use dimradmars_mod, only: totcloudfrac, albedo 41 49 use dust_param_mod, only: tauscaling 42 use tracer_mod, only: noms,igcm_h2o_ice,igcm_co2 ! tracer names 43 #else 44 use comsoil_h, only: nsoilmx, ini_comsoil_h,inertiedat, mlayer,volcapa 45 use surfdat_h, only: albedodat, zmea, zstd, zsig, zgam, zthe, & 50 use tracer_mod, only: noms,igcm_h2o_ice,igcm_co2 ! tracer names 51 #else 52 ! 1b: Modules specific from the Generic physiq 53 use comsoil_h, only: nsoilmx, ini_comsoil_h,inertiedat, mlayer,volcapa 54 use surfdat_h, only: albedodat, zmea, zstd, zsig, zgam, zthe, & 46 55 emissiv 47 use tracer_h, only: noms,igcm_h2o_ice,igcm_co2 ! tracer names 48 use phys_state_var_mod 49 #endif 50 use phyetat0_mod, only: phyetat0 51 use phyredem, only: physdem0, physdem1 52 use turb_mod, only: q2, wstar 53 use netcdf, only: nf90_open,NF90_NOWRITE,nf90_noerr,nf90_strerror, & 54 nf90_get_var, nf90_inq_varid, nf90_inq_dimid, & 55 nf90_inquire_dimension,nf90_close 56 use tracer_h, only: noms,igcm_h2o_ice,igcm_co2 ! tracer names 57 use phys_state_var_mod, only: cloudfrac, totcloudfrac, albedo_snow_SPECTV,HICE,RNAT, & 58 PCTSRF_SIC, TSLAB, TSEA_ICE, SEA_ICE, & 59 ALBEDO_BAREGROUND,ALBEDO_CO2_ICE_SPECTV, phys_state_var_init 60 use aerosol_mod, only : iniaerosol 61 #endif 62 ! 1c: Modules specific from the 1d marsian physiq 56 63 #ifndef CPP_1D 57 64 USE iniphysiq_mod, ONLY: iniphysiq 58 ! For phyredem : 59 USE control_mod, ONLY: iphysiq, day_step,nsplit_phys 65 USE control_mod, ONLY: iphysiq, day_step,nsplit_phys 60 66 #else 61 67 use time_phylmdz_mod, only: daysec, iphysiq,day_step 62 68 #endif 63 USE logic_mod, ONLY: iflag_phys 69 64 70 #ifndef CPP_STD 65 71 use mod_phys_lmdz_para, only: is_parallel, is_sequential, & 66 72 is_mpi_root, is_omp_root, & 67 73 is_master 68 use planete_h, only: aphelie, periheli, year_day, peri_day, &74 use planete_h, only: aphelie, periheli, year_day, peri_day, & 69 75 obliquit 70 76 #else 71 ! USE comcstfi_mod, ONLY: rad,g,r,cpp,pi 72 ! USE inifis_mod, ONLY: inifis 73 use planete_mod, only: apoastr, periastr, year_day, peri_day, & 77 use planete_mod, only: apoastr, periastr, year_day, peri_day, & 74 78 obliquit 75 79 #endif 76 USE mod_const_mpi, ONLY: COMM_LMDZ 77 USE comslope_mod, ONLY: nslope,def_slope,def_slope_mean, &80 81 USE comslope_mod, ONLY: nslope,def_slope,def_slope_mean, & 78 82 subslope_dist,iflat, & 79 83 major_slope,ini_comslope_h 84 85 86 USE logic_mod, ONLY: iflag_phys 87 USE mod_const_mpi, ONLY: COMM_LMDZ 80 88 use time_phylmdz_mod, only: daysec,dtphys 81 USE comconst_mod, ONLY: rad,g,r,cpp,pi89 USE comconst_mod, ONLY: rad,g,r,cpp,pi 82 90 USE infotrac 83 USE geometry_mod, only: latitude_deg 84 use conf_pem_mod, only: conf_pem 85 use pemredem, only: pemdem0,pemdem1 86 use co2glaciers_mod,only: co2glaciers_evol,co2glaciersflow 87 use criterion_pem_stop_mod,only: criterion_waterice_stop,criterion_co2_stop 88 use constants_marspem_mod,only: alpha_clap_co2,beta_clap_co2, alpha_clap_h2o,beta_clap_h2o, & 91 USE geometry_mod, only: latitude_deg 92 93 use conf_pem_mod, only: conf_pem 94 use pemredem, only: pemdem0,pemdem1 95 use co2glaciers_mod, only: co2glaciers_evol,co2glaciersflow 96 use criterion_pem_stop_mod, only: criterion_waterice_stop,criterion_co2_stop 97 use constants_marspem_mod, only: alpha_clap_co2,beta_clap_co2, alpha_clap_h2o,beta_clap_h2o, & 89 98 m_co2,m_noco2 90 99 use evol_co2_ice_s_mod, only: evol_co2_ice_s 91 100 use evol_h2o_ice_s_mod, only: evol_h2o_ice_s 92 93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SOIL 94 use comsoil_h_PEM, only: soil_pem,ini_comsoil_h_PEM,end_comsoil_h_PEM,nsoilmx_PEM, & 95 TI_PEM,inertiedat_PEM, & ! soil thermal inertia 96 tsoil_PEM, mlayer_PEM,layer_PEM, & ! Soil temp, number of subsurface layers, soil mid layer depths 97 fluxgeo, & ! geothermal flux for the PEM and GCM 98 water_reservoir ! Water ressources 99 use adsorption_mod, only : regolith_adsorption,adsorption_pem, & ! bool to check if adsorption, main subroutine 100 ini_adsorption_h_PEM, end_adsorption_h_PEM, & ! allocate arrays 101 co2_adsorbded_phys, h2o_adsorbded_phys ! mass of co2 and h2O adsorbded 102 103 !!! For orbit parameters 104 USE temps_mod_evol, ONLY: dt_pem, evol_orbit_pem, Max_iter_pem 101 use comsoil_h_PEM, only: soil_pem,ini_comsoil_h_PEM,end_comsoil_h_PEM,nsoilmx_PEM, & 102 TI_PEM,inertiedat_PEM, & ! soil thermal inertia 103 tsoil_PEM, mlayer_PEM,layer_PEM, & ! Soil temp, number of subsurface layers, soil mid layer depths 104 fluxgeo, & ! geothermal flux for the PEM and GCM 105 water_reservoir ! Water ressources 106 use adsorption_mod, only : regolith_adsorption,adsorption_pem, & ! bool to check if adsorption, main subroutine 107 ini_adsorption_h_PEM, end_adsorption_h_PEM, & ! allocate arrays 108 co2_adsorbded_phys, h2o_adsorbded_phys ! mass of co2 and h2O adsorbded 109 USE temps_mod_evol, ONLY: dt_pem, evol_orbit_pem, Max_iter_pem 105 110 use orbit_param_criterion_mod, only : orbit_param_criterion 106 use recomp_orb_param_mod, only: recomp_orb_param111 use recomp_orb_param_mod, only: recomp_orb_param 107 112 use ice_table_mod, only: porefillingice_depth,porefillingice_thickness,& 108 113 end_ice_table_porefilling,ini_ice_table_porefilling, & … … 111 116 112 117 #ifdef CPP_1D 113 use regular_lonlat_mod, only: init_regular_lonlat118 use regular_lonlat_mod, only: init_regular_lonlat 114 119 use physics_distribution_mod, only: init_physics_distribution 115 use mod_grid_phy_lmdz, only : regular_lonlat116 use init_phys_1d_mod, only : init_phys_1d120 use mod_grid_phy_lmdz, only : regular_lonlat 121 use init_phys_1d_mod, only : init_phys_1d 117 122 #endif 118 123 … … 147 152 REAL ps(ip1jmp1) ! pression au sol 148 153 149 REAL, dimension(:),allocatable :: ps_start_GCM !(ngrid) !pression au sol154 REAL, dimension(:),allocatable :: ps_start_GCM !(ngrid) pression au sol 150 155 REAL, dimension(:,:),allocatable :: ps_timeseries !(ngrid x timelen) ! pression au sol instantannées 151 156 … … 173 178 174 179 ! Variable for h2o_ice evolution 175 REAL :: ini_surf_h2o 180 REAL :: ini_surf_h2o ! Initial surface of sublimating h2o ice 176 181 REAL :: ini_surf_co2 ! Initial surface of sublimating co2 ice 177 182 … … 188 193 LOGICAL :: STOPPING_1_water ! Logical : is there still water ice to sublimate? 189 194 LOGICAL :: STOPPING_co2 ! Logical : is the criterion (% of change in the surface of sublimating water ice) reached? 190 LOGICAL :: STOPPING_pressure 191 INTEGER :: criterion_stop ! which criterion is reached ? 1= h2o ice surf, 2 = co2 ice surf, 3 = ps, 4 = orb param195 LOGICAL :: STOPPING_pressure! Logical : is the criterion (% of change in the surface pressure) reached? 196 INTEGER :: criterion_stop ! which criterion is reached ? 1= h2o ice surf, 2 = co2 ice surf, 3 = ps, 4 = orb param 192 197 193 198 real,save :: A , B, mmean ! Molar mass: intermediate A, B for computations of the mean molar mass of the layer [mol/kg] … … 222 227 223 228 REAL, ALLOCATABLE :: tsurf_ave(:,:) ! Physic x SLOPE field : Averaged Surface Temperature [K] 224 REAL, ALLOCATABLE :: tsoil_ave(:,:,:) ! Physic x SOIL x SLOPE field : Averaged Soil Temperature [K]229 REAL, ALLOCATABLE :: tsoil_ave(:,:,:) ! Physic x SOIL x SLOPE field : Averaged Soil Temperature [K] 225 230 REAL, ALLOCATABLE :: tsurf_GCM_timeseries(:,:,:) ! ngrid x SLOPE XTULES field : Surface Temperature in timeseries [K] 226 231 227 232 REAL, ALLOCATABLE :: tsoil_phys_PEM_timeseries(:,:,:,:) !IG x SLOPE XTULES field : NOn averaged Soil Temperature [K] 228 REAL, ALLOCATABLE :: tsoil_GCM_timeseries(:,:,:,:) !IG x SLOPE XTULES field : NOn averaged Soil Temperature [K]229 REAL, ALLOCATABLE :: tsurf_ave_yr1(:,:) ! Physic x SLOPE field : Averaged Surface Temperature of first call of the gcm [K]233 REAL, ALLOCATABLE :: tsoil_GCM_timeseries(:,:,:,:) !IG x SLOPE XTULES field : NOn averaged Soil Temperature [K] 234 REAL, ALLOCATABLE :: tsurf_ave_yr1(:,:) ! Physic x SLOPE field : Averaged Surface Temperature of first call of the gcm [K] 230 235 231 236 REAL,ALLOCATABLE :: TI_locslope(:,:) ! Physic x Soil: Intermediate thermal inertia to compute Tsoil [SI] 232 237 REAL,ALLOCATABLE :: Tsoil_locslope(:,:) ! Physic x Soil: intermediate when computing Tsoil [K] 233 238 REAL,ALLOCATABLE :: Tsurf_locslope(:) ! Physic x Soil: Intermediate surface temperature to compute Tsoil [K] 234 REAL,ALLOCATABLE :: watersoil_density_timeseries(:,:,:,:) ! Physic x Soil x Slope x Times water soil density, time series [kg /m^3]235 REAL,ALLOCATABLE :: watersurf_density_ave(:,:) ! Physic x Slope, water surface density, yearly averaged [kg/m^3]239 REAL,ALLOCATABLE :: watersoil_density_timeseries(:,:,:,:) ! Physic x Soil x Slope x Times water soil density, time series [kg /m^3] 240 REAL,ALLOCATABLE :: watersurf_density_ave(:,:) ! Physic x Slope, water surface density, yearly averaged [kg/m^3] 236 241 REAL,ALLOCATABLE :: watersoil_density_PEM_timeseries(:,:,:,:) ! Physic x Soil x Slope x Times, water soil density, time series [kg/m^3] 237 242 REAL,ALLOCATABLE :: watersoil_density_PEM_ave(:,:,:) ! Physic x Soil x SLopes, water soil density, yearly averaged [kg/m^3] … … 252 257 253 258 #ifdef CPP_STD 254 ! INTEGER :: nsplit_phys=1255 ! LOGICAL :: iflag_phys=.true.256 259 REAL :: frost_albedo_threshold=0.05 ! frost albedo threeshold to convert fresh frost to old ice 257 260 REAL :: albedo_h2o_frost ! albedo of h2o frost 258 REAL,ALLOCATABLE :: co2ice(:) ! Physics: co2 ice mesh averaged [kg/m^2] 261 REAL,allocatable :: tsurf_read_generic(:) ! Temporary variable to do the subslope transfert dimensiion when reading form generic 262 REAL,allocatable :: qsurf_read_generic(:,:) ! Temporary variable to do the subslope transfert dimensiion when reading form generic 263 REAL,allocatable :: tsoil_read_generic(:,:) ! Temporary variable to do the subslope transfert dimensiion when reading form generic 264 REAL,allocatable :: emis_read_generic(:) ! Temporary variable to do the subslope transfert dimensiion when reading form generic 265 REAL,allocatable :: albedo_read_generic(:,:) ! Temporary variable to do the subslope transfert dimensiion when reading form generic 266 REAL,allocatable :: tsurf(:,:) ! Subslope variable, only needed in the GENERIC case 267 REAL,allocatable :: qsurf(:,:,:) ! Subslope variable, only needed in the GENERIC case 268 REAL,allocatable :: tsoil(:,:,:) ! Subslope variable, only needed in the GENERIC case 269 REAL,allocatable :: emis(:,:) ! Subslope variable, only needed in the GENERIC case 270 REAL,allocatable :: watercap(:,:) ! Subslope variable, only needed in the GENERIC case =0 no watercap in generic model 271 LOGICAL, allocatable :: WATERCAPTAG(:) ! Subslope variable, only needed in the GENERIC case =false no watercaptag in generic model 272 REAL,allocatable :: albedo(:,:,:) ! Subslope variable, only needed in the GENERIC case 273 REAL,allocatable :: inertiesoil(:,:,:) ! Subslope variable, only needed in the GENERIC case 259 274 #endif 260 275 261 276 #ifdef CPP_1D 262 INTEGER :: nsplit_phys263 integer,parameter:: jjm_value=jjm-1264 integer :: ierr277 INTEGER :: nsplit_phys 278 integer,parameter:: jjm_value=jjm-1 279 integer :: ierr 265 280 #else 266 integer,parameter:: jjm_value=jjm281 integer,parameter:: jjm_value=jjm 267 282 #endif 268 283 … … 449 464 call initracer(ngrid,nq) 450 465 call iniaerosol() 466 allocate(tsurf_read_generic(ngrid)) 467 allocate(qsurf_read_generic(ngrid,nq)) 468 allocate(tsoil_read_generic(ngrid,nsoilmx)) 469 allocate(emis_read_generic(ngrid)) 470 allocate(tsurf(ngrid,1)) 471 allocate(qsurf(ngrid,nq,1)) 472 allocate(tsoil(ngrid,nsoilmx,1)) 473 allocate(emis(ngrid,1)) 474 allocate(watercap(ngrid,1)) 475 allocate(watercaptag(ngrid)) 476 allocate(albedo_read_generic(ngrid,2)) 477 allocate(albedo(ngrid,2,1)) 478 allocate(inertiesoil(ngrid,nsoilmx,1)) 451 479 call phyetat0(.true., & 452 480 ngrid,nlayer,FILE_NAME,0,0,nsoilmx,nq, & 453 day_ini,time_phys,tsurf ,tsoil,emis,q2,qsurf, &481 day_ini,time_phys,tsurf_read_generic,tsoil_read_generic,emis_read_generic,q2,qsurf_read_generic, & 454 482 cloudfrac,totcloudfrac,hice, & 455 483 rnat,pctsrf_sic,tslab, tsea_ice,sea_ice) 456 call surfini(ngrid,nq,qsurf,albedo,albedo_bareground,albedo_snow_SPECTV,albedo_co2_ice_SPECTV) 457 458 call ini_comslope_h(ngrid,nsoilmx,nq) 459 460 allocate(co2ice(ngrid)) 461 co2ice(:)=qsurf(:,igcm_co2) 462 co2ice_slope(:,1)=co2ice(:) 463 tsurf_slope(:,1)=tsurf(:) 484 call surfini(ngrid,nq,qsurf_read_generic,albedo_read_generic,albedo_bareground,albedo_snow_SPECTV,albedo_co2_ice_SPECTV) 485 486 nslope=1 487 call ini_comslope_h(ngrid,1) 488 489 qsurf(:,:,1)=qsurf_read_generic(:,:) 490 tsurf(:,1)=tsurf_read_generic(:) 491 tsoil(:,:,1)=tsoil_read_generic(:,:) 492 emis(:,1)=emis_read_generic(:) 493 watercap(:,1)=0. 494 watercaptag(:)=.false. 495 albedo(:,1,1)=albedo_read_generic(:,1) 496 albedo(:,2,1)=albedo_read_generic(:,2) 497 inertiesoil(:,:,1)=inertiedat(:,:) 464 498 465 499 if (nslope.eq.1) then … … 473 507 DO i=1,ngrid 474 508 DO nnq=1,nqtot 475 qsurf _slope(i,nnq,1)=qsurf(i,nnq)476 if(qsurf(i,nnq ).LT.0) then477 qsurf(i,nnq )=0.509 qsurf(i,nnq,1)=qsurf_read_generic(i,nnq) 510 if(qsurf(i,nnq,1).LT.0) then 511 qsurf(i,nnq,1)=0. 478 512 endif 479 513 enddo … … 529 563 call nb_time_step_GCM("data_GCM_Y1.nc",timelen) 530 564 565 allocate(tsoil_ave(ngrid,nsoilmx,nslope)) 566 allocate(watersoil_density_PEM_ave(ngrid,nsoilmx_PEM,nslope)) 567 531 568 allocate(vmr_co2_gcm(ngrid,timelen)) 532 569 allocate(ps_timeseries(ngrid,timelen)) … … 537 574 allocate(tsurf_ave_yr1(ngrid,nslope)) 538 575 allocate(tsurf_ave(ngrid,nslope)) 539 allocate(tsoil_ave(ngrid,nsoilmx,nslope)) 576 540 577 allocate(tsurf_GCM_timeseries(ngrid,nslope,timelen)) 541 578 allocate(tsoil_GCM_timeseries(ngrid,nsoilmx,nslope,timelen)) … … 549 586 allocate(tsoil_phys_PEM_timeseries(ngrid,nsoilmx_PEM,nslope,timelen)) 550 587 allocate(watersoil_density_PEM_timeseries(ngrid,nsoilmx_PEM,nslope,timelen)) 551 allocate(watersoil_density_PEM_ave(ngrid,nsoilmx_PEM,nslope))552 588 allocate(delta_co2_adsorbded(ngrid)) 553 589 allocate(delta_h2o_adsorbded(ngrid)) … … 603 639 ENDDO 604 640 watersoil_density_PEM_ave(:,:,:) = SUM(watersoil_density_PEM_timeseries(:,:,:,:),4)/timelen 641 endif !soil_pem 605 642 deallocate(tsoil_ave) 606 643 deallocate(tsoil_GCM_timeseries) 607 endif !soil_pem608 644 609 645 !------------------------ … … 1124 1160 1125 1161 ! III_a.1 Ice update (for startfi) 1126 #ifdef CPP_STD1127 ! Co2 ice1128 DO ig = 1,ngrid1129 co2ice(ig) = 0.1130 DO islope = 1,nslope1131 co2ice(ig) = co2ice(ig) + co2ice_slope(ig,islope) &1132 * subslope_dist(ig,islope) / &1133 cos(pi*def_slope_mean(islope)/180.)1134 ENDDO1135 qsurf(ig,igcm_co2)=co2ice(ig)1136 ENDDO ! of DO ig=1,ngrid1137 #endif1138 1162 1139 1163 ! H2O ice -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r2980 r2985 66 66 real :: year_PEM_read ! Year of the PEM previous run 67 67 LOGICAL :: startpem_file ! boolean to check if we read the startfile or not 68 #ifdef CPP_STD 69 logical :: watercaptag(ngrid) 70 71 watercaptag(:)=.false. 72 #endif 68 73 69 74 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
trunk/LMDZ.COMMON/libf/evolution/read_data_GCM.F90
r2980 r2985 122 122 print *, "Downloading data for h2o_ice_s_slope done" 123 123 124 #ifndef CPP_STD 125 124 126 print *, "Downloading data for watercap_slope ..." 125 127 DO islope=1,nslope … … 129 131 ENDDO 130 132 print *, "Downloading data for watercap_slope done" 133 134 #endif 131 135 132 136 print *, "Downloading data for tsurf_slope ..." … … 139 143 print *, "Downloading data for tsurf_slope done" 140 144 145 #ifndef CPP_STD 146 141 147 if(soil_pem) then 142 148 … … 169 175 170 176 endif !soil_pem 177 178 #endif 171 179 172 180 else !nslope=1 no slope, we copy all the values … … 177 185 #ifndef CPP_STD 178 186 ! call get_var3("watercap", watercap_slope(:,:,1,:)) 179 watercap_slope(:,:,1,:)=1. 187 watercap_slope(:,:,1,:)=0. 188 watersurf_density_dyn(:,:,:,:)=0. 189 watersoil_density_dyn(:,:,:,:,:)=0. 180 190 #endif 181 191 … … 188 198 print *, "Computing the min of h2o_ice_slope" 189 199 min_h2o_ice_dyn(:,:,:)=minval(h2o_ice_s_dyn+watercap_slope,4) 190 ! min_h2o_ice_dyn(:,:,:)=minval(h2o_ice_s_dyn,4)191 200 print *, "Computing the min of co2_ice_slope" 192 201 min_co2_ice_dyn(:,:,:)=minval(co2_ice_slope_dyn,4) -
trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90
r2980 r2985 17 17 USE planete_h, ONLY: e_elips, obliquit, timeperi, periheli,aphelie,p_elips,peri_day,year_day 18 18 #else 19 use planete_mod, only: e_elips, obliquit, timeperi 19 use planete_mod, only: e_elips, obliquit, timeperi,periastr,apoastr,p_elips,peri_day,year_day 20 20 USE comcstfi_mod, only: pi 21 21 … … 53 53 ! 0. Initializations 54 54 ! ********************************************************************** 55 #ifdef CPP_STD 56 real aphelie 57 real periheli 55 58 59 aphelie=apoastr 60 periheli=periastr 61 #endif 56 62 57 63 Year=year_bp_ini+year_PEM+final_iter … … 104 110 unitastr=149.597927 105 111 p_elips=0.5*(periheli+aphelie)*(1-e_elips*e_elips)/unitastr 106 112 #ifndef CPP_STD 107 113 call call_dayperi(timeperi,e_elips,peri_day,year_day) 114 #endif 108 115 endif 109 116 exit -
trunk/LMDZ.COMMON/libf/evolution/soil_thermalproperties_mod.F90
r2962 r2985 58 58 59 59 SUBROUTINE update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,ice_thickness,TI_PEM) 60 #ifndef CPP_STD 60 61 61 USE comsoil_h, only: inertiedat, volcapa 62 62 USE comsoil_h_PEM, only: layer_PEM,inertiedat_PEM,depth_breccia,depth_bedrock,index_breccia,index_bedrock,reg_thprop_dependp … … 232 232 !======================================================================= 233 233 RETURN 234 #endif235 234 END subroutine update_soil_thermalproperties 236 235 -
trunk/LMDZ.COMMON/makelmdz_fcm
r2967 r2985 488 488 if [[ -d ${LIBFGCM}/evolution && "$code" == "pem" ]] 489 489 then 490 if [[ "$physique" == "std" ]] 491 then 492 CPP_KEY="$CPP_KEY CPP_STD" 493 fi 490 494 EVOLUTION_PATH="${LIBFGCM}/evolution" 491 495 INCLUDE="$INCLUDE -I${LIBFGCM}/evolution" 492 496 fi 497 498 if [[ -d ${LIBFGCM}/evolution && "$code" == "reshape_XIOS_output" ]] 499 then 500 if [[ "$physique" == "std" ]] 501 then 502 CPP_KEY="$CPP_KEY CPP_STD" 503 fi 504 EVOLUTION_PATH="${LIBFGCM}/evolution" 505 INCLUDE="$INCLUDE -I${LIBFGCM}/evolution" 506 fi 507 493 508 494 509 # NETCDF library include/library paths -
trunk/LMDZ.GENERIC/deftank/field_def_physics.xml
r2737 r2985 14 14 unit="degrees" /> 15 15 </field_group> 16 17 <field_group id="fields_altitude" grid_ref="altitude_grid"> 18 <field id="aps" 19 long_name="aps" /> 20 <field id="bps" 21 long_name="bps" /> 22 </field_group> 23 24 <field_group id="fields_interlayer" grid_ref="interlayer_grid"> 25 <field id="ap" 26 long_name="ap" /> 27 <field id="bp" 28 long_name="bp" /> 29 </field_group> 30 16 31 <!-- 1D variables (spectral)--> 17 32 <field_group id="IR_fields" grid_ref="grid_IR"> … … 42 57 long_name="Absorbed stellar radiation" 43 58 unit="W/m2" /> 59 <field id="tsurf" 60 long_name="Surface Temperature" 61 unit="K" /> 62 <field id="co2ice" 63 long_name="CO2 ice thickness" 64 unit="kg/m2" /> 65 <field id="h2o_ice_s" 66 long_name="H2O ice thickness" 67 unit="kg/m2" /> 68 <field id="h2o_cropped" 69 long_name="h2o in the first layer" 70 unit="kg/kg" /> 71 <field id="co2_cropped" 72 long_name="co2 in the first layer" 73 unit="kg/kg" /> 44 74 </field_group> 45 75 … … 74 104 long_name="Plume vertical velocity" 75 105 unit="m/s" /> 106 </field_group> 76 107 77 </field_group>78 108 <!--Spectral IR 3D variables--> 79 109 <field_group id="spectral_IR_3D" grid_ref="grid_IR_3D"> -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2972 r2985 2695 2695 CALL send_xios_field('h2o_vap',zq(:,:,igcm_h2o_vap)) 2696 2696 CALL send_xios_field('h2o_ice',zq(:,:,igcm_h2o_ice)) 2697 2698 CALL send_xios_field('h2o_layer1',zq(:,1,igcm_h2o_vap)) 2699 CALL send_xios_field('co2_layer1',zq(:,1,igcm_co2_ice)) 2700 CALL send_xios_field('tsurf',tsurf) 2701 CALL send_xios_field('co2ice',qsurf(1:ngrid,igcm_co2_ice)) 2702 CALL send_xios_field('h2o_ice_s',qsurf(1:ngrid,igcm_h2o_ice)) 2697 2703 ENDIF 2698 2704
Note: See TracChangeset
for help on using the changeset viewer.