Changeset 3190 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Jan 30, 2024, 10:14:19 AM (10 months ago)
Author:
llange
Message:

PEM
Fixing bug in writediagpem: soil layers written in the diagpem where those of the PCM and not the PEM.
LL

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3182 r3190  
    213213== 25/01/2023 == JBC
    214214Update of "launch_pem.sh" related to r3171 to move the "diagsoilpem.nc" in the intended output folder.
     215
     216== 29/01/2023 == LL
     217Fixing bug when recomputing Tsoil for the startfi. It is now done with: Tsoil averaged + Delta T where delta T is tthe difference between the instantaneous soil temperature and the yearly averaged soil temperature in the original startfi.
     218
     219== 30/01/2023 == LL
     220Fixing bug in writediagpem: soil layers written in the diagpem where those of the PCM and not the PEM.
     221
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r3178 r3190  
    253253                tsoil_tmp_yr2(:,:,islope) = tsoil_tmp_yr1(:,:,islope)
    254254                call compute_tsoil_pem(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_tmp_yr2(:,:,islope))
    255 
     255               
    256256                do iloop = nsoil_PCM+1,nsoil_PEM
    257257                    tsoil_PEM(:,iloop,islope) = tsoil_tmp_yr2(:,iloop,islope)
  • trunk/LMDZ.COMMON/libf/evolution/writediagpem.F90

    r3181 r3190  
    593593! Modifs: Aug.2010 Ehouarn: enforce outputs to be real*4
    594594
    595 use comsoil_h, only: nsoilmx, inertiedat
     595use comsoil_h_PEM, only: nsoilmx_PEM, inertiedat_PEM
    596596use geometry_mod, only: cell_area
    597597use time_phylmdz_mod, only: ecritphy, day_step, iphysiq
     
    611611character(len=*),intent(in) :: units ! 'units' attribute of the variable
    612612integer,intent(in) :: dimpx ! dimension of the variable (3,2 or 0)
    613 real,dimension(ngrid,nsoilmx),intent(in) :: px ! variable
     613real,dimension(ngrid,nsoilmx_PEM),intent(in) :: px ! variable
    614614
    615615! Local variables:
    616 real*4,dimension(nbp_lon+1,nbp_lat,nsoilmx) :: data3 ! to store 3D data
     616real*4,dimension(nbp_lon+1,nbp_lat,nsoilmx_PEM) :: data3 ! to store 3D data
    617617real*4,dimension(nbp_lon+1,nbp_lat) :: data2 ! to store 2D data
    618618real*4 :: data0 ! to store 0D data
    619 real*4 :: data3_1d(1,nsoilmx) ! to store a profile in 1D model
     619real*4 :: data3_1d(1,nsoilmx_PEM) ! to store a profile in 1D model
    620620real*4 :: data2_1d ! to store surface value with 1D model
    621621integer :: i,j,l ! for loops
     
    624624real*4,save :: date ! time counter (in elapsed days)
    625625
    626 real :: inertia((nbp_lon+1),nbp_lat,nsoilmx)
     626real :: inertia((nbp_lon+1),nbp_lat,nsoilmx_PEM)
    627627real :: area((nbp_lon+1),nbp_lat)
    628628
    629 real :: inertiafi_glo(klon_glo,nsoilmx)
     629real :: inertiafi_glo(klon_glo,nsoilmx_PEM)
    630630real :: areafi_glo(klon_glo)
    631631
     
    647647#ifdef CPP_PARA
    648648! Added to work in parallel mode
    649 real dx3_glop(klon_glo,nsoilmx)
    650 real dx3_glo(nbp_lon,nbp_lat,nsoilmx) ! to store a global 3D data set
     649real dx3_glop(klon_glo,nsoilmx_PEM)
     650real dx3_glo(nbp_lon,nbp_lat,nsoilmx_PEM) ! to store a global 3D data set
    651651real dx2_glop(klon_glo)
    652652real dx2_glo(nbp_lon,nbp_lat)     ! to store a global 2D (surface) data set
     
    693693#ifdef CPP_PARA
    694694   ! Gather inertiedat() soil thermal inertia on physics grid
    695    call Gather(inertiedat,inertiafi_glo)
     695   call Gather(inertiedat_PEM,inertiafi_glo)
    696696   ! Gather cell_area() mesh area on physics grid
    697697   call Gather(cell_area,areafi_glo)
    698698#else
    699          inertiafi_glo(:,:)=inertiedat(:,:)
     699         inertiafi_glo(:,:)=inertiedat_PEM(:,:)
    700700         areafi_glo(:)=cell_area(:)
    701701#endif
     
    705705   if (klon_glo>1) then
    706706    do i=1,nbp_lon+1 ! poles
    707      inertia(i,1,1:nsoilmx)=inertiafi_glo(1,1:nsoilmx)
    708      inertia(i,nbp_lat,1:nsoilmx)=inertiafi_glo(klon_glo,1:nsoilmx)
     707     inertia(i,1,1:nsoilmx_PEM)=inertiafi_glo(1,1:nsoilmx_PEM)
     708     inertia(i,nbp_lat,1:nsoilmx_PEM)=inertiafi_glo(klon_glo,1:nsoilmx_PEM)
    709709     ! for area, divide at the poles by nbp_lon
    710710     area(i,1)=areafi_glo(1)/nbp_lon
     
    714714     ig0= 1+(j-2)*nbp_lon
    715715     do i=1,nbp_lon
    716         inertia(i,j,1:nsoilmx)=inertiafi_glo(ig0+i,1:nsoilmx)
     716        inertia(i,j,1:nsoilmx_PEM)=inertiafi_glo(ig0+i,1:nsoilmx_PEM)
    717717        area(i,j)=areafi_glo(ig0+i)
    718718     enddo
    719719     ! handle redundant point in longitude
    720      inertia(nbp_lon+1,j,1:nsoilmx)=inertia(1,j,1:nsoilmx)
     720     inertia(nbp_lon+1,j,1:nsoilmx_PEM)=inertia(1,j,1:nsoilmx_PEM)
    721721     area(nbp_lon+1,j)=area(1,j)
    722722    enddo
     
    791791#else
    792792  if (klon_glo>1) then ! General case
    793    do l=1,nsoilmx
     793   do l=1,nsoilmx_PEM
    794794    ! handle the poles
    795795    do i=1,nbp_lon+1
     
    807807   enddo
    808808  else ! 1D model case
    809    data3_1d(1,1:nsoilmx)=px(1,1:nsoilmx)
     809   data3_1d(1,1:nsoilmx_PEM)=px(1,1:nsoilmx_PEM)
    810810  endif
    811811#endif
     
    841841  endif
    842842  edges(2)=nbp_lat
    843   edges(3)=nsoilmx
     843  edges(3)=nsoilmx_PEM
    844844  edges(4)=1
    845845 
Note: See TracChangeset for help on using the changeset viewer.