Changeset 1516 for trunk/LMDZ.GENERIC/libf/phystd/soil_settings.F
- Timestamp:
- Mar 17, 2016, 9:45:36 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/soil_settings.F
r1350 r1516 2 2 3 3 ! use netcdf 4 use comsoil_h, only: layer, mlayer, inertiedat, volcapa 4 use comsoil_h, only: layer, mlayer, inertiedat, volcapa, 5 & lay1, alpha 5 6 use iostart, only: inquire_field_ndims, get_var, get_field, 6 7 & inquire_field, inquire_dimension_length … … 70 71 real,dimension(:),allocatable :: newval 71 72 72 real alpha,lay1 ! coefficients for building layers73 real malpha,mlay1 ! coefficients for building layers 73 74 real xmin,xmax ! to display min and max of a field 74 75 … … 133 134 ! default mlayer distribution, following a power law: 134 135 ! mlayer(k)=lay1*alpha**(k-1/2) 135 lay1=2.e-4136 alpha=2137 136 do iloop=0,nsoil-1 138 137 mlayer(iloop)=lay1*(alpha**(iloop-0.5)) … … 142 141 ! Assuming layer distribution follows mid-layer law: 143 142 ! layer(k)=lay1*alpha**(k-1) 144 lay1=sqrt(mlayer(0)*mlayer(1)) 145 alpha=mlayer(1)/mlayer(0) 143 mlay1=sqrt(mlayer(0)*mlayer(1)) 144 malpha=mlayer(1)/mlayer(0) 145 ! Check that these values are the same as those prescibed for mlayers 146 if ((abs(mlay1-lay1)/lay1).gt.1.e-6) then 147 write(*,*) "soil_settings error: mlay1=",mlay1 148 write(*,*) " does not match comsoil_h lay1=",lay1 149 stop 150 endif 151 if ((abs(malpha-alpha)/alpha).gt.1.e-6) then 152 write(*,*) "soil_settings error: malpha=",malpha 153 write(*,*) " does not match comsoil_h alpha=",alpha 154 stop 155 endif 146 156 do iloop=1,nsoil 147 layer(iloop)= lay1*(alpha**(iloop-1))157 layer(iloop)=mlay1*(malpha**(iloop-1)) 148 158 enddo 159 149 160 ! 2. Volumetric heat capacity (note: it is declared in comsoil_h) 150 161 ! ---------------------------
Note: See TracChangeset
for help on using the changeset viewer.