- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/utilities/easy_netcdf.F90
r4773 r5158 392 392 393 393 ndimlens(:) = 0 394 doj = 1,ndims394 DO j = 1,ndims 395 395 istatus = nf90_inquire_dimension(this%ncid, idimids(j), len=ndimlens(j)) 396 396 if (istatus /= NF90_NOERR) then … … 404 404 if (present(ntotal)) then 405 405 ntotal = 1 406 doj = 1, ndims406 DO j = 1, ndims 407 407 ntotal = ntotal * ndimlens(j) 408 408 end do … … 613 613 ! Compute number of elements of the variable in the file 614 614 ntotal = 1 615 doj = 1, ndims615 DO j = 1, ndims 616 616 ntotal = ntotal * ndimlens(j) 617 617 end do … … 658 658 ! Compute number of elements of the variable in the file 659 659 ntotal = 1 660 doj = 1, ndims660 DO j = 1, ndims 661 661 ntotal = ntotal * ndimlens(j) 662 662 end do … … 707 707 ! i.e. excluding the slowest varying dimension, indexed by "index" 708 708 ntotal = 1 709 doj = 1, ndims-1709 DO j = 1, ndims-1 710 710 ntotal = ntotal * ndimlens(j) 711 711 end do … … 761 761 ! Ensure variable has only one dimension in the file 762 762 n = 1 763 doj = 1, ndims763 DO j = 1, ndims 764 764 n = n * ndimlens(j) 765 765 if (j > 1 .and. ndimlens(j) > 1) then … … 819 819 ! Ensure variable has only one dimension in the file 820 820 n = 1 821 doj = 1, ndims821 DO j = 1, ndims 822 822 n = n * ndimlens(j) 823 823 if (j > 1 .and. ndimlens(j) > 1) then … … 878 878 ! Ensure variable has only one dimension in the file 879 879 n = 1 880 doj = 1, ndims880 DO j = 1, ndims 881 881 n = n * ndimlens(j) 882 882 if (j > 1 .and. ndimlens(j) > 1) then … … 938 938 ! Ensure variable has only one dimension aside from the last one 939 939 n = 1 940 doj = 1, ndims-1940 DO j = 1, ndims-1 941 941 n = n * ndimlens(j) 942 942 if (j > 1 .and. ndimlens(j) > 1) then … … 1021 1021 ! dimensions 1022 1022 ntotal = 1 1023 doj = 1, ndims1023 DO j = 1, ndims 1024 1024 ntotal = ntotal * ndimlens(j) 1025 1025 if (j > 2 .and. ndimlens(j) > 1) then … … 1133 1133 ! dimensions 1134 1134 ntotal = 1 1135 doj = 1, ndims1135 DO j = 1, ndims 1136 1136 ntotal = ntotal * ndimlens(j) 1137 1137 if (j > 2 .and. ndimlens(j) > 1) then … … 1202 1202 vcount(1:2) = [ndimlen1,1] 1203 1203 1204 doj = 1,ndimlen21204 DO j = 1,ndimlen2 1205 1205 vstart(2) = j 1206 1206 istatus = nf90_get_var(this%ncid, ivarid, matrix(:,j), start=vstart, count=vcount) … … 1252 1252 ! dimensions aside from the last one 1253 1253 ntotal = 1 1254 doj = 1, ndims-11254 DO j = 1, ndims-1 1255 1255 ntotal = ntotal * ndimlens(j) 1256 1256 if (j > 2 .and. ndimlens(j) > 1) then … … 1376 1376 ! dimensions 1377 1377 ntotal = 1 1378 doj = 1, ndims1378 DO j = 1, ndims 1379 1379 ntotal = ntotal * ndimlens(j) 1380 1380 if (j > 3 .and. ndimlens(j) > 1) then … … 1512 1512 ! dimensions aside from the last one 1513 1513 ntotal = 1 1514 doj = 1, ndims-11514 DO j = 1, ndims-1 1515 1515 ntotal = ntotal * ndimlens(j) 1516 1516 if (j > 3 .and. ndimlens(j) > 1) then … … 1654 1654 ! dimensions 1655 1655 ntotal = 1 1656 doj = 1, ndims1656 DO j = 1, ndims 1657 1657 ntotal = ntotal * ndimlens(j) 1658 1658 if (j > 4 .and. ndimlens(j) > 1) then … … 1804 1804 1805 1805 ! Pad with blanks since nf90_get_att does not do this 1806 doj = i_attr_len+1,len(attr_str)1806 DO j = i_attr_len+1,len(attr_str) 1807 1807 attr_str(j:j) = ' ' 1808 1808 end do … … 1878 1878 1879 1879 ! Pad with blanks since nf90_get_att does not do this 1880 doj = i_attr_len+1,len(attr_str)1880 DO j = i_attr_len+1,len(attr_str) 1881 1881 attr_str(j:j) = ' ' 1882 1882 end do … … 2705 2705 end if 2706 2706 2707 dojdim = 1,ndims2707 DO jdim = 1,ndims 2708 2708 istatus = nf90_inquire_dimension(infile%ncid, idimids(jdim), & 2709 2709 & name=dimname, len=dimlen) … … 2771 2771 2772 2772 ! Map dimension IDs 2773 dojdim = 1,ndims2773 DO jdim = 1,ndims 2774 2774 istatus = nf90_inquire_dimension(infile%ncid, idimids_in(jdim), name=dim_name) 2775 2775 if (istatus /= NF90_NOERR) then … … 2801 2801 2802 2802 ! Copy attributes 2803 dojattr = 1,nattr2803 DO jattr = 1,nattr 2804 2804 istatus = nf90_inq_attname(infile%ncid, ivarid_in, jattr, attr_name) 2805 2805 if (istatus /= NF90_NOERR) then
Note: See TracChangeset
for help on using the changeset viewer.