-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathPythonWrapper.f95
More file actions
2419 lines (2320 loc) · 110 KB
/
Copy pathPythonWrapper.f95
File metadata and controls
2419 lines (2320 loc) · 110 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
subroutine pyPlmBar(exitstatus,p,lmax,z,csphase,cnorm,p_d0)
use shtools, only: PlmBar
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmBar(p,lmax,z,csphase=csphase,cnorm=cnorm,exitstatus=exitstatus)
end subroutine pyPlmBar
subroutine pyPlmBar_d1(exitstatus,p,dp1,lmax,z,csphase,cnorm,p_d0,dp1_d0)
use shtools, only: PlmBar_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmBar_d1(p,dp1,lmax,z,csphase=csphase,cnorm=cnorm,&
exitstatus=exitstatus)
end subroutine pyPlmBar_d1
subroutine pyPlBar(exitstatus,p,lmax,z,p_d0)
use shtools, only: PlBar
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlBar(p,lmax,z,exitstatus=exitstatus)
end subroutine pyPlBar
subroutine pyPlBar_d1(exitstatus,p,dp1,lmax,z,p_d0,dp1_d0)
use shtools, only: PlBar_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlBar_d1(p,dp1,lmax,z,exitstatus=exitstatus)
end subroutine pyPlBar_d1
subroutine pyPlmON(exitstatus,p,lmax,z,csphase,cnorm,p_d0)
use shtools, only: PlmON
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmON(p,lmax,z,csphase=csphase,cnorm=cnorm,exitstatus=exitstatus)
end subroutine pyPlmON
subroutine pyPlmON_d1(exitstatus,p,dp1,lmax,z,csphase,cnorm,p_d0,dp1_d0)
use shtools, only: PlmON_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmON_d1(p,dp1,lmax,z,csphase=csphase,cnorm=cnorm,&
exitstatus=exitstatus)
end subroutine pyPlmON_d1
subroutine pyPlON(exitstatus,p,lmax,z,p_d0)
use shtools, only: PlON
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlON(p,lmax,z,exitstatus=exitstatus)
end subroutine pyPlON
subroutine pyPlON_d1(exitstatus,p,dp1,lmax,z,p_d0,dp1_d0)
use shtools, only: PlON_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlON_d1(p,dp1,lmax,z,exitstatus=exitstatus)
end subroutine pyPlON_d1
subroutine pyPlmSchmidt(exitstatus,p,lmax,z,csphase,cnorm,p_d0)
use shtools, only: PlmSchmidt
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmSchmidt(p,lmax,z,csphase=csphase,cnorm=cnorm,&
exitstatus=exitstatus)
end subroutine pyPlmSchmidt
subroutine pyPlmSchmidt_d1(exitstatus,p,dp1,lmax,z,csphase,cnorm,p_d0,dp1_d0)
use shtools, only: PlmSchmidt_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: cnorm
call PlmSchmidt_d1(p,dp1,lmax,z,csphase=csphase,cnorm=cnorm,&
exitstatus=exitstatus)
end subroutine pyPlmSchmidt_d1
subroutine pyPlSchmidt(exitstatus,p,lmax,z,p_d0)
use shtools, only: PlSchmidt
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlSchmidt(p,lmax,z,exitstatus=exitstatus)
end subroutine pyPlSchmidt
subroutine pyPlSchmidt_d1(exitstatus,p,dp1,lmax,z,p_d0,dp1_d0)
use shtools, only: PlSchmidt_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PlSchmidt_d1(p,dp1,lmax,z,exitstatus=exitstatus)
end subroutine pyPlSchmidt_d1
subroutine pyPLegendreA(exitstatus,p,lmax,z,csphase,p_d0)
use shtools, only: PLegendreA
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
call PLegendreA(p,lmax,z,csphase=csphase,exitstatus=exitstatus)
end subroutine pyPLegendreA
subroutine pyPLegendreA_d1(exitstatus,p,dp1,lmax,z,csphase,p_d0,dp1_d0)
use shtools, only: PLegendreA_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
integer(int32),intent(in) :: csphase
call PLegendreA_d1(p,dp1,lmax,z,csphase=csphase,exitstatus=exitstatus)
end subroutine pyPLegendreA_d1
subroutine pyPLegendre(exitstatus,p,lmax,z,p_d0)
use shtools, only: PLegendre
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PLegendre(p,lmax,z,exitstatus=exitstatus)
end subroutine pyPLegendre
subroutine pyPLegendre_d1(exitstatus,p,dp1,lmax,z,p_d0,dp1_d0)
use shtools, only: PLegendre_d1
use ftypes
implicit none
integer(int32),intent(in) :: p_d0
integer(int32),intent(in) :: dp1_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(p_d0),intent(out) :: p
real(dp),dimension(dp1_d0),intent(out) :: dp1
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: z
call PLegendre_d1(p,dp1,lmax,z,exitstatus=exitstatus)
end subroutine pyPLegendre_d1
subroutine pySHExpandDH(exitstatus,grid,n,cilm,lmax,norm,sampling,csphase,&
lmax_calc,cilm_d0,cilm_d1,cilm_d2,grid_d0,grid_d1)
use shtools, only: SHExpandDH
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: grid_d0
integer(int32),intent(in) :: grid_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(grid_d0,grid_d1),intent(in) :: grid
integer(int32),intent(in) :: n
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(out) :: lmax
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: sampling
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
call SHExpandDH(grid,n,cilm,lmax,norm=norm,sampling=sampling,&
csphase=csphase,lmax_calc=lmax_calc,&
exitstatus=exitstatus)
end subroutine pySHExpandDH
subroutine pyMakeGridDH(exitstatus,griddh,n,cilm,lmax,norm,sampling,&
csphase,lmax_calc,extend,cilm_d0,cilm_d1,cilm_d2,&
griddh_d0,griddh_d1)
use shtools, only: MakeGridDH
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: griddh_d0
integer(int32),intent(in) :: griddh_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(griddh_d0,griddh_d1),intent(out) :: griddh
integer(int32),intent(out) :: n
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: sampling
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
integer(int32),intent(in) :: extend
call MakeGridDH(griddh,n,cilm,lmax,norm=norm,sampling=sampling,&
csphase=csphase,lmax_calc=lmax_calc,extend=extend,&
exitstatus=exitstatus)
end subroutine pyMakeGridDH
subroutine pySHExpandDHC(exitstatus,grid,n,cilm,lmax,norm,sampling,&
csphase,lmax_calc,cilm_d0,cilm_d1,cilm_d2,&
grid_d0,grid_d1)
use shtools, only: SHExpandDHC
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: grid_d0
integer(int32),intent(in) :: grid_d1
integer(int32),intent(out) :: exitstatus
complex(dp),dimension(grid_d0,grid_d1),intent(in) :: grid
integer(int32),intent(in) :: n
complex(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(out) :: lmax
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: sampling
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
call SHExpandDHC(grid,n,cilm,lmax,norm=norm,sampling=sampling,&
csphase=csphase,lmax_calc=lmax_calc,&
exitstatus=exitstatus)
end subroutine pySHExpandDHC
subroutine pyMakeGridDHC(exitstatus,griddh,n,cilm,lmax,norm,sampling,&
csphase,lmax_calc,extend,cilm_d0,cilm_d1,cilm_d2,&
griddh_d0,griddh_d1)
use shtools, only: MakeGridDHC
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: griddh_d0
integer(int32),intent(in) :: griddh_d1
integer(int32),intent(out) :: exitstatus
complex(dp),dimension(griddh_d0,griddh_d1),intent(out) :: griddh
integer(int32),intent(out) :: n
complex(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: sampling
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
integer(int32),intent(in) :: extend
call MakeGridDHC(griddh,n,cilm,lmax,norm=norm,sampling=sampling,&
csphase=csphase,lmax_calc=lmax_calc,extend=extend,&
exitstatus=exitstatus)
end subroutine pyMakeGridDHC
subroutine pyshglq(exitstatus,lmax,zero,w,zero_d0,w_d0)
use shtools, only: SHGLQ
use ftypes
implicit none
integer(int32),intent(in) :: zero_d0
integer(int32),intent(in) :: w_d0
integer(int32),intent(out) :: exitstatus
integer(int32),intent(in) :: lmax
real(dp),dimension(zero_d0),intent(out) :: zero
real(dp),dimension(w_d0),intent(out) :: w
call SHGLQ(lmax,zero,w,exitstatus=exitstatus)
end subroutine pySHGLQ
subroutine pySHExpandGLQ(exitstatus,cilm,lmax,gridglq,w,zero,norm,csphase,&
lmax_calc,cilm_d0,cilm_d1,cilm_d2,gridglq_d0,&
gridglq_d1,zero_d0,w_d0)
use shtools, only: SHExpandGLQ
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: gridglq_d0
integer(int32),intent(in) :: gridglq_d1
integer(int32),intent(in) :: zero_d0
integer(int32),intent(in) :: w_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(in) :: lmax
real(dp),dimension(gridglq_d0,gridglq_d1),intent(in) :: gridglq
real(dp),dimension(w_d0),intent(in) :: w
real(dp),dimension(zero_d0),intent(in) :: zero
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
call SHExpandGLQ(cilm,lmax,gridglq,w,zero=zero,norm=norm,&
csphase=csphase,lmax_calc=lmax_calc,&
exitstatus=exitstatus)
end subroutine pySHExpandGLQ
subroutine pyMakeGridGLQ(exitstatus,gridglq,cilm,lmax,zero,norm,csphase,&
lmax_calc,extend,gridglq_d0,gridglq_d1,cilm_d0,&
cilm_d1,cilm_d2,zero_d0)
use shtools, only: MakeGridGLQ
use ftypes
implicit none
integer(int32),intent(in) :: gridglq_d0
integer(int32),intent(in) :: gridglq_d1
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: zero_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(gridglq_d0,gridglq_d1),intent(out) :: gridglq
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),dimension(zero_d0),intent(in) :: zero
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
integer(int32),intent(in) :: extend
call MakeGridGLQ(gridglq,cilm,lmax,zero=zero,norm=norm,&
csphase=csphase,lmax_calc=lmax_calc,extend=extend,&
exitstatus=exitstatus)
end subroutine pyMakeGridGLQ
subroutine pySHExpandGLQC(exitstatus,cilm,lmax,gridglq,w,zero,norm,&
csphase,lmax_calc,cilm_d0,cilm_d1,cilm_d2,&
gridglq_d0,gridglq_d1,zero_d0,w_d0)
use shtools, only: SHExpandGLQC
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: gridglq_d0
integer(int32),intent(in) :: gridglq_d1
integer(int32),intent(in) :: zero_d0
integer(int32),intent(in) :: w_d0
integer(int32),intent(out) :: exitstatus
complex(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(in) :: lmax
complex(dp),dimension(gridglq_d0,gridglq_d1),intent(in) :: gridglq
real(dp),dimension(w_d0),intent(in) :: w
real(dp),dimension(zero_d0),intent(in) :: zero
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
call SHExpandGLQC(cilm,lmax,gridglq,w,zero=zero,norm=norm,&
csphase=csphase,lmax_calc=lmax_calc,&
exitstatus=exitstatus)
end subroutine pySHExpandGLQC
subroutine pyMakeGridGLQC(exitstatus,gridglq,cilm,lmax,zero,norm,csphase,&
lmax_calc,extend,gridglq_d0,gridglq_d1,cilm_d0,&
cilm_d1,cilm_d2,zero_d0)
use shtools, only: MakeGridGLQC
use ftypes
implicit none
integer(int32),intent(in) :: gridglq_d0
integer(int32),intent(in) :: gridglq_d1
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: zero_d0
integer(int32),intent(out) :: exitstatus
complex(dp),dimension(gridglq_d0,gridglq_d1),intent(out) :: gridglq
complex(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),dimension(zero_d0),intent(in) :: zero
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: lmax_calc
integer(int32),intent(in) :: extend
call MakeGridGLQC(gridglq,cilm,lmax,zero=zero,norm=norm,&
csphase=csphase,lmax_calc=lmax_calc,extend=extend,&
exitstatus=exitstatus)
end subroutine pyMakeGridGLQC
subroutine pyGLQGridCoord(exitstatus,latglq,longlq,lmax,nlat,nlong,extend,&
latglq_d0,longlq_d0)
use shtools, only: GLQGridCoord
use ftypes
implicit none
integer(int32),intent(in) :: latglq_d0
integer(int32),intent(in) :: longlq_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(latglq_d0),intent(out) :: latglq
real(dp),dimension(longlq_d0),intent(out) :: longlq
integer(int32),intent(in) :: lmax
integer(int32),intent(out) :: nlat
integer(int32),intent(out) :: nlong
integer(int32),intent(in) :: extend
call GLQGridCoord(latglq,longlq,lmax,nlat,nlong,extend=extend,&
exitstatus=exitstatus)
end subroutine pyGLQGridCoord
subroutine pySHExpandLSQ(exitstatus,cilm,d,lat,lon,nmax,lmax,norm,chi2,&
csphase,cilm_d0,cilm_d1,cilm_d2,d_d0,lat_d0,&
lon_d0)
use shtools, only: SHExpandLSQ
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: d_d0
integer(int32),intent(in) :: lat_d0
integer(int32),intent(in) :: lon_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(d_d0),intent(in) :: d
real(dp),dimension(lat_d0),intent(in) :: lat
real(dp),dimension(lon_d0),intent(in) :: lon
integer(int32),intent(in) :: nmax
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
real(dp),intent(out) :: chi2
integer(int32),intent(in) :: csphase
call SHExpandLSQ(cilm,d,lat,lon,nmax,lmax,norm=norm,chi2=chi2,&
csphase=csphase,exitstatus=exitstatus)
end subroutine pySHExpandLSQ
subroutine pySHExpandLSQ_G(exitstatus,cilm,d,lat,lon,g,nmax,lmax,norm,&
chi2,csphase,cilm_d0,cilm_d1,cilm_d2,d_d0,&
lat_d0,lon_d0,g_d0,g_d1)
use shtools, only: SHExpandLSQ
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: d_d0
integer(int32),intent(in) :: lat_d0
integer(int32),intent(in) :: lon_d0
integer(int32),intent(in) :: g_d0
integer(int32),intent(in) :: g_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(d_d0),intent(in) :: d
real(dp),dimension(lat_d0),intent(in) :: lat
real(dp),dimension(lon_d0),intent(in) :: lon
real(dp),dimension(g_d0,g_d1),intent(in) :: g
integer(int32),intent(in) :: nmax
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
real(dp),intent(out) :: chi2
integer(int32),intent(in) :: csphase
call SHExpandLSQ(cilm,d,lat,lon,nmax,lmax,norm=norm,chi2=chi2,&
g=g,csphase=csphase,exitstatus=exitstatus)
end subroutine pySHExpandLSQ_G
subroutine pySHExpandWLSQ(exitstatus,cilm,d,w,lat,lon,nmax,lmax,norm,chi2,&
csphase,cilm_d0,cilm_d1,cilm_d2,d_d0,w_d0,lat_d0,&
lon_d0)
use shtools, only: SHExpandLSQ
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: d_d0
integer(int32),intent(in) :: w_d0
integer(int32),intent(in) :: lat_d0
integer(int32),intent(in) :: lon_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(d_d0),intent(in) :: d
real(dp),dimension(w_d0),intent(in) :: w
real(dp),dimension(lat_d0),intent(in) :: lat
real(dp),dimension(lon_d0),intent(in) :: lon
integer(int32),intent(in) :: nmax
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
real(dp),intent(out) :: chi2
integer(int32),intent(in) :: csphase
call SHExpandLSQ(cilm,d,lat,lon,nmax,lmax,norm=norm,chi2=chi2,&
csphase=csphase,weights=w,exitstatus=exitstatus)
end subroutine pySHExpandWLSQ
subroutine pySHExpandWLSQ_G(exitstatus,cilm,d,w,lat,lon,g,nmax,lmax,norm,&
chi2,csphase,cilm_d0,cilm_d1,cilm_d2,d_d0,w_d0,&
lat_d0,lon_d0,g_d0,g_d1)
use shtools, only: SHExpandLSQ
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: d_d0
integer(int32),intent(in) :: w_d0
integer(int32),intent(in) :: lat_d0
integer(int32),intent(in) :: lon_d0
integer(int32),intent(in) :: g_d0
integer(int32),intent(in) :: g_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(d_d0),intent(in) :: d
real(dp),dimension(w_d0),intent(in) :: w
real(dp),dimension(g_d0,g_d1),intent(in) :: g
real(dp),dimension(lat_d0),intent(in) :: lat
real(dp),dimension(lon_d0),intent(in) :: lon
integer(int32),intent(in) :: nmax
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
real(dp),intent(out) :: chi2
integer(int32),intent(in) :: csphase
call SHExpandLSQ(cilm,d,lat,lon,nmax,lmax,norm=norm,chi2=chi2,&
csphase=csphase,weights=w,g=g,exitstatus=exitstatus)
end subroutine pySHExpandWLSQ_G
subroutine pyLSQ_G(exitstatus,g,lat,lon,nmax,lmax,norm,csphase,g_d0,g_d1,&
lat_d0,lon_d0)
use shtools, only: LSQ_G
use ftypes
implicit none
integer(int32),intent(in) :: g_d0
integer(int32),intent(in) :: g_d1
integer(int32),intent(in) :: lat_d0
integer(int32),intent(in) :: lon_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(g_d0,g_d1),intent(out) :: g
real(dp),dimension(lat_d0),intent(in) :: lat
real(dp),dimension(lon_d0),intent(in) :: lon
integer(int32),intent(in) :: nmax
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
call LSQ_G(g,lat,lon,nmax,lmax,norm=norm,csphase=csphase,&
exitstatus=exitstatus)
end subroutine pyLSQ_G
subroutine pyMakeGrid2d(exitstatus,grid,cilm,lmax,interval,nlat,nlong,&
norm,csphase,f,a,north,south,east,west,dealloc,&
cilm_d0,cilm_d1,cilm_d2,grid_d0,grid_d1)
use shtools, only: MakeGrid2d
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: grid_d0
integer(int32),intent(in) :: grid_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(grid_d0,grid_d1),intent(out) :: grid
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: interval
integer(int32),intent(out) :: nlat
integer(int32),intent(out) :: nlong
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
real(dp),intent(in) :: f
real(dp),intent(in) :: a
real(dp),intent(in) :: north
real(dp),intent(in) :: south
real(dp),intent(in) :: east
real(dp),intent(in) :: west
integer(int32),intent(in) :: dealloc
if (f<0.0_dp .and. a<0.0_dp) then
call MakeGrid2d(grid,cilm,lmax,interval,nlat,nlong,norm=norm,&
csphase=csphase,north=north,south=south,east=east,&
west=west,dealloc=dealloc,exitstatus=exitstatus)
else
call MakeGrid2d(grid,cilm,lmax,interval,nlat,nlong,norm=norm,&
csphase=csphase,f=f,a=a,north=north,&
south=south,east=east,west=west,dealloc=dealloc,&
exitstatus=exitstatus)
end if
end subroutine pyMakeGrid2d
function pyMakeGridPoint(cilm,lmax,lat,lon,norm,csphase,dealloc,&
cilm_d0,cilm_d1,cilm_d2)
use shtools, only: MakeGridPoint
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: lat
real(dp),intent(in) :: lon
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: dealloc
real(dp) :: pyMakeGridPoint
pyMakeGridPoint=MakeGridPoint(cilm,lmax,lat,lon,norm=norm,&
csphase=csphase,dealloc=dealloc)
end function pyMakeGridPoint
function pyMakeGridPointC(cilm,lmax,lat,lon,norm,csphase,dealloc,&
cilm_d0,cilm_d1,cilm_d2)
use shtools, only: MakeGridPointC
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
complex(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),intent(in) :: lat
real(dp),intent(in) :: lon
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
integer(int32),intent(in) :: dealloc
complex(dp) :: pyMakeGridPointC
pyMakeGridPointC=MakeGridPointC(cilm,lmax,lat,lon,norm=norm,&
csphase=csphase,dealloc=dealloc)
end function pyMakeGridPointC
subroutine pySHMultiply(exitstatus,shout,sh1,lmax1,sh2,lmax2,precomp,norm,&
csphase,sh1_d0,sh1_d1,sh1_d2,sh2_d0,sh2_d1,sh2_d2,&
shout_d0,shout_d1,shout_d2)
use shtools, only: SHMultiply
use ftypes
implicit none
integer(int32),intent(in) :: sh1_d0
integer(int32),intent(in) :: sh1_d1
integer(int32),intent(in) :: sh1_d2
integer(int32),intent(in) :: sh2_d0
integer(int32),intent(in) :: sh2_d1
integer(int32),intent(in) :: sh2_d2
integer(int32),intent(in) :: shout_d0
integer(int32),intent(in) :: shout_d1
integer(int32),intent(in) :: shout_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(shout_d0,shout_d1,shout_d2),intent(out) :: shout
real(dp),dimension(sh1_d0,sh1_d1,sh1_d2),intent(in) :: sh1
integer(int32),intent(in) :: lmax1
real(dp),dimension(sh2_d0,sh2_d1,sh2_d2),intent(in) :: sh2
integer(int32),intent(in) :: lmax2
integer(int32),intent(in) :: precomp
integer(int32),intent(in) :: norm
integer(int32),intent(in) :: csphase
call SHMultiply(shout,sh1,lmax1,sh2,lmax2,precomp=precomp,&
norm=norm,csphase=csphase,exitstatus=exitstatus)
end subroutine pySHMultiply
subroutine pySHRead2(exitstatus,filename,cilm,lmax,lmax_in,gm,r0_pot,dot,&
doystart,doyend,epoch,cilm_d0,cilm_d1,cilm_d2,dot_d0,&
dot_d1,dot_d2)
use shtools, only: SHRead2
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: dot_d0
integer(int32),intent(in) :: dot_d1
integer(int32),intent(in) :: dot_d2
integer(int32),intent(out) :: exitstatus
character(*),intent(in) :: filename
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(out) :: lmax
integer(int32),intent(in) :: lmax_in
real(dp),intent(out) :: gm
real(dp),intent(out) :: r0_pot
real(dp),dimension(dot_d0,dot_d1,dot_d2),intent(out) :: dot
real(dp),intent(out) :: doystart
real(dp),intent(out) :: doyend
real(dp),intent(out) :: epoch
call SHRead2(filename,cilm,lmax,gm,r0_pot,dot=dot,doystart=doystart,&
doyend=doyend,epoch=epoch,exitstatus=exitstatus)
end subroutine pySHRead2
subroutine pySHRead2Error(exitstatus,filename,cilm,error,lmax,lmax_in,gm,&
r0_pot,dot,doystart,doyend,epoch,cilm_d0,&
cilm_d1,cilm_d2,error_d0,error_d1,error_d2,&
dot_d0,dot_d1,dot_d2)
use shtools, only: SHRead2
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: error_d0
integer(int32),intent(in) :: error_d1
integer(int32),intent(in) :: error_d2
integer(int32),intent(in) :: dot_d0
integer(int32),intent(in) :: dot_d1
integer(int32),intent(in) :: dot_d2
integer(int32),intent(out) :: exitstatus
character(*),intent(in) :: filename
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(error_d0,error_d1,error_d2),intent(out) :: error
integer(int32),intent(out) :: lmax
integer(int32),intent(in) :: lmax_in
real(dp),intent(out) :: gm
real(dp),intent(out) :: r0_pot
real(dp),dimension(dot_d0,dot_d1,dot_d2),intent(out) :: dot
real(dp),intent(out) :: doystart
real(dp),intent(out) :: doyend
real(dp),intent(out) :: epoch
call SHRead2(filename,cilm,lmax,gm,r0_pot,error=error,dot=dot,&
doystart=doystart,doyend=doyend,epoch=epoch,&
exitstatus=exitstatus)
end subroutine pySHRead2Error
subroutine pySHReadJPL(exitstatus,filename,cilm,lmax,lmax_in,gm,&
formatstring,cilm_d0,cilm_d1,cilm_d2)
use shtools, only: SHReadJPL
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(out) :: exitstatus
character(*),intent(in) :: filename
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(out) :: lmax
integer(int32),intent(in) :: lmax_in
real(dp),dimension(2),intent(out) :: gm
character(6),intent(in) :: formatstring
call SHReadJPL(filename,cilm,lmax,gm=gm,formatstring=formatstring,&
exitstatus=exitstatus)
end subroutine pySHReadJPL
subroutine pySHReadJPLError(exitstatus,filename,cilm,error,lmax,lmax_in,&
gm,formatstring,cilm_d0,cilm_d1,cilm_d2,&
error_d0,error_d1,error_d2)
use shtools, only: SHReadJPL
use ftypes
implicit none
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: error_d0
integer(int32),intent(in) :: error_d1
integer(int32),intent(in) :: error_d2
integer(int32),intent(out) :: exitstatus
character(*),intent(in) :: filename
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
real(dp),dimension(error_d0,error_d1,error_d2),intent(out) :: error
integer(int32),intent(in) :: lmax
integer(int32),intent(in) :: lmax_in
real(dp),dimension(2),intent(out) :: gm
character(6),intent(in) :: formatstring
call SHReadJPL(filename,cilm,lmax,error=error,gm=gm,&
formatstring=formatstring,exitstatus=exitstatus)
end subroutine pySHReadJPLError
subroutine pySHCilmToVector(exitstatus,cilm,vector,lmax,vector_d0,cilm_d0,&
cilm_d1,cilm_d2)
use shtools, only: SHCilmToVector
use ftypes
implicit none
integer(int32),intent(in) :: vector_d0
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
real(dp),dimension(vector_d0),intent(out) :: vector
integer(int32),intent(in) :: lmax
call SHCilmToVector(cilm,vector,lmax,exitstatus=exitstatus)
end subroutine pySHCilmToVector
subroutine pySHVectorToCilm(exitstatus,vector,cilm,lmax,vector_d0,cilm_d0,&
cilm_d1,cilm_d2)
use shtools, only: SHVectorToCilm
use ftypes
implicit none
integer(int32),intent(in) :: vector_d0
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(vector_d0),intent(in) :: vector
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(in) :: lmax
call SHVectorToCilm(vector,cilm,lmax,exitstatus=exitstatus)
end subroutine pySHVectorToCilm
subroutine pySHCilmToCindex(exitstatus,cilm,cindex,degmax,cindex_d0,&
cindex_d1,cilm_d0,cilm_d1,cilm_d2)
use shtools, only: SHCilmToCindex
use ftypes
implicit none
integer(int32),intent(in) :: cindex_d0
integer(int32),intent(in) :: cindex_d1
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
real(dp),dimension(cindex_d0,cindex_d1),intent(out) :: cindex
integer(int32),intent(in) :: degmax
call SHCilmToCindex(cilm,cindex,degmax=degmax,exitstatus=exitstatus)
end subroutine pySHCilmToCindex
subroutine pySHCindexToCilm(exitstatus,cindex,cilm,degmax,cindex_d0,&
cindex_d1,cilm_d0,cilm_d1,cilm_d2)
use shtools, only: SHCindexToCilm
use ftypes
implicit none
integer(int32),intent(in) :: cindex_d0
integer(int32),intent(in) :: cindex_d1
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cindex_d0,cindex_d1),intent(in) :: cindex
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(out) :: cilm
integer(int32),intent(in) :: degmax
call SHCindexToCilm(cindex,cilm,degmax=degmax,exitstatus=exitstatus)
end subroutine pySHCindexToCilm
subroutine pySHrtoc(exitstatus,rcilm,ccilm,degmax,convention,switchcs,&
rcilm_d0,rcilm_d1,rcilm_d2,ccilm_d0,ccilm_d1,ccilm_d2)
use shtools, only: SHrtoc
use ftypes
implicit none
integer(int32),intent(in) :: rcilm_d0
integer(int32),intent(in) :: rcilm_d1
integer(int32),intent(in) :: rcilm_d2
integer(int32),intent(in) :: ccilm_d0
integer(int32),intent(in) :: ccilm_d1
integer(int32),intent(in) :: ccilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(rcilm_d0,rcilm_d1,rcilm_d2),intent(in) :: rcilm
real(dp),dimension(ccilm_d0,ccilm_d1,ccilm_d2),intent(out) :: ccilm
integer(int32),intent(in) :: degmax
integer(int32),intent(in) :: convention
integer(int32),intent(in) :: switchcs
call SHrtoc(rcilm,ccilm,degmax=degmax,convention=convention,&
switchcs=switchcs,exitstatus=exitstatus)
end subroutine pySHrtoc
subroutine pySHctor(exitstatus,ccilm,rcilm,degmax,convention,switchcs,&
rcilm_d0,rcilm_d1,rcilm_d2,ccilm_d0,ccilm_d1,ccilm_d2)
use shtools, only: SHctor
use ftypes
implicit none
integer(int32),intent(in) :: rcilm_d0
integer(int32),intent(in) :: rcilm_d1
integer(int32),intent(in) :: rcilm_d2
integer(int32),intent(in) :: ccilm_d0
integer(int32),intent(in) :: ccilm_d1
integer(int32),intent(in) :: ccilm_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(ccilm_d0,ccilm_d1,ccilm_d2),intent(in) :: ccilm
real(dp),dimension(rcilm_d0,rcilm_d1,rcilm_d2),intent(out) :: rcilm
integer(int32),intent(in) :: degmax
integer(int32),intent(in) :: convention
integer(int32),intent(in) :: switchcs
call SHctor(ccilm,rcilm,degmax=degmax,convention=convention,&
switchcs=switchcs,exitstatus=exitstatus)
end subroutine pySHctor
subroutine pydjpi2(exitstatus,dj,lmax,dj_d0,dj_d1,dj_d2)
use shtools, only: djpi2
use ftypes
implicit none
integer(int32),intent(in) :: dj_d0
integer(int32),intent(in) :: dj_d1
integer(int32),intent(in) :: dj_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(dj_d0,dj_d1,dj_d2),intent(out) :: dj
integer(int32),intent(in) :: lmax
call djpi2(dj,lmax,exitstatus=exitstatus)
end subroutine pydjpi2
subroutine pySHRotateCoef(exitstatus,x,cof,rcof,dj,lmax,rcof_d0,rcof_d1,&
dj_d0,dj_d1,dj_d2,cof_d0,cof_d1)
use shtools, only: SHRotateCoef
use ftypes
implicit none
integer(int32),intent(in) :: rcof_d0
integer(int32),intent(in) :: rcof_d1
integer(int32),intent(in) :: dj_d0
integer(int32),intent(in) :: dj_d1
integer(int32),intent(in) :: dj_d2
integer(int32),intent(in) :: cof_d0
integer(int32),intent(in) :: cof_d1
integer(int32),intent(out) :: exitstatus
real(dp),dimension(3),intent(in) :: x
real(dp),dimension(cof_d0,cof_d1),intent(in) :: cof
real(dp),dimension(rcof_d0,rcof_d1),intent(out) :: rcof
real(dp),dimension(dj_d0,dj_d1,dj_d2),intent(in) :: dj
integer(int32),intent(in) :: lmax
call SHRotateCoef(x,cof,rcof,dj,lmax,exitstatus=exitstatus)
end subroutine pySHRotateCoef
subroutine pySHRotateRealCoef(exitstatus,cilmrot,cilm,lmax,x,dj,x_d0,&
dj_d0,dj_d1,dj_d2,cilm_d0,cilm_d1,cilm_d2,&
cilmrot_d0,cilmrot_d1,cilmrot_d2)
use shtools, only: SHRotateRealCoef
use ftypes
implicit none
integer(int32),intent(in) :: x_d0
integer(int32),intent(in) :: dj_d0
integer(int32),intent(in) :: dj_d1
integer(int32),intent(in) :: dj_d2
integer(int32),intent(in) :: cilm_d0
integer(int32),intent(in) :: cilm_d1
integer(int32),intent(in) :: cilm_d2
integer(int32),intent(in) :: cilmrot_d0
integer(int32),intent(in) :: cilmrot_d1
integer(int32),intent(in) :: cilmrot_d2
integer(int32),intent(out) :: exitstatus
real(dp),dimension(cilmrot_d0,cilmrot_d1,cilmrot_d2),intent(out) ::&
cilmrot
real(dp),dimension(cilm_d0,cilm_d1,cilm_d2),intent(in) :: cilm
integer(int32),intent(in) :: lmax
real(dp),dimension(x_d0),intent(in) :: x
real(dp),dimension(dj_d0,dj_d1,dj_d2),intent(in) :: dj
call SHRotateRealCoef(cilmrot,cilm,lmax,x,dj,exitstatus=exitstatus)
end subroutine pySHRotateRealCoef
subroutine pySHAdmitCorr(exitstatus,G,T,lmax,admit,admit_error,corr,G_d0,&
G_d1,G_d2,admit_d0,admit_error_d0,T_d0,T_d1,T_d2,&
corr_d0)
use shtools, only: SHAdmitCorr
use ftypes
implicit none
integer(int32),intent(in) :: G_d0
integer(int32),intent(in) :: G_d1
integer(int32),intent(in) :: G_d2
integer(int32),intent(in) :: admit_d0
integer(int32),intent(in) :: admit_error_d0
integer(int32),intent(in) :: T_d0
integer(int32),intent(in) :: T_d1
integer(int32),intent(in) :: T_d2
integer(int32),intent(in) :: corr_d0
integer(int32),intent(out) :: exitstatus
real(dp),dimension(G_d0,G_d1,G_d2),intent(in) :: G
real(dp),dimension(T_d0,T_d1,T_d2),intent(in) :: T
integer(int32),intent(in) :: lmax
real(dp),dimension(admit_d0),intent(out) :: admit
real(dp),dimension(admit_error_d0),intent(out) :: admit_error
real(dp),dimension(corr_d0),intent(out) :: corr
call SHAdmitCorr(G,T,lmax,admit,corr,admit_error=admit_error,&