Changeset 3991 for trunk/LMDZ.COMMON/libf/evolution/surf_temp.F90
- Timestamp:
- Dec 16, 2025, 4:39:24 PM (7 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/surf_temp.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/surf_temp.F90
r3989 r3991 1 1 MODULE surf_temp 2 2 !----------------------------------------------------------------------- 3 ! NAME 4 ! surf_temp 5 ! 6 ! DESCRIPTION 7 ! Surface temperature management. 8 ! 9 ! AUTHORS & DATE 10 ! JB Clement, 2025 11 ! 12 ! NOTES 13 ! 14 !----------------------------------------------------------------------- 15 16 ! DECLARATION 17 ! ----------- 3 18 implicit none 4 19 5 !=======================================================================6 20 contains 7 ! =======================================================================21 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 22 9 23 !======================================================================= 10 24 SUBROUTINE update_tsurf_nearest_baresoil(ngrid,nslope,nlon,nlat,latitude,tsurf_avg,co2_ice,is_co2ice_ini,co2ice_disappeared) 11 25 !----------------------------------------------------------------------- 26 ! NAME 27 ! update_tsurf_nearest_baresoil 28 ! 29 ! DESCRIPTION 30 ! Update surface temperature where CO2 ice disappeared using nearby 31 ! bare soil temperature. 32 ! 33 ! AUTHORS & DATE 34 ! JB Clement, 2025 35 ! 36 ! NOTES 37 ! 38 !----------------------------------------------------------------------- 39 40 ! DEPENDENCIES 41 ! ------------ 12 42 use grid_conversion, only: vect2lonlat, lonlat2vect 13 43 44 ! DECLARATION 45 ! ----------- 14 46 implicit none 15 47 16 ! Inputs: 17 integer, intent(in) :: nlon, nlat, nslope, ngrid 18 real, dimension(ngrid,nslope), intent(in) :: co2_ice 19 real, dimension(ngrid), intent(in) :: latitude 20 logical, dimension(ngrid,nslope), intent(in) :: is_co2ice_ini 21 ! Outputs: 22 real, dimension(ngrid,nslope), intent(inout) :: tsurf_avg 23 logical, dimension(ngrid,nslope), intent(inout) :: co2ice_disappeared 24 ! Local variables: 25 real, parameter :: eps = 1.e-10 26 integer :: islope, i, j, k, radius, rmax, di, dj, ii, jj 27 logical :: found 28 real, dimension(nlon,nlat,nslope) :: tsurf_ll, co2ice_ll, mask_co2ice_ini, co2ice_disappeared_ll 29 real, dimension(nlon,nlat) :: latitude_ll 30 real, dimension(ngrid) :: tmp 31 integer, dimension(nslope - 1) :: priority 32 48 ! ARGUMENTS 49 ! --------- 50 integer, intent(in) :: nlon, nlat, nslope, ngrid ! Grid dimensions 51 real, dimension(ngrid,nslope), intent(in) :: co2_ice ! CO2 ice density 52 real, dimension(ngrid), intent(in) :: latitude ! Latitude 53 logical, dimension(ngrid,nslope), intent(in) :: is_co2ice_ini ! Initial CO2 ice flag 54 real, dimension(ngrid,nslope), intent(inout) :: tsurf_avg ! Average surface temperature 55 logical, dimension(ngrid,nslope), intent(inout) :: co2ice_disappeared ! Ice disappeared flag 56 57 ! LOCAL VARIABLES 58 ! --------------- 59 real, parameter :: eps = 1.e-10 60 integer :: islope, i, j, k, radius, rmax, di, dj, ii, jj 61 logical :: found 62 real, dimension(nlon,nlat,nslope) :: tsurf_ll, co2ice_ll, mask_co2ice_ini, co2ice_disappeared_ll 63 real, dimension(nlon,nlat) :: latitude_ll 64 real, dimension(ngrid) :: tmp 65 integer, dimension(nslope - 1) :: priority 66 67 ! CODE 68 ! ---- 33 69 ! Check to escape the subroutine (not relevant in 1D) 34 70 if (ngrid == 1) return … … 110 146 !======================================================================= 111 147 SUBROUTINE get_slope_priority(lat,nslope,islope,priority) 112 ! Priority given to equator-ward slope which are most likely to hold no ice 113 148 !----------------------------------------------------------------------- 149 ! NAME 150 ! get_slope_priority 151 ! 152 ! DESCRIPTION 153 ! Determine slope priority based on latitude (equator-ward favored). 154 ! 155 ! AUTHORS & DATE 156 ! JB Clement, 2025 157 ! 158 ! NOTES 159 ! Equator-ward slopes are most likely to hold no ice. 160 !----------------------------------------------------------------------- 161 162 ! DECLARATION 163 ! ----------- 114 164 implicit none 115 165 116 ! Inputs: 117 real, intent(in) :: lat 118 integer, intent(in) :: nslope, islope 119 ! Outputs: 120 integer, dimension(nslope - 1), intent(out) :: priority 121 ! Locals: 166 ! ARGUMENTS 167 ! --------- 168 real, intent(in) :: lat ! Latitude [degrees] 169 integer, intent(in) :: nslope, islope 170 integer, dimension(nslope - 1), intent(out) :: priority ! Priority ordering of slopes 171 172 ! LOCAL VARIABLES 173 ! --------------- 122 174 integer :: i, k 123 175 124 ! C ode125 ! -----176 ! CODE 177 ! ---- 126 178 k = 1 127 179
Note: See TracChangeset
for help on using the changeset viewer.
