# Scientific Computing Workshop 11-12 June 2024: Day1 Q&A archive ![NRIS logo](https://www.sigma2.no/sites/default/files/2024-02/NRIS-globe-web-banner.jpg) ## Day 1 : Using NetCDF data format with Modern Fortran :::success ## Lesson Materials - [Day1 Slides](https://drive.google.com/drive/folders/1bxAoQC5a-1fjgB4wuaQj95A0POPljrtP) - Example Codes are in three locations. 1. [G-drive](https://drive.google.com/drive/folders/1bxAoQC5a-1fjgB4wuaQj95A0POPljrtP) 2. [Gitlab](https://gitlab.sigma2.no/open/netcdf) 3 On Saga under `/cluster/projects/nn9970k/scw_s2024/day1/netcdf/` ::: ## Day 1 : Using NetCDF data format with Modern Fortran ### Icebreaker 1. Are you familiar with netCDF data format? Type an 'o' - yes: oooo - no : oooo 2. Which programming languages are you comfortable with? State below. - Lua - MATLAB o - Python: o - Julia - Fortran - C/C++: o - R 3. Which tools are you using to visualise netCDF data? State below. - NCO library - Python netCDF4: o - MATLAB: oo - ncview: o :::info - A nice blog post on [What Julia can and can't replace about Fortran](https://joshua-laughner.io/posts/julia-misunderstood/#:~:text=Julia%20isn't%20a%20catch,than%20be%20hurt%20by%20it.) - [ncdump - gives a nice summary of file contents ](https://www.unidata.ucar.edu/software/netcdf/workshops/2011/utilities/Ncdump.html) - [The NetCDF Programming APIs](https://docs.unidata.ucar.edu/netcdf-c/current/netcdf_apis.html) - [Software for Manipulating or Displaying NetCDF Data](https://www.unidata.ucar.edu/software/netcdf/software.html) - [Unidata netCDF Fortran repo](https://github.com/Unidata/netcdf-fortran) ::: ### Ask your questions below. 1. How many netCDF formats are there? - netCDF format variants: the classic format, 64-bit data format, 64-bit offset format and netCDF-4 format. See more [here](https://docs.unidata.ucar.edu/netcdf/NUG/netcdf_introduction.html) ## Poll - Do you have access to the example codes? - Yes: o - No : > Example Codes are in three locations. > 1. [G-drive](https://drive.google.com/drive/folders/1bxAoQC5a-1fjgB4wuaQj95A0POPljrtP) > 2. [Gitlab](https://gitlab.sigma2.no/open/netcdf) > 3 On Saga under `/cluster/projects/nn9970k/scw_s2024/day1/netcdf/` > ## Exercise : example-1 > hints to compile > - `gfortran $INCLUDE filename.f90 -o filename -lnetcdff` > - `export INCLUDE=-I/cluster/software/netCDF-Fortran/4.6.1-gompi-2023a/include` > - ```export INCLUDE=$(echo $CPATH | awk -F: '{print "-I"$1}')``` – seems to be needed for Makefile example compilation ## Poll - Have you finished the exercise? - yes: oo - no, I need more time: - no, I am stuck as I got error message: - no, I am not trying now: ## Feedback for the day - One thing you liked - Great course, I liked both the theory and the relevant examples. Good with the material that can be explored in more details after the course. - Thank you +1 - Thank you for the nice course +2 - One thing we should improve next time ------------------------------------------------------------------
{}