-
Lionel GUEZ authored
procedure so it can be used by program test_set_all_outerm. Move dummy argument corner of set_all_outerm to last position. Bug fix in procedure get_snapshot: urc(2) must always be lower than nlat, even if periodic is true. Fix the same bug in procedure set_all_outerm: llc(2) >= 1 and urc(2) <= nlat even if periodic is true. Bug fix in procedure set_all_outerm: the lower bound of dummy argument ssh is not always 1. Make script examine_ssh_values.py work for a periodic domain. Make program test_set_all_outerm work for a periodic domain. max_radius is now chosen at run-time (we must change it for a very coarse grid). Add a corresponding test. In written shapefiles, replace field "area" by field "r_eq_area", that is radius of disk of equal area. This is a smaller number so it needs fewer characters, especially for a global coarse grid.
Lionel GUEZ authoredprocedure so it can be used by program test_set_all_outerm. Move dummy argument corner of set_all_outerm to last position. Bug fix in procedure get_snapshot: urc(2) must always be lower than nlat, even if periodic is true. Fix the same bug in procedure set_all_outerm: llc(2) >= 1 and urc(2) <= nlat even if periodic is true. Bug fix in procedure set_all_outerm: the lower bound of dummy argument ssh is not always 1. Make script examine_ssh_values.py work for a periodic domain. Make program test_set_all_outerm work for a periodic domain. max_radius is now chosen at run-time (we must change it for a very coarse grid). Add a corresponding test. In written shapefiles, replace field "area" by field "r_eq_area", that is radius of disk of equal area. This is a smaller number so it needs fewer characters, especially for a global coarse grid.
init_shapefiles.f 3.24 KiB
module init_shapefiles_m
implicit none
integer, protected:: ifield_extr_ssh, ifield_extr_date, &
ifield_extr_eddy_index, ifield_extr_interp, ifield_extr_cycl, &
ifield_extr_valid, ifield_extr_speed
integer, protected:: ifield_out_r_eq_area, ifield_out_ssh, &
ifield_out_date, ifield_out_eddy_index, ifield_out_radius4
integer, protected:: ifield_max_speed_r_eq_area, ifield_max_speed_ssh, &
ifield_max_speed_date, ifield_max_speed_eddy_index
contains
subroutine init_shapefiles(hshp_extremum, hshp_outermost, hshp_max_speed)
use shapelib, only: shpt_point, shpt_polygon, shpfileobject, ftdouble, &
ftinteger
use shapelib_03, only: shp_create_03, dbf_add_field_03
TYPE(shpfileobject), intent(out):: hshp_extremum ! shapefile extremum_$m
TYPE(shpfileobject), intent(out):: hshp_outermost
! shapefile outermost_contour_$m
TYPE(shpfileobject), intent(out):: hshp_max_speed
! shapefile x_speed_contour_$m
!---------------------------------------------------------------------
call shp_create_03("extremum_1", shpt_point, hshp_extremum)
call dbf_add_field_03(ifield_extr_ssh, hshp_extremum, 'ssh', ftdouble, &
nwidth = 13, ndecimals = 6)
call dbf_add_field_03(ifield_extr_date, hshp_extremum, 'date_index', &
ftinteger, nwidth = 4, ndecimals = 0)
call dbf_add_field_03(ifield_extr_eddy_index, hshp_extremum, 'eddy_index', &
ftinteger, nwidth = 5, ndecimals = 0)
call dbf_add_field_03(ifield_extr_interp, hshp_extremum, 'interpolat', &
ftinteger, nwidth = 1, ndecimals = 0)
call dbf_add_field_03(ifield_extr_cycl, hshp_extremum, 'cyclone', &
ftinteger, nwidth = 1, ndecimals = 0)
call dbf_add_field_03(ifield_extr_valid, hshp_extremum, 'valid', &
ftinteger, nwidth = 1, ndecimals = 0)
call dbf_add_field_03(ifield_extr_speed, hshp_extremum, 'speed', ftdouble, &
nwidth = 13, ndecimals = 6)
call shp_create_03("outermost_contour_1", shpt_polygon, hshp_outermost)
call dbf_add_field_03(ifield_out_r_eq_area, hshp_outermost, &
'r_eq_area', ftdouble, nwidth = 10, ndecimals = 4)
call dbf_add_field_03(ifield_out_ssh, hshp_outermost, 'ssh', ftdouble, &
nwidth = 13, ndecimals = 6)
call dbf_add_field_03(ifield_out_date, hshp_outermost, 'date_index', &
ftinteger, nwidth = 4, ndecimals = 0)
call dbf_add_field_03(ifield_out_eddy_index, hshp_outermost, 'eddy_index', &
ftinteger, nwidth = 5, ndecimals = 0)
call dbf_add_field_03(ifield_out_radius4, hshp_outermost, 'radius4', &
ftinteger, nwidth = 2, ndecimals = 0)
call shp_create_03("max_speed_contour_1", shpt_polygon, hshp_max_speed)
call dbf_add_field_03(ifield_max_speed_r_eq_area, hshp_max_speed, &
'r_eq_area', ftdouble, nwidth = 10, ndecimals = 4)
call dbf_add_field_03(ifield_max_speed_ssh, hshp_max_speed, 'ssh', &
ftdouble, nwidth = 13, ndecimals = 6)
call dbf_add_field_03(ifield_max_speed_date, hshp_max_speed, 'date_index', &
ftinteger, nwidth = 4, ndecimals = 0)
call dbf_add_field_03(ifield_max_speed_eddy_index, hshp_max_speed, &
'eddy_index', ftinteger, nwidth = 5, ndecimals = 0)
end subroutine init_shapefiles
end module init_shapefiles_m