Changeset 3537 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Dec 6, 2024, 5:47:19 PM (2 weeks ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3533 r3537 507 507 == 04/12/2024 == JBC 508 508 Fixing the writing format for "info_PEM.txt". 509 510 == 06/12/2024 == JBC 511 Small fixes to initialize and output ice table-related variables and in the launching script. -
trunk/LMDZ.COMMON/libf/evolution/deftank/launchPEM.sh
r3498 r3537 114 114 echo "The number of PCM runs between each PEM run has been modified from $nPCM_old to $nPCM." 115 115 fi 116 if [ $n_myear -ne $n_myear_old]; then116 if [ "$(echo "$n_myear != $n_myear_old" | bc)" -eq 1 ]; then 117 117 echo "The number of initial PCM runs has been modified from $n_myear_old to $n_myear." 118 118 fi -
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3518 r3537 295 295 iPCM=$(($irelaunch + 1)) 296 296 cleanfiles diags/diagfi .nc $irelaunch 297 cleanfiles diags/diagsoil .nc $irelaunch 297 298 cleanfiles diags/data2reshape .nc $irelaunch 298 299 cleanfiles "out_PCM/run" "" $irelaunch … … 310 311 iPEM=1 311 312 cleanfiles diags/diagpem .nc $iPEM 313 cleanfiles diags/diagsoilpem .nc $iPEM 312 314 cleanfiles "out_PEM/run" "" $iPEM 313 315 cleanfiles starts/restart1D_postPEM .txt $iPEM … … 333 335 il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc) 334 336 cleanfiles diags/diagpem .nc $iPEM 337 cleanfiles diags/diagsoilpem .nc $iPEM 335 338 cleanfiles "out_PEM/run" "" $iPEM 336 339 cleanfiles starts/restart1D_postPEM .txt $iPEM … … 366 369 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt 367 370 cleanfiles diags/diagfi .nc $(($iPCM - 1)) 371 cleanfiles diags/diagsoil .nc $(($iPCM - 1)) 368 372 cleanfiles "out_PCM/run" "" $(($iPCM - 1)) 369 373 cleanfiles starts/restart1D .txt $(($iPCM - 1)) … … 372 376 cleanfiles diags/data2reshape .nc $(($iPCM - 1)) 373 377 cleanfiles diags/diagpem .nc $irelaunch 378 cleanfiles diags/diagsoilpem .nc $irelaunch 374 379 cleanfiles "out_PEM/run" "" $irelaunch 375 380 cleanfiles starts/restart1D_postPEM .txt $irelaunch -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3532 r3537 995 995 if (icetable_equilibrium) then 996 996 call writediagpem(ngrid,'ssi_depth_slope'//str2,'ice table depth','m',2,icetable_depth(:,islope)) 997 call writediagpem(ngrid,'ssi_thick_slope'//str2,'ice table depth','m',2,icetable_thickness(:,islope))997 call writediagpem(ngrid,'ssi_thick_slope'//str2,'ice table thickness','m',2,icetable_thickness(:,islope)) 998 998 else if (icetable_dynamic) then 999 999 call writediagpem(ngrid,'ssi_depth_slope'//str2,'ice table depth','m',2,icetable_depth(:,islope)) 1000 call writediagpem(ngrid,'ssi_thick_slope'//str2,'ice table depth','m',2,icetable_thickness(:,islope))1001 1000 endif 1002 1001 … … 1004 1003 call writediagsoilpem(ngrid,'tsoil_PEM_slope'//str2,'tsoil_PEM','K',3,tsoil_PEM(:,:,islope)) 1005 1004 call writediagsoilpem(ngrid,'inertiesoil_PEM_slope'//str2,'TI_PEM','K',3,TI_PEM(:,:,islope)) 1005 if (icetable_dynamic) call writediagpem(ngrid,'ice_porefilling'//str2,'ice pore filling','-',3,ice_porefilling(:,:,islope)) 1006 1006 if (adsorption_pem) then 1007 1007 call writediagsoilpem(ngrid,'co2_ads_slope'//str2,'co2_ads','K',3,co2_adsorbded_phys(:,:,islope)) … … 1070 1070 !------------------------ 1071 1071 ! III_a.1 Ice update (for startfi) 1072 1073 1072 watercap = 0. 1074 1073 perennial_co2ice = co2_ice … … 1210 1209 if (layering_algo) nb_str_max = get_nb_str_max(stratif,ngrid,nslope) ! Get the maximum number of "stratum" in the stratification (layerings) 1211 1210 call pemdem0("restartpem.nc",longitude,latitude,cell_area,ngrid,nslope,def_slope,subslope_dist) 1212 call pemdem1("restartpem.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM, & 1213 TI_PEM,icetable_depth,icetable_thickness,ice_porefilling, & 1211 call pemdem1("restartpem.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM,TI_PEM,icetable_depth,icetable_thickness,ice_porefilling, & 1214 1212 co2_adsorbded_phys,h2o_adsorbded_phys,h2o_ice,stratif) 1215 1213 write(*,*) "restartpem.nc has been written" -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r3532 r3537 7 7 !======================================================================= 8 8 9 SUBROUTINE pemetat0(filename,ngrid,nsoil_PCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM,ice _table_depth,ice_table_thickness, &9 SUBROUTINE pemetat0(filename,ngrid,nsoil_PCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM,icetable_depth,icetable_thickness, & 10 10 ice_porefilling,tsurf_avg_yr1,tsurf_avg_yr2,q_co2,q_h2o,ps_inst,tsoil_inst,d_h2oice,d_co2ice,co2_ice,h2o_ice, & 11 11 global_avg_pressure,watersurf_avg,watersoil_avg,m_co2_regolith_phys,deltam_co2_regolith_phys, & … … 16 16 use comsoil_h, only: volcapa, inertiedat 17 17 use adsorption_mod, only: regolith_adsorption, adsorption_pem 18 use ice_table_mod, only: computeice_table_equilibrium, icetable_ depth, icetable_thickness, icetable_equilibrium, icetable_dynamic18 use ice_table_mod, only: computeice_table_equilibrium, icetable_equilibrium, icetable_dynamic 19 19 use constants_marspem_mod, only: alpha_clap_h2o, beta_clap_h2o, TI_breccia, TI_bedrock 20 20 use soil_thermalproperties_mod, only: update_soil_thermalproperties … … 60 60 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: TI_PEM ! soil (mid-layer) thermal inertia in the PEM grid [SI] 61 61 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: tsoil_PEM ! soil (mid-layer) temperature [K] 62 real, dimension(ngrid,nslope), intent(inout) :: ice _table_depth! Ice table depth [m]63 real, dimension(ngrid,nslope), intent(inout) :: ice _table_thickness! Ice table thickness [m]62 real, dimension(ngrid,nslope), intent(inout) :: icetable_depth ! Ice table depth [m] 63 real, dimension(ngrid,nslope), intent(inout) :: icetable_thickness ! Ice table thickness [m] 64 64 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: ice_porefilling ! Subsurface ice pore filling [m3/m3] 65 65 real, dimension(ngrid,nsoil_PEM,nslope,timelen), intent(inout) :: tsoil_inst ! instantaneous soil (mid-layer) temperature [K] … … 108 108 109 109 !0.2 Set to default values 110 ice_table_depth = -1. ! by default, no ice table 111 ice_table_thickness = -1. 110 icetable_depth = -1. ! by default, no ice table 111 icetable_thickness = -1. 112 ice_porefilling = 0. 112 113 !1. Run 113 114 if (startpem_file) then … … 305 306 !3. Ice Table 306 307 if (icetable_equilibrium) then 307 call get_field("ice _table_depth",ice_table_depth,found)308 call get_field("icetable_depth",icetable_depth,found) 308 309 if (.not. found) then 309 write(*,*)'PEM settings: failed loading <ice _table_depth>'310 write(*,*)'PEM settings: failed loading <icetable_depth>' 310 311 write(*,*)'will reconstruct the values of the ice table given the current state' 311 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg,TI_PEM(:,1,:),ice _table_depth,ice_table_thickness)312 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice _table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM)312 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg,TI_PEM(:,1,:),icetable_depth,icetable_thickness) 313 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,icetable_depth,icetable_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 313 314 do islope = 1,nslope 314 315 call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) … … 318 319 else if (icetable_dynamic) then 319 320 call get_field("ice_porefilling",ice_porefilling,found) 321 if (.not. found) write(*,*)'PEM settings: failed loading <ice_porefilling>' 322 call get_field("icetable_depth",icetable_depth,found) 320 323 if (.not. found) then 321 write(*,*)'PEM settings: failed loading <ice_porefilling>' 322 ice_porefilling = 0. 323 endif 324 call get_field("ice_table_depth",ice_table_depth,found) 325 if (.not. found) then 326 write(*,*)'PEM settings: failed loading <ice_table_depth>' 324 write(*,*)'PEM settings: failed loading <icetable_depth>' 327 325 write(*,*)'will reconstruct the values of the ice table given the current state' 328 ice_table_depth = -9999. 329 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice_table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 326 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,icetable_depth,icetable_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 330 327 do islope = 1,nslope 331 328 call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) … … 498 495 !c) Ice table 499 496 if (icetable_equilibrium) then 500 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg,TI_PEM(:,1,:),ice _table_depth,ice_table_thickness)501 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice _table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM)497 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg,TI_PEM(:,1,:),icetable_depth,icetable_thickness) 498 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,icetable_depth,icetable_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 502 499 do islope = 1,nslope 503 500 call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) … … 505 502 write(*,*) 'PEMETAT0: Ice table done' 506 503 else if (icetable_dynamic) then 507 ice_porefilling = 0. 508 ice_table_depth = -9999. 509 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice_table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 504 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,icetable_depth,icetable_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 510 505 do islope = 1,nslope 511 506 call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) -
trunk/LMDZ.COMMON/libf/evolution/pemredem.F90
r3498 r3537 58 58 59 59 SUBROUTINE pemdem1(filename,i_myear,nsoil_PEM,ngrid,nslope,tsoil_slope_PEM,inertiesoil_slope_PEM, & 60 ice _table_depth,ice_table_thickness,ice_porefilling,m_co2_regolith,m_h2o_regolith,h2o_ice,stratif)60 icetable_depth,icetable_thickness,ice_porefilling,m_co2_regolith,m_h2o_regolith,h2o_ice,stratif) 61 61 62 62 ! write time-dependent variable to restart file … … 77 77 real, dimension(ngrid,nsoil_PEM,nslope), intent(in) :: tsoil_slope_PEM ! under mesh bining according to slope 78 78 real, dimension(ngrid,nsoil_PEM,nslope), intent(in) :: inertiesoil_slope_PEM ! under mesh bining according to slope 79 real, dimension(ngrid,nslope), intent(in) :: ice _table_depth ! under mesh bining according to slope80 real, dimension(ngrid,nslope), intent(in) :: ice _table_thickness ! under mesh bining according to slope79 real, dimension(ngrid,nslope), intent(in) :: icetable_depth ! under mesh bining according to slope 80 real, dimension(ngrid,nslope), intent(in) :: icetable_thickness ! under mesh bining according to slope 81 81 real, dimension(ngrid,nsoil_PEM,nslope), intent(in) :: ice_porefilling ! under mesh bining according to slope 82 82 real, dimension(ngrid,nsoil_PEM,nslope), intent(in) :: m_co2_regolith, m_h2o_regolith … … 122 122 call put_field("mh2o_reg_ads_slope"//num, "Mass of h2o adsorbded in the regolith",m_h2o_regolith(:,:,islope),Year) 123 123 enddo 124 call put_field("ice _table_depth","Depth of ice table",ice_table_depth,Year)125 call put_field("ice _table_thickness","Depth of ice table",ice_table_thickness,Year)124 call put_field("icetable_depth","Depth of ice table",icetable_depth,Year) 125 call put_field("icetable_thickness","Depth of ice table",icetable_thickness,Year) 126 126 call put_field("ice_porefilling","Subsurface ice pore filling",ice_porefilling,Year) 127 127 call put_field("inertiedat_PEM","Thermal inertie of PEM ",inertiedat_PEM,Year)
Note: See TracChangeset
for help on using the changeset viewer.