Changeset 4135 for trunk/LMDZ.COMMON/libf/evolution/backup.F90
- Timestamp:
- Mar 16, 2026, 6:09:43 PM (10 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/backup.F90 (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/backup.F90
r4134 r4135 114 114 ! LOCAL VARIABLES 115 115 ! --------------- 116 real(dp), dimension(:,:), allocatable :: h2o_ice4PCM, co2_ice4PCM, tsurf4PCM, flux_geo4PCM, albedo4PCM, emissivity4PCM 117 real(dp), dimension(:,:), allocatable :: teta4PCM, air_mass4PCM 118 real(dp), dimension(:,:,:), allocatable :: tsoil4PCM, inertiesoil4PCM, q4PCM 119 real(dp), dimension(:), allocatable :: ps4PCM 120 real(dp) :: pa4PCM, preff4PCM 121 logical(k4), dimension(:), allocatable :: is_h2o_perice 116 real(dp), dimension(ngrid,nslope) :: h2o_ice4PCM, co2_ice4PCM, tsurf4PCM, flux_geo4PCM, albedo4PCM, emissivity4PCM 117 real(dp), dimension(ngrid,nlayer) :: teta4PCM, air_mass4PCM 118 real(dp), dimension(ngrid,nsoil_PCM,nslope) :: tsoil4PCM, inertiesoil4PCM 119 real(dp), dimension(ngrid,nlayer,nq) :: q4PCM 120 real(dp), dimension(ngrid) :: ps4PCM 121 logical(k4), dimension(ngrid) :: is_h2o_perice 122 real(dp) :: pa4PCM, preff4PCM 122 123 123 124 ! CODE 124 125 ! ---- 125 126 ! Build ice for the PCM 126 allocate(h2o_ice4PCM(ngrid,nslope),co2_ice4PCM(ngrid,nslope),is_h2o_perice(ngrid))127 127 call build4PCM_perice(h2o_ice,co2_ice,is_h2o_perice,h2o_ice4PCM,co2_ice4PCM) 128 128 129 129 ! Build surface temperature for the PCM 130 allocate(tsurf4PCM(ngrid,nslope))131 130 call build4PCM_tsurf(tsurf_avg,tsurf_dev,tsurf4PCM) 132 131 133 132 ! Build soil for the PCM 134 if (do_soil) then 135 allocate(tsoil4PCM(ngrid,nsoil_PCM,nslope),inertiesoil4PCM(ngrid,nsoil_PCM,nslope),flux_geo4PCM(ngrid,nslope)) 136 call build4PCM_soil(tsoil_avg,tsoil_dev,inertiesoil4PCM,tsoil4PCM,flux_geo4PCM) 137 end if 133 if (do_soil) call build4PCM_soil(tsoil_avg,tsoil_dev,inertiesoil4PCM,tsoil4PCM,flux_geo4PCM) 138 134 139 135 ! Build atmosphere for the PCM 140 allocate(ps4PCM(ngrid),teta4PCM(ngrid,nlayer),air_mass4PCM(ngrid,nlayer))141 136 call build4PCM_atmosphere(ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini,ps4PCM,pa4PCM,preff4PCM,teta4PCM,air_mass4PCM) 142 137 143 138 ! Build tracers for the PCM 144 allocate(q4PCM(ngrid,nlayer,nq))145 139 call build4PCM_tracers(ps4PCM,q4PCM) 146 140 147 141 ! Build surface radiative properties state for the PCM 148 allocate(albedo4PCM(ngrid,nslope),emissivity4PCM(ngrid,nslope))149 142 call build4PCM_surf_rad_prop(h2o_ice,co2_ice,albedo4PCM,emissivity4PCM) 150 143 … … 158 151 end if 159 152 160 ! Deallocation161 if (allocated(emissivity4PCM)) deallocate(emissivity4PCM)162 if (allocated(albedo4PCM)) deallocate(albedo4PCM)163 if (allocated(q4PCM)) deallocate(q4PCM)164 if (allocated(ps4PCM)) deallocate(ps4PCM)165 if (allocated(teta4PCM)) deallocate(teta4PCM)166 if (allocated(air_mass4PCM)) deallocate(air_mass4PCM)167 if (allocated(tsoil4PCM)) deallocate(tsoil4PCM)168 if (allocated(inertiesoil4PCM)) deallocate(inertiesoil4PCM)169 if (allocated(flux_geo4PCM)) deallocate(flux_geo4PCM)170 if (allocated(tsurf4PCM)) deallocate(tsurf4PCM)171 if (allocated(co2_ice4PCM)) deallocate(co2_ice4PCM)172 if (allocated(h2o_ice4PCM)) deallocate(h2o_ice4PCM)173 if (allocated(is_h2o_perice)) deallocate(is_h2o_perice)174 175 153 END SUBROUTINE save_clim_state 176 154 !======================================================================= 177 155 178 156 !======================================================================= 179 SUBROUTINE backup_restarts( idt)157 SUBROUTINE backup_restarts(backup_idt) 180 158 !----------------------------------------------------------------------- 181 159 ! NAME … … 205 183 ! ARGUMENTS 206 184 ! --------- 207 integer(di), intent(in) :: idt185 integer(di), intent(in) :: backup_idt 208 186 209 187 ! LOCAL VARIABLES … … 213 191 ! CODE 214 192 ! ---- 215 suffix = '_ts'//int2str( idt)216 217 call print_msg('> Backup at dt = '//int2str(idt),LVL_NFO)193 suffix = '_ts'//int2str(backup_idt) 194 195 call print_msg('> Backup of "restart" files at dt = '//int2str(backup_idt),LVL_NFO) 218 196 call copy_restart_if_present('re'//startevo_name,suffix2filename(startevo_name,suffix)) 219 197 call copy_restart_if_present('re'//startfi_name,suffix2filename(startfi_name,suffix))
Note: See TracChangeset
for help on using the changeset viewer.
