Changeset 3760 for trunk


Ignore:
Timestamp:
May 13, 2025, 6:05:05 PM (7 weeks ago)
Author:
emillour
Message:

Pluto PCM:
Fix issue with parallelism in writediagsoil. And introduce the "diagsoil"
flag to trigger outputing a diagsoil.nc file or not.
EM

Location:
trunk/LMDZ.PLUTO
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/changelog.txt

    r3721 r3760  
    18741874Some update/cleanup of examples in "startarchive2icosa", now that the
    18751875"rearrange" step is no longer needed.
     1876
     1877== 13/05/2025 == EM
     1878Fix issue with parallelism in writediagsoil. And introduce the "diagsoil"
     1879flag to trigger outputing a diagsoil.nc file or not.
     1880
  • trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90

    r3758 r3760  
    2626  use surfdat_h
    2727  use wstats_mod, only: callstats
     28  use writediagsoil_mod, only: diagsoil
    2829  use ioipsl_getin_p_mod, only : getin_p
    2930  use mod_phys_lmdz_para, only : is_parallel, is_master, bcast
     
    261262
    262263     if (is_master) write(*,*) trim(rname)//&
     264       ": Write sub-surface fields in file diagsoil.nc ?"
     265     diagsoil=.false. ! default value
     266     call getin_p("diagsoil",diagsoil)
     267     if (is_master) write(*,*) trim(rname)//" diagsoil = ",diagsoil
     268
     269     if (is_master) write(*,*) trim(rname)//&
    263270       ": Test energy conservation of model physics ?"
    264271     enertest=.false. ! default value
  • trunk/LMDZ.PLUTO/libf/phypluto/writediagsoil.F90

    r3749 r3760  
    22
    33implicit none
     4
     5logical,save :: diagsoil ! global flag to trigger generating a diagsoil.nc
     6                         ! file or not. Initialized in inifis()
    47
    58contains
     
    8083#endif
    8184
    82 ! 0. This routine shoul only be used in lon-lat case
     85! 0. Do we ouput a diagsoil.nc file? If not just bail out now.
     86if(.not.diagsoil) return
     87
     88! This routine should only be used in lon-lat case
    8389if (grid_type==unstructured) then
    84   return
     90  write(*,*) "writediagsoil: Error !!!"
     91  write(*,*) "diagsoil.nc outputs not possible on unstructured grids!!"
     92  call abort_physic("writediagsoil","impossible on unstructured grid",1)
    8593endif
    8694
     
    96104    write(*,*) "   firstname string not long enough!!"
    97105    write(*,*) "   increase its size to at least ",len_trim(name)
    98     stop
     106    call abort_physic("writediagsoil","firstname too short",1)
    99107  endif
    100108
     
    107115   if (ierr.ne.NF_NOERR) then
    108116    write(*,*)'writediagsoil: Error, failed creating file '//trim(filename)
    109     stop
     117    call abort_physic("writediagsoil","failed creating"//trim(filename),1)
    110118   endif
     119  endif ! of if (is_master)
    111120
    112121#ifdef CPP_PARA
     
    120129#endif
    121130
     131  if (is_master) then
    122132   ! build inertia() and area()
    123133   if (klon_glo>1) then
     
    187197     if (ierr.ne.NF_NOERR) then
    188198      write(*,*)"writediagsoil: Failed writing date to time variable"
    189       stop
     199      call abort_physic("writediagsoil","failed writing time",1)
    190200     endif
    191201    endif ! of if (is_master)
Note: See TracChangeset for help on using the changeset viewer.