Changeset 5185 for LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities
- Timestamp:
- Sep 11, 2024, 4:27:07 PM (19 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities
- Files:
-
- 2 edited
-
easy_netcdf.F90 (modified) (16 diffs)
-
print_matrix.F90 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities/easy_netcdf.F90
r5159 r5185 763 763 DO j = 1, ndims 764 764 n = n * ndimlens(j) 765 if (j > 1 . and. ndimlens(j) > 1) then765 if (j > 1 .AND. ndimlens(j) > 1) then 766 766 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 767 767 & var_name, & … … 821 821 DO j = 1, ndims 822 822 n = n * ndimlens(j) 823 if (j > 1 . and. ndimlens(j) > 1) then823 if (j > 1 .AND. ndimlens(j) > 1) then 824 824 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 825 825 & var_name, & … … 880 880 DO j = 1, ndims 881 881 n = n * ndimlens(j) 882 if (j > 1 . and. ndimlens(j) > 1) then882 if (j > 1 .AND. ndimlens(j) > 1) then 883 883 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 884 884 & var_name, & … … 940 940 DO j = 1, ndims-1 941 941 n = n * ndimlens(j) 942 if (j > 1 . and. ndimlens(j) > 1) then942 if (j > 1 .AND. ndimlens(j) > 1) then 943 943 write(nulerr,'(a,a,a)') '*** Error reading 1D slice from NetCDF variable ', & 944 944 & var_name, & … … 1023 1023 DO j = 1, ndims 1024 1024 ntotal = ntotal * ndimlens(j) 1025 if (j > 2 . and. ndimlens(j) > 1) then1025 if (j > 2 .AND. ndimlens(j) > 1) then 1026 1026 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 1027 1027 & var_name, & … … 1135 1135 DO j = 1, ndims 1136 1136 ntotal = ntotal * ndimlens(j) 1137 if (j > 2 . and. ndimlens(j) > 1) then1137 if (j > 2 .AND. ndimlens(j) > 1) then 1138 1138 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 1139 1139 & var_name, & … … 1254 1254 DO j = 1, ndims-1 1255 1255 ntotal = ntotal * ndimlens(j) 1256 if (j > 2 . and. ndimlens(j) > 1) then1256 if (j > 2 .AND. ndimlens(j) > 1) then 1257 1257 write(nulerr,'(a,a,a)') '*** Error reading 2D slice from NetCDF variable ', & 1258 1258 & var_name, & … … 1378 1378 DO j = 1, ndims 1379 1379 ntotal = ntotal * ndimlens(j) 1380 if (j > 3 . and. ndimlens(j) > 1) then1380 if (j > 3 .AND. ndimlens(j) > 1) then 1381 1381 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 1382 1382 & var_name, & … … 1514 1514 DO j = 1, ndims-1 1515 1515 ntotal = ntotal * ndimlens(j) 1516 if (j > 3 . and. ndimlens(j) > 1) then1516 if (j > 3 .AND. ndimlens(j) > 1) then 1517 1517 write(nulerr,'(a,a,a)') '*** Error reading 3D slice from NetCDF variable ', & 1518 1518 & var_name, & … … 1656 1656 DO j = 1, ndims 1657 1657 ntotal = ntotal * ndimlens(j) 1658 if (j > 4 . and. ndimlens(j) > 1) then1658 if (j > 4 .AND. ndimlens(j) > 1) then 1659 1659 write(nulerr,'(a,a,a)') '*** Error reading NetCDF variable ', & 1660 1660 & var_name, & … … 1987 1987 end if 1988 1988 1989 if (present(dim1_name) . and. ndims_input >= 1) then1989 if (present(dim1_name) .AND. ndims_input >= 1) then 1990 1990 ! Variable is at least one dimensional 1991 1991 ndims_local = 1 … … 1996 1996 call my_abort('Error writing NetCDF file') 1997 1997 end if 1998 if (present(dim2_name) . and. ndims_input >= 2) then1998 if (present(dim2_name) .AND. ndims_input >= 2) then 1999 1999 ! Variable is at least two dimensional 2000 2000 ndims_local = 2 … … 2005 2005 call my_abort('Error writing NetCDF file') 2006 2006 end if 2007 if (present(dim3_name) . and. ndims_input >= 3) then2007 if (present(dim3_name) .AND. ndims_input >= 3) then 2008 2008 ! Variable is at least three dimensional 2009 2009 ndims_local = 3 … … 2014 2014 call my_abort('Error writing NetCDF file') 2015 2015 end if 2016 if (present(dim4_name) . and. ndims_input >= 4) then2016 if (present(dim4_name) .AND. ndims_input >= 4) then 2017 2017 ! Variable is at least three dimensional 2018 2018 ndims_local = 4 … … 2472 2472 ! Check the total size of the variable to be stored (but receiving 2473 2473 ! ntotal is zero then there must be an unlimited dimension) 2474 if (ntotal /= size(var,kind=jpib) . and. ntotal /= 0) then2474 if (ntotal /= size(var,kind=jpib) .AND. ntotal /= 0) then 2475 2475 write(nulerr,'(a,i0,a,a,a,i0)') '*** Error: attempt to write matrix of total size ', & 2476 2476 & nvarlen, ' to ', var_name, ' which has total size ', ntotal … … 2551 2551 write(var_slice_name,'(a,a,i0,a)') var_name, '(:,:,', index3, ')' 2552 2552 end if 2553 if (ntotal /= size(var,kind=jpib) . and. ntotal /= 0) then2553 if (ntotal /= size(var,kind=jpib) .AND. ntotal /= 0) then 2554 2554 write(nulerr,'(a,i0,a,a,a,i0)') '*** Error: attempt to write matrix of total size ', & 2555 2555 & nvarlen, ' to ', trim(var_slice_name), ' which has total size ', ntotal -
LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities/print_matrix.F90
r5158 r5185 47 47 write(unit_local,'(f16.8,$)') mat(i,j) 48 48 end do 49 if (present(name) . and. i == size(mat,1)) then49 if (present(name) .AND. i == size(mat,1)) then 50 50 write(unit_local,'(a)') ']' 51 51 else
Note: See TracChangeset
for help on using the changeset viewer.
