diff --git a/Inst_eddies/inst_eddies.f90 b/Inst_eddies/inst_eddies.f90 index a1c5aa33c95e56d11dc2ed7e272e28bcb3f83eee..c35063b58e5903dc64713060abc544b1f40422f8 100644 --- a/Inst_eddies/inst_eddies.f90 +++ b/Inst_eddies/inst_eddies.f90 @@ -204,9 +204,9 @@ program inst_eddies end if end do - call write_aux(corner_deg, step_deg, nlon, nlat, n_cyclo, & + call write_aux(corner_deg, step_deg, nlon, nlat, hshpc_cyclo, & shpc_dir = "SHPC_cyclo") - call write_aux(corner_deg, step_deg, nlon, nlat, n_anti, & + call write_aux(corner_deg, step_deg, nlon, nlat, hshpc_anti, & shpc_dir = "SHPC_anti") CALL shpc_close(hshpc_cyclo) CALL shpc_close(hshpc_anti) diff --git a/Inst_eddies/write_aux.f90 b/Inst_eddies/write_aux.f90 index 373ce9354dcf9d4eb41797ccb77853c9062882bc..518c0ff35a560c049cc2d74edf791ef72307abe0 100644 --- a/Inst_eddies/write_aux.f90 +++ b/Inst_eddies/write_aux.f90 @@ -4,12 +4,15 @@ module write_aux_m contains - subroutine write_aux(corner_deg, step_deg, nlon, nlat, n_shapes, shpc_dir) + subroutine write_aux(corner_deg, step_deg, nlon, nlat, hshpc, shpc_dir) ! Write auxiliary files "grid_nml.txt" and "ishape_last.txt". ! Libraries: use jumble, only: new_unit + use shapelib_03, only: shp_get_info_03 + + use derived_types, only: shpc ! Note: we do not use assumed-shape arrays here for corner_deg and ! step_deg because of an internal compiler error of ifort @@ -26,15 +29,16 @@ contains ! size of ssh array in input NetCDF, assuming no repeated point if ! the grid is global - integer, intent(in):: n_shapes + TYPE(shpc), intent(in):: hshpc character(len = *), intent(in):: shpc_dir ! Local: namelist /grid_nml/ corner_deg, step_deg, nlon, nlat - integer unit + integer unit, n_entities !-------------------------------------------------------------------- + call shp_get_info_03(hshpc%extremum, n_entities) call new_unit(unit) open(unit, file = shpc_dir // "/grid_nml.txt", status = "replace", & action = "write") @@ -43,7 +47,7 @@ contains open(unit, file = shpc_dir // "/ishape_last.txt", status = "replace", & action = "write") - write(unit, fmt = *) n_shapes - 1 + write(unit, fmt = *) n_entities - 1 close(unit) end subroutine write_aux