Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup the directory mosaic #1344

Open
mlee03 opened this issue Aug 18, 2023 · 4 comments
Open

Cleanup the directory mosaic #1344

mlee03 opened this issue Aug 18, 2023 · 4 comments
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality.

Comments

@mlee03
Copy link
Contributor

mlee03 commented Aug 18, 2023

Is your feature request related to a problem? Please describe.
There are two mosaic related directories in FMS: mosaic2 and mosaic. Currently, mosaic2_mod and grid2_mod in mosaic2 are being utilized while mosaic_mod and grid_mod in mosaic have been retired. Thus the directory mosaic can/should be removed. However, the mosaic directory cannot be removed because it also contains ".c" files that are being used by mosaic2 and horiz_interp.

This issue suggests to

  1. Move all ".c" files in mosaic to mosaic2 directory
  2. Remove the mosaic directory
  3. Clean up the ".c" files to only contain functions being used by FMS. The ".c" files seem to have been directly copied over from FRE_NCTools and many functions in those files are not used by FMS.

Describe alternatives you've considered
Leave it as it is.

Additional context
Striving to make FMS more perfect.

@mlee03 mlee03 added the enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. label Aug 18, 2023
@mlee03 mlee03 changed the title Cleanup read_mosaic.c Cleanup the directory mosaic Sep 11, 2023
@rem1776
Copy link
Contributor

rem1776 commented Oct 3, 2023

@mlee03 That read_mosaic.c file is causing some issues for removing the macros. I was thinking it should've been ifdef'ed with fms/mpp_io as it somewhat qualifies as "old io" and uses netcdf calls directly, does that sound good to you?

We shouldn't need these io routines now since fms2_io is flawless and works as intended lol, but we've seen with create_xgrid sometimes C functions can sneak in and be used in other files without a use or anything.

We should probably bind the C functions used to a fortran routine as part of these updates.

@mlee03
Copy link
Contributor Author

mlee03 commented Oct 4, 2023

lol @rem1776 I was thinking of removing all functions in there except for get_global_area. To my knowledge, none of those read functions are used in the models

@rem1776
Copy link
Contributor

rem1776 commented Oct 4, 2023

@mlee03 I'll just ifdef them out for now then. #1383

@mlee03
Copy link
Contributor Author

mlee03 commented Oct 4, 2023

@rem1776 sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants