Ignore:
Timestamp:
Sep 11, 2024, 4:27:07 PM (19 months ago)
Author:
abarral
Message:

Replace REPROBUS CPP KEY by logical using handmade wonky wrapper

Location:
LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities/easy_netcdf.F90

    r5159 r5185  
    763763    DO j = 1, ndims
    764764      n = n * ndimlens(j)
    765       if (j > 1 .and. ndimlens(j) > 1) then
     765      if (j > 1 .AND. ndimlens(j) > 1) then
    766766        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    767767             & var_name, &
     
    821821    DO j = 1, ndims
    822822      n = n * ndimlens(j)
    823       if (j > 1 .and. ndimlens(j) > 1) then
     823      if (j > 1 .AND. ndimlens(j) > 1) then
    824824        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    825825             & var_name, &
     
    880880    DO j = 1, ndims
    881881      n = n * ndimlens(j)
    882       if (j > 1 .and. ndimlens(j) > 1) then
     882      if (j > 1 .AND. ndimlens(j) > 1) then
    883883        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    884884             & var_name, &
     
    940940    DO j = 1, ndims-1
    941941      n = n * ndimlens(j)
    942       if (j > 1 .and. ndimlens(j) > 1) then
     942      if (j > 1 .AND. ndimlens(j) > 1) then
    943943        write(nulerr,'(a,a,a)') '*** Error reading 1D slice from NetCDF variable ', &
    944944             & var_name, &
     
    10231023    DO j = 1, ndims
    10241024      ntotal = ntotal * ndimlens(j)
    1025       if (j > 2 .and. ndimlens(j) > 1) then
     1025      if (j > 2 .AND. ndimlens(j) > 1) then
    10261026        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    10271027           & var_name, &
     
    11351135    DO j = 1, ndims
    11361136      ntotal = ntotal * ndimlens(j)
    1137       if (j > 2 .and. ndimlens(j) > 1) then
     1137      if (j > 2 .AND. ndimlens(j) > 1) then
    11381138        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    11391139           & var_name, &
     
    12541254    DO j = 1, ndims-1
    12551255      ntotal = ntotal * ndimlens(j)
    1256       if (j > 2 .and. ndimlens(j) > 1) then
     1256      if (j > 2 .AND. ndimlens(j) > 1) then
    12571257        write(nulerr,'(a,a,a)') '*** Error reading 2D slice from NetCDF variable ', &
    12581258           & var_name, &
     
    13781378    DO j = 1, ndims
    13791379      ntotal = ntotal * ndimlens(j)
    1380       if (j > 3 .and. ndimlens(j) > 1) then
     1380      if (j > 3 .AND. ndimlens(j) > 1) then
    13811381        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    13821382           & var_name, &
     
    15141514    DO j = 1, ndims-1
    15151515      ntotal = ntotal * ndimlens(j)
    1516       if (j > 3 .and. ndimlens(j) > 1) then
     1516      if (j > 3 .AND. ndimlens(j) > 1) then
    15171517        write(nulerr,'(a,a,a)') '*** Error reading 3D slice from NetCDF variable ', &
    15181518           & var_name, &
     
    16561656    DO j = 1, ndims
    16571657      ntotal = ntotal * ndimlens(j)
    1658       if (j > 4 .and. ndimlens(j) > 1) then
     1658      if (j > 4 .AND. ndimlens(j) > 1) then
    16591659        write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', &
    16601660           & var_name, &
     
    19871987    end if
    19881988
    1989     if (present(dim1_name) .and. ndims_input >= 1) then
     1989    if (present(dim1_name) .AND. ndims_input >= 1) then
    19901990      ! Variable is at least one dimensional
    19911991      ndims_local = 1
     
    19961996        call my_abort('Error writing NetCDF file')
    19971997      end if
    1998       if (present(dim2_name) .and. ndims_input >= 2) then
     1998      if (present(dim2_name) .AND. ndims_input >= 2) then
    19991999        ! Variable is at least two dimensional
    20002000        ndims_local = 2
     
    20052005          call my_abort('Error writing NetCDF file')
    20062006        end if
    2007         if (present(dim3_name) .and. ndims_input >= 3) then
     2007        if (present(dim3_name) .AND. ndims_input >= 3) then
    20082008          ! Variable is at least three dimensional
    20092009          ndims_local = 3
     
    20142014            call my_abort('Error writing NetCDF file')
    20152015          end if
    2016           if (present(dim4_name) .and. ndims_input >= 4) then
     2016          if (present(dim4_name) .AND. ndims_input >= 4) then
    20172017            ! Variable is at least three dimensional
    20182018            ndims_local = 4
     
    24722472    ! Check the total size of the variable to be stored (but receiving
    24732473    ! ntotal is zero then there must be an unlimited dimension)
    2474     if (ntotal /= size(var,kind=jpib) .and. ntotal /= 0) then
     2474    if (ntotal /= size(var,kind=jpib) .AND. ntotal /= 0) then
    24752475      write(nulerr,'(a,i0,a,a,a,i0)') '*** Error: attempt to write matrix of total size ', &
    24762476           & nvarlen, ' to ', var_name, ' which has total size ', ntotal
     
    25512551      write(var_slice_name,'(a,a,i0,a)') var_name, '(:,:,', index3, ')'
    25522552    end if
    2553     if (ntotal /= size(var,kind=jpib) .and. ntotal /= 0) then
     2553    if (ntotal /= size(var,kind=jpib) .AND. ntotal /= 0) then
    25542554      write(nulerr,'(a,i0,a,a,a,i0)') '*** Error: attempt to write matrix of total size ', &
    25552555           & nvarlen, ' to ', trim(var_slice_name), ' which has total size ', ntotal
  • LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities/print_matrix.F90

    r5158 r5185  
    4747          write(unit_local,'(f16.8,$)') mat(i,j)
    4848       end do
    49        if (present(name) .and. i == size(mat,1)) then
     49       if (present(name) .AND. i == size(mat,1)) then
    5050         write(unit_local,'(a)') ']'
    5151       else
Note: See TracChangeset for help on using the changeset viewer.