45 module horiz_interp_bicubic_mod
50 use constants_mod,
only: pi
51 use platform_mod,
only: r4_kind, r8_kind
66 module procedure horiz_interp_bicubic_new_1d_r8
67 module procedure horiz_interp_bicubic_new_1d_s_r8
68 module procedure horiz_interp_bicubic_new_1d_r4
69 module procedure horiz_interp_bicubic_new_1d_s_r4
74 module procedure horiz_interp_bicubic_r4
75 module procedure horiz_interp_bicubic_r8
82 #include<file_version.h>
83 logical :: module_is_initialized = .false.
84 integer :: verbose_bicubic = 0
104 module procedure fill_xy_r4
105 module procedure fill_xy_r8
109 module procedure bcuint_r4
110 module procedure bcuint_r8
114 module procedure bcucof_r4
115 module procedure bcucof_r8
120 module procedure indl_r4
121 module procedure indl_r8
126 module procedure indu_r4
127 module procedure indu_r8
135 if(module_is_initialized)
return
137 module_is_initialized = .true.
138 tpi = real(2.0_r8_kind*pi, r8_kind)
147 if(interp%horizInterpReals8_type%is_allocated)
then
148 if(
allocated(interp%horizInterpReals8_type%rat_x))
deallocate ( interp%horizInterpReals8_type%rat_x )
149 if(
allocated(interp%horizInterpReals8_type%rat_y))
deallocate ( interp%horizInterpReals8_type%rat_y )
150 if(
allocated(interp%horizInterpReals8_type%lon_in))
deallocate ( interp%horizInterpReals8_type%lon_in )
151 if(
allocated(interp%horizInterpReals8_type%lat_in))
deallocate ( interp%horizInterpReals8_type%lat_in )
152 if(
allocated(interp%horizInterpReals8_type%wti))
deallocate ( interp%horizInterpReals8_type%wti )
153 else if(interp%horizInterpReals4_type%is_allocated)
then
154 if(
allocated(interp%horizInterpReals4_type%rat_x))
deallocate ( interp%horizInterpReals4_type%rat_x )
155 if(
allocated(interp%horizInterpReals4_type%rat_y))
deallocate ( interp%horizInterpReals4_type%rat_y )
156 if(
allocated(interp%horizInterpReals4_type%lon_in))
deallocate ( interp%horizInterpReals4_type%lon_in )
157 if(
allocated(interp%horizInterpReals4_type%lat_in))
deallocate ( interp%horizInterpReals4_type%lat_in )
158 if(
allocated(interp%horizInterpReals4_type%wti))
deallocate ( interp%horizInterpReals4_type%wti )
160 if(
allocated(interp%i_lon) )
deallocate( interp%i_lon )
161 if(
allocated(interp%j_lat) )
deallocate( interp%j_lat )
163 interp%horizInterpReals8_type%is_allocated = .false.
164 interp%horizInterpReals4_type%is_allocated = .false.
168 #include "horiz_interp_bicubic_r4.fh"
169 #include "horiz_interp_bicubic_r8.fh"
171 end module horiz_interp_bicubic_mod
subroutine, public write_version_number(version, tag, unit)
Prints to the log file (or a specified unit) the version id string and tag name.
subroutine, public horiz_interp_bicubic_del(Interp)
Free memory from a horiz_interp_type used for bicubic interpolation (allocated via horiz_bicubic_new)
subroutine, public horiz_interp_bicubic_init
Initializes module and writes version number to logfile.out.
Creates a new horiz_interp_type for bicubic interpolation. Allocates space and initializes a derived-...
find the lower neighbour of xf in field xc, return is the index
find the upper neighbour of xf in field xc, return is the index
Holds data pointers and metadata for horizontal interpolations, passed between the horiz_interp modul...
integer function stdout()
This function returns the current standard fortran unit numbers for output.
integer function mpp_pe()
Returns processor ID.
Perform bicubic horizontal interpolation.