Decode one record of version 10600 to 10699.
Reads record three times: header for array sizes, again to ladv for nadv, then in full.
End of file gives nvers = 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | iunit |
Unit of open |
function loadconv_10600(iunit) result(cnv) !! Decode one record of version 10600 to 10699. !! !! Reads record three times: header for array sizes, again to `ladv` for `nadv`, then in full. !! End of file gives `nvers = 0`. use typedef, only: & int32 use convdata, only: & convtype, & nuc_kind_len, idx_kind_len ! Arguments integer(kind=int32), intent(IN):: & iunit !! Unit of open `.cnv` file, positioned at record. type(convtype) :: & cnv integer(kind=int32) :: & iostat read(iunit, IOSTAT=iostat) & cnv%nvers, & cnv%ncyc,& cnv%timesec, & cnv%dt, & cnv%nconv, & cnv%nnuc, & cnv%nnuk, & cnv%nneu, & cnv%nnucd, & cnv%nnukd, & cnv%nneud, & cnv%ncoord, & cnv%idx_kind_len, & cnv%nuc_kind_len if (cnv%nvers < 10600 .or. cnv%nvers >= 10700) & error stop '[loadconv_10600] version out of range (expects 10600-10699)' if (cnv%idx_kind_len /= idx_kind_len) error stop 'idx_kind_len mismatch' if (cnv%nuc_kind_len /= nuc_kind_len) error stop 'nuc_kind_len mismatch' if (IS_IOSTAT_END(iostat)) then cnv%nvers = 0 return endif allocate(& cnv%nuc(cnv%nnuc), & cnv%nuk(cnv%nnuk), & cnv%neu(cnv%nneu), & cnv%nucd(cnv%nnucd), & cnv%nukd(cnv%nnukd), & cnv%neud(cnv%nneud), & cnv%yzip(cnv%nconv), & cnv%xmcoord(cnv%ncoord), & cnv%rncoord(cnv%ncoord), & cnv%inuc(cnv%nnuc), & cnv%inuk(cnv%nnuk), & cnv%ineu(cnv%nneu), & cnv%inucd(cnv%nnucd), & cnv%inukd(cnv%nnukd), & cnv%ineud(cnv%nneud), & cnv%iconv(cnv%nconv)) backspace(iunit) read(iunit) & cnv%nvers, & cnv%ncyc,& cnv%timesec, & cnv%dt, & cnv%nconv, & cnv%nnuc, & cnv%nnuk, & cnv%nneu, & cnv%nnucd, & cnv%nnukd, & cnv%nneud, & cnv%ncoord, & cnv%idx_kind_len, & cnv%nuc_kind_len, & cnv%nuc, & cnv%nuk, & cnv%neu, & cnv%nucd, & cnv%nukd, & cnv%neud, & cnv%yzip, & cnv%xmcoord, & cnv%rncoord, & cnv%ladv cnv%nadv = popcnt(cnv%ladv) backspace(iunit) allocate(& cnv%iadv(cnv%nadv), & cnv%dmadv(cnv%nadv), & cnv%dvadv(cnv%nadv)) read(iunit) & cnv%nvers, & cnv%ncyc,& cnv%timesec, & cnv%dt, & cnv%nconv, & cnv%nnuc, & cnv%nnuk, & cnv%nneu, & cnv%nnucd, & cnv%nnukd, & cnv%nneud, & cnv%ncoord, & cnv%idx_kind_len, & cnv%nuc_kind_len, & cnv%nuc, & cnv%nuk, & cnv%neu, & cnv%nucd, & cnv%nukd, & cnv%neud, & cnv%yzip, & cnv%xmcoord, & cnv%rncoord, & cnv%ladv, & cnv%iadv, & cnv%dmadv, & cnv%dvadv, & cnv%inuc, & cnv%inuk, & cnv%ineu, & cnv%inucd, & cnv%inukd, & cnv%ineud, & cnv%iconv, & cnv%levcnv, & cnv%minloss, & cnv%mingain, & cnv%minnucl, & cnv%minnucg, & cnv%minneul, & cnv%minneug, & cnv%minlossd, & cnv%mingaind, & cnv%minnucld, & cnv%minnucgd, & cnv%minneuld, & cnv%minneugd, & cnv%tc, & cnv%dc, & cnv%pc, & cnv%ec, & cnv%sc, & cnv%ye, & cnv%ab, & cnv%et, & cnv%sn, & cnv%su, & cnv%g1, & cnv%g2, & cnv%s1, & cnv%s2, & cnv%aw, & cnv%summ0, & cnv%radius0, & cnv%an, & cnv%abun, & cnv%eni , & cnv%enk , & cnv%enp , & cnv%ent , & cnv%epro , & cnv%enn , & cnv%enr , & cnv%ensc , & cnv%enes , & cnv%enc , & cnv%enpist , & cnv%enid , & cnv%enkd , & cnv%enpd , & cnv%entd , & cnv%eprod , & cnv%xlumn , & cnv%enrd , & cnv%enscd , & cnv%enesd , & cnv%encd , & cnv%enpistd, & cnv%xlum , & cnv%xlum0 , & cnv%entloss, & cnv%eniloss, & cnv%enkloss, & cnv%enploss, & cnv%enrloss, & cnv%angit , & cnv%angltv , & cnv%xmacc return end function loadconv_10600