Skip to content

Commit

Permalink
Rename files and update the function get_base_name.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesKouatchou committed May 10, 2024
1 parent 907001b commit af43ef0
Show file tree
Hide file tree
Showing 51 changed files with 117 additions and 714 deletions.
687 changes: 32 additions & 655 deletions generic3g/ComponentSpecParser.F90

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions geom_mgr/CoordinateAxis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
target_sources(MAPL.geom_mgr PRIVATE

new_CoordinateAxis_CoordinateAxis.F90
equal_to_CoordinateAxis.F90
not_equal_to_CoordinateAxis.F90
get_extent_CoordinateAxis.F90
get_centers_CoordinateAxis.F90
get_corners_CoordinateAxis.F90
is_periodic_CoordinateAxis.F90
get_dim_name_CoordinateAxis.F90
get_coordinates_dim_CoordinateAxis.F90
new_CoordinateAxis.F90
equal_to.F90
not_equal_to.F90
get_extent.F90
get_centers.F90
get_corners.F90
is_periodic.F90
get_dim_name.F90
get_coordinates_dim.F90
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 4 additions & 14 deletions geom_mgr/GeomManager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,10 @@ module function get_geom_from_id(this, id, rc) result(geom)
integer, intent(in) :: id
integer, optional, intent(out) :: rc
end function get_geom_from_id
end interface

contains

function get_geom_manager() result(geom_mgr)
type(GeomManager), pointer :: geom_mgr
logical :: init = .false.

if (.not. init) then
call geom_manager%initialize()
init = .true.
end if

geom_mgr => geom_manager
end function get_geom_manager
module function get_geom_manager() result(geom_mgr)
type(GeomManager), pointer :: geom_mgr
end function get_geom_manager
end interface

end module mapl3g_GeomManager
27 changes: 14 additions & 13 deletions geom_mgr/GeomManager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
target_sources(MAPL.geom_mgr PRIVATE

new_GeomManager_GeomManager.F90
initialize_GeomManager.F90
add_factory_GeomManager.F90
delete_mapl_geom_GeomManager.F90
get_mapl_geom_from_hconfig_GeomManager.F90
get_mapl_geom_from_metadata_GeomManager.F90
get_mapl_geom_from_id_GeomManager.F90
get_mapl_geom_from_spec_GeomManager.F90
add_mapl_geom_GeomManager.F90
make_geom_spec_from_metadata_GeomManager.F90
make_geom_spec_from_hconfig_GeomManager.F90
make_mapl_geom_from_spec_GeomManager.F90
get_geom_from_id_GeomManager.F90
get_geom_manager.F90
new_GeomManager.F90
initialize.F90
add_factory.F90
delete_mapl_geom.F90
get_mapl_geom_from_hconfig.F90
get_mapl_geom_from_metadata.F90
get_mapl_geom_from_id.F90
get_mapl_geom_from_spec.F90
add_mapl_geom.F90
make_geom_spec_from_metadata.F90
make_geom_spec_from_hconfig.F90
make_mapl_geom_from_spec.F90
get_geom_from_id.F90
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions geom_mgr/GeomManager/get_geom_manager.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "MAPL_Generic.h"

submodule (mapl3g_GeomManager) get_geom_manager_smod

contains

module function get_geom_manager() result(geom_mgr)
type(GeomManager), pointer :: geom_mgr
logical :: init = .false.

if (.not. init) then
call geom_manager%initialize()
init = .true.
end if

geom_mgr => geom_manager
end function get_geom_manager

end submodule get_geom_manager_smod
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions geom_mgr/MaplGeom/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
target_sources(MAPL.geom_mgr PRIVATE

new_MaplGeom_MaplGeom.F90
set_id_MaplGeom.F90
get_spec_MaplGeom.F90
get_geom_MaplGeom.F90
get_factory_MaplGeom.F90
get_file_metadata_MaplGeom.F90
get_gridded_dims_MaplGeom.F90
get_basis_MaplGeom.F90
new_MaplGeom.F90
set_id.F90
get_spec.F90
get_geom.F90
get_factory.F90
get_file_metadata.F90
get_gridded_dims.F90
get_basis.F90
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions geom_mgr/VectorBasis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
target_sources(MAPL.geom_mgr PRIVATE

create_fields_VectorBasis.F90
destroy_fields_VectorBasis.F90
get_unit_vector_VectorBasis.F90
grid_get_centers_VectorBasis.F90
grid_get_coords_1d_VectorBasis.F90
grid_get_coords_2d_VectorBasis.F90
grid_get_corners_VectorBasis.F90
latlon2xyz_VectorBasis.F90
MAPL_GeomGetCoords_VectorBasis.F90
mid_pt_sphere_VectorBasis.F90
new_GridVectorBasis_VectorBasis.F90
new_NS_Basis_VectorBasis.F90
xyz2latlon_VectorBasis.F90
create_fields.F90
destroy_fields.F90
get_unit_vector.F90
grid_get_centers.F90
grid_get_coords_1d.F90
grid_get_coords_2d.F90
grid_get_corners.F90
latlon2xyz.F90
MAPL_GeomGetCoords.F90
mid_pt_sphere.F90
new_GridVectorBasis.F90
new_NS_Basis.F90
xyz2latlon.F90
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 18 additions & 2 deletions shared/MAPL_Throw.F90
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,30 @@ function get_base_name(filename) result(base_name)
character(:), allocatable :: base_name
character(*), intent(in) :: filename

integer :: idx
integer :: idx, idx2

idx = scan(filename, '/', back=.true.)
if (idx /= 0) then
idx2 = scan(filename(:idx-1), '/', back=.true.)
else
idx2 = idx
end if

base_name = filename(idx+1:)
base_name = filename(idx2+1:)

end function get_base_name

! function get_base_name(filename) result(base_name)
! character(:), allocatable :: base_name
! character(*), intent(in) :: filename
!
! integer :: idx
!
! idx = scan(filename, '/', back=.true.)
!
! base_name = filename(idx+1:)
!
! end function get_base_name


end module MAPL_ThrowMod

0 comments on commit af43ef0

Please sign in to comment.