29 real(kind=kind_real),
allocatable :: lat(:)
30 real(kind=kind_real),
allocatable :: lon(:)
31 real(kind=kind_real),
allocatable :: area(:,:)
34 #define LISTED_TYPE qg_geom 37 #include "oops/util/linkedList_i.f" 47 #include "oops/util/linkedList_c.f" 51 subroutine c_qg_geo_setup(c_key_self, c_conf) bind(c,name='qg_geo_setup_f90')
53 integer(c_int),
intent(inout) :: c_key_self
54 type(c_ptr),
intent(in) :: c_conf
57 real(kind=kind_real) :: lat_center,lat_south, lat_north, lon_west, lon_east, full_area
58 type(qg_geom),
pointer :: self
64 self%nx = config_get_int(c_conf,
"nx")
65 self%ny = config_get_int(c_conf,
"ny")
68 allocate(self%lon(self%nx))
69 allocate(self%lat(self%ny))
70 allocate(self%area(self%nx,self%ny))
79 self%lon(ix) = lon_west+
real(ix-1,kind=
kind_real)/
real(self%nx-1,kind=
kind_real)*(lon_east-lon_west)
82 self%lat(iy) = lat_south+
real(iy-1,kind=
kind_real)/
real(self%ny-1,kind=
kind_real)*(lat_north-lat_south)
86 self%lon = self%lon*180_kind_real/
pi 87 self%lat = self%lat*180_kind_real/
pi 91 self%area = full_area/
real(self%nx*self%ny,kind=
kind_real)
97 subroutine c_qg_geo_clone(c_key_self, c_key_other) bind(c,name='qg_geo_clone_f90')
99 integer(c_int),
intent(in ) :: c_key_self
100 integer(c_int),
intent(inout) :: c_key_other
102 type(qg_geom),
pointer :: self, other
109 allocate(other%lon(other%nx))
110 allocate(other%lat(other%ny))
111 allocate(other%area(other%nx,other%ny))
114 other%area = self%area
120 subroutine c_qg_geo_delete(c_key_self) bind(c,name='qg_geo_delete_f90')
123 integer(c_int),
intent(inout) :: c_key_self
131 subroutine c_qg_geo_info(c_key_self, c_nx, c_ny) bind(c,name='qg_geo_info_f90')
133 integer(c_int),
intent(in ) :: c_key_self
134 integer(c_int),
intent(inout) :: c_nx
135 integer(c_int),
intent(inout) :: c_ny
136 type(qg_geom),
pointer :: self
real(kind=kind_real), parameter domain_meridional
meridional model domain (m)
subroutine c_qg_geo_clone(c_key_self, c_key_other)
Fortran derived type to hold geometry data for the QG model.
type(registry_t), public qg_geom_registry
Linked list interface - defines registry_t type.
Constants for the QG model.
subroutine c_qg_geo_info(c_key_self, c_nx, c_ny)
Fortran module handling geometry for the QG model.
subroutine c_qg_geo_delete(c_key_self)
real(kind=kind_real), parameter req
Earth radius at equator (m)
subroutine c_qg_geo_setup(c_key_self, c_conf)
Linked list implementation.
real(kind=kind_real), parameter domain_zonal
model domain (m) in zonal direction
integer, parameter, public kind_real
real(fp), parameter, public pi