Changeset 3620 for trunk/LMDZ.COMMON
- Timestamp:
- Feb 12, 2025, 12:03:26 PM (26 hours ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3618 r3620 591 591 == 11/02/2025 == JBC 592 592 Correction for a problem concerning an imported variable whether in 1D or 3D. 593 594 == 12/02/2025 == JBC 595 Few small adjustments in the code. -
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3611 r3620 348 348 il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc) 349 349 if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account 350 i_myear=$(($(awk "NR==$iPEM {print \$3}" "info_PEM.txt") + $il))350 i_myear=$(($(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") + $il)) 351 351 else # Counting: only PEM runs count 352 i_myear=$(awk "NR==$iPEM {print \$3}" "info_PEM.txt")352 i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") 353 353 fi 354 354 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt … … 380 380 iPEM=$(echo "$irelaunch + 1" | bc) 381 381 iPCM=$(echo "$nPCM_ini + $nPCM*($irelaunch - 1) + 1" | bc) 382 i_myear=$(awk "NR==$ (($iPEM + 1)) {print\$3}" "info_PEM.txt")382 i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") 383 383 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt 384 384 cleanfiles diags/diagfi .nc $(($iPCM - 1)) -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3618 r3620 1015 1015 !------------------------ 1016 1016 call recomp_tend_co2(ngrid,nslope,timelen,d_co2ice,d_co2ice_ini,co2_ice,emis,vmr_co2_PCM,vmr_co2_PEM_phys,ps_timeseries,ps_avg_global_old,ps_avg_global_new) 1017 1018 do ig = 1,ngrid1019 do islope = 1,nslope1020 call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))1021 enddo1022 enddo1017 !write(*,*) "> Updating the H2O sub-surface ice tendency due to lag layer" 1018 !do ig = 1,ngrid 1019 ! do islope = 1,nslope 1020 ! call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope)) 1021 ! enddo 1022 !enddo 1023 1023 deallocate(vmr_co2_PEM_phys,icetable_depth_old,tsoil_PEM_timeseries_old) 1024 1024 -
trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
r3616 r3620 52 52 real, dimension(ngrid,nsoilmx,nslope,timelen), intent(out) :: watersoil_density_timeseries ! Water density timeseries in the soil layer [kg/m^3] 53 53 ! Local variables 54 integer :: i, j, l, islope ! Loop variables54 integer :: i, j, t, islope ! Loop variables 55 55 real :: A, B ! Intermediate variables to compute the mean molar mass of the layer 56 56 character(:), allocatable :: num ! For reading sloped variables … … 243 243 !------ 244 244 call get_var3("tsurf"//num,var3_read_1) 245 245 write(*,*) "Data for tsurf"//num//" downloaded." 246 246 247 247 ! Compute average over the year for each point … … 263 263 var3_read_3 = sum(var4_read,4)/timelen 264 264 #ifndef CPP_1D 265 do l = 1,nsoilmx266 call gr_dyn_fi( timelen,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,l,:),tsoil_timeseries(:,l,islope,:))265 do t = 1,timelen 266 call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,:,t),tsoil_timeseries(:,:,islope,t)) 267 267 enddo 268 268 call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var3_read_3,tsoil_avg(:,:,islope)) … … 277 277 call get_var4("waterdensity_soil"//num,var4_read) 278 278 #ifndef CPP_1D 279 do l = 1,nsoilmx280 call gr_dyn_fi( timelen,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,l,:),watersoil_density_timeseries(:,l,islope,:))279 do t = 1,timelen 280 call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,:,t),watersoil_density_timeseries(:,:,islope,t)) 281 281 enddo 282 282 #else -
trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90
r3610 r3620 89 89 real, parameter :: zcdv = 0.0325 ! Drag coefficient 90 90 91 write(*,*) "> Updating the H2O tendency due to lag layer"92 93 91 ! Higher resistance due to growing lag layer (higher depth) 94 92 Rz_old = icetable_depth_old*zcdv/coef_diff ! Old resistance from PCM
Note: See TracChangeset
for help on using the changeset viewer.