Changeset 3485
- Timestamp:
- Oct 24, 2024, 1:10:52 PM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/soil.F
r1543 r3485 16 16 ! 17 17 ! Purpose: Compute soil temperature using an implict 1st order scheme 18 ! 19 ! Note: depths of layers and mid-layers, soil thermal inertia and 18 ! 19 ! Note: depths of layers and mid-layers, soil thermal inertia and 20 20 ! heat capacity are commons in comsoil.h 21 21 !----------------------------------------------------------------------- … … 25 25 ! --------- 26 26 ! inputs: 27 integer,intent(in) :: ngrid ! number of (horizontal) grid-points 28 integer,intent(in) :: nsoil ! number of soil layers 29 logical,intent(in) :: firstcall ! identifier for initialization call 27 integer,intent(in) :: ngrid ! number of (horizontal) grid-points 28 integer,intent(in) :: nsoil ! number of soil layers 29 logical,intent(in) :: firstcall ! identifier for initialization call 30 30 logical,intent(in) :: lastcall 31 31 real,intent(in) :: therm_i(ngrid,nsoil) ! thermal inertia … … 46 46 real,save :: mu 47 47 !$OMP THREADPRIVATE(mthermdiff,thermdiff,coefq,coefd,alph,beta,mu) 48 48 49 49 ! local variables: 50 50 integer ig,ik … … 56 56 if (firstcall) then 57 57 ! note: firstcall is set to .true. or .false. by the caller 58 ! and not changed by soil.F 58 ! and not changed by soil.F 59 59 60 60 ALLOCATE(mthermdiff(ngrid,0:nsoil-1)) ! mid-layer thermal diffusivity … … 100 100 coefd(ig,ik)=thermdiff(ig,ik)/(mlayer(ik)-mlayer(ik-1)) 101 101 enddo 102 102 103 103 ! alph_{N-1} 104 104 alph(ig,nsoil-1)=coefd(ig,nsoil-1)/ … … 120 120 !write(*,*)'soil: ig=',ig,' capcal(ig)=',capcal(ig) 121 121 enddo ! of do ig=1,ngrid 122 122 123 123 ! Additional checks: is the vertical discretization sufficient 124 124 ! to resolve diurnal and annual waves? … … 139 139 & diurnal_skin 140 140 write(*,*) " change soil layer distribution (comsoil_h.F90)" 141 stop 141 call abort_physic("soil", 142 & "change soil layer distribution (comsoil_h.F90)",1) 142 143 endif 143 144 if (2.*annual_skin>layer(nsoil)) then … … 150 151 & annual_skin 151 152 write(*,*) " change soil layer distribution (comsoil_h.F90)" 152 stop 153 call abort_physic("soil", 154 & "change soil layer distribution (comsoil_h.F90)",1) 153 155 endif 154 156 enddo ! of do ig=1,ngrid 155 157 156 158 else ! of if (firstcall) 157 159 … … 171 173 enddo 172 174 enddo 173 175 174 176 endif! of if (firstcall) 175 177
Note: See TracChangeset
for help on using the changeset viewer.