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

Adding NetCDF Input/Output File Options #22

Closed
drnimbusrain opened this issue Sep 27, 2022 · 5 comments
Closed

Adding NetCDF Input/Output File Options #22

drnimbusrain opened this issue Sep 27, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@drnimbusrain
Copy link
Member

drnimbusrain commented Sep 27, 2022

Adding namelist controlled NetCDF input/output file options for improved assessment and testing of canopy-app modules.

Could also make a netcdf_io module based on NACC to read netcdf inputs: https://github.com/noaa-oar-arl/NACC/blob/master/parallel/src/netcdf_io_mod.f90
canopy_netcdf_io_mod.F90
canopy_outncf.F90

After Issue #22 is completed, the output creation could be moved to txt and netcdf output modules:
canopy_outncf_mod.F90: Based on NACC: https://github.com/noaa-oar-arl/NACC/blob/master/parallel/src/outncf.f90
canopy_outtxt_mod.F90: https://github.com/noaa-oar-arl/canopy-app/blob/develop/canopy_driver.F90#L333

For the input option, we need example input NetCDF file from Issue #25 first. Hopefully, @angehung5 can help generate one based on the current input_variables.txt file.

@zmoon
@drnimbusrain

@drnimbusrain drnimbusrain added enhancement New feature or request help wanted Extra attention is needed labels Sep 27, 2022
@drnimbusrain drnimbusrain changed the title Adding NetCDF Output File Option Adding NetCDF Input/Output File Options Sep 27, 2022
@drnimbusrain
Copy link
Member Author

@zmoon One thing to consider is that with NetCDF IO we will have to compile model with netcdf-fortran libraries.

@zmoon
Copy link
Member

zmoon commented Sep 27, 2022

@zmoon One thing to consider is that with NetCDF IO we will have to compile model with netcdf-fortran libraries.

Yes there is that. I do think it would be valuable to keep at least maybe a single-column text input option that doesn't require netCDF. That way simple testing/experimentation can be done without needing to edit netCDF files.

@drnimbusrain
Copy link
Member Author

drnimbusrain commented Sep 27, 2022

@zmoon Yes, my thought too.

I hope this could be done by compiling with netcdf-fortran as an option (for when user wants to input and/or output NetCDF) rather than requirement. I think we should keep the text file option, and add two new namelist options (e.g., infile_fmt and outfile_fmt) to namelist.

I also assume we need logic in the Makefile to compile different input (e.g., canopy_intxt_mod.F90 or canopy_inncf_mod.F90) and output submodules (e.g., canopy_outtxt_mod.F90 or canopy_outncf_mod.F90) depending on if the user has selected "netcdf" during compliation, because the NetCDF read/write submodules will have embedded use netcdf-fortran in them.

@zmoon
Copy link
Member

zmoon commented Sep 27, 2022

Yeah we should be able to do that similar to the current DEBUG option, with conditionals and appending to OBJS. At some point we can move to CMake.

@drnimbusrain
Copy link
Member Author

@zmoon @angehung5 Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants