- Timestamp:
- Nov 8, 2024, 10:56:18 AM (13 days ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3483 r3500 527 527 real :: annual_skin ! anuual skin depth (m) 528 528 529 ! when no startfi file is asked for init 530 real alpha,lay1 ! coefficients for building layers 531 integer iloop 529 532 530 533 ! flags to trigger extra sanity checks … … 599 602 #ifndef MESOSCALE 600 603 if (.not.startphy_file) then 604 ! starting without startfi.nc and with callsoil 605 ! is not yet possible as soildepth default is not defined 606 if (callsoil) then 607 ! default mlayer distribution, following a power law: 608 ! mlayer(k)=lay1*alpha**(k-1/2) 609 lay1=2.e-4 610 alpha=2 611 do iloop=0,nsoilmx-1 612 mlayer(iloop)=lay1*(alpha**(iloop-0.5)) 613 enddo 614 lay1=sqrt(mlayer(0)*mlayer(1)) 615 alpha=mlayer(1)/mlayer(0) 616 do iloop=1,nsoilmx 617 layer(iloop)=lay1*(alpha**(iloop-1)) 618 enddo 619 endif 601 620 ! additionnal "academic" initialization of physics 602 621 if (is_master) write(*,*) "Physiq: initializing tsurf(:) to pt(:,1) !!" … … 1011 1030 ! enddo 1012 1031 1013 if ( callsoil) then1032 if (firstcall.and.callsoil) then 1014 1033 ! AF24 Originally in soil.F, but inertiedat is modified by surfprop 1015 1034 ! Additional checks: is the vertical discretization sufficient … … 1019 1038 inertia_min=minval(inertiedat(ig,:)) 1020 1039 inertia_max=maxval(inertiedat(ig,:)) 1040 print*, "inertia min max" , inertia_min, inertia_max 1021 1041 ! diurnal and annual skin depth 1022 1042 diurnal_skin=(inertia_min/volcapa)*sqrt(daysec/pi) -
trunk/LMDZ.PLUTO/libf/phypluto/soil_settings.F
r3184 r3500 39 39 ! --------- 40 40 ! inputs: 41 integer,intent(in) :: nid ! Input Netcdf file ID 41 integer,intent(in) :: nid ! Input Netcdf file ID 42 42 integer,intent(in) :: ngrid ! # of horizontal grid points 43 43 integer,intent(in) :: nsoil ! # of soil layers … … 55 55 integer ndims ! # of dimensions of read <inertiedat> data 56 56 integer ig,iloop ! loop counters 57 57 58 58 integer edges(3),corner(3) ! to read a specific time 59 59 … … 89 89 endif 90 90 91 ! allocate oldmlayer 91 ! allocate oldmlayer 92 92 allocate(oldmlayer(dimlen),stat=ierr) 93 93 if (ierr.ne.0) then … … 115 115 & 'and thermal inertia will be required!' 116 116 endif 117 117 118 118 ! 1.2 Find out the # of dimensions <inertiedat> was defined as using 119 119 ndims=inquire_field_ndims("inertiedat") … … 135 135 oldmlayer(iloop)=sqrt(887.75/3.14)*((2.**(iloop-0.5))-1.) 136 136 enddo 137 else ! Look for depth 137 else ! Look for depth 138 138 ! read <depth> coordinate 139 139 if (interpol) then !put values in oldmlayer … … 180 180 ! 2. Volumetric heat capacity (note: it is declared in comsoil_h) 181 181 ! --------------------------- 182 ! "volcapa" is (so far) 0D and written in "controle" table of startfi file 182 ! "volcapa" is (so far) 0D and written in "controle" table of startfi file 183 183 ! volcapa is read or set when "controle" is read (see tabfi.F) 184 184 ! Just in case, we check here that it is not zero. If it is, we … … 210 210 call abort 211 211 endif 212 212 213 213 write(*,*)' => Building soil thermal inertia (using reference sur 214 214 &face thermal inertia)' … … 242 242 endif ! of if (interpol) 243 243 endif ! of if (ndims.eq.1) 244 244 245 245 ! 4. Read soil temperatures 246 246 ! ------------------------- … … 275 275 call abort 276 276 endif 277 endif ! of if (interpol) 277 endif ! of if (interpol) 278 278 endif! of if (.not.ok) 279 279 … … 304 304 deallocate(oldval) 305 305 deallocate(newval) 306 interpol=.false. ! no need for interpolation any more 306 interpol=.false. ! no need for interpolation any more 307 307 endif !of if (olddepthdef) 308 308 … … 325 325 inertiedat(ig,:)=newval(:) 326 326 enddo 327 327 328 328 ! soil temperature 329 329 ! vertical coordinate … … 339 339 tsoil(ig,:)=newval(:) 340 340 enddo 341 341 342 342 !cleanup 343 343 deallocate(oldgrid) … … 347 347 deallocate(oldtsoil) 348 348 endif ! of if (interpol) 349 349 350 350 ! 6. Report min and max values of soil temperatures and thermal inertias 351 351 ! ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.