Ignore:
Timestamp:
May 23, 2024, 4:21:32 PM (7 months ago)
Author:
jbclement
Message:

PEM:
Making "writediagsoilpem.F90" work in 3D with the correct PEM soil depth dimension.
JBC

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

Legend:

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

    r3339 r3345  
    321321== 22/05/2024 == JBC
    322322Correction of the way sublimating ice is identified at the beginning of the PEM + some updates for the default variables and the display of information.
     323
     324== 23/05/2024 == JBC
     325Making "writediagsoilpem.F90" work in 3D with the correct PEM soil depth dimension.
  • trunk/LMDZ.COMMON/libf/evolution/glaciers_mod.F90

    r3308 r3345  
    5555
    5656!-----------------------------
    57 write(*,*) "Flow of CO2 glacier"
     57write(*,*) "Flow of CO2 glaciers"
    5858   
    5959call computeTcondCO2(timelen,ngrid,nslope,vmr_co2_PEM,ps_PCM,global_avg_ps_PCM,global_avg_ps_PEM,Tcond)
  • trunk/LMDZ.COMMON/libf/evolution/writediagpem.F90

    r3339 r3345  
    294294!---------------------
    295295    if (dim == 3) then
     296        IF (klon_glo>1) THEN ! General case
    296297#ifdef CPP_PARA
    297298        ! Gather field on a "global" (without redundant longitude) array
     
    309310!         Passage variable physique -->  variable dynamique
    310311!         recast (copy) variable from physics grid to dynamics grid
    311         IF (klon_glo>1) THEN ! General case
    312312            DO l=1,nbp_lev
    313313                DO i=1,nbp_lon+1
     
    323323                ENDDO
    324324            ENDDO
     325#endif
    325326        ELSE ! 1D model case
    326327            dx3_1d(1,1:nbp_lev)=px(1,1:nbp_lev)
    327328        ENDIF
    328 #endif
    329329!       Ecriture du champs
    330330        if (is_master) then
     
    392392    else if (dim == 2) then
    393393
     394        IF (klon_glo>1) THEN ! General case
    394395#ifdef CPP_PARA
    395396        ! Gather field on a "global" (without redundant longitude) array
     
    408409!         Passage variable physique -->  physique dynamique
    409410!         recast (copy) variable from physics grid to dynamics grid
    410         IF (klon_glo>1) THEN ! General case
    411411            DO i=1,nbp_lon+1
    412412                dx2(i,1)=px(1,1)
     
    420420                dx2(nbp_lon+1,j)=dx2(1,j)
    421421            ENDDO
     422#endif
    422423        ELSE ! 1D model case
    423424            dx2_1d=px(1,1)
    424425        ENDIF
    425 #endif
    426426
    427427        if (is_master) then
     
    595595! Modifs: Aug.2010 Ehouarn: enforce outputs to be real*4
    596596
    597 use comsoil_h_PEM,      only: nsoilmx_PEM, inertiedat_PEM
     597use comsoil_h_PEM,      only: mlayer_PEM, nsoilmx_PEM, inertiedat_PEM
    598598use geometry_mod,       only: cell_area
    599599use mod_phys_lmdz_para, only: is_mpi_root, is_master, gather
     
    601601use mod_grid_phy_lmdz,  only: grid_type, unstructured
    602602use time_evol_mod,      only: ecritpem, dt_pem
     603use iniwritesoil_mod,   only: iniwritesoil
    603604
    604605implicit none
     
    693694
    694695#ifdef CPP_PARA
    695    ! Gather inertiedat() soil thermal inertia on physics grid
     696   ! Gather inertiedat_PEM() soil thermal inertia on physics grid
    696697   call Gather(inertiedat_PEM,inertiafi_glo)
    697698   ! Gather cell_area() mesh area on physics grid
     
    726727   ! write "header" of file (longitudes, latitudes, geopotential, ...)
    727728   if (klon_glo>1) then ! general 3D case
    728      call iniwritesoil(nid,ngrid,inertia,area,nbp_lon+1,nbp_lat)
     729     call iniwritesoil(nid,ngrid,inertia,area,nbp_lon+1,nbp_lat,nsoilmx_PEM,mlayer_PEM)
    729730   else ! 1D model
    730      call iniwritesoil(nid,ngrid,inertiafi_glo(1,:),areafi_glo(1),1,1)
     731     call iniwritesoil(nid,ngrid,inertiafi_glo(1,:),areafi_glo(1),1,1,nsoilmx_PEM,mlayer_PEM)
    731732   endif
    732733
     
    776777if (dimpx.eq.3) then ! Case of a 3D variable
    777778  ! A. Recast data along 'dynamics' grid
     779  if (klon_glo>1) then ! General case
    778780#ifdef CPP_PARA
    779781  ! gather field on a "global" (without redundant longitude) array
     
    789791!$OMP BARRIER
    790792#else
    791   if (klon_glo>1) then ! General case
    792793   do l=1,nsoilmx_PEM
    793794    ! handle the poles
     
    805806    enddo
    806807   enddo
     808#endif
    807809  else ! 1D model case
    808810   data3_1d(1,1:nsoilmx_PEM)=px(1,1:nsoilmx_PEM)
    809811  endif
    810 #endif
    811812 
    812813  ! B. Write (append) the variable to the NetCDF file
     
    862863
    863864  ! A. Recast data along 'dynamics' grid
     865  if (klon_glo>1) then ! General case
    864866#ifdef CPP_PARA
    865867  ! gather field on a "global" (without redundant longitude) array
     
    876878!$OMP BARRIER
    877879#else
    878   if (klon_glo>1) then ! general case
    879880    ! handle the poles
    880881    do i=1,nbp_lon+1
     
    890891      data2(nbp_lon+1,j)=data2(1,j) ! extra (modulo) longitude
    891892    enddo
     893#endif
    892894  else ! 1D model case
    893895    data2_1d=px(1,1)
    894896  endif
    895 #endif
    896897
    897898  ! B. Write (append) the variable to the NetCDF file
     
    989990END SUBROUTINE writediagsoilpem
    990991
    991 
    992992END MODULE writediagpem_mod
    993 
Note: See TracChangeset for help on using the changeset viewer.