From 39eb3dc9d8ec92e2a62947294df56fbd0e449d4b Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Wed, 9 Feb 2022 12:02:24 +0100 Subject: [PATCH] Added and updated cmngr.f The file cmngr.f was updated to be compatible with Python bindings. --- .../fortran/phd_ce_noso_nosp_nosym/cmngr.f | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/cmngr.f diff --git a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/cmngr.f b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/cmngr.f new file mode 100644 index 0000000..5601793 --- /dev/null +++ b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/cmngr.f @@ -0,0 +1,41 @@ +C +C====================================================================== +C + SUBROUTINE CMNGR(NAT,NGR,CMN) +C +C input : NAT,NGR +C output : CMN +C +C This subroutine calculate C(NAT-N,M-N) where, +C 1<=M<=NGR<=NAT,1<=N<=M +C C(NAT-N,M-N) is stored as CMN(N,M) +C +C H.-F. Zhao 2007 +C + USE DIM_MOD +C + INTEGER NAT,NGR +C + REAL CMN(NGR_M,NGR_M) +C + IF(NGR.GT.NAT) THEN + WRITE(6,*) 'NGR is larger than NAT, which is wrong' + STOP + ENDIF +C + DO M=1,NGR + DO N=1,NGR + CMN(N,M)=0. + ENDDO + CMN(M,M)=1. + ENDDO +C + DO M=1,NGR + DO N=M-1,1,-1 + CMN(N,M)=CMN(N+1,M)*FLOAT(NAT-N)/FLOAT(M-N) + ENDDO + ENDDO +C + RETURN +C + END