Changeset 13369 for utils/tools/SIREN/src/iom_rstdimg.f90
- Timestamp:
- 2020-07-31T10:50:52+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/tools/SIREN/src/iom_rstdimg.f90
r12080 r13369 45 45 !> - id_varid is variabale id 46 46 !> - cd_name is variabale name or standard name 47 !> - id_start is a integer(4) 1D array of index from which the data 47 !> - id_start is a integer(4) 1D array of index from which the data 48 48 !> values will be read [optional] 49 49 !> - id_count is a integer(4) 1D array of the number of indices selected … … 59 59 !> 60 60 !> @date November, 2013 - Initial Version 61 !> @date August, 2017 61 !> @date August, 2017 62 62 !> - handle use of domain decomposition for monoproc file 63 63 !> … … 80 80 81 81 ! type and variable 82 PRIVATE :: im_vnl !< variable name length 82 PRIVATE :: im_vnl !< variable name length 83 83 84 84 ! function and subroutine … … 104 104 PRIVATE :: iom_rstdimg__get_rec ! compute record number before writing file 105 105 PRIVATE :: iom_rstdimg__write_header ! write header in an opened dimg file 106 PRIVATE :: iom_rstdimg__write_var ! write variables in an opened dimg file 106 PRIVATE :: iom_rstdimg__write_var ! write variables in an opened dimg file 107 107 108 108 ! module variable … … 143 143 IMPLICIT NONE 144 144 145 ! Argument 145 ! Argument 146 146 TYPE(TFILE), INTENT(INOUT) :: td_file 147 147 … … 162 162 CALL logger_fatal( " OPEN: can not open dimg file "//& 163 163 & TRIM(td_file%c_name) ) 164 164 165 165 ELSE 166 166 … … 246 246 & TRIM(td_file%c_name)& 247 247 & //" with record length "//TRIM(fct_str(td_file%i_recl))) 248 ENDIF 248 ENDIF 249 249 250 250 ELSE … … 268 268 CALL logger_error("IOM RSTDIMG OPEN: file "//& 269 269 & TRIM(td_file%c_name)) 270 ENDIF 270 ENDIF 271 271 272 272 ENDIF … … 299 299 IMPLICIT NONE 300 300 301 ! Argument 301 ! Argument 302 302 TYPE(TFILE), INTENT(INOUT) :: td_file 303 303 … … 312 312 & " CLOSE: no id associated to file "//TRIM(td_file%c_name)) 313 313 314 ELSE 314 ELSE 315 315 CALL logger_info( & 316 316 & " CLOSE: file "//TRIM(td_file%c_name)) … … 322 322 ENDIF 323 323 324 td_file%i_id = 0 324 td_file%i_id = 0 325 325 326 326 ENDIF … … 330 330 SUBROUTINE iom_rstdimg__get_info(td_file) 331 331 !------------------------------------------------------------------- 332 !> @brief This subroutine get global information in an opened dimg 332 !> @brief This subroutine get global information in an opened dimg 333 333 !> file. 334 334 !> @details 335 !> It gets the number of variables, the domain decompistion, 335 !> It gets the number of variables, the domain decompistion, 336 336 !> the record of the header.<br/> 337 !> It read dimensions, and add it to dimension structure inside 337 !> It read dimensions, and add it to dimension structure inside 338 338 !> file structure. 339 339 !> … … 348 348 IMPLICIT NONE 349 349 350 ! Argument 350 ! Argument 351 351 TYPE(TFILE), INTENT(INOUT) :: td_file 352 352 353 353 ! local variable 354 354 INTEGER(i4) :: il_status 355 INTEGER(i4) :: il_recl ! record length 356 INTEGER(i4) :: il_nx, il_ny, il_nz ! x,y,z dimension 357 INTEGER(i4) :: il_n0d, il_n1d, il_n2d, il_n3d ! number of 0/1/2/3D variables 355 INTEGER(i4) :: il_recl ! record length 356 INTEGER(i4) :: il_nx, il_ny, il_nz ! x,y,z dimension 357 INTEGER(i4) :: il_n0d, il_n1d, il_n2d, il_n3d ! number of 0/1/2/3D variables 358 358 INTEGER(i4) :: il_rhd ! record of the header infos 359 359 360 TYPE(TDIM) :: tl_dim ! dimension structure 360 TYPE(TDIM) :: tl_dim ! dimension structure 361 361 !---------------------------------------------------------------- 362 362 … … 364 364 & " IOM RSTDIMG GET INFO: about dimg file "//TRIM(td_file%c_name)) 365 365 366 ! read first record 367 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 366 ! read first record 367 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 368 368 & il_recl, & 369 369 & il_nx, il_ny, il_nz, & … … 391 391 CALL dim_reorder(td_file%t_dim) 392 392 393 ! save total number of variable 393 ! save total number of variable 394 394 td_file%i_n0d=il_n0d 395 395 td_file%i_n1d=il_n1d … … 422 422 IMPLICIT NONE 423 423 424 ! Argument 424 ! Argument 425 425 TYPE(TFILE), INTENT(INOUT) :: td_file 426 426 … … 428 428 TYPE(TATT) :: tl_att 429 429 INTEGER(i4) :: il_status 430 INTEGER(i4) :: il_recl ! record length 431 INTEGER(i4) :: il_nx, il_ny, il_nz ! x,y,z dimension 432 INTEGER(i4) :: il_n0d, il_n1d, il_n2d, il_n3d ! number of 0/1/2/3D variables 430 INTEGER(i4) :: il_recl ! record length 431 INTEGER(i4) :: il_nx, il_ny, il_nz ! x,y,z dimension 432 INTEGER(i4) :: il_n0d, il_n1d, il_n2d, il_n3d ! number of 0/1/2/3D variables 433 433 INTEGER(i4) :: il_iglo, il_jglo ! domain global size 434 434 INTEGER(i4) :: il_rhd ! record of the header infos … … 449 449 & TRIM(td_file%c_name)) 450 450 451 ! read first record 452 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 451 ! read first record 452 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 453 453 & il_recl, & 454 454 & il_nx, il_ny, il_nz, & … … 495 495 ENDIF 496 496 497 ! read first record 498 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 497 ! read first record 498 READ( td_file%i_id, IOSTAT=il_status, REC=1 )& 499 499 & il_recl, & 500 500 & il_nx, il_ny, il_nz, & … … 548 548 SUBROUTINE iom_rstdimg__get_file_var(td_file) 549 549 !------------------------------------------------------------------- 550 !> @brief This subroutine read information about variable on an 550 !> @brief This subroutine read information about variable on an 551 551 !> opened dimg file. 552 552 !> @details … … 563 563 IMPLICIT NONE 564 564 565 ! Argument 565 ! Argument 566 566 TYPE(TFILE), INTENT(INOUT) :: td_file 567 567 … … 582 582 il_start(1) = 1 583 583 il_count(1) = td_file%i_n0d 584 584 585 585 il_start(2) = 1 + il_count(1) 586 586 il_count(2) = il_start(2) - 1 + td_file%i_n1d 587 587 588 588 il_start(3) = 1 + il_count(2) 589 589 il_count(3) = il_start(3) - 1 + td_file%i_n2d 590 590 591 591 il_start(4) = 1 + il_count(3) 592 592 il_count(4) = il_start(4) - 1 + td_file%i_n3d 593 593 594 594 ALLOCATE( cl_name(td_file%i_nvar), dl_value(td_file%i_nvar) ) 595 595 596 ! read first record 597 READ( td_file%i_id, IOSTAT=il_status, REC=td_file%i_rhd )& 596 ! read first record 597 READ( td_file%i_id, IOSTAT=il_status, REC=td_file%i_rhd )& 598 598 & cl_name(il_start(1):il_count(1)), dl_value(il_start(1):il_count(1)),& 599 599 & cl_name(il_start(2):il_count(2)), dl_value(il_start(2):il_count(2)),& … … 646 646 SUBROUTINE iom_rstdimg__get_file_var_0d(td_file, cd_name, dd_value) 647 647 !------------------------------------------------------------------- 648 !> @brief This subroutine put informations about scalar variable 648 !> @brief This subroutine put informations about scalar variable 649 649 !> inside file structure. 650 650 !> … … 659 659 IMPLICIT NONE 660 660 661 ! Argument 661 ! Argument 662 662 TYPE(TFILE), INTENT(INOUT) :: td_file 663 663 CHARACTER(LEN=im_vnl), DIMENSION(:), INTENT(IN) :: cd_name … … 676 676 tl_dim(:)%l_use=.FALSE. 677 677 tl_dim(:)%i_len=1 678 678 679 679 ! case scalar variable 680 680 DO ji = 1, td_file%i_n0d 681 681 682 682 td_file%t_var(ji)=var_init( TRIM(cd_name(ji)), NF90_DOUBLE, & 683 683 & tl_dim(:), dd_fill=0._dp, & … … 701 701 SUBROUTINE iom_rstdimg__get_file_var_1d(td_file, cd_name, dd_value) 702 702 !------------------------------------------------------------------- 703 !> @brief This subroutine put informations about variable 1D 703 !> @brief This subroutine put informations about variable 1D 704 704 !> inside file structure. 705 705 !> … … 707 707 !> @date November, 2013 - Initial Version 708 708 !> @date July, 2016 709 !> - change right dimension struct 709 !> - change right dimension struct 710 710 !> 711 711 !> @param[inout] td_file file structure … … 716 716 IMPLICIT NONE 717 717 718 ! Argument 718 ! Argument 719 719 TYPE(TFILE), INTENT(INOUT) :: td_file 720 720 CHARACTER(LEN=im_vnl), DIMENSION(:), INTENT(IN) :: cd_name … … 737 737 tl_dim(1:2)%l_use=.FALSE. 738 738 tl_dim(1:2)%i_len=1 739 739 740 740 td_file%t_var(ji)=var_init( TRIM(cd_name(ji)), NF90_DOUBLE, & 741 741 & tl_dim(:), dd_fill=0._dp, & … … 751 751 SUBROUTINE iom_rstdimg__get_file_var_2d(td_file, cd_name, dd_value) 752 752 !------------------------------------------------------------------- 753 !> @brief This subroutine put informations about variable 2D 753 !> @brief This subroutine put informations about variable 2D 754 754 !> inside file structure. 755 755 !> … … 764 764 IMPLICIT NONE 765 765 766 ! Argument 766 ! Argument 767 767 TYPE(TFILE), INTENT(INOUT) :: td_file 768 768 CHARACTER(LEN=im_vnl), DIMENSION(:), INTENT(IN) :: cd_name … … 784 784 ! do not use Z dimension 785 785 tl_dim(3)%l_use=.FALSE. 786 tl_dim(3)%i_len=1 786 tl_dim(3)%i_len=1 787 787 788 788 td_file%t_var(ji)=var_init( TRIM(cd_name(ji)), NF90_DOUBLE, & … … 799 799 SUBROUTINE iom_rstdimg__get_file_var_3d(td_file, cd_name, dd_value) 800 800 !------------------------------------------------------------------- 801 !> @brief This subroutine put informations about variable 3D 801 !> @brief This subroutine put informations about variable 3D 802 802 !> inside file structure. 803 803 !> … … 812 812 IMPLICIT NONE 813 813 814 ! Argument 814 ! Argument 815 815 TYPE(TFILE), INTENT(INOUT) :: td_file 816 816 CHARACTER(LEN=im_vnl), DIMENSION(:), INTENT(IN) :: cd_name … … 829 829 830 830 ! define same dimension as in file 831 tl_dim(:)=dim_copy(td_file%t_dim(:)) 831 tl_dim(:)=dim_copy(td_file%t_dim(:)) 832 832 833 833 td_file%t_var(ji)=var_init( TRIM(cd_name(ji)), NF90_DOUBLE, & … … 845 845 & RESULT (tf_dim) 846 846 !------------------------------------------------------------------- 847 !> @brief This function read one dimension in an opened netcdf file, 847 !> @brief This function read one dimension in an opened netcdf file, 848 848 !> given dimension id. 849 849 !> … … 853 853 !> @param[in] td_file file structure 854 854 !> @param[in] id_dimid dimension id 855 !> @return dimension structure 855 !> @return dimension structure 856 856 !------------------------------------------------------------------- 857 857 858 858 IMPLICIT NONE 859 859 860 ! Argument 860 ! Argument 861 861 TYPE(TFILE), INTENT(IN) :: td_file 862 862 INTEGER(i4), INTENT(IN) :: id_dimid … … 872 872 & " READ DIM: no id associated to dimg file "//TRIM(td_file%c_name)) 873 873 874 ELSE 874 ELSE 875 875 876 876 tf_dim%i_id=id_dimid … … 895 895 & RESULT (tf_dim) 896 896 !------------------------------------------------------------------- 897 !> @brief This function read one dimension in an opened netcdf file, 897 !> @brief This function read one dimension in an opened netcdf file, 898 898 !> given dimension name. 899 899 !> … … 903 903 !> @param[in] td_file file structure 904 904 !> @param[in] cd_name dimension name 905 !> @return dimension structure 905 !> @return dimension structure 906 906 !------------------------------------------------------------------- 907 907 908 908 IMPLICIT NONE 909 909 910 ! Argument 910 ! Argument 911 911 TYPE(TFILE), INTENT(IN) :: td_file 912 912 CHARACTER(LEN=*), INTENT(IN) :: cd_name … … 925 925 & " READ DIM: no id associated to dimg file "//TRIM(td_file%c_name)) 926 926 927 ELSE 927 ELSE 928 928 929 929 il_dimid=dim_get_id(td_file%t_dim(:), TRIM(cd_name)) … … 943 943 & RESULT (tf_var) 944 944 !------------------------------------------------------------------- 945 !> @brief This function read variable value in an opened 945 !> @brief This function read variable value in an opened 946 946 !> dimg file, given variable id. 947 947 !> @details 948 !> Optionaly, start indices and number of indices selected along each dimension 948 !> Optionaly, start indices and number of indices selected along each dimension 949 949 !> could be specify in a 4 dimension array (/'x','y','z','t'/) 950 950 !> … … 954 954 !> @param[in] td_file file structure 955 955 !> @param[in] id_varid variable id 956 !> @param[in] id_start index in the variable from which the data values 956 !> @param[in] id_start index in the variable from which the data values 957 957 !> will be read 958 958 !> @param[in] id_count number of indices selected along each dimension 959 !> @return variable structure 959 !> @return variable structure 960 960 !------------------------------------------------------------------- 961 961 962 962 IMPLICIT NONE 963 963 964 ! Argument 964 ! Argument 965 965 TYPE(TFILE), INTENT(IN) :: td_file 966 966 INTEGER(i4), INTENT(IN) :: id_varid … … 995 995 & TRIM(td_file%t_var(il_varid(1))%c_name)//& 996 996 & " should be already read ") 997 ENDIF 997 ENDIF 998 998 999 999 ELSE … … 1009 1009 & RESULT (tf_var) 1010 1010 !------------------------------------------------------------------- 1011 !> @brief This function read variable value in an opened 1011 !> @brief This function read variable value in an opened 1012 1012 !> dimg file, given variable name or standard name. 1013 1013 !> @details 1014 !> Optionaly, start indices and number of indices selected along each dimension 1014 !> Optionaly, start indices and number of indices selected along each dimension 1015 1015 !> could be specify in a 4 dimension array (/'x','y','z','t'/) 1016 1016 !> … … 1022 1022 !> 1023 1023 !> @param[in] td_file file structure 1024 !> @param[in] cd_name variable name or standard name 1025 !> @param[in] id_start index in the variable from which the data values 1024 !> @param[in] cd_name variable name or standard name 1025 !> @param[in] id_start index in the variable from which the data values 1026 1026 !> will be read 1027 1027 !> @param[in] id_count number of indices selected along each dimension 1028 !> @return variable structure 1028 !> @return variable structure 1029 1029 !------------------------------------------------------------------- 1030 1030 1031 1031 IMPLICIT NONE 1032 1032 1033 ! Argument 1033 ! Argument 1034 1034 TYPE(TFILE), INTENT(IN) :: td_file 1035 1035 CHARACTER(LEN=*), INTENT(IN) :: cd_name … … 1075 1075 1076 1076 ENDIF 1077 1077 1078 1078 END FUNCTION iom_rstdimg__read_var_name 1079 1079 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 1083 1083 !> variable 1,2,3d. 1084 1084 !> @details 1085 !> Optionaly,start indices and number of indices selected along each dimension 1085 !> Optionaly,start indices and number of indices selected along each dimension 1086 1086 !> could be specify in a 4 dimension array (/'x','y','z','t'/) 1087 1087 !> … … 1099 1099 IMPLICIT NONE 1100 1100 1101 ! Argument 1101 ! Argument 1102 1102 TYPE(TFILE), INTENT(IN) :: td_file 1103 1103 TYPE(TVAR) , INTENT(INOUT) :: td_var … … 1191 1191 CALL logger_trace( & 1192 1192 & " READ VAR VALUE: get variable "//TRIM(td_var%c_name)//& 1193 & " in file "//TRIM(td_file%c_name)) 1193 & " in file "//TRIM(td_file%c_name)) 1194 1194 1195 1195 IF( ALL(td_var%t_dim(1:3)%l_use) )THEN … … 1197 1197 ALLOCATE(dl_tmp( td_var%t_dim(1)%i_len, & 1198 1198 & td_var%t_dim(2)%i_len, & 1199 & td_var%t_dim(4)%i_len) ) 1199 & td_var%t_dim(4)%i_len) ) 1200 1200 DO ji=1,td_var%t_dim(3)%i_len 1201 1201 READ(td_file%i_id, IOSTAT=il_status, REC=td_var%i_rec +ji-1) & … … 1228 1228 ENDIF 1229 1229 ENDIF 1230 1230 1231 1231 ! Allocate space to hold variable value in structure 1232 1232 IF( ASSOCIATED(td_var%d_value) )THEN 1233 DEALLOCATE(td_var%d_value) 1233 DEALLOCATE(td_var%d_value) 1234 1234 ENDIF 1235 1235 … … 1253 1253 td_var%t_dim(:)%i_len=il_count(:) 1254 1254 1255 ! extract value 1255 ! extract value 1256 1256 td_var%d_value(:,:,:,:) = dl_value(il_start(1):il_start(1)+il_count(1)-1,& 1257 1257 & il_start(2):il_start(2)+il_count(2)-1,& … … 1263 1263 ENDIF 1264 1264 1265 ! force to change _FillValue to avoid mistake 1265 ! force to change _FillValue to avoid mistake 1266 1266 ! with dummy zero _FillValue 1267 1267 IF( td_var%d_fill == 0._dp )THEN … … 1289 1289 !> - use iom_rstdimg__get_rec 1290 1290 !> @date August, 2017 1291 !> - split in write_header and write_var 1291 !> - split in write_header and write_var 1292 1292 !> 1293 1293 !> @param[inout] td_file file structure … … 1296 1296 IMPLICIT NONE 1297 1297 1298 ! Argument 1298 ! Argument 1299 1299 TYPE(TFILE), INTENT(INOUT) :: td_file 1300 1300 … … 1322 1322 CALL iom_rstdimg_close(td_file) 1323 1323 1324 ! compute record number to be used 1324 ! compute record number to be used 1325 1325 ! and add variable no0d, no1d,.. if need be 1326 1326 CALL iom_rstdimg__get_rec(td_file) … … 1387 1387 !> - use iom_rstdimg__get_rec 1388 1388 !> @date August, 2017 1389 !> - split in write_header and write_var 1389 !> - split in write_header and write_var 1390 1390 !> 1391 1391 !> @param[inout] td_file file structure … … 1394 1394 IMPLICIT NONE 1395 1395 1396 ! Argument 1396 ! Argument 1397 1397 TYPE(TFILE), INTENT(INOUT) :: td_file 1398 1398 … … 1409 1409 1410 1410 ! write variable in file 1411 CALL iom_rstdimg__write_var(td_file) 1411 CALL iom_rstdimg__write_var(td_file) 1412 1412 1413 1413 ELSE … … 1437 1437 IMPLICIT NONE 1438 1438 1439 ! Argument 1439 ! Argument 1440 1440 TYPE(TFILE), INTENT(INOUT) :: td_file 1441 1441 … … 1465 1465 il_tmp1d(:)=-1 1466 1466 1467 tl_var=var_init( 'no1d', il_tmp1d(:)) 1467 tl_var=var_init( 'no1d', il_tmp1d(:)) 1468 1468 1469 1469 DEALLOCATE( il_tmp1d ) 1470 1470 1471 CALL file_add_var( td_file, tl_var ) 1472 ENDIF 1473 1471 CALL file_add_var( td_file, tl_var ) 1472 ENDIF 1473 1474 1474 IF( td_file%i_n2d == 0 )THEN 1475 1475 ! create var … … 1482 1482 DEALLOCATE( il_tmp2d ) 1483 1483 1484 CALL file_add_var( td_file, tl_var ) 1485 1486 ENDIF 1487 1484 CALL file_add_var( td_file, tl_var ) 1485 1486 ENDIF 1487 1488 1488 IF( td_file%i_n3d == 0 )THEN 1489 1489 ! create var … … 1497 1497 DEALLOCATE( il_tmp3d ) 1498 1498 1499 CALL file_add_var( td_file, tl_var ) 1499 CALL file_add_var( td_file, tl_var ) 1500 1500 ENDIF 1501 1501 … … 1534 1534 SUBROUTINE iom_rstdimg__write_header(td_file) 1535 1535 !------------------------------------------------------------------- 1536 !> @brief This subroutine write header in an opened dimg 1536 !> @brief This subroutine write header in an opened dimg 1537 1537 !> file in write mode. 1538 1538 !> … … 1547 1547 IMPLICIT NONE 1548 1548 1549 ! Argument 1549 ! Argument 1550 1550 TYPE(TFILE), INTENT(INOUT) :: td_file 1551 1551 … … 1568 1568 INTEGER(i4), DIMENSION(:), ALLOCATABLE :: il_lei 1569 1569 INTEGER(i4), DIMENSION(:), ALLOCATABLE :: il_lej 1570 1570 1571 1571 ! loop indices 1572 1572 INTEGER(i4) :: ji … … 1613 1613 & il_nproc <= 0 .OR. & 1614 1614 & il_nproc > il_niproc * il_njproc )THEN 1615 1615 1616 1616 CALL logger_error(" WRITE FILE: invalid domain splitting ") 1617 1617 … … 1621 1621 1622 1622 ENDIF 1623 1623 1624 1624 ! get domain number 1625 1625 il_ind=att_get_index( td_file%t_att, "DOMAIN_number" ) … … 1669 1669 il_jmpp(:) = INT(td_file%t_att(il_ind)%d_value(:)) 1670 1670 ENDIF 1671 1671 1672 1672 ! check left bottom indices 1673 1673 IF( ANY(il_impp(:)==0) .OR. ANY(il_jmpp(:)==0) )THEN … … 1705 1705 il_ldj(:) = INT(td_file%t_att(il_ind)%d_value(:)) 1706 1706 ENDIF 1707 1707 1708 1708 ! check first indoor indices 1709 1709 IF( ANY(il_ldi(:)==0) .OR. ANY(il_ldj(:)==0) )THEN … … 1727 1727 IF( ANY(il_lei(:)==0) .OR. ANY(il_lej(:)==0) )THEN 1728 1728 CALL logger_warn("WRITE FILE: no data for subdomain last indoor indices") 1729 ENDIF 1729 ENDIF 1730 1730 1731 1731 ! write file header … … 1753 1753 & il_lei, il_lej ) 1754 1754 1755 END SUBROUTINE iom_rstdimg__write_header 1755 END SUBROUTINE iom_rstdimg__write_header 1756 1756 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1757 1757 SUBROUTINE iom_rstdimg__write_var(td_file) … … 1769 1769 IMPLICIT NONE 1770 1770 1771 ! Argument 1771 ! Argument 1772 1772 TYPE(TFILE), INTENT(INOUT) :: td_file 1773 1773 … … 1796 1796 cl_name(ji) = TRIM(td_file%t_var(ji)%c_name) 1797 1797 dl_value(ji) = REAL(td_file%t_var(ji)%i_rec,dp) 1798 1798 1799 1799 SELECT CASE (TRIM(td_file%t_var(ji)%c_name)) 1800 1800 CASE('no0d','no1d','no2d','no3d') 1801 1801 CASE DEFAULT 1802 1802 1803 1803 ! use scale factor and offset 1804 1804 WHERE( td_file%t_var(ji)%d_value(:,:,:,:) /= & … … 1820 1820 CASE(3) 1821 1821 il_rec = td_file%t_var(ji)%i_rec + jk -1 1822 END SELECT 1822 END SELECT 1823 1823 WRITE( td_file%i_id, IOSTAT=il_status, REC=il_rec ) & 1824 1824 & td_file%t_var(ji)%d_value(:,:,jk,1) … … 1838 1838 il_start(1) = 1 1839 1839 il_count(1) = td_file%i_n0d 1840 1840 1841 1841 il_start(2) = 1 + il_count(1) 1842 1842 il_count(2) = il_start(2) - 1 + td_file%i_n1d 1843 1843 1844 1844 il_start(3) = 1 + il_count(2) 1845 1845 il_count(3) = il_start(3) - 1 + td_file%i_n2d 1846 1846 1847 1847 il_start(4) = 1 + il_count(3) 1848 1848 il_count(4) = il_start(4) - 1 + td_file%i_n3d
Note: See TracChangeset
for help on using the changeset viewer.