My Project
Loading...
Searching...
No Matches
transi.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2014- ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
62
75
76#ifndef ectrans_transi_h
77#define ectrans_transi_h
78
79#include <stddef.h> // size_t
80
81typedef int _bool;
82
83#ifdef __cplusplus
84extern "C" {
85#endif
86
87#include "ectrans/version.h"
88
89#define TRANS_FFT992 1
90#define TRANS_FFTW 2
91
92#define TRANS_SUCCESS 0
93
94struct Trans_t;
95struct DirTrans_t;
96struct DirTransAdj_t;
97struct InvTrans_t;
98struct InvTransAdj_t;
99struct DistGrid_t;
100struct GathGrid_t;
101struct DistSpec_t;
102struct GathSpec_t;
103struct VorDivToUV_t;
104struct SpecNorm_t;
105
106
110const char* trans_error_msg(int errcode);
111
122
132int trans_set_radius(double radius);
133
144int trans_set_nprtrv(int nprtrv);
145
156int trans_set_nprgpew(int nprgpew);
157
167int trans_set_leq_regions(_bool ldeq_regions);
168
177int trans_use_mpi(_bool);
178
190int trans_init(void);
191
192int trans_set_read(struct Trans_t*, const char* filepath);
193int trans_set_write(struct Trans_t*, const char* filepath);
194int trans_set_cache(struct Trans_t*, const void*, size_t);
195
222
223
233int trans_inquire(struct Trans_t* trans, const char* varlist);
234
293int trans_dirtrans(struct DirTrans_t* dirtrans);
294
295
354int trans_dirtrans_adj(struct DirTransAdj_t* dirtransadj);
355
356
422int trans_invtrans(struct InvTrans_t* invtrans);
423
424
425
491int trans_invtrans_adj(struct InvTransAdj_t* invtrans_adj);
492
520int trans_distgrid(struct DistGrid_t* distgrid);
521
554int trans_gathgrid(struct GathGrid_t* gathgrid);
555
586int trans_distspec(struct DistSpec_t* distspec);
587
616int trans_gathspec(struct GathSpec_t* gathspec);
617
648int trans_vordiv_to_UV(struct VorDivToUV_t* vordiv_to_UV);
649
667int trans_specnorm(struct SpecNorm_t* specnorm);
668
677
678
685int trans_finalize(void);
686
687
701struct Trans_t {
702
704 int ndgl;
705 int* nloen;
707 int nlon;
708 int nsmax;
709 _bool llam;
710
711 _bool lsplit;
714 int flt;
716 int fft;
718
719 char* readfp;
720 char* writefp;
721 const void* cache;
722 size_t cachesize;
724
726 int myproc;
727 int nproc;
729
731 int handle;
733
734
736 int nspec;
737 int nspec2;
740 int nump;
741 int ngptot;
744 int* ngptotl;
746 int* nmyms;
748 int* nasm0;
750 int nprtrw;
751 int* numpp;
753 int* npossp;
755 int* nptrms;
757 int* nallms;
760 int* ndim0g;
762 int* nvalue;
764
765
773 int* nfrstlat;
775 int* nlstlat;
778 int* nptrlat;
788 int* nsta;
799 int* nonl;
802 _bool* ldsplitlat;
805
806
810 int* nultpp;
813 int* nptrls;
816 int* nnmeng;
818
819
820
822 double* rmu;
824 double* rgw;
826 double* rpnm;
828 int nlei3;
830 int* npms;
832 double* rlapin;
834 int* ndglu;
836
837
839 double pexwn;
840 double peywn;
841 double * pweight;
842 int ndgux;
843 int nmsmax;
844 int * mvalue;
846};
847
852int trans_new( struct Trans_t* );
853
861int trans_set_resol( struct Trans_t* trans, int ndgl, const int* nloen );
862
873int trans_set_resol_lonlat( struct Trans_t* trans, int nlon, int nlat );
874
883int trans_set_resol_lam( struct Trans_t* trans, int nx, int ny, double dx, double dy );
884
890int trans_set_trunc( struct Trans_t* trans, int nsmax );
891
898int trans_set_trunc_lam( struct Trans_t* trans, int trunc_x, int trunc_y );
899
900
907{
908 const double* rgp;
915 double* rspscalar;
917 double* rspvor;
919 double* rspdiv;
921 const double* rmeanu;
923 const double* rmeanv;
925 int nproma;
930 struct Trans_t* trans;
931 int count;
932};
933
938struct DirTrans_t new_dirtrans(struct Trans_t* trans);
939
940
947{
948 const double* rgp;
955 double* rspscalar;
957 double* rspvor;
959 double* rspdiv;
961 const double* rmeanu;
963 const double* rmeanv;
965 int nproma;
970 struct Trans_t* trans;
971 int count;
972};
973
978struct DirTransAdj_t new_dirtrans_adj(struct Trans_t* trans);
979
980
987{
988 const double* rspscalar;
990 const double* rspvor;
992 const double* rspdiv;
994 const double* rmeanu;
996 const double* rmeanv;
998 double* rgp;
1019 struct Trans_t* trans;
1020 int count;
1021};
1022
1027struct InvTrans_t new_invtrans(struct Trans_t* trans);
1028
1029
1031
1033{
1034 double* rspscalar;
1036 double* rspvor;
1038 double* rspdiv;
1040 const double* rmeanu;
1042 const double* rmeanv;
1044 const double* rgp;
1065 struct Trans_t* trans;
1066 int count;
1067};
1068
1073struct InvTransAdj_t new_invtrans_adj(struct Trans_t* trans);
1074
1075
1076
1083{
1084 const double* rgpg;
1087 double* rgp;
1091 const int* nfrom;
1094 int nfld;
1096 struct Trans_t* trans;
1097 int count;
1098};
1099
1104struct DistGrid_t new_distgrid(struct Trans_t* trans);
1105
1112{
1113 double* rgpg;
1117 const double* rgp;
1121 const int* nto;
1124 int nfld;
1126 struct Trans_t* trans;
1127 int count;
1128};
1129
1134struct GathGrid_t new_gathgrid(struct Trans_t* trans);
1135
1142{
1143 const double* rspecg;
1146 double* rspec;
1149 const int* nfrom;
1151 int nfld;
1152 struct Trans_t* trans;
1153 int count;
1154};
1155
1160struct DistSpec_t new_distspec(struct Trans_t* trans);
1161
1168{
1169 double* rspecg;
1172 const double* rspec;
1175 const int* nto;
1177 int nfld;
1178 struct Trans_t* trans;
1179 int count;
1180};
1181
1186struct GathSpec_t new_gathspec(struct Trans_t* trans);
1187
1194{
1195 const double* rspvor;
1198 const double* rspdiv;
1201 double* rspu;
1204 double* rspv;
1207 int nfld;
1208 int nsmax;
1211 int count;
1212};
1213
1217struct VorDivToUV_t new_vordiv_to_UV(void);
1218
1219
1221{
1222 const double *rspec;
1226 const double *rmet;
1228 double* rnorm;
1230 int nfld;
1231 struct Trans_t* trans;
1232 int count;
1233};
1234
1238struct SpecNorm_t new_specnorm(struct Trans_t* trans);
1239
1240#ifdef __cplusplus
1241}
1242#endif
1243
1244#endif
Arguments structure for trans_dirtrans()
Definition transi.h:907
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:923
double * rspdiv
[output] spectral divergence
Definition transi.h:919
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:928
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:925
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:927
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:929
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:930
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:926
const double * rgp
[input] gridpoint fields
Definition transi.h:908
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:931
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:921
double * rspvor
[output] spectral vorticity
Definition transi.h:917
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:915
Arguments structure for trans_dirtrans_adj()
Definition transi.h:947
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:963
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:961
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:955
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:966
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:969
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:970
double * rspvor
[output] spectral vorticity
Definition transi.h:957
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:968
const double * rgp
[input] gridpoint fields
Definition transi.h:948
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:967
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:971
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:965
double * rspdiv
[output] spectral divergence
Definition transi.h:959
Arguments structure for trans_distgrid()
Definition transi.h:1083
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1097
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1096
const double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG].
Definition transi.h:1084
int nfld
Number of distributed fields.
Definition transi.h:1094
double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1087
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1093
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1095
const int * nfrom
Processors responsible for distributing each field DIMENSIONS(1:NFLD)
Definition transi.h:1091
Arguments structure for trans_distspec()
Definition transi.h:1142
const double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1143
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1153
const int * nfrom
Processors responsible for distributing each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1149
int nfld
Number of distributed fields.
Definition transi.h:1151
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1152
double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1146
Arguments structure for trans_gathgrid()
Definition transi.h:1112
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1127
int nfld
Number of distributed fields.
Definition transi.h:1124
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1125
const int * nto
Processors responsible for gathering each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1121
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1126
double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG] DIMENSI...
Definition transi.h:1113
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1123
const double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1117
Arguments structure for trans_gathspec()
Definition transi.h:1168
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1178
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1179
double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1169
const int * nto
Processors responsible for gathering each field DIMENSIONS(1:NFLD)
Definition transi.h:1175
const double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1172
int nfld
Number of distributed fields.
Definition transi.h:1177
Arguments structure for trans_invtrans()
Definition transi.h:987
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1011
const double * rspvor
[input] spectral vorticity
Definition transi.h:990
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1014
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:996
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1018
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1013
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1020
double * rgp
[output] gridpoint fields
Definition transi.h:998
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1017
const double * rspscalar
[input,default=NULL] spectral scalar valued fields
Definition transi.h:988
const double * rspdiv
[input] spectral divergence
Definition transi.h:992
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1015
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1019
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1016
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1012
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:994
Adjoint of spectral inverse.
Definition transi.h:1033
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1061
const double * rgp
[input] gridpoint fields
Definition transi.h:1044
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1062
int count
Internal storage for calls to trans_invtrans_adj()
Definition transi.h:1066
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:1042
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1058
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1060
double * rspvor
[output] spectral vorticity
Definition transi.h:1036
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1064
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1059
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:1040
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1063
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1057
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1065
double * rspscalar
[output,default=NULL] spectral scalar valued fields
Definition transi.h:1034
double * rspdiv
[output] spectral divergence
Definition transi.h:1038
Definition transi.h:1221
int nmaster
Processor to receive norms (value 1 means MPI_RANK 0)
Definition transi.h:1225
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1232
int nfld
Number of fields.
Definition transi.h:1230
const double * rspec
Spectral array to compute norm of Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1222
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1231
const double * rmet
metric, OPTIONAL DIMENSIONS(0:NSMAX)
Definition transi.h:1226
double * rnorm
Norms (output for processor nmaster) DIMENSIONS(1:NFLD)
Definition transi.h:1228
Struct that holds information to do transforms for one particular grid resolution.
Definition transi.h:701
int * nptrls
Pointer to first global latitude of each a-set for which it performs the Fourier calculations DIMEN...
Definition transi.h:813
int * ndim0g
Defines partitioning of global spectral fields among PEs DIMENSIONS(0:NSMAX)
Definition transi.h:760
int nspec2
Number of complex spectral coefficients on this PE times 2 (real and imag)
Definition transi.h:737
int ndgux
number of latitudes not in extension zone
Definition transi.h:842
int nspec2g
global KSPEC2
Definition transi.h:738
int * nloen
Number of longitude points for each latitude DIMENSIONS(1:NDGL)
Definition transi.h:705
int n_regions_EW
Number of regions in East-West direction.
Definition transi.h:768
int * nmyms
This PEs spectral zonal wavenumbers DIMENSIONS(1:NUMP)
Definition transi.h:746
int * npossp
Defines partitioning of global spectral fields among PEs DIMENSIONS(1:NPRTRW+1)
Definition transi.h:753
int nlei3
First dimension of Legendre polynomials.
Definition transi.h:828
int ngptotg
Total number of grid columns on the Globe.
Definition transi.h:742
int nspec2mx
Maximun KSPEC2 among all PEs.
Definition transi.h:739
int * ngptotl
Number of grid columns on each PE DIMENSIONS(1:N_REGIONS_NS,1:N_REGIONS_EW)
Definition transi.h:744
double * rgw
Gaussian weights DIMENSIONS(1:NDGL)
Definition transi.h:824
int * nptrms
Pointer to the first wave number of a given a-set DIMENSIONS(1:NPRTRW)
Definition transi.h:755
int handle
Resolution tag for which info is required ,default is the first defined resulution (input)
Definition transi.h:731
int nprtrw
Number of processors in A-direction (input)
Definition transi.h:750
double * pweight
weight for distribution
Definition transi.h:841
int ndgl
Number of lattitudes.
Definition transi.h:704
int n_regions_NS
Number of regions in North-South direction.
Definition transi.h:767
int * nasm0
Address in a spectral array of (m, n=m) DIMENSIONS(0:NSMAX)
Definition transi.h:748
int fft
FFT library to use underneith FFT992 = 1 ; FFTW = 2.
Definition transi.h:716
int * ndglu
Number of active points in an hemisphere for a given wavenumber "m" DIMENSIONS(0:NSMAX)
Definition transi.h:834
int * nlstlat
Last latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:775
int * nvalue
n value for each KSPEC2 spectral coeffient DIMENSIONS(1:NSPEC2)
Definition transi.h:762
int myproc
Current MPI task (numbering starting at 1)
Definition transi.h:726
int * nultpp
Number of latitudes for which each a-set is calculating the FFT's. DIMENSIONS(1:NPRTRNS)
Definition transi.h:810
int * nfrstlat
First latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:773
int my_region_NS
My region in North-South direction.
Definition transi.h:769
int nlon
Number of longitude points for all latitudes .
Definition transi.h:707
int * numpp
No. of wave numbers each wave set is responsible for. DIMENSIONS(1:NPRTRW)
Definition transi.h:751
int nfrstloff
Offset for first lat of own a-set in grid-point space.
Definition transi.h:777
double * rlapin
Eigen-values of the inverse Laplace operator DIMENSIONS(-1:NSMAX+2)
Definition transi.h:832
int nsmax
Spectral truncation wave number.
Definition transi.h:708
int * nonl
Number of grid columns for the latitudes on a processor. Similar to nsta() in data structure....
Definition transi.h:799
double peywn
resolution in y
Definition transi.h:840
double pexwn
resolution in x
Definition transi.h:839
_bool llam
True if the corresponding resolution is LAM, false if it is global.
Definition transi.h:709
double * rpnm
Legendre polynomials DIMENSIONS(1:NLEI3,1:NSPOLEGL)
Definition transi.h:826
int ngptot
Total number of grid columns on this PE.
Definition transi.h:741
int nmsmax
spectral truncation in x direction
Definition transi.h:843
_bool lsplit
If false, the distribution does not allow latitudes to be split.
Definition transi.h:711
int nproc
Number of parallel MPI tasks.
Definition transi.h:727
int nprtrns
No. of sets in N-S direction (Fourier space) (always equal to NPRTRW)
Definition transi.h:808
_bool * ldsplitlat
True if latitude is split in grid point space over two a-sets. DIMENSIONS(1:NDGL)
Definition transi.h:802
int * nptrlstlat
Pointer to the last latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:783
int llatlon
If true, the transforms compute extra coefficients for latlon transforms.
Definition transi.h:712
double * rmu
sin(Gaussian latitudes) DIMENSIONS(1:NDGL)
Definition transi.h:822
int * nptrlat
Pointer to the start of each latitude DIMENSIONS(1:NDGL)
Definition transi.h:778
int nptrfloff
Offset for pointer to the first latitude of own a-set NSTA and NONL arrays, i.e. nptrfrstlat(myseta)-...
Definition transi.h:786
int nspolegl
Second dimension of Legendre polynomials.
Definition transi.h:829
int * npms
Adress for legendre polynomial for given M (NSMAX) DIMENSIONS(0:NSMAX)
Definition transi.h:830
int * nnmeng
associated (with NLOENG) cut-off zonal wavenumber DIMENSIONS(1:NDGL)
Definition transi.h:816
int * nsta
Position of first grid column for the latitudes on a processor. DIMENSIONS(1:NDGL+N_REGIONS_NS-1,...
Definition transi.h:788
int * n_regions
Number of East-West Regions per band of North-South Regions.
Definition transi.h:771
int ngptotmx
Maximum number of grid columns on any of the PEs.
Definition transi.h:743
int my_region_EW
My region in East-West direction.
Definition transi.h:770
int flt
If true, the Fast-Legendre-Transform method is used which is faster for higher resolutions (N1024)
Definition transi.h:714
int * nallms
Wave numbers for all wave-set concatenated together to give all wave numbers in wave-set order DIME...
Definition transi.h:757
int nspec
Number of complex spectral coefficients on this PE.
Definition transi.h:736
int nump
Number of spectral waves handled by this PE.
Definition transi.h:740
int * mvalue
wavenumbers in x direction
Definition transi.h:844
int * nptrfrstlat
Pointer to the first latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:780
Arguments structure for trans_vordiv_to_UV()
Definition transi.h:1194
double * rspu
Local spectral array for U*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1201
int count
Internal storage for calls to trans_vordiv_toUV()
Definition transi.h:1211
double * rspv
Local spectral array for V*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1204
const double * rspvor
Local spectral array for vorticity Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD]...
Definition transi.h:1195
const double * rspdiv
Local spectral array for divergence Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD...
Definition transi.h:1198
int ncoeff
number of spectral coefficients (equivalent to nspec2 for distributed or nspec2g for global)
Definition transi.h:1209
int nfld
Number of distributed fields.
Definition transi.h:1207
int nsmax
Spectral resolution (T)
Definition transi.h:1208
int trans_set_trunc_lam(struct Trans_t *trans, int trunc_x, int trunc_y)
Set spectral truncation wave number for trans for LAM grids.
Definition transi.c:136
int trans_specnorm(struct SpecNorm_t *specnorm)
Compute global spectral norms.
const char * trans_error_msg(int errcode)
Get error message relating to error code.
Definition transi.c:39
int trans_inquire(struct Trans_t *trans, const char *varlist)
Inquire the trans library for array values.
int trans_distgrid(struct DistGrid_t *distgrid)
Distribute global gridpoint array among processors.
int trans_dirtrans(struct DirTrans_t *dirtrans)
Direct spectral transform (from grid-point to spectral)
int trans_invtrans_adj(struct InvTransAdj_t *invtrans_adj)
Adjoint of the Inverse spectral transform (from grid-point spectral)
int trans_new(struct Trans_t *)
Constructor for Trans_t, setting default values.
Definition transi.c:60
int trans_set_resol_lonlat(struct Trans_t *trans, int nlon, int nlat)
Set gridpoint resolution for trans for longitude-latitude grids.
Definition transi.c:94
int trans_set_radius(double radius)
Set radius of planet used in trans.
int trans_delete(struct Trans_t *trans)
Remove footprint of specific resolution.
int trans_gathspec(struct GathSpec_t *gathspec)
Gather global spectral array from processors.
int trans_setup(struct Trans_t *trans)
Setup a new resolution to be used in the trans library.
int trans_invtrans(struct InvTrans_t *invtrans)
Inverse spectral transform (from spectral grid-point)
int trans_set_nprtrv(int nprtrv)
Set nprtrv for parallel distribution of fields in spectral space.
int trans_set_trunc(struct Trans_t *trans, int nsmax)
Set spectral truncation wave number for trans.
Definition transi.c:130
int trans_set_handles_limit(int limit)
Set limit on maximum simultaneously allocated transforms.
int trans_set_resol(struct Trans_t *trans, int ndgl, const int *nloen)
Set gridpoint resolution for trans.
Definition transi.c:84
int trans_use_mpi(_bool)
Use MPI in trans library.
int trans_gathgrid(struct GathGrid_t *gathgrid)
Gather global gridpoint array from processors.
int trans_vordiv_to_UV(struct VorDivToUV_t *vordiv_to_UV)
Convert Spectral vorticity & divergence to Spectral u*cos(theta) & v*cos(theta)
int trans_finalize(void)
Finalize trans library.
Definition transi_module.F90:1483
int trans_set_leq_regions(_bool ldeq_regions)
Set leq_regions in trans.
int trans_set_nprgpew(int nprgpew)
Set nprgpew for distribution of fields in gridpoint space.
int trans_dirtrans_adj(struct DirTransAdj_t *dirtransadj)
Adjoint of the Direct spectral transform (from spectral to grid-point)
int trans_set_resol_lam(struct Trans_t *trans, int nx, int ny, double dx, double dy)
Set gridpoint resolution for trans for LAM grids.
Definition transi.c:116
int trans_distspec(struct DistSpec_t *distspec)
Distribute global spectral array among processors.
int trans_init(void)
Initialize trans library.
Definition transi_module.F90:608