Changeset 1516 for trunk/LMDZ.GENERIC
- Timestamp:
- Mar 17, 2016, 9:45:36 AM (9 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1514 r1516 1117 1117 - Added a generic routine (in utilities directory) to extrapolate ice fields. 1118 1118 - Added a generic version of streamfunction (in utilities directory). 1119 1120 == 17/03/2016 == EM 1121 - Added tests to ensure that soil model settings are adequate to resolve 1122 sub-surface diurnal and annual thermal waves. -
trunk/LMDZ.GENERIC/libf/phystd/comsoil_h.F90
r1315 r1516 6 6 !integer, parameter :: nsoilmx = 13 ! for z1=0.03 m, depth = 104.8 m => earth case 7 7 integer, parameter :: nsoilmx = 18 8 ! Full soil layer depths are set as: layer(k)=lay1*alpha**(k-1) , k=1,nsoil 9 ! Mid soil layer depths are set as: mlayer(k)=lay1*alpha**(k-1/2) , k=0,nsoil-1 10 real,parameter :: lay1=2.e-4 ! depth of first full soil layer 11 real,parameter :: alpha=2 8 12 9 13 real,save,allocatable,dimension(:) :: layer ! soil layer depths -
trunk/LMDZ.GENERIC/libf/phystd/soil.F
r1315 r1516 4 4 & capcal,fluxgrd) 5 5 6 use comsoil_h, only: layer, mlayer, volcapa 6 use comsoil_h, only: layer, mlayer, volcapa, inertiedat 7 use comcstfi_mod, only: pi, daysec 8 use planete_mod, only: year_day 9 use comgeomfi_h, only: long, lati 7 10 8 11 implicit none … … 49 52 ! local variables: 50 53 integer ig,ik 51 54 real :: inertia_min,inertia_max 55 real :: diurnal_skin ! diurnal skin depth (m) 56 real :: annual_skin ! anuual skin depth (m) 52 57 53 58 ! 0. Initialisations and preprocessing step … … 118 123 !write(*,*)'soil: ig=',ig,' capcal(ig)=',capcal(ig) 119 124 enddo ! of do ig=1,ngrid 120 125 126 ! Additional checks: is the vertical discretization sufficient 127 ! to resolve diurnal and annual waves? 128 do ig=1,ngrid 129 ! extreme inertia for this column 130 inertia_min=minval(inertiedat(ig,:)) 131 inertia_max=maxval(inertiedat(ig,:)) 132 ! diurnal and annual skin depth 133 diurnal_skin=(inertia_min/volcapa)*sqrt(daysec/pi) 134 annual_skin=(inertia_max/volcapa)*sqrt(year_day*daysec/pi) 135 if (0.5*diurnal_skin<layer(1)) then 136 ! one should have the fist layer be at least half of diurnal skin depth 137 write(*,*) "soil Error: grid point ig=",ig 138 write(*,*) " longitude=",long(ig)*(180./pi) 139 write(*,*) " latitude=",lati(ig)*(180./pi) 140 write(*,*) " first soil layer depth ",layer(1) 141 write(*,*) " not small enough for a diurnal skin depth of ", 142 & diurnal_skin 143 write(*,*) " change soil layer distribution (comsoil_h.F90)" 144 stop 145 endif 146 if (2.*annual_skin>layer(nsoil)) then 147 ! one should have the full soil be at least twice the diurnal skin depth 148 write(*,*) "soil Error: grid point ig=",ig 149 write(*,*) " longitude=",long(ig)*(180./pi) 150 write(*,*) " latitude=",lati(ig)*(180./pi) 151 write(*,*) " total soil layer depth ",layer(nsoil) 152 write(*,*) " not large enough for an annual skin depth of ", 153 & annual_skin 154 write(*,*) " change soil layer distribution (comsoil_h.F90)" 155 stop 156 endif 157 enddo ! of do ig=1,ngrid 158 121 159 else ! of if (firstcall) 122 160 -
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.