Changeset 3961 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Nov 14, 2025, 5:26:48 PM (4 weeks ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 12 edited
-
NS_dyn_ss_ice_m.F90 (modified) (1 diff)
-
adsorption_mod.F90 (modified) (5 diffs)
-
changelog.txt (modified) (1 diff)
-
glaciers_mod.F90 (modified) (2 diffs)
-
ice_table_mod.F90 (modified) (1 diff)
-
iostart_PEM.F90 (modified) (2 diffs)
-
orbit_param_criterion_mod.F90 (modified) (1 diff)
-
pem.F90 (modified) (7 diffs)
-
pemetat0.F90 (modified) (4 diffs)
-
read_data_PCM_mod.F90 (modified) (4 diffs)
-
recomp_orb_param_mod.F90 (modified) (3 diffs)
-
stopping_crit_mod.F90 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/NS_dyn_ss_ice_m.F90
r3563 r3961 22 22 !*********************************************************************** 23 23 use constants_marspem_mod, only: sec_per_sol 24 use fast_subs_mars, only: psv, icelayer_mars, NMAX 25 #ifndef CPP_STD 26 use comcstfi_h, only: pi 27 #else 28 use comcstfi_mod, only: pi 29 #endif 24 use fast_subs_mars, only: psv, icelayer_mars, NMAX 25 use comcstfi_h, only: pi 30 26 implicit none 31 27 integer, parameter :: NP=1 ! # of sites -
trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90
r3571 r3961 71 71 tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mco2reg) 72 72 73 END SUBROUTINE 73 END SUBROUTINE regolith_adsorption 74 74 75 75 !======================================================================= … … 89 89 use vertical_layers_mod, only: ap, bp 90 90 use constants_marspem_mod, only: alpha_clap_h2o, beta_clap_h2o, m_h2o, m_co2,m_noco2, rho_regolith 91 92 #ifndef CPP_STD 93 use comcstfi_h, only: pi 94 #else 95 use comcstfi_mod, only: pi 96 #endif 91 use comcstfi_h, only: pi 97 92 98 93 implicit none … … 147 142 ispermanent_co2glaciers = .false. 148 143 149 #ifndef CPP_STD 150 ! 0.1 Look at perennial ice 144 ! 0.1 Look at perennial ice 145 do ig = 1,ngrid 146 do islope = 1,nslope 147 if (abs(d_h2oglaciers(ig,islope)) > 1.e-5 .and. abs(waterice(ig,islope)) > 0.) ispermanent_h2oglaciers(ig,islope) = .true. 148 if (abs(d_co2glaciers(ig,islope)) > 1.e-5 .and. abs(co2ice(ig,islope)) > 0.) ispermanent_co2glaciers(ig,islope) = .true. 149 enddo 150 enddo 151 152 ! 0.2 Compute the partial pressure of vapor 153 ! a. the molecular mass into the column 154 do ig = 1,ngrid 155 mass_mean(ig,:) = 1/(A*q_co2(ig,:) + B) 156 enddo 157 158 ! b. pressure level 159 do it = 1,timelen 151 160 do ig = 1,ngrid 152 do islope = 1,nslope 153 if (abs(d_h2oglaciers(ig,islope)) > 1.e-5 .and. abs(waterice(ig,islope)) > 0.) ispermanent_h2oglaciers(ig,islope) = .true. 154 if (abs(d_co2glaciers(ig,islope)) > 1.e-5 .and. abs(co2ice(ig,islope)) > 0.) ispermanent_co2glaciers(ig,islope) = .true. 161 zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it) 162 enddo 163 enddo 164 165 ! c. Vapor pressure 166 pvapor = mass_mean/m_h2o*q_h2o*zplev_mean 167 pvapor_avg = sum(pvapor,2)/timelen 168 deallocate(pvapor,zplev_mean,mass_mean) 169 170 ! 1. we compute the mass of H2O adsorded in each layer of the meshes 171 do ig = 1,ngrid 172 do islope = 1,nslope 173 do iloop = 1,index_breccia 174 K = Ko*exp(e/tsoil_PEM(ig,iloop,islope)) 175 if (TI_PEM(ig,iloop,islope) < inertie_thresold) then 176 theta_h2o_adsorbed(ig,iloop,islope) = (K*pvapor_avg(ig)/(1. + K*pvapor_avg(ig)))**mu 177 else 178 p_sat = exp(beta_clap_h2o/tsoil_PEM(ig,iloop,islope) + alpha_clap_h2o) ! we assume fixed temperature in the ice ... not really good but ... 179 theta_h2o_adsorbed(ig,iloop,islope) = (K*p_sat/(1. + K*p_sat))**mu 180 endif 181 dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbed(ig,iloop,islope)*m_theta*rho_regolith 155 182 enddo 156 183 enddo 157 158 ! 0.2 Compute the partial pressure of vapor 159 ! a. the molecular mass into the column 160 do ig = 1,ngrid 161 mass_mean(ig,:) = 1/(A*q_co2(ig,:) + B) 162 enddo 163 164 ! b. pressure level 165 do it = 1,timelen 166 do ig = 1,ngrid 167 zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it) 184 enddo 185 186 ! 2. Check the exchange between the atmosphere and the regolith 187 do ig = 1,ngrid 188 delta_mreg(ig) = 0. 189 do islope = 1,nslope 190 deltam_reg_slope(ig,islope) = 0. 191 do iloop = 1,index_breccia 192 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 193 if (iloop == 1) then 194 deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope))*(layer_PEM(iloop)) 195 else 196 deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope))*(layer_PEM(iloop) - layer_PEM(iloop - 1)) 197 endif 198 else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC! 199 deltam_reg_complete(ig,iloop,islope) = 0. 200 endif 201 deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope) 168 202 enddo 169 enddo 170 171 ! c. Vapor pressure 172 pvapor = mass_mean/m_h2o*q_h2o*zplev_mean 173 pvapor_avg = sum(pvapor,2)/timelen 174 #endif 175 deallocate(pvapor,zplev_mean,mass_mean) 176 177 #ifndef CPP_STD 178 ! 1. we compute the mass of H2O adsorded in each layer of the meshes 179 do ig = 1,ngrid 180 do islope = 1,nslope 181 do iloop = 1,index_breccia 182 K = Ko*exp(e/tsoil_PEM(ig,iloop,islope)) 183 if (TI_PEM(ig,iloop,islope) < inertie_thresold) then 184 theta_h2o_adsorbed(ig,iloop,islope) = (K*pvapor_avg(ig)/(1. + K*pvapor_avg(ig)))**mu 185 else 186 p_sat = exp(beta_clap_h2o/tsoil_PEM(ig,iloop,islope) + alpha_clap_h2o) ! we assume fixed temperature in the ice ... not really good but ... 187 theta_h2o_adsorbed(ig,iloop,islope) = (K*p_sat/(1. + K*p_sat))**mu 188 endif 189 dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbed(ig,iloop,islope)*m_theta*rho_regolith 190 enddo 191 enddo 192 enddo 193 194 ! 2. Check the exchange between the atmosphere and the regolith 195 do ig = 1,ngrid 196 delta_mreg(ig) = 0. 197 do islope = 1,nslope 198 deltam_reg_slope(ig,islope) = 0. 199 do iloop = 1,index_breccia 200 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 201 if (iloop == 1) then 202 deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope))*(layer_PEM(iloop)) 203 else 204 deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope))*(layer_PEM(iloop) - layer_PEM(iloop - 1)) 205 endif 206 else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC! 207 deltam_reg_complete(ig,iloop,islope) = 0. 208 endif 209 deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope) 210 enddo 211 delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 212 enddo 213 enddo 214 m_h2o_completesoil = dm_h2o_regolith_slope 215 #endif 216 END SUBROUTINE 203 delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 204 enddo 205 enddo 206 m_h2o_completesoil = dm_h2o_regolith_slope 207 208 END SUBROUTINE regolith_h2oadsorption 217 209 218 210 !======================================================================= … … 230 222 use vertical_layers_mod, only: ap, bp 231 223 use constants_marspem_mod, only: m_co2, m_noco2, rho_regolith 232 233 #ifndef CPP_STD 234 use comcstfi_h, only: pi 235 #else 236 use comcstfi_mod, only: pi 237 #endif 224 use comcstfi_h, only: pi 238 225 239 226 implicit none … … 288 275 ispermanent_co2glaciers = .false. 289 276 290 #ifndef CPP_STD 291 ! 0.1 Look at perennial ice 277 ! 0.1 Look at perennial ice 278 do ig = 1,ngrid 279 do islope = 1,nslope 280 if (abs(d_h2oglaciers(ig,islope)) > 1.e-5 .and. abs(waterice(ig,islope)) > 0.) ispermanent_h2oglaciers(ig,islope) = .true. 281 if (abs(d_co2glaciers(ig,islope)) > 1.e-5 .and. abs(co2ice(ig,islope)) > 0.) ispermanent_co2glaciers(ig,islope) = .true. 282 enddo 283 enddo 284 285 ! 0.2 Compute the partial pressure of CO2 286 ! a. the molecular mass into the column 287 do ig = 1,ngrid 288 mass_mean(ig,:) = 1./(A*q_co2(ig,:) + B) 289 enddo 290 291 ! b. pressure level 292 do it = 1,timelen 292 293 do ig = 1,ngrid 293 do islope = 1,nslope 294 if (abs(d_h2oglaciers(ig,islope)) > 1.e-5 .and. abs(waterice(ig,islope)) > 0.) ispermanent_h2oglaciers(ig,islope) = .true. 295 if (abs(d_co2glaciers(ig,islope)) > 1.e-5 .and. abs(co2ice(ig,islope)) > 0.) ispermanent_co2glaciers(ig,islope) = .true. 294 zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it) 295 enddo 296 enddo 297 298 ! c. Vapor pressure 299 pco2 = mass_mean/m_co2*q_co2*zplev_mean 300 pco2_avg(:) = sum(pco2(:,:),2)/timelen 301 302 deallocate(zplev_mean,mass_mean,pco2) 303 304 ! 1. Compute the fraction of the pores occupied by H2O 305 call regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, & 306 theta_h2o_adsorbed, m_h2o_adsorbed,delta_mh2o) 307 308 ! 2. we compute the mass of co2 adsorded in each layer of the meshes 309 do ig = 1,ngrid 310 do islope = 1,nslope 311 do iloop = 1,index_breccia 312 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 313 dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1. - theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig)/ & 314 (alpha*pco2_avg(ig) + sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope))) 315 else 316 if (abs(m_co2_completesoil(ig,iloop,islope)) < 1.e-10) then !!! we are at first call 317 dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1. - theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig) & 318 /(alpha*pco2_avg(ig)+sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope))) 319 else ! no change: permanent ice stick the atoms of CO2 320 dm_co2_regolith_slope(ig,iloop,islope) = m_co2_completesoil(ig,iloop,islope) 321 endif 322 endif 296 323 enddo 297 324 enddo 298 299 ! 0.2 Compute the partial pressure of CO2 300 ! a. the molecular mass into the column 301 do ig = 1,ngrid 302 mass_mean(ig,:) = 1./(A*q_co2(ig,:) + B) 303 enddo 304 305 ! b. pressure level 306 do it = 1,timelen 307 do ig = 1,ngrid 308 zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it) 325 enddo 326 327 ! 3. Check the exchange between the atmosphere and the regolith 328 do ig = 1,ngrid 329 delta_mreg(ig) = 0. 330 do islope = 1,nslope 331 deltam_reg_slope(ig,islope) = 0. 332 do iloop = 1,index_breccia 333 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 334 if (iloop == 1) then 335 deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope))*(layer_PEM(iloop)) 336 else 337 deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope))*(layer_PEM(iloop) - layer_PEM(iloop - 1)) 338 endif 339 else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC! 340 deltam_reg_complete(ig,iloop,islope) = 0. 341 endif 342 deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope) 309 343 enddo 310 enddo 311 312 ! c. Vapor pressure 313 pco2 = mass_mean/m_co2*q_co2*zplev_mean 314 pco2_avg(:) = sum(pco2(:,:),2)/timelen 315 316 deallocate(zplev_mean,mass_mean,pco2) 317 318 ! 1. Compute the fraction of the pores occupied by H2O 319 call regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, & 320 theta_h2o_adsorbed, m_h2o_adsorbed,delta_mh2o) 321 322 ! 2. we compute the mass of co2 adsorded in each layer of the meshes 323 do ig = 1,ngrid 324 do islope = 1,nslope 325 do iloop = 1,index_breccia 326 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 327 dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1. - theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig)/ & 328 (alpha*pco2_avg(ig) + sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope))) 329 else 330 if (abs(m_co2_completesoil(ig,iloop,islope)) < 1.e-10) then !!! we are at first call 331 dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1. - theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig) & 332 /(alpha*pco2_avg(ig)+sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope))) 333 else ! no change: permanent ice stick the atoms of CO2 334 dm_co2_regolith_slope(ig,iloop,islope) = m_co2_completesoil(ig,iloop,islope) 335 endif 336 endif 337 enddo 338 enddo 339 enddo 340 341 ! 3. Check the exchange between the atmosphere and the regolith 342 do ig = 1,ngrid 343 delta_mreg(ig) = 0. 344 do islope = 1,nslope 345 deltam_reg_slope(ig,islope) = 0. 346 do iloop = 1,index_breccia 347 if (TI_PEM(ig,iloop,islope) < inertie_thresold .and. .not. ispermanent_h2oglaciers(ig,islope) .and. .not. ispermanent_co2glaciers(ig,islope)) then 348 if (iloop == 1) then 349 deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope))*(layer_PEM(iloop)) 350 else 351 deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope))*(layer_PEM(iloop) - layer_PEM(iloop - 1)) 352 endif 353 else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC! 354 deltam_reg_complete(ig,iloop,islope) = 0. 355 endif 356 deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope) 357 enddo 358 delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 359 enddo 360 enddo 361 m_co2_completesoil = dm_co2_regolith_slope 362 #endif 344 delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 345 enddo 346 enddo 347 m_co2_completesoil = dm_co2_regolith_slope 363 348 364 349 END SUBROUTINE regolith_co2adsorption -
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3958 r3961 791 791 == 12/11/2025 == JBC 792 792 Checking if a PCM run length is one Martian year + Changing instruction from "run" to "year" to be clearer. 793 794 == 14/11/2025 == JBC 795 Clearing all the tags and code related to the Generic PCM. -
trunk/LMDZ.COMMON/libf/evolution/glaciers_mod.F90
r3603 r3961 105 105 use ice_table_mod, only: rho_ice 106 106 use abort_pem_mod, only: abort_pem 107 #ifndef CPP_STD 108 use comcstfi_h, only: pi, g 109 #else 110 use comcstfi_mod, only: pi, g 111 #endif 107 use comcstfi_h, only: pi, g 112 108 113 109 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 172 168 use ice_table_mod, only: rho_ice 173 169 use abort_pem_mod, only: abort_pem 174 #ifndef CPP_STD 175 use comcstfi_h, only: pi 176 #else 177 use comcstfi_mod, only: pi 178 #endif 170 use comcstfi_h, only: pi 179 171 180 172 implicit none -
trunk/LMDZ.COMMON/libf/evolution/ice_table_mod.F90
r3602 r3961 152 152 use comslope_mod, only: subslope_dist, def_slope_mean 153 153 use constants_marspem_mod, only: porosity 154 #ifndef CPP_STD 155 use comcstfi_h, only: pi 156 #else 157 use comcstfi_mod, only: pi 158 #endif 154 use comcstfi_h, only: pi 159 155 160 156 implicit none -
trunk/LMDZ.COMMON/libf/evolution/iostart_PEM.F90
r3457 r3961 475 475 USE mod_grid_phy_lmdz, only: klon_glo 476 476 USE dimphy, only: klev, klevp1 477 #ifndef CPP_STD478 477 USE tracer_mod, only: nqmx 479 #else480 use tracer_h, only: nqtot481 #endif482 478 USE comsoil_h_PEM, only: nsoilmx_PEM 483 479 USE comslope_mod, only: nslope … … 487 483 INTEGER :: ierr 488 484 LOGICAL,SAVE :: already_created=.false. 489 490 #ifdef CPP_STD491 INTEGER :: nqmx492 nqmx=nqtot493 #endif494 485 495 486 IF (is_master) THEN -
trunk/LMDZ.COMMON/libf/evolution/orbit_param_criterion_mod.F90
r3860 r3961 23 23 use ioipsl_getincom, only: getin 24 24 #endif 25 #ifndef CPP_STD 26 use planete_h, only: e_elips, obliquit, lsperi 27 use comcstfi_h, only: pi 28 #else 29 use planete_mod, only: e_elips, obliquit, lsperi 30 use comcstfi_mod, only: pi 31 #endif 25 use planete_h, only: e_elips, obliquit, lsperi 26 use comcstfi_h, only: pi 32 27 use time_evol_mod, only: year_bp_ini, var_obl, var_ecc, var_lsp, convert_years 33 28 use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, ini_lask_param_mod, last_ilask -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3938 r3961 77 77 use paleoclimate_mod, only: h2o_ice_depth, zdqsdif_ssi_tot 78 78 use surf_temp, only: update_tsurf_nearest_baresoil 79 80 #ifndef CPP_STD 81 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, inertiesoil, flux_geo, nqsoil, qsoil 82 use surfdat_h, only: tsurf, qsurf, emis, emissiv, emisice, ini_surfdat_h, & 83 albedodat, albedice, albedo_h2o_frost, albedo_h2o_cap, & 84 zmea, zstd, zsig, zgam, zthe, frost_albedo_threshold, & 85 watercap, watercaptag, perennial_co2ice, albedo_perennialco2 86 use dimradmars_mod, only: totcloudfrac, albedo 87 use dust_param_mod, only: tauscaling 88 use tracer_mod, only: noms, igcm_h2o_ice, igcm_co2, mmol, igcm_h2o_vap ! Tracer names and molar masses 89 use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master 90 use planete_h, only: aphelie, periheli, year_day, peri_day, obliquit, iniorbit 91 use surfini_mod, only: surfini 92 use comcstfi_h, only: mugaz 93 #else 94 use tracer_h, only: noms, igcm_h2o_ice, igcm_co2 ! Tracer names 95 use phys_state_var_mod, only: cloudfrac, totcloudfrac, albedo_snow_SPECTV,HICE,RNAT, & 96 PCTSRF_SIC, TSLAB, TSEA_ICE, SEA_ICE, ALBEDO_BAREGROUND, & 97 ALBEDO_CO2_ICE_SPECTV, phys_state_var_init 98 use aerosol_mod, only: iniaerosol 99 use planete_mod, only: apoastr, periastr, year_day, peri_day, obliquit 100 use comcstfi_mod, only: pi, rad, g, r, cpp, rcp, mugaz 101 #endif 79 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, inertiesoil, flux_geo, nqsoil, qsoil 80 use surfdat_h, only: tsurf, qsurf, emis, emissiv, emisice, ini_surfdat_h, & 81 albedodat, albedice, albedo_h2o_frost, albedo_h2o_cap, & 82 zmea, zstd, zsig, zgam, zthe, frost_albedo_threshold, & 83 watercap, watercaptag, perennial_co2ice, albedo_perennialco2 84 use dimradmars_mod, only: totcloudfrac, albedo 85 use dust_param_mod, only: tauscaling 86 use tracer_mod, only: noms, igcm_h2o_ice, igcm_co2, mmol, igcm_h2o_vap ! Tracer names and molar masses 87 use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master 88 use planete_h, only: aphelie, periheli, year_day, peri_day, obliquit, iniorbit 89 use surfini_mod, only: surfini 90 use comcstfi_h, only: mugaz 102 91 103 92 #ifndef CPP_1D … … 255 244 character(32) :: hostname = ' ' 256 245 257 #ifdef CPP_STD258 real :: frost_albedo_threshold = 0.05 ! Frost albedo threeshold to convert fresh frost to old ice259 real :: albedo_h2o_frost ! Albedo of h2o frost260 real, dimension(:), allocatable :: tsurf_read_generic ! Temporary variable to do the subslope transfert dimension when reading form generic261 real, dimension(:,:), allocatable :: qsurf_read_generic ! Temporary variable to do the subslope transfert dimension when reading form generic262 real, dimension(:,:), allocatable :: tsoil_read_generic ! Temporary variable to do the subslope transfert dimension when reading form generic263 real, dimension(:), allocatable :: emis_read_generic ! Temporary variable to do the subslope transfert dimension when reading form generic264 real, dimension(:,:), allocatable :: albedo_read_generic ! Temporary variable to do the subslope transfert dimension when reading form generic265 real, dimension(:,:), allocatable :: tsurf ! Subslope variable, only needed in the GENERIC case266 real, dimension(:,:,:), allocatable :: qsurf ! Subslope variable, only needed in the GENERIC case267 real, dimension(:,:,:), allocatable :: tsoil ! Subslope variable, only needed in the GENERIC case268 real, dimension(:,:), allocatable :: emis ! Subslope variable, only needed in the GENERIC case269 real, dimension(:,:), allocatable :: watercap ! Subslope variable, only needed in the GENERIC case =0 no watercap in generic model270 logical, dimension(:), allocatable :: watercaptag ! Subslope variable, only needed in the GENERIC case =false no watercaptag in generic model271 real, dimension(:,:,:), allocatable :: albedo ! Subslope variable, only needed in the GENERIC case272 real, dimension(:,:,:), allocatable :: inertiesoil ! Subslope variable, only needed in the GENERIC case273 #endif274 275 246 #ifdef CPP_1D 276 247 integer :: nsplit_phys … … 330 301 331 302 ! Parallel variables 332 #ifndef CPP_STD 333 is_sequential = .true. 334 is_parallel = .false. 335 is_mpi_root = .true. 336 is_omp_root = .true. 337 is_master = .true. 338 #endif 303 is_sequential = .true. 304 is_parallel = .false. 305 is_mpi_root = .true. 306 is_omp_root = .true. 307 is_master = .true. 339 308 340 309 ! Some constants … … 438 407 ! I_b.2 Read the "startfi.nc" 439 408 ! First we read the initial state (starfi.nc) 440 #ifndef CPP_STD 441 write(*,*) '> Reading "startfi.nc"' 442 call phyetat0(startfi_name,0,0,nsoilmx,ngrid,nlayer,nq,nqsoil,day_ini,time_phys,tsurf, & 443 tsoil,albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac,wstar, & 444 watercap,perennial_co2ice,def_slope,def_slope_mean,subslope_dist) 445 446 ! Remove unphysical values of surface tracer 447 where (qsurf < 0.) qsurf = 0. 448 449 call surfini(ngrid,nslope,qsurf) 450 #else 451 call phys_state_var_init(nq) 452 if (.not. allocated(noms)) allocate(noms(nq)) ! (because noms is an argument of physdem1 whether or not tracer is on) 453 call initracer(ngrid,nq) 454 call iniaerosol() 455 allocate(tsurf_read_generic(ngrid)) 456 allocate(qsurf_read_generic(ngrid,nq)) 457 allocate(tsoil_read_generic(ngrid,nsoilmx)) 458 allocate(qsoil_read_generic(ngrid,nsoilmx,nqsoil,nslope)) 459 allocate(emis_read_generic(ngrid)) 460 allocate(albedo_read_generic(ngrid,2)) 461 allocate(qsurf(ngrid,nq,1)) 462 allocate(tsurf(ngrid,1)) 463 allocate(tsoil(ngrid,nsoilmx,1)) 464 allocate(emis(ngrid,1)) 465 allocate(watercap(ngrid,1)) 466 allocate(watercaptag(ngrid)) 467 allocate(albedo(ngrid,2,1)) 468 allocate(inertiesoil(ngrid,nsoilmx,1)) 469 call phyetat0(.true.,ngrid,nlayer,startfi_name,0,0,nsoilmx,nq,nqsoil,day_ini,time_phys, & 470 tsurf_read_generic,tsoil_read_generic,emis_read_generic,q2, & 471 qsurf_read_generic,qsoil_read_generic,cloudfrac,totcloudfrac,hice, & 472 rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 473 call surfini(ngrid,nq,qsurf_read_generic,albedo_read_generic,albedo_bareground,albedo_snow_SPECTV,albedo_co2_ice_SPECTV) 474 475 nslope = 1 476 call ini_comslope_h(ngrid,1) 477 478 qsurf(:,:,1) = qsurf_read_generic 479 tsurf(:,1) = tsurf_read_generic 480 tsoil(:,:,1) = tsoil_read_generic 481 emis(:,1) = emis_read_generic 482 watercap(:,1) = 0. 483 watercaptag(:) = .false. 484 albedo(:,1,1) = albedo_read_generic(:,1) 485 albedo(:,2,1) = albedo_read_generic(:,2) 486 inertiesoil(:,:,1) = inertiedat 487 488 if (nslope == 1) then 489 def_slope(1) = 0 490 def_slope(2) = 0 491 def_slope_mean = 0 492 subslope_dist(:,1) = 1. 493 endif 494 495 ! Remove unphysical values of surface tracer 496 qsurf(:,:,1) = qsurf_read_generic 497 where (qsurf < 0.) qsurf = 0. 498 499 deallocate(tsurf_read_generic,qsurf_read_generic,qsoil_read_generic,emis_read_generic) 500 #endif 409 write(*,*) '> Reading "startfi.nc"' 410 call phyetat0(startfi_name,0,0,nsoilmx,ngrid,nlayer,nq,nqsoil,day_ini,time_phys,tsurf, & 411 tsoil,albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac,wstar, & 412 watercap,perennial_co2ice,def_slope,def_slope_mean,subslope_dist) 413 414 ! Remove unphysical values of surface tracer 415 where (qsurf < 0.) qsurf = 0. 416 417 call surfini(ngrid,nslope,qsurf) 501 418 502 419 do nnq = 1,nqtot ! Why not using ini_tracer? … … 680 597 ! I_i Compute orbit criterion 681 598 !------------------------ 682 #ifndef CPP_STD 683 call iniorbit(aphelie,periheli,year_day,peri_day,obliquit) 684 #else 685 call iniorbit(apoastr,periastr,year_day,peri_day,obliquit) 686 #endif 599 call iniorbit(aphelie,periheli,year_day,peri_day,obliquit) 687 600 688 601 n_myear_leg = Max_iter_pem … … 1108 1021 enddo 1109 1022 tsoil = tsoil_PEM(:,1:nsoilmx,:) + tsoil_dev 1110 #ifndef CPP_STD1111 1023 flux_geo = fluxgeo 1112 #endif1113 1024 endif 1114 1025 deallocate(tsurf_avg,tsoil_dev) … … 1239 1150 ! III_b.2 Write the "restartfi.nc" 1240 1151 write(*,*) '> Writing "restartfi.nc"' 1241 #ifndef CPP_STD 1242 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, & 1243 nlayer,nq,ptimestep,pday,0.,cell_area,albedodat, & 1244 inertiedat,def_slope,subslope_dist) 1245 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, & 1246 ptimestep,ztime_fin,tsurf,tsoil,inertiesoil, & 1247 albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, & 1248 wstar,watercap,perennial_co2ice) 1249 #else 1250 if (allocated(noms)) deallocate(noms) 1251 deallocate(qsurf,tsurf,tsoil,emis,watercap,watercaptag,albedo,inertiesoil) 1252 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, & 1253 nlayer,nq,ptimestep,pday,time_phys,cell_area, & 1254 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 1255 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, & 1256 ptimestep,ztime_fin,tsurf,tsoil,emis,q2,qsurf,qsoil, & 1257 cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,tslab, & 1258 tsea_ice,sea_ice) 1259 #endif 1152 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, & 1153 nlayer,nq,ptimestep,pday,0.,cell_area,albedodat, & 1154 inertiedat,def_slope,subslope_dist) 1155 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, & 1156 ptimestep,ztime_fin,tsurf,tsoil,inertiesoil, & 1157 albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, & 1158 wstar,watercap,perennial_co2ice) 1260 1159 1261 1160 !------------------------ -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r3850 r3961 24 24 use callkeys_mod, only: startphy_file 25 25 use glaciers_mod, only: rho_co2ice, rho_h2oice 26 27 #ifndef CPP_STD 28 use comcstfi_h, only: r, mugaz, pi 29 use surfdat_h, only: watercaptag, watercap, perennial_co2ice 30 #else 31 use comcstfi_mod, only: r, mugaz, pi 32 #endif 26 use comcstfi_h, only: r, mugaz, pi 27 use surfdat_h, only: watercaptag, watercap, perennial_co2ice 33 28 34 29 implicit none … … 74 69 real, dimension(:,:,:,:), allocatable :: stratif_array ! Array for layerings 75 70 76 #ifdef CPP_STD77 logical, dimension(ngrid) :: watercaptag78 watercaptag = .false.79 #endif80 81 71 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 82 72 !!! … … 112 102 113 103 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 114 #ifndef CPP_STD115 104 ! h2o ice 116 105 h2o_ice = 0. … … 130 119 ! co2 ice 131 120 co2_ice = perennial_co2ice 132 #endif133 121 134 122 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
r3620 r3961 86 86 where (var3_read_1 < 0.) var3_read_1 = 0. 87 87 write(*,*) "Data for co2_ice"//num//" downloaded." 88 #ifndef CPP_STD89 88 call get_var3("perennial_co2ice"//num,var3_read_2) 90 89 write(*,*) "Data for perennial_co2ice"//num//" downloaded." 91 #endif92 90 93 91 ! Compute the minimum over the year for each point … … 105 103 where (var3_read_1 < 0.) var3_read_1 = 0. 106 104 write(*,*) "Data for h2o_ice_s"//num//" downloaded." 107 #ifndef CPP_STD108 105 call get_var3("watercap"//num,var3_read_2) 109 106 write(*,*) "Data for watercap"//num//" downloaded." 110 #endif111 107 112 108 ! Compute the minimum over the year for each point … … 207 203 where (var3_read_1 < 0.) var3_read_1 = 0. 208 204 write(*,*) "Data for co2_ice"//num//" downloaded." 209 #ifndef CPP_STD210 205 call get_var3("perennial_co2ice"//num,var3_read_2) 211 206 write(*,*) "Data for perennial_co2ice"//num//" downloaded." 212 #endif213 207 214 208 ! Compute the minimum over the year for each point … … 226 220 where (var3_read_1 < 0.) var3_read_1 = 0. 227 221 write(*,*) "Data for h2o_ice_s"//num//" downloaded." 228 #ifndef CPP_STD229 222 call get_var3("watercap"//num,var3_read_2) 230 223 write(*,*) "Data for watercap"//num//" downloaded." 231 #endif232 224 233 225 ! Compute the minimum over the year for each point -
trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90
r3851 r3961 15 15 SUBROUTINE recomp_orb_param(i_myear,i_myear_leg) 16 16 17 use time_evol_mod, only: year_bp_ini, var_obl, var_ecc, var_lsp 18 use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, end_lask_param_mod, last_ilask 19 #ifndef CPP_STD 20 use comcstfi_h, only: pi 21 use planete_h, only: e_elips, obliquit, lsperi, periheli, aphelie, p_elips, peri_day, year_day 22 use call_dayperi_mod, only: call_dayperi 23 #else 24 use comcstfi_mod, only: pi 25 use planete_mod, only: e_elips, obliquit, lsperi, periastr, apoastr, p_elips, peri_day, year_day 26 #endif 17 use time_evol_mod, only: year_bp_ini, var_obl, var_ecc, var_lsp 18 use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, end_lask_param_mod, last_ilask 19 use comcstfi_h, only: pi 20 use planete_h, only: e_elips, obliquit, lsperi, periheli, aphelie, p_elips, peri_day, year_day 21 use call_dayperi_mod, only: call_dayperi 27 22 28 23 implicit none … … 52 47 ! 0. Initializations 53 48 ! ********************************************************************** 54 #ifdef CPP_STD55 real :: aphelie, periheli56 57 aphelie = apoastr58 periheli = periastr59 #endif60 61 49 Year = year_bp_ini + i_myear ! We compute the current year 62 50 Lsp = lsperi*180./pi ! We convert in degree … … 125 113 p_elips = 0.5*(periheli + aphelie)*(1. - e_elips*e_elips)/unitastr 126 114 127 #ifndef CPP_STD 128 call call_dayperi(Lsp,e_elips,peri_day,year_day) 129 #endif 115 call call_dayperi(Lsp,e_elips,peri_day,year_day) 130 116 131 117 END SUBROUTINE recomp_orb_param -
trunk/LMDZ.COMMON/libf/evolution/stopping_crit_mod.F90
r3938 r3961 155 155 use time_evol_mod, only: dt 156 156 use comslope_mod, only: subslope_dist, def_slope_mean 157 #ifndef CPP_STD 158 use comcstfi_h, only: pi 159 #else 160 use comcstfi_mod, only: pi 161 #endif 157 use comcstfi_h, only: pi 162 158 163 159 implicit none
Note: See TracChangeset
for help on using the changeset viewer.
