Ignore:
Timestamp:
Oct 26, 2023, 11:30:35 AM (14 months ago)
Author:
jbclement
Message:

PEM:

  • Correction of a bug when running with ifort, XIOS and no sub-slopes. If compiled with ifort, the 'Reshape' program cashed because of sub-slopes variables were written in the XIOS output but not filled. A new file definition without sub-slopes can be chosen in the xml file to avoid this issue.
  • Addition in the 'Reshape' program of a check to remove the output files if they exist to prevent a crash.

JBC

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

Legend:

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

    r3097 r3106  
    120120Following r3095, 'iniorbit' is now a subroutine of "planete_h.F90".
    121121Correction of a bug from r3088: "diagfi.nc" was not changed into "diagpem.nc" in the commited version of "writediagpem.F90"!
     122
     123== 26/10/2023 == JBC
     124    - Correction of a bug when running with ifort, XIOS and no sub-slopes. If compiled with ifort, the 'Reshape' program cashed because of sub-slopes variables were written in the XIOS output but not filled. A new file definition without sub-slopes can be chosen in the xml file to avoid this issue.
     125    - Addition in the 'Reshape' program of a check to remove the output files if they exist to prevent a crash.
  • trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90

    r3096 r3106  
    1515
    1616integer                               :: state, ncid, ncid1, ncid2, nDims, nVars, nGlobalAtts, unlimDimID
    17 integer                               :: i, j, include_parents
     17integer                               :: i, j, include_parents, cstat
    1818integer, dimension(:),    allocatable :: dimids, varids, dimids_2, varids_2, dimid_var
    1919real, dimension(:),       allocatable :: tempvalues_1d, values_1d
     
    2121real, dimension(:,:,:),   allocatable :: tempvalues_3d, values_3d
    2222real, dimension(:,:,:,:), allocatable :: tempvalues_4d, values_4d
    23 character(1)                          :: str2
     23character(1)                          :: str
    2424character(30)                         :: name_, namevar
    2525integer                               :: xtype_var, len_, len_1, len_2, len_lat, len_lon, len_time, len_soil
    2626integer                               :: dimid_lon, dimid_lat, dimid_time, dimid_soil, dimid_2, numdims, numatts, numyear
     27logical                               :: yes
    2728
    2829do numyear = 1,2
    2930    write(*,*) 'numyear',numyear
    30     write(str2(1:1),'(i1.1)') numyear
     31    write(str(1:1),'(i1.1)') numyear
    3132    !nf90_open                 ! open existing netCDF dataset
    3233    !integer :: ncid, state
    3334    !...
    34     state = nf90_open(path = "data2reshape"//str2//".nc", mode = nf90_nowrite, ncid = ncid1)
    35     if (state /= nf90_noerr) call handle_err(state)
    36 
    37     state = nf90_create(path = "data_PCM_Y"//str2//".nc", cmode=or(nf90_noclobber,nf90_64bit_offset), ncid = ncid2)
     35    state = nf90_open(path = "data2reshape"//str//".nc", mode = nf90_nowrite, ncid = ncid1)
     36    if (state /= nf90_noerr) call handle_err(state)
     37
     38    inquire(file = 'data_PCM_Y'//str//'.nc', exist = yes)
     39    if (yes) then
     40        call execute_command_line('rm data_PCM_Y'//str//'.nc',cmdstat = cstat)
     41        if (cstat > 0) then
     42            error stop 'Command exection failed!'
     43        else if (cstat < 0) then
     44            error stop 'Command execution not supported!'
     45        endif
     46    endif
     47    state = nf90_create(path = "data_PCM_Y"//str//".nc", cmode=or(nf90_noclobber,nf90_64bit_offset), ncid = ncid2)
    3848    if (state /= nf90_noerr) call handle_err(state)
    3949
Note: See TracChangeset for help on using the changeset viewer.