<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://climate-cms.wikis.unsw.edu.au/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=C.carouge</id>
	<title>climate-cms wikis.unsw.edu.au - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://climate-cms.wikis.unsw.edu.au/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=C.carouge"/>
	<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/Special:Contributions/C.carouge"/>
	<updated>2026-10-21T12:13:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Unified_Model&amp;diff=3615</id>
		<title>Unified Model</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Unified_Model&amp;diff=3615"/>
		<updated>2022-09-19T04:01:41Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: Update helpdesk email&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The Unified Model is the atmospheric component of [[ACCESS|ACCESS]], developed by the UK's Met Office. The Centre of Excellence sublicences the UM from CAWCR, our licence allows us to run the UM at NCI only. To run the UM you will first need an NCI account, then ask for connection to the ACCESS group through [https://my.nci.org.au/mancini/project/access/join NCI's account website].&lt;br /&gt;
&lt;br /&gt;
The ACCESS climate models are based on version 7.3 of the UM, most Australian university research uses this version. The Bureau makes use of the more recent version 7.8 for forecasting, and is evaluating moving to version 8.2. These are the primary versions supported at NCI, other versions are available but may not be quite as well tested. Different versions include changed science configurations, for details see the [https://code.metoffice.gov.uk/trac/um/wiki/ReleaseNotes release notes].&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
The UM is configured through a graphical interface, which is run from the server [[Accessdev]]. Follow the [[Accessdev#Getting_Set_Up|Set Up Instructions]] for the version of the model you want to run.&lt;br /&gt;
&lt;br /&gt;
There are two ways to run the model. Newer versions (post UM 10) use Rose &amp;amp; Cylc, older versions (pre UM 10) use a program called UMUI.&lt;br /&gt;
&lt;br /&gt;
The Met Office have a tutorial for the model at https://code.metoffice.gov.uk/doc/um/latest/&lt;br /&gt;
&lt;br /&gt;
A variety of model configurations are within the Centre. Feel free to contact CMS to discuss the different model types and what might be most appropriate for your work. If you plan on contributing work to the Met Office make sure you use the most recent version of the model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= UM 10 / Global Atmosphere / ACCESS 2.x =&lt;br /&gt;
&lt;br /&gt;
The current version of the Unified Model is available from the Met Office's repository site [https://code.metoffice.gov.uk https://code.metoffice.gov.uk].&lt;br /&gt;
&lt;br /&gt;
ARCCSS researchers need to email [mailto:cws_help@nci.org.au cws_help@nci.org.au] to request an account on the Met Office server.&lt;br /&gt;
&lt;br /&gt;
=== Links &amp;amp; More Information ===&lt;br /&gt;
&lt;br /&gt;
*[https://accessdev.nci.org.au/trac/wiki/GettingConnected Connecting to Accessdev and running Rose] &lt;br /&gt;
*[[Running_the_UM_with_Rose|Tips on using Rose with the UM]] &lt;br /&gt;
*[http://nespclimate.com.au/wp-content/uploads/2020/10/Instruction-document-Getting_started_with_ACCESS.pdf Getting Started with ACCESS] &lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/um UM code &amp;amp; issue tracker] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/umdp.html UM 10.X Documentation] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/um-training/index.html Rose Interface Tutorial] &lt;br /&gt;
*[http://collab.metoffice.gov.uk/twiki/bin/view/Support/UMUserTutorial2017 UM User Tutorial 2017] &lt;br /&gt;
*[http://collab.metoffice.gov.uk/twiki/bin/view/Support/UMUserTutorial2016 UM User Tutorial 2016] &lt;br /&gt;
&lt;br /&gt;
*[[GA7_Performance|GA7 Performance]]&lt;br /&gt;
&lt;br /&gt;
= Pre-UM 10 =&lt;br /&gt;
&lt;br /&gt;
See [[Unified Model pre10]] for documentation on older versions of the model&lt;br /&gt;
&lt;br /&gt;
= Experiments =&lt;br /&gt;
&lt;br /&gt;
A full list of experiments we support or have helped set up can be found at [[UM_Experiments|UM Experiments]]&lt;br /&gt;
&lt;br /&gt;
These configurations are currently our primary support targets:&lt;br /&gt;
&lt;br /&gt;
*[[ACCESS_2.0|ACCESS 2.0]] &lt;br /&gt;
*[[ACCESS-ESM|ACCESS-ESM]] &lt;br /&gt;
*[[Global Atmosphere|GA 7]] &lt;br /&gt;
*[[U-aa753_Nested_Suite|Nesting Suite]]&lt;br /&gt;
&lt;br /&gt;
= Guides =&lt;br /&gt;
&lt;br /&gt;
Assorted information on running the UM and available job configurations is listed in the sections below. Feel free to email [mailto:cws_help@nci.org.au climate_help@nci.org.au] if you have any difficulties using the UM or suggestions for how we can make using the UM simpler.&lt;br /&gt;
&lt;br /&gt;
*[[Getting_Help_with_the_UM|Getting Help with the UM]] &lt;br /&gt;
*[[Um-errors|Common Errors]] &lt;br /&gt;
&lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
*[[Running_the_UM_with_Rose|Running the UM with Rose]]&lt;br /&gt;
*[[UM_Helper_Scripts|UM Helper Scripts]]&lt;br /&gt;
&lt;br /&gt;
== Run Types ==&lt;br /&gt;
&lt;br /&gt;
*[[AMIP|AMIP]] &lt;br /&gt;
*[[ACCESS|CMIP]] &lt;br /&gt;
*[https://trac.nci.org.au/trac/access/wiki/SCM_testcases Single Column] &lt;br /&gt;
*[[KPP_Coupling|KPP Coupling]] &lt;br /&gt;
*[https://trac.nci.org.au/trac/access/wiki/APS1_ACCESS_C ACCESS-C High-resolution NWP] &lt;br /&gt;
*[[UM_Nested_Models|Nested / Limited Area Models]] &lt;br /&gt;
*[[UKCA|UKCA Chemistry]] &lt;br /&gt;
&lt;br /&gt;
*[http://www.ukca.ac.uk/wiki/index.php/UKCA_&amp;amp;_UMUI_Tutorials UKCA Tutorials] &lt;br /&gt;
*[https://trac.nci.org.au/trac/access/wiki/AccessModelExperimentLibrary CAWCR's ACCESS experiment library] (log in with your NCI account)&lt;br /&gt;
&lt;br /&gt;
= Common Errors =&lt;br /&gt;
&lt;br /&gt;
If a run fails, search for 'UM ERROR' in the .leave file to see what went wrong. Common issues are listed here&lt;br /&gt;
&lt;br /&gt;
*[[Um-errors#pp-headers|REPLANCA: PP HEADERS ON ANCILLARY FILE DO NOT MATCH]] &lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/um/wiki/KnownUMFailurePoints Known UM failures at UKMO] &lt;br /&gt;
&lt;br /&gt;
== Job Input ==&lt;br /&gt;
&lt;br /&gt;
*[[UM_Ancillary_files|UM Ancillary files]] &lt;br /&gt;
*[[Modifying_UM_Files|Modifying UM files with Mule]] &lt;br /&gt;
*[[SCM_with_ERA-Interim|SCM with ERA-Interim]] &lt;br /&gt;
&lt;br /&gt;
== Job Output ==&lt;br /&gt;
&lt;br /&gt;
*[[Using_STASH|Using STASH]] &lt;br /&gt;
*[[UM_Filenames|UM output filename convention]] &lt;br /&gt;
*[[Analysing_UM_outputs|Analysing UM outputs &amp;amp; Converting to NetCDF]] &lt;br /&gt;
*[[Archiving_Output|Archiving Output]] &lt;br /&gt;
*[[Comparing_UM_Files|Comparing UM Files]] &lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/UKESM/wiki/CMIP6/DiagnosticMappings Mapping UM outputs to CMIP fields] &lt;br /&gt;
&lt;br /&gt;
== Modifying the UM ==&lt;br /&gt;
&lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/um/wiki/working_practices Met Office UM Development Working Practices] &lt;br /&gt;
*[[Adding New Fields to STASH]] &lt;br /&gt;
*[[Profiling_with_IPM_and_Vampir|Profiling MPI]] &lt;br /&gt;
&lt;br /&gt;
== Informative ==&lt;br /&gt;
&lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/um/wiki/PastReleases UM Version Summaries] &lt;br /&gt;
*[[Downloading_from_MASS|Downloading from MASS]] &lt;br /&gt;
*[[Vertical_Coordinates|Vertical Coordinates]]&lt;br /&gt;
&lt;br /&gt;
== [[UM_and_ACCESS_FAQ|UM and ACCESS FAQs]] ==&lt;br /&gt;
&lt;br /&gt;
*[[UM_and_ACCESS_FAQ#Who_can_gain_access_to_the_UM_and_the_ACCESS_models.3F|Who can gain access to the UM and the ACCESS models?]]&lt;br /&gt;
*[[UM_and_ACCESS_FAQ#What_to_do_to_gain_access_to_the_UM_and_the_ACCESS_models.3F|What to do to gain access to the UM and the ACCESS models?]]&lt;br /&gt;
*[[UM_and_ACCESS_FAQ#What_to_do_to_use_the_software_in_.2Fprojects.2Faccess.2Fbin.3F|What to do to use the software in /projects/access/bin?]]&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
&lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/um UM code &amp;amp; issue tracker] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/umdp.html UM Documentation] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/um-training/index.html Rose Interface Tutorial] &lt;br /&gt;
*[http://cms.ncas.ac.uk/ NCAS] &lt;br /&gt;
&lt;br /&gt;
*[[UM_Admin|UM Admin]] &lt;br /&gt;
*[[UM_Partial_guides|UM Partial guides]] &lt;br /&gt;
&lt;br /&gt;
[[Category:Unified Model]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3557</id>
		<title>NU-WRF</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3557"/>
		<updated>2022-05-05T01:29:13Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
NU-WRF stands for NASA Unified WRF. It is an augmented WRF code with additional software developed at NASA. Although it is distributed with a suite of other softwares, we are only using it to run CABLE through LIS and coupling CABLE to WRF via LIS. To do so we only port the following softwares from NU-WRF:&lt;br /&gt;
&lt;br /&gt;
*WRF &lt;br /&gt;
*LDT &lt;br /&gt;
*LIS &lt;br /&gt;
&lt;br /&gt;
All other softwares are untested by the CMS team.&lt;br /&gt;
&lt;br /&gt;
= Access to NU-WRF =&lt;br /&gt;
&lt;br /&gt;
This software suite is under license, anyone affiliated with CLEX is able to use it. You will need to request access to the code though.&lt;br /&gt;
&lt;br /&gt;
All the codes necessary to run CABLE-LIS and CABLE-WRF are hosted on Bitbucket. '''Please create a Bitbucket account for yourself.'''&lt;br /&gt;
&lt;br /&gt;
In addition to the model source code, we have put together a software suite to manage configurations for CABLE-LIS or CABLE-WRF. You will find all the information on accessing the model source code and setting up the configurations [https://bitbucket.org/ahirsch/templates/wiki/Instructions on the wiki for the configuration software] (under Bitbucket).&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3556</id>
		<title>NU-WRF</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3556"/>
		<updated>2022-05-05T01:29:00Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
NU-WRF stands for NASA Unified WRF. It is an augmented WRF code with additional software developed at NASA. Although it is distributed with a suite of other softwares, we are only using it to run CABLE through LIS and coupling CABLE to WRF via LIS. To do so we only port the following softwares from NU-WRF:&lt;br /&gt;
&lt;br /&gt;
*WRF &lt;br /&gt;
*LDT &lt;br /&gt;
*LIS &lt;br /&gt;
&lt;br /&gt;
All other softwares are untested by the CMS team.&lt;br /&gt;
&lt;br /&gt;
= Access to NU-WRF =&lt;br /&gt;
&lt;br /&gt;
This software suite is under license, anyone affiliated with CLEX is able to use it. You will need to request access to the code though.&lt;br /&gt;
&lt;br /&gt;
All the codes necessary to run CABLE-LIS and CABLE-WRF are hosted on Bitbucket.'''Please create a Bitbucket account for yourself.'''&lt;br /&gt;
&lt;br /&gt;
In addition to the model source code, we have put together a software suite to manage configurations for CABLE-LIS or CABLE-WRF. You will find all the information on accessing the model source code and setting up the configurations [https://bitbucket.org/ahirsch/templates/wiki/Instructions on the wiki for the configuration software] (under Bitbucket).&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3555</id>
		<title>NU-WRF</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NU-WRF&amp;diff=3555"/>
		<updated>2022-05-05T01:15:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
NU-WRF stands for NASA Unified WRF. It is an augmented WRF code with additional software developed at NASA. Although it is distributed with a suite of other softwares, we are only using it to run CABLE through LIS and coupling CABLE to WRF via LIS. To do so we only port the following softwares from NU-WRF:&lt;br /&gt;
&lt;br /&gt;
*WRF &lt;br /&gt;
*LDT &lt;br /&gt;
*LIS &lt;br /&gt;
&lt;br /&gt;
All other softwares are untested by the CMS team.&lt;br /&gt;
&lt;br /&gt;
= Access to NU-WRF =&lt;br /&gt;
&lt;br /&gt;
This software suite is under license, anyone affiliated with CLEX is able to use it. You will need to request access to the code though.&lt;br /&gt;
&lt;br /&gt;
All the codes necessary to run CABLE-LIS and CABLE-WRF are hosted on Bitbucket.'''Please create a Bitbucket account for yourself.'''&lt;br /&gt;
&lt;br /&gt;
In addition to the model source code, we have put together a software suite to manage configurations for CABLE-LIS or CABLE-WRF. You will find all the information on accessing the model source code and setting up the configurations [https://bitbucket.org/ahirsch/templates/wiki/Home on the wiki for the configuration software] (under Bitbucket).&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Getting_Help&amp;diff=3537</id>
		<title>Getting Help</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Getting_Help&amp;diff=3537"/>
		<updated>2022-05-04T02:58:08Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Part of the role of the&amp;amp;nbsp;CMS team is to support members of CLEX with computational isues such as those&amp;amp;nbsp;arising with running models, accessing data and analysing data.&lt;br /&gt;
&lt;br /&gt;
The CMS team supports a range of models (listed in the navigation bar on the left-&amp;amp;nbsp;hand side of the page). We can provide assistance for other models, but this will be limited in scope and dependent on the availability of team resources. We also support analysis and other general computing tasks on NCI machines. We can provide general advice for activities undertaken at other sites, or on home machines, but this is necessarily limited as we have no control over, or familiarity with other systems.&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways to contact the CMS team to get support:&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*Climate Weather Science helpdesk [mailto:cws_help@nci.org.au cws_help@nci.org.au] &lt;br /&gt;
*The CLEX slack workspace&amp;amp;nbsp;[https://arccss.slack.com arccss.slack.com] &amp;amp;nbsp; &lt;br /&gt;
*[[One-on-one_calls|One-on-one videocall]] &lt;br /&gt;
*In person with local [[CMS|CMS team member]] &lt;br /&gt;
&lt;br /&gt;
The slack workspace is a good way to contact other CLEX members as well as the CMS team.&amp;amp;nbsp;It is best suited to shorter less complex queries in general.&amp;amp;nbsp;There are a number of channels focussing on different topics. When asking for help it may be that someone else from the Centre will have some useful feedback. It is best not to contact team members directly: we rotate support duties to allow time for other tasks, so asking in a general channel means the team member tasked with support, or who is best placed to answer the question, can assist.&lt;br /&gt;
&lt;br /&gt;
The help desk email is the preferred method for requesting help, as it allows the CMS to triage any queries to reserve time of the CMS team members for other activities. It also allows better visibility of open requests for the CMS team especially for queries that take several days to solve. We also cover for team absences. Simply outline your issue in an email and send it to&amp;amp;nbsp;[mailto:cws_help@nci.org.au cws_help@nci.org.au]&amp;amp;nbsp;which will open a help ticket on our helpdesk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines for help requests ==&lt;br /&gt;
&lt;br /&gt;
First of all, do not apologise or belittle yourself for asking a question! We all had to start one day. We all have different backgrounds with different areas of expertise. And most of all, we are all humans! None of us will know everything, all of us will be forgetful. Asking someone else is the best way to learn what we don't know or to realise what we have forgotten.&lt;br /&gt;
&lt;br /&gt;
When seeking assistance, there are some steps that should be taken&amp;amp;nbsp;to&amp;amp;nbsp;make the most efficient use of everyone's time:&lt;br /&gt;
&lt;br /&gt;
*Follow the [[Troubleshooting|troubleshooting guide]] &lt;br /&gt;
*Have you read the documentation on this wiki (if it exists), any other relevant documentation, or looked on&amp;amp;nbsp;[https://climate-cms.org our blog]? &lt;br /&gt;
*Do you need to do some [[Training|training]] to improve your&amp;amp;nbsp;skills? &lt;br /&gt;
*Include all relevant information: &lt;br /&gt;
**what have you tried already that hasn't worked? &lt;br /&gt;
**what machine are you running on: your machine (what OS), Gadi at NCI, OOD at NCI, accessdev at NCI or another server (give name) &lt;br /&gt;
**if working at NCI please supply your NCI user name &lt;br /&gt;
**if working on Gadi was the issue in a login session or on the PBS compute nodes? &lt;br /&gt;
**upload any code to [https://gist.github.com gist.github.com] or for more complex examples [https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/create-a-repo create a GitHub repository]. If you cannot put the code on Github because of licensing, put it on NCI and give us the path. '''Do not send copies of your code.''' &lt;br /&gt;
**if relevant, specify the modules that were loaded, or environment variables that were set. Tell us if you load modules in your .bashrc or .bash_profile files (unrecommended practice!) &lt;br /&gt;
**if a command produces an error make sure to include the exact command run, including all arguments. The simplest is copy-paste. &lt;br /&gt;
**if a script produces an error make sure to include the exact name of the script and the exact way you execute the script. Copy-paste is the simplest here again. &lt;br /&gt;
**Add any relevant reference. It is unlikely you are referring to a paper-only resource, so include the link (or at least the URL), a quote from emails and webpage (with the address to the relevant page), forward emails, link to a paper... For example, if you say: &amp;quot;As I've seen on the wiki&amp;quot;, &amp;quot;As per the article X&amp;quot; etc. you need to put the reference.   &lt;br /&gt;
*Please check to make sure any specified directories and/or files [[Tips:_Custom_file_permissions_at_creation|have group&amp;amp;nbsp;permissions set]] such that they can be accessed. Assume we can access the shared filesystems at NCI: /scratch and /g/data for your group. If we can't, we'll tell you what to do. '''/home directories are per default personal! You will need to change permissions for us to access!''' &lt;br /&gt;
*Where appropriate, reduce your query to a minimal&amp;amp;nbsp;reproducible example (Stack Overflow has a [https://stackoverflow.com/help/minimal-reproducible-example nice description of what this means], note that the formatting requirements are redundant) &lt;br /&gt;
*Please '''do not''' send code or error messages&amp;amp;nbsp;as screenshots or poorly formatted text&amp;amp;nbsp; &lt;br /&gt;
*Please submit new help requests for substantially new queries and not just append to existing queries. This makes sure any new&amp;amp;nbsp;query is visible to all team members, and can be triaged appropriately. We also have the satisfaction of completing a task rather than have it drag on interminably. Additionally, it provides us with a more organised database of queries and solutions. &lt;br /&gt;
&lt;br /&gt;
To foster&amp;amp;nbsp;best practice software development for code housed&amp;amp;nbsp;in a GitHub repository (or similar) the following steps are preferred:&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*Create an issue in the repo for the bug/problem &lt;br /&gt;
*Add a test for the specific bug where appropriate &lt;br /&gt;
*Document solution in the issue and&amp;amp;nbsp;refer&amp;amp;nbsp;to commits/pull requests: this creates a tight link between discussion of the problem and potential solutions with the code changes made to address points raised in the discussion. This could be done by the CMS team member helping you when appropriate. &lt;br /&gt;
*Resolve issue through a pull request mechanism. This could be done by the CMS team member helping you when appropriate. &lt;br /&gt;
*Close issue when fix has been committed &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== What can users expect ==&lt;br /&gt;
&lt;br /&gt;
Users can expect:&lt;br /&gt;
&lt;br /&gt;
*to receive a reply to a query within 24 hours during normal business hours &lt;br /&gt;
*have their problem solved if it is within scope, or a work-around suggested, and if not then an explanation of why their problem is currently not solvable &lt;br /&gt;
*where an update is required for a current ticket to&amp;amp;nbsp;wait no longer than a week during a non-holiday period &lt;br /&gt;
&lt;br /&gt;
If any of the above expectations are not being met, contact the CMS team. We are only human and sometimes might inadvertently let slip some requests.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
Blog post on [https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/ Writing the perfect question] &amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3525</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3525"/>
		<updated>2022-05-03T00:31:55Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. For information, on what data needs to be published see the [[CLEX_Data_policy|CLEX Data Policy]] and [[Which_data_should_I_publish|Which_data_should_I_publish]] page. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html our blog]. &lt;br /&gt;
#Try and '''avoid your data getting into quarantine'''. Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape. &lt;br /&gt;
#'''Be careful when going on leave!''' Make sure to check your data holdings under /scratch before your leave. &lt;br /&gt;
#'''For extended leave''' (e.g. ship cruises, parental leave, sabbatical), '''do not leave any important data under /scratch.'''&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3523</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3523"/>
		<updated>2022-05-03T00:30:03Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. For information, on what data needs to be published see the [[CLEX_Data_policy|CLEX Data Policy]] and [[Which_data_should_I_publish|Which_data_should_I_publish]] page. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See our blog. &lt;br /&gt;
#Try and '''avoid your data getting into quarantine'''. Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape. &lt;br /&gt;
#'''Be careful when going on leave!''' Make sure to check your data holdings under /scratch before your leave. &lt;br /&gt;
#'''For extended leave''' (e.g. ship cruises, parental leave, sabbatical), '''do not leave any important data under /scratch.'''&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3521</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3521"/>
		<updated>2022-05-03T00:26:03Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. For information, on what data needs to be published see the [[CLEX_Data_policy|CLEX Data Policy]] and [[Which_data_should_I_publish]] page. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See our blog. &lt;br /&gt;
#Try and '''avoid your data getting into quarantine'''. Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape.&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3520</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3520"/>
		<updated>2022-05-03T00:18:40Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See our blog. &lt;br /&gt;
#Try and '''avoid your data getting into quarantine'''. Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape.&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3519</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3519"/>
		<updated>2022-05-03T00:18:16Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See our blog. &lt;br /&gt;
#Try and '''avoid your data getting into quarantine'''. Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape.&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3518</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3518"/>
		<updated>2022-05-03T00:17:37Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
= Long term strategy =&lt;br /&gt;
&lt;br /&gt;
#'''Keep using /scratch'''. There is not enough disk space if nobody is using /scratch. Your data is safe on /scratch as long as you access it, i.e. read, modify, create. Only the data you won't use for some time needs to be managed. &lt;br /&gt;
#'''Managing your data does not mean storing everything on /g/data. '''You need to think about what future use you have for that data. If you don't need it anymore and it can be reproduced, delete it. If you will need to publish the data, publish it now. It is a lot easier to publish a new version if you need a small change than to publish the initial version. If you can't publish now but won't need it for a long time, put the data on tape. If you won't need this data for a short time but you know you will get back to it soon, put it on /g/data &lt;br /&gt;
#'''Learn how to use the tape system'''. See our blog. &lt;br /&gt;
#Make managing your data '''a periodic, frequent task''' in your calendar. This includes all data: /scratch, /g/data and tape.&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3513</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3513"/>
		<updated>2022-04-27T03:32:18Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is the recommended filesystem to write outputs from your simulations into from the compute nodes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag. Remember do not write the outputs of large climate simulations to /g/data directly. Only write from the compute nodes to this space from an analysis job for example.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3512</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3512"/>
		<updated>2022-04-27T03:29:30Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is the recommended filesystem to write outputs from your simulations into from the compute nodes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3511</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3511"/>
		<updated>2022-04-27T03:29:10Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is the recommended filesystem to write outputs from your simulation into.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3510</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3510"/>
		<updated>2022-04-27T03:28:07Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3509</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3509"/>
		<updated>2022-04-27T03:27:37Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3508</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3508"/>
		<updated>2022-04-27T03:27:16Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss or massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is only accessible via specific commands which are detailed in the archiving data wiki page. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3507</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3507"/>
		<updated>2022-04-27T03:26:03Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3506</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3506"/>
		<updated>2022-04-27T00:58:48Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use cases for the various filesystems ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch only&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Producing large amounts of temporary data that will be deleted once analysis is completed&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Data duplicated from another site (or from massdata) used regularly as input for models or analysis, so access time is constantly updated and they can be copied again if deleted&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Temporary run directory for a simulation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;PBS log files and other log files from a simulation or analysis&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Keep on scratch but migrate when finished(/g/data, /scratch, off-site, tape)&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Climate model output or other data that will be analysed and archived in a short time frame, within the 100 day expiry time limit, taking into account that accessing the files will reset the expiry time&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Figures in some cases. If you are producing a very large number of figures and only keep a few for the long term.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create initially on scratch but migrate to /g/data automatically and delete from scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Long climate model runs that might take longer than the 100 day expiry date to complete, where there is no possibility to analyse the data before the run is complete&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Shared climate model runs that may well be accessed by a wide variety of people but the access patterns are not predictable. e.g. CMIP, CORDEX, COSIMA outputs&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Create in /home or /g/data directly&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;Any code: your own analysis code, climate models source codes&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;External packages installed locally&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: Arial;  color: rgb(0, 0, 0);  background-color: transparent;  font-weight: 400;  font-style: normal;  font-variant: normal;  text-decoration: none;  vertical-align: baseline;  white-space: pre-wrap&amp;quot;&amp;gt;DO NOT RUN CLIMATE MODELS AND OUTPUT DIRECTLY TO EITHER OF THESE LOCATIONS. This is an anti-pattern, it is not performant and NCI will become quite annoyed as /scratch is designed for this use-case and /g/data and /home are not.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/hh5''': this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''/g/data/ua8''': the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Home&amp;diff=3505</id>
		<title>Home</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Home&amp;diff=3505"/>
		<updated>2022-04-27T00:53:25Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[File:CLEX-ARC-logo.png|center|800px|CLEX-ARC-logo.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
'''CLEX [[CMS|CMS]]''' is a team providing data and computational support to researchers at the ARC Centre of Excellence for Climate Extremes&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;[[Scratch_file_expiry|'''Scratch automatic file deletion''']]&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''Working from home: [[Working_from_home|some advice on how to setup]]'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''NCI project's migration: [[Migrate_experiment_projects|modifications to apply after the projects' migration]]'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Our Services'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
*[[ARCCSS_induction|Induction]] &lt;br /&gt;
*[[CMS#Our_People|Local Support]] &lt;br /&gt;
*[[FAQs|Checking the FAQs]] &lt;br /&gt;
*[[Getting_Help|Getting Help from CMS]] &lt;br /&gt;
*[[Training|Training]] &lt;br /&gt;
*[mailto:cws_help@nci.org.au Help Desk: cws_help@nci.org.au] &lt;br /&gt;
*[https://arccss.slack.com/ Slack] &lt;br /&gt;
*[[One-on-one_calls|Video meetings with CMS]] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
*[[News|News]] &lt;br /&gt;
*[https://coecms.github.io/ Blog] &lt;br /&gt;
*[https://www.youtube.com/channel/UCSmoK6oWV9O0Hmyt9UdDNsQ Youtube] &lt;br /&gt;
*[https://github.com/coecms Github] &lt;br /&gt;
*[https://anaconda.org/coecms Conda Packages] &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''NCI'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[Accounting_at_NCI|Accounting at NCI]]&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Data'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[Data_Access|Data Access]]&lt;br /&gt;
&lt;br /&gt;
*Common Datasets &lt;br /&gt;
**[[CMIP|CMIP]] &lt;br /&gt;
**[[ERA5|ERA5]] &lt;br /&gt;
**[[ERA_INTERIM|ERA Interim]]   &lt;br /&gt;
*'''[[:Category:Dataset|All Datasets]]''' &lt;br /&gt;
*[[CLEX_and_ARCCSS_data_collection|Data published by ARCCSS and CLEX]] &lt;br /&gt;
*[https://geonetwork.nci.org.au NCI Data Catalogue] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
Data Management&lt;br /&gt;
&lt;br /&gt;
*[[Data_induction|An&amp;amp;nbsp;overview]] &lt;br /&gt;
*[[CLEX_Data_policy|CLEX&amp;amp;nbsp;Data&amp;amp;nbsp;policy]] &lt;br /&gt;
*[[Publishing_options|How to Publish Data]] &lt;br /&gt;
*[[Persistent_research_identifiers|Persistent research&amp;amp;nbsp;identifiers]] &lt;br /&gt;
*[[Publisher_policies|Journal requirements]] &lt;br /&gt;
*[[Leaving_the_Centre_guidelines|Leaving the Centre guidelines]] &lt;br /&gt;
*[[Storage|Storage]] &lt;br /&gt;
&lt;br /&gt;
[[Data|All data resources]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Models'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[ACCESS|ACCESS]] (Coupled)&lt;br /&gt;
&lt;br /&gt;
*[https://accessdev.nci.org.au/trac/wiki/GettingConnected Getting Started with ACCESS] &lt;br /&gt;
*[[ACCESS#Model_Versions|CMIP Experiments]] &lt;br /&gt;
*[[:Category:ACCESS|Other ACCESS Configurations]] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[MOM|MOM]] (Ocean)&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/COSIMA/access-om2/wiki ACCESS-OM 2] &lt;br /&gt;
*[http://cosima.org.au COSIMA] &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[Unified_Model|Unified Model]] (Atmosphere) &lt;br /&gt;
*[[Unified_Model#Getting_Started|Getting Started with the UM]] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/umdp.html UM Documentation] &lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/home MOSRS] &lt;br /&gt;
*[[Unified_Model#Supported_Experiments|Experiment Configurations]] &lt;br /&gt;
&lt;br /&gt;
| [[CABLE|CABLE]] (Land)&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[WRF|WRF]] (Atmosphere)&lt;br /&gt;
| [[NU-WRF|NU-WRF]] (Atmosphere-Land)&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[:Category:Models|Other Models]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Resources'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &lt;br /&gt;
[[Glossary|Glossary]]&lt;br /&gt;
&lt;br /&gt;
'''Tips:'''&lt;br /&gt;
&lt;br /&gt;
*[[Tips:_Custom_file_permissions_at_creation|Custom file permissions]] &lt;br /&gt;
*[[VS_Code|Getting started with VS Code]] &lt;br /&gt;
&lt;br /&gt;
'''CLEx information:'''&amp;lt;br/&amp;gt; [https://climateextremes.org.au CLEX - ARC Centre of Excellence for Climate Extremes]&lt;br /&gt;
&lt;br /&gt;
[https://twitter.com/ClimateExtremes @ClimateExtremes]&lt;br /&gt;
&lt;br /&gt;
'''Partners'''&lt;br /&gt;
&lt;br /&gt;
*[https://nci.org.au NCI - National Computational Infrastructure] &lt;br /&gt;
*[https://ardc.edu.au/ ARDC - Australian Research Data Commons] &lt;br /&gt;
*[https://www.csiro.au/en/Research/OandA CSIRO] &lt;br /&gt;
*[https://bom.gov.au Bureau of Meterology] &lt;br /&gt;
*[https://www.gfdl.noaa.gov/ GFDL - Geophysical Fluid Dynamics Laboratory] &lt;br /&gt;
*[https://www.metoffice.gov.uk/ UK Met Office] &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;p style=&amp;quot;text-align:right&amp;quot;&amp;gt;[[:Category:Contents|Contents]] | [[:Category:Admin|Admin]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Home&amp;diff=3504</id>
		<title>Home</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Home&amp;diff=3504"/>
		<updated>2022-04-27T00:53:05Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[File:CLEX-ARC-logo.png|center|800px|CLEX-ARC-logo.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
'''CLEX [[CMS|CMS]]''' is a team providing data and computational support to researchers at the ARC Centre of Excellence for Climate Extremes&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Scratch_file_expiry|&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Scratch automatic file deletion'''&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''Working from home: [[Working_from_home|some advice on how to setup]]'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''NCI project's migration: [[Migrate_experiment_projects|modifications to apply after the projects' migration]]'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Our Services'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
*[[ARCCSS_induction|Induction]] &lt;br /&gt;
*[[CMS#Our_People|Local Support]] &lt;br /&gt;
*[[FAQs|Checking the FAQs]] &lt;br /&gt;
*[[Getting_Help|Getting Help from CMS]] &lt;br /&gt;
*[[Training|Training]] &lt;br /&gt;
*[mailto:cws_help@nci.org.au Help Desk: cws_help@nci.org.au] &lt;br /&gt;
*[https://arccss.slack.com/ Slack] &lt;br /&gt;
*[[One-on-one_calls|Video meetings with CMS]] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
*[[News|News]] &lt;br /&gt;
*[https://coecms.github.io/ Blog] &lt;br /&gt;
*[https://www.youtube.com/channel/UCSmoK6oWV9O0Hmyt9UdDNsQ Youtube] &lt;br /&gt;
*[https://github.com/coecms Github] &lt;br /&gt;
*[https://anaconda.org/coecms Conda Packages] &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''NCI'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[Accounting_at_NCI|Accounting at NCI]]&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Data'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[Data_Access|Data Access]]&lt;br /&gt;
&lt;br /&gt;
*Common Datasets &lt;br /&gt;
**[[CMIP|CMIP]] &lt;br /&gt;
**[[ERA5|ERA5]] &lt;br /&gt;
**[[ERA_INTERIM|ERA Interim]]   &lt;br /&gt;
*'''[[:Category:Dataset|All Datasets]]''' &lt;br /&gt;
*[[CLEX_and_ARCCSS_data_collection|Data published by ARCCSS and CLEX]] &lt;br /&gt;
*[https://geonetwork.nci.org.au NCI Data Catalogue] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
Data Management&lt;br /&gt;
&lt;br /&gt;
*[[Data_induction|An&amp;amp;nbsp;overview]] &lt;br /&gt;
*[[CLEX_Data_policy|CLEX&amp;amp;nbsp;Data&amp;amp;nbsp;policy]] &lt;br /&gt;
*[[Publishing_options|How to Publish Data]] &lt;br /&gt;
*[[Persistent_research_identifiers|Persistent research&amp;amp;nbsp;identifiers]] &lt;br /&gt;
*[[Publisher_policies|Journal requirements]] &lt;br /&gt;
*[[Leaving_the_Centre_guidelines|Leaving the Centre guidelines]] &lt;br /&gt;
*[[Storage|Storage]] &lt;br /&gt;
&lt;br /&gt;
[[Data|All data resources]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Models'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[ACCESS|ACCESS]] (Coupled)&lt;br /&gt;
&lt;br /&gt;
*[https://accessdev.nci.org.au/trac/wiki/GettingConnected Getting Started with ACCESS] &lt;br /&gt;
*[[ACCESS#Model_Versions|CMIP Experiments]] &lt;br /&gt;
*[[:Category:ACCESS|Other ACCESS Configurations]] &lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 50%&amp;quot; | &lt;br /&gt;
[[MOM|MOM]] (Ocean)&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/COSIMA/access-om2/wiki ACCESS-OM 2] &lt;br /&gt;
*[http://cosima.org.au COSIMA] &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[Unified_Model|Unified Model]] (Atmosphere) &lt;br /&gt;
*[[Unified_Model#Getting_Started|Getting Started with the UM]] &lt;br /&gt;
*[https://code.metoffice.gov.uk/doc/um/latest/umdp.html UM Documentation] &lt;br /&gt;
*[https://code.metoffice.gov.uk/trac/home MOSRS] &lt;br /&gt;
*[[Unified_Model#Supported_Experiments|Experiment Configurations]] &lt;br /&gt;
&lt;br /&gt;
| [[CABLE|CABLE]] (Land)&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[WRF|WRF]] (Atmosphere)&lt;br /&gt;
| [[NU-WRF|NU-WRF]] (Atmosphere-Land)&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| [[:Category:Models|Other Models]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center;  background:skyblue&amp;quot; | '''Resources'''&lt;br /&gt;
|- style=&amp;quot;vertical-align:top&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &lt;br /&gt;
[[Glossary|Glossary]]&lt;br /&gt;
&lt;br /&gt;
'''Tips:'''&lt;br /&gt;
&lt;br /&gt;
*[[Tips:_Custom_file_permissions_at_creation|Custom file permissions]] &lt;br /&gt;
*[[VS_Code|Getting started with VS Code]] &lt;br /&gt;
&lt;br /&gt;
'''CLEx information:'''&amp;lt;br/&amp;gt; [https://climateextremes.org.au CLEX - ARC Centre of Excellence for Climate Extremes]&lt;br /&gt;
&lt;br /&gt;
[https://twitter.com/ClimateExtremes @ClimateExtremes]&lt;br /&gt;
&lt;br /&gt;
'''Partners'''&lt;br /&gt;
&lt;br /&gt;
*[https://nci.org.au NCI - National Computational Infrastructure] &lt;br /&gt;
*[https://ardc.edu.au/ ARDC - Australian Research Data Commons] &lt;br /&gt;
*[https://www.csiro.au/en/Research/OandA CSIRO] &lt;br /&gt;
*[https://bom.gov.au Bureau of Meterology] &lt;br /&gt;
*[https://www.gfdl.noaa.gov/ GFDL - Geophysical Fluid Dynamics Laboratory] &lt;br /&gt;
*[https://www.metoffice.gov.uk/ UK Met Office] &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;p style=&amp;quot;text-align:right&amp;quot;&amp;gt;[[:Category:Contents|Contents]] | [[:Category:Admin|Admin]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Conda&amp;diff=3503</id>
		<title>Conda</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Conda&amp;diff=3503"/>
		<updated>2022-04-27T00:30:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Conda Python Environments ==&lt;br /&gt;
&lt;br /&gt;
CMS maintain an Anaconda Python environment at NCI, with a wide variety of climate and weather related libraries.&lt;br /&gt;
&lt;br /&gt;
You can find the most recent list of libraries at our [https://github.com/coecms/conda-envs/blob/analysis3/environment.yml github repository], or run &amp;lt;code&amp;gt;conda list&amp;lt;/code&amp;gt; with an environment loaded.&lt;br /&gt;
&lt;br /&gt;
To use any of the conda environments:&lt;br /&gt;
&lt;br /&gt;
#Request access to [https://my.nci.org.au/mancini/project/hh5 hh5] (to do once) &lt;br /&gt;
#You must first run (to do at each session, a qsub job is a new session) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module use /g/data/hh5/public/modules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can safely put this in your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt; file. It can go in the &amp;lt;code&amp;gt;if in_interactive_shell; then&amp;lt;/code&amp;gt; section of the file.&lt;br /&gt;
&lt;br /&gt;
If you need to use the conda environment in a PBS job you will need to add the hh5 project to your storage flags, e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;none&amp;quot;&amp;gt;#PBS -l storage=gdata/hh5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these &amp;lt;code&amp;gt;&amp;lt;tt&amp;gt;conda&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt; environments will work on gadi login and compute nodes, and in the OOD cloud environment. They '''do not work '''on &amp;lt;code&amp;gt;accessdev&amp;lt;/code&amp;gt;, as this has a very old system version that is no longer compatible.&lt;br /&gt;
&lt;br /&gt;
=== Stable Environment ===&lt;br /&gt;
&lt;br /&gt;
We update the stable environment once a quarter, around when NCI do their quarterly maintenance of Gadi. Otherwise everything in the environment stays fixed, we don't update packages or install new packages unless something is very broken.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module load conda/analysis3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unstable Environment ===&lt;br /&gt;
&lt;br /&gt;
The unstable environment gets updated more often, as we install new packages or apply updates to existing ones. If you ask for a new package it will be installed here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module load conda/analysis3-unstable&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we do our quarterly update the unstable environment becomes the new stable environment.&lt;br /&gt;
&lt;br /&gt;
=== Removed Environments ===&lt;br /&gt;
&lt;br /&gt;
Normally after three quarters have passed old environments are removed, to reduce disk space and support burden. Conda environment.yml descriptions of past environments are available at [https://github.com/coecms/conda-history https://github.com/coecms/conda-history].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating personal environments ==&lt;br /&gt;
&lt;br /&gt;
You can create your own environment if needed, but please be cautious of both the size on disk and number of files that Conda environments can create.&lt;br /&gt;
&lt;br /&gt;
'''Make a file &amp;lt;tt&amp;gt;&amp;lt;code&amp;gt;~/.condarc&amp;lt;/code&amp;gt;&amp;lt;/tt&amp;gt;''' like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;none&amp;quot;&amp;gt;auto_activate_base: false&lt;br /&gt;
envs_dirs:&lt;br /&gt;
  - /scratch/$PROJECT/$USER/conda/envs&lt;br /&gt;
  - /g/data/hh5/public/apps/miniconda3/envs&lt;br /&gt;
pkgs_dirs:&lt;br /&gt;
  - /scratch/$PROJECT/$USER/conda/pkgs&lt;br /&gt;
conda-build:&lt;br /&gt;
  root-dir: /scratch/$PROJECT/$USER/conda/bld&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will set up Conda to create environments in /scratch, by default it puts them in your home directory which will rapidly use up your disk quota.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
'''To create the conda environment, load the conda module, then deactivate it''' with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;conda deactivate&lt;br /&gt;
conda env create ...&lt;br /&gt;
conda activate ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
'''Create an environment file: &amp;lt;tt&amp;gt;environment.yml&amp;lt;/tt&amp;gt;.''' Files on &amp;lt;tt&amp;gt;scratch&amp;lt;/tt&amp;gt; are deleted if no longer used, so this file allows you to re-create your environment if some of the files are deleted. You can use any name for the environment file. Keep it secure.&lt;br /&gt;
&amp;lt;pre&amp;gt;conda env export &amp;gt; environment.yml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To recreate the environment from the environment file:&lt;br /&gt;
&amp;lt;pre&amp;gt;conda env create -f environment.yml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Analysis / Jupyter ==&lt;br /&gt;
&lt;br /&gt;
[https://jupyter.org/ Jupyter] provides a 'notebook' interface for working with Python - you can combine Python code, text, latex equations and plots in a web interface.&lt;br /&gt;
&lt;br /&gt;
The preferred method of running Jupyter at NCI is through the ''''Open on Demand' (OOD)''' service [https://ood.nci.org.au https://ood.nci.org.au]. This runs a Jupyter instance in NCI's cloud that you can access directly from your browser. To use CLEX Conda in OOD, start Jupyter with the advanced options:&lt;br /&gt;
&lt;br /&gt;
*Module Directories: /g/data/hh5/public/modules &lt;br /&gt;
*Modules: conda/analysis3 &lt;br /&gt;
&lt;br /&gt;
The Centre has developed a script&amp;amp;nbsp;('''&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif;&amp;quot;&amp;gt;gadi_jupyter&amp;lt;/span&amp;gt;'''&amp;lt;span style=&amp;quot;font-family:Courier New,Courier,monospace;&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt; that can run Jupyter on gadi compute nodes and display the notebook interface on your local computer. These scripts are available at [https://github.com/coecms/nci_scripts https://github.com/coecms/nci_scripts], see the instructions there for usage.&lt;br /&gt;
&lt;br /&gt;
You can also run Jupyter directly on VDI, by loading the [[Conda]] environment and running 'jupyter lab'.&lt;br /&gt;
&lt;br /&gt;
Note that on Windows the Jupyter scripts must be run through a Bash terminal (From WSL or Cygwin).&lt;br /&gt;
&lt;br /&gt;
== Requesting new packages ==&lt;br /&gt;
&lt;br /&gt;
You can ask for a new package to be installed or for an existing package to be updated by emailing [mailto:cws_help@nci.org.au cws_help@nci.org.au]. Please include a link to the package documentation to your request.&lt;br /&gt;
&lt;br /&gt;
It would be appreciated if you can check the package isn't already installed before putting in a request. To do so, please load the unstable environment and use &amp;lt;code&amp;gt;conda list&amp;lt;/code&amp;gt; to list the packages included in that environment&lt;br /&gt;
&lt;br /&gt;
As a general rule we will only install packages from the [https://conda-forge.org/feedstocks/ 'conda-forge'] channel. Newly installed packages will be available in the conda/analysis3-unstable environment.&lt;br /&gt;
&lt;br /&gt;
== Update History ==&lt;br /&gt;
&lt;br /&gt;
=== 22.01 (Current Stable) ===&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://pygam.readthedocs.io/en/latest/ pygam]&amp;amp;nbsp;build&amp;amp;nbsp;Generalized Additive Models in Python &lt;br /&gt;
**[https://pyspectrum.readthedocs.io/en/latest/ spectrum]&amp;amp;nbsp;tools to estimate Power Spectral Densities based on Fourier transform, parametric methods or eigenvalues analysis   &lt;br /&gt;
*'''Climate specific''' &lt;br /&gt;
**[https://xmhw.readthedocs.io/en/latest/ xmhw]&amp;amp;nbsp;xarray compatible Marine Heatwave Detection &lt;br /&gt;
**[https://argopy.readthedocs.io/en/latest/ argopy]&amp;amp;nbsp;library dedicated to&amp;amp;nbsp;[https://argopy.readthedocs.io/en/latest/what_is_argo.html#what-is-argo Argo]&amp;amp;nbsp;data access, manipulation and visualisation for standard users as well as Argo experts. &lt;br /&gt;
**[https://www.ilamb.org/doc/ ilamb]&amp;amp;nbsp;the International Land Model Benchmarking ([http://www.ilamb.org/ ILAMB]) project is a model-data intercomparison and integration project designed to improve the performance of land models   &lt;br /&gt;
*'''Developer''' &lt;br /&gt;
**'''​​​​​​​'''[https://github.com/lidatong/dataclasses-json dataclasses-json]&amp;amp;nbsp;provides&amp;amp;nbsp;a simple API for encoding and decoding&amp;amp;nbsp;[https://docs.python.org/3/library/dataclasses.html dataclasses]&amp;amp;nbsp;to and from JSON   &lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**'''​​​​​​​'''[https://pysal.org pysal]&amp;amp;nbsp;spatial analysis library for open, cross platform geospatial data science   &lt;br /&gt;
&lt;br /&gt;
=== 21.10 (Unsupported) ===&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://github.com/josuemtzmo/xarrayMannKendall xarraymannkendall] compute linear trends over 2D and 3D arrays &lt;br /&gt;
**[https://hdbscan.readthedocs.io/en/latest/ hdbscan] tools to use unsupervised learning to find clusters, or dense regions, of a dataset   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://github.com/jannikmi/timezonefinder timezonefinder] looking up the corresponding timezone for given coordinates on earth entirely offline &lt;br /&gt;
**[https://iris-grib.readthedocs.io/en/stable/ iris-grib] converting between weather and climate datasets that are stored as GRIB files and Iris cubes &lt;br /&gt;
**[https://github.com/NCAR/intake-thredds intake-thredds] Intake interface to THREDDS data catalogs   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://lftp.yar.ru/ lftp] sophisticated file transfer program supporting a number of network protocols &lt;br /&gt;
**[https://github.com/gorakhargosh/watchdog watchdog] monitor file system events &lt;br /&gt;
**[https://github.com/ml31415/numpy-groupies numpy_groupies] Optimised tools for group-indexing operations: aggregated sum and more &lt;br /&gt;
**[https://anytree.readthedocs.io/en/latest/ anytree] Simple, lightweight and extensible Tree data structure &lt;br /&gt;
**[https://github.com/hansec/fortran-language-server fortran-language-server] Fortran implementation of the Language Server Protocol &lt;br /&gt;
**[https://jupyterbook.org/intro.html jupyter-book] building beautiful, publication-quality books and documents from computational material &lt;br /&gt;
**[https://github.com/fsspec/kerchunk kerchunk] Cloud-friendly access to archival data &lt;br /&gt;
**[https://github.com/ultrajson/ultrajson ujson] ultra fast JSON encoder and decoder   &lt;br /&gt;
&lt;br /&gt;
'''Known Issues'''&lt;br /&gt;
&lt;br /&gt;
*MetPy is incompatible with the Matplotlib version in this environment [https://github.com/Unidata/MetPy/issues/2281 https://github.com/Unidata/MetPy/issues/2281] &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.07&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to version 3.9. See what's new at [https://docs.python.org/3/whatsnew/3.9.html https://docs.python.org/3/whatsnew/3.9.html]&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://www.tensorflow.org/ tensorflow] TensorFlow is an end-to-end open source platform for machine learning &lt;br /&gt;
***Note: You may need to load the NCI modules 'cuda' and 'cudnn' to use tensorflow on GPU nodes   &lt;br /&gt;
**[https://shap.readthedocs.io/en/latest/index.html shap] a game theoretic approach to explain the output of any machine learning model   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://gcm-filters.readthedocs.io/en/latest/ gcm_filters] Diffusion-based Spatial Filtering of Gridded Data from General Circulation Models   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://docs.enthought.com/mayavi/mayavi/ mayavi] 3D scientific data visualization and plotting in Python   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://github.com/danielwhatmuff/gh gh] a tool to open Github projects in a browser from the command line   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.04&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Conda has dropped support for the old operating system version used on the Accessdev VM. It is likely that future versions of analysis3 after 21.04 will not work on Accessdev, consider setting up tasks to run on Gadi if they require the Conda environment.&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://www.cvxpy.org/ cvxpy] modeling language for convex optimization problems &lt;br /&gt;
**[https://xgboost.readthedocs.io/en/latest/index.html dask-xgboost] optimized distributed gradient boosting library &lt;br /&gt;
**[https://github.com/mmhs013/pymannkendall pymannkendall] analyze time series data for consistently increasing or decreasing trends   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://xarray-spatial.org/ xarray-spatial] common raster analysis functions   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://github.com/jbusecke/xmovie xmovie] simple way of creating beautiful movies from xarray objects   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://www.atlassian.com/git/tutorials/git-subtree git-subtree] subtree extension for Git &lt;br /&gt;
**[https://rechunker.readthedocs.io/en/latest/ rechunker] efficient and scalable manipulation of the chunk structure of chunked array formats such as Zarr and TileDB &lt;br /&gt;
**[https://github.com/spyder-ide/spyder-kernels spyder-kernels] allow conda environment to work with [https://www.spyder-ide.org/ Spyder IDE] &lt;br /&gt;
**[https://github.com/rasbt/watermark watermark] IPython magic extension for printing date and time stamps, version numbers, and hardware information   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.01&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The conda environment now uses a conda provided OpenMPI, rather than Gadi's OpenMPI module. This impacts users of mpi4py, esmf, esmpy and xesmf&lt;br /&gt;
&lt;br /&gt;
era5grib, the tool for converting NCI's ERA5 archive to GRIB format for use in UM/WRF limited area runs, now uses the NCI managed ERA5 archive in projects [https://opus.nci.org.au/display/ERA5/ERA5+Community+Home rt52 and zz93]. The new archive has global coverage, allowing limited area models to be run anywhere on the globe. The previously used CLEX archive will be removed on the 28th April to free up disk space, until this happens previous behavior can be accessed using the flag '--source CLEX'.&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics''' &lt;br /&gt;
**[https://ml.dask.org/index.html dask-ml] Scalable machine learning &lt;br /&gt;
**[https://geostat-framework.readthedocs.io/projects/pykrige/en/stable/ pykrige] Gaussian process regression toolkit &lt;br /&gt;
**[https://nctoolkit.readthedocs.io/en/latest/ nctoolkit] Toolkit for analysing NetCDF data   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[http://xarray-spatial.org/ xarray-spatial] Raster-based spatial analysis &lt;br /&gt;
**[https://pypi.org/project/Fiona/ fiona] GDAL vector API for Python   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://residentmario.github.io/geoplot/index.html geoplot] Geospatial data visualisation &lt;br /&gt;
**[https://python-visualization.github.io/folium/ folium] Leaflet webpage map manipulation &lt;br /&gt;
**[https://github.com/jwass/mplleaflet mplleaflet] Use matplotlib on Leaflet webpage maps   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://mamba.readthedocs.io/en/latest/ mamba] Faster conda environment setup &lt;br /&gt;
**[https://github.com/psf/black black] Python code formatter &lt;br /&gt;
**[https://intake-esm.readthedocs.io/en/latest/ intake-esm] Data cataloguing tool   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.10 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to 3.8 ([https://docs.python.org/3.8/whatsnew/3.8.html changes])&lt;br /&gt;
&lt;br /&gt;
There are a small number of packages in analysis3-20.07 that are not compatible with 3.8, these have been disabled until we can get them working&lt;br /&gt;
&lt;br /&gt;
*pynio ([https://github.com/conda-forge/pynio-feedstock/issues/90 https://github.com/conda-forge/pynio-feedstock/issues/90]) &lt;br /&gt;
*&amp;lt;s&amp;gt;cf_units&amp;lt;/s&amp;gt; (was renamed to 'cf-units') &lt;br /&gt;
*&amp;lt;s&amp;gt;pymunge&amp;lt;/s&amp;gt; (fixed) &lt;br /&gt;
*&amp;lt;s&amp;gt;ants&amp;lt;/s&amp;gt; (fixed) &lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/corteva/rioxarray rioxarray] geospatial xarray extension powered by rasterio &lt;br /&gt;
*[https://github.com/cupy/cupy cupy] CUDA accellerated numpy &lt;br /&gt;
*[https://github.com/jwkvam/celluloid celluloid] simplified animations with matplotlib &lt;br /&gt;
*[https://pythonhosted.org/rasterstats/ rasterstats] summarizing geospatial raster datasets based on vector geometries &lt;br /&gt;
*[https://github.com/python-windrose/windrose windrose] manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution &lt;br /&gt;
*[https://pyam-iamc.readthedocs.io/en/stable/ pyam] analysis and visualization of integrated-assessment scenarios &lt;br /&gt;
*[https://github.com/apache/arrow pyarrow] a cross-language development platform for in-memory data &lt;br /&gt;
*[https://github.com/jdowner/gist python-gist] a command line interface for working with github gists &lt;br /&gt;
*[https://sourceforge.net/projects/mcmc-jags/ jags] statistical analysis of Bayesian hierarchical models by Markov Chain Monte Carlo &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.07 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://xesmf.readthedocs.io/en/latest/ xesmf] - regrids xarray data (NOTE: uses Gadi's ESMF install, won't work on VDI) &lt;br /&gt;
*[http://sharp.weather.ou.edu/dev/ sharppy] - sounding and holograph analysis &lt;br /&gt;
*[https://earthpy.readthedocs.io/en/latest/ earthpy] - spatial raster and vector tools (e.g. rasterise shapefiles) &lt;br /&gt;
*[https://pypi.org/project/descartes/ descartes] - plot shapefiles &lt;br /&gt;
*[https://github.com/coecms/era5grib era5grib] - convert data from NCI ERA5 archive to GRIB for use in WRF/UM (beta tool) &lt;br /&gt;
*[https://xmitgcm.readthedocs.io xmitgcm] - read mitgcm binary output &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.04 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Cartopy NaturalEarth source data has been centrally installed, so coastlines etc. can be drawn on compute nodes&lt;br /&gt;
&lt;br /&gt;
Clef has been updated to 1.0, can now find ACCESS model CMIP6 data published by NCI&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*geopy: Locate lat/lon coordinates of places &lt;br /&gt;
*ninja: mom6 build system &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.01 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to 3.7&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*xlrd: Read excel files &lt;br /&gt;
*ants: Unified Model Ancillary tools &lt;br /&gt;
*climtas: Dask-aware Xarray timeseries processing &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.10 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
basemap has been removed as it is [https://matplotlib.org/basemap/users/intro.html#deprecation-notice no longer supported] and caused conflicts with other packages&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*addmeta &lt;br /&gt;
*[http://holoviews.org/ holoviews]: Fancy plots &lt;br /&gt;
*[https://jiffyclub.github.io/palettable/ palettable]: Matplotlib colour palettes &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.07 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*pyferret &lt;br /&gt;
*pyngl &lt;br /&gt;
*pynio &lt;br /&gt;
*xgcm &lt;br /&gt;
*xrft &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.04 (unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable Changes'''&lt;br /&gt;
&lt;br /&gt;
*arccssive has been renamed to clef &lt;br /&gt;
*A bug preventing Iris from opening UM files without a date has been fixed &lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/kwgoodman/bottleneck bottleneck] Fast rolling operations &lt;br /&gt;
*[https://github.com/ecmwf/cfgrib cfgrib] CF metadata for GRIB files &lt;br /&gt;
*[https://github.com/SciTools/cf-units cfunits] Convert between CF units &lt;br /&gt;
*[https://github.com/shoyer/h5netcdf h5netcdf] Pythonic interface to netCDF4 via h5py &lt;br /&gt;
*[https://github.com/intake/intake intake] Lightweight data catalogues &lt;br /&gt;
*[https://gitlab.com/remikz/nccmp/ nccmp] Compare netcdf files &lt;br /&gt;
*[https://github.com/pydata/sparse sparse] Sparse multi-dimensional arrays &lt;br /&gt;
&lt;br /&gt;
[[Category:NCI]] [[Category:Python]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Conda&amp;diff=3502</id>
		<title>Conda</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Conda&amp;diff=3502"/>
		<updated>2022-04-27T00:28:29Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Conda Python Environments ==&lt;br /&gt;
&lt;br /&gt;
CMS maintain an Anaconda Python environment at NCI, with a wide variety of climate and weather related libraries.&lt;br /&gt;
&lt;br /&gt;
You can find the most recent list of libraries at our [https://github.com/coecms/conda-envs/blob/analysis3/environment.yml github repository], or run &amp;lt;code&amp;gt;conda list&amp;lt;/code&amp;gt; with an environment loaded.&lt;br /&gt;
&lt;br /&gt;
To use any of the conda environments:&lt;br /&gt;
&lt;br /&gt;
#Request access to [https://my.nci.org.au/mancini/project/hh5 hh5] (to do once) &lt;br /&gt;
#You must first run (to do at each session, a qsub job is a new session) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module use /g/data/hh5/public/modules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can safely put this in your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt; file. It can go in the &amp;lt;code&amp;gt;if in_interactive_shell; then&amp;lt;/code&amp;gt; section of the file.&lt;br /&gt;
&lt;br /&gt;
If you need to use the conda environment in a PBS job you will need to add the hh5 project to your storage flags, e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;none&amp;quot;&amp;gt;#PBS -l storage=gdata/hh5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these &amp;lt;code&amp;gt;&amp;lt;tt&amp;gt;conda&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt; environments will work on gadi login and compute nodes, and in the OOD cloud environment. They '''do not work '''on &amp;lt;code&amp;gt;accessdev&amp;lt;/code&amp;gt;, as this has a very old system version that is no longer compatible.&lt;br /&gt;
&lt;br /&gt;
=== Stable Environment ===&lt;br /&gt;
&lt;br /&gt;
We update the stable environment once a quarter, around when NCI do their quarterly maintenance of Gadi. Otherwise everything in the environment stays fixed, we don't update packages or install new packages unless something is very broken.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module load conda/analysis3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unstable Environment ===&lt;br /&gt;
&lt;br /&gt;
The unstable environment gets updated more often, as we install new packages or apply updates to existing ones. If you ask for a new package it will be installed here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;module load conda/analysis3-unstable&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we do our quarterly update the unstable environment becomes the new stable environment.&lt;br /&gt;
&lt;br /&gt;
=== Removed Environments ===&lt;br /&gt;
&lt;br /&gt;
Normally after three quarters have passed old environments are removed, to reduce disk space and support burden. Conda environment.yml descriptions of past environments are available at [https://github.com/coecms/conda-history https://github.com/coecms/conda-history].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating personal environments ==&lt;br /&gt;
&lt;br /&gt;
You can create your own environment if needed, but please be cautious of both the size on disk and number of files that Conda environments can create.&lt;br /&gt;
&lt;br /&gt;
'''Make a file &amp;lt;code&amp;gt;~/.condarc&amp;lt;/code&amp;gt;''' like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;none&amp;quot;&amp;gt;auto_activate_base: false&lt;br /&gt;
envs_dirs:&lt;br /&gt;
  - /scratch/$PROJECT/$USER/conda/envs&lt;br /&gt;
  - /g/data/hh5/public/apps/miniconda3/envs&lt;br /&gt;
pkgs_dirs:&lt;br /&gt;
  - /scratch/$PROJECT/$USER/conda/pkgs&lt;br /&gt;
conda-build:&lt;br /&gt;
  root-dir: /scratch/$PROJECT/$USER/conda/bld&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will set up Conda to create environments in /scratch, by default it puts them in your home directory which will rapidly use up your disk quota.&lt;br /&gt;
&lt;br /&gt;
'''To create the conda environment, load the conda module, then deactivate it''' with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;conda deactivate&lt;br /&gt;
conda env create ...&lt;br /&gt;
conda activate ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create an environment file: &amp;lt;tt&amp;gt;environment.yml&amp;lt;/tt&amp;gt;.''' Files on &amp;lt;tt&amp;gt;scratch&amp;lt;/tt&amp;gt; are deleted if no longer used, so this file allows you to re-create your environment if some of the files are deleted. You can use any name for the environment file. Keep it secure.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;conda&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;env&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;o&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;environment&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;o&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;yml&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To recreate the environment from the environment file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;conda&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;env&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;create&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;o&amp;quot;&amp;gt;-&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;f&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;environment&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;o&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;yml&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Analysis / Jupyter ==&lt;br /&gt;
&lt;br /&gt;
[https://jupyter.org/ Jupyter] provides a 'notebook' interface for working with Python - you can combine Python code, text, latex equations and plots in a web interface.&lt;br /&gt;
&lt;br /&gt;
The preferred method of running Jupyter at NCI is through the ''''Open on Demand' (OOD)''' service [https://ood.nci.org.au https://ood.nci.org.au]. This runs a Jupyter instance in NCI's cloud that you can access directly from your browser. To use CLEX Conda in OOD, start Jupyter with the advanced options:&lt;br /&gt;
&lt;br /&gt;
*Module Directories: /g/data/hh5/public/modules &lt;br /&gt;
*Modules: conda/analysis3 &lt;br /&gt;
&lt;br /&gt;
The Centre has developed a script&amp;amp;nbsp;('''&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif;&amp;quot;&amp;gt;gadi_jupyter&amp;lt;/span&amp;gt;'''&amp;lt;span style=&amp;quot;font-family:Courier New,Courier,monospace;&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt; that can run Jupyter on gadi compute nodes and display the notebook interface on your local computer. These scripts are available at [https://github.com/coecms/nci_scripts https://github.com/coecms/nci_scripts], see the instructions there for usage.&lt;br /&gt;
&lt;br /&gt;
You can also run Jupyter directly on VDI, by loading the [[Conda]] environment and running 'jupyter lab'.&lt;br /&gt;
&lt;br /&gt;
Note that on Windows the Jupyter scripts must be run through a Bash terminal (From WSL or Cygwin).&lt;br /&gt;
&lt;br /&gt;
== Requesting new packages ==&lt;br /&gt;
&lt;br /&gt;
You can ask for a new package to be installed or for an existing package to be updated by emailing [mailto:cws_help@nci.org.au cws_help@nci.org.au]. Please include a link to the package documentation to your request.&lt;br /&gt;
&lt;br /&gt;
It would be appreciated if you can check the package isn't already installed before putting in a request. To do so, please load the unstable environment and use &amp;lt;code&amp;gt;conda list&amp;lt;/code&amp;gt; to list the packages included in that environment&lt;br /&gt;
&lt;br /&gt;
As a general rule we will only install packages from the [https://conda-forge.org/feedstocks/ 'conda-forge'] channel. Newly installed packages will be available in the conda/analysis3-unstable environment.&lt;br /&gt;
&lt;br /&gt;
== Update History ==&lt;br /&gt;
&lt;br /&gt;
=== 22.01 (Current Stable) ===&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://pygam.readthedocs.io/en/latest/ pygam]&amp;amp;nbsp;build&amp;amp;nbsp;Generalized Additive Models in Python &lt;br /&gt;
**[https://pyspectrum.readthedocs.io/en/latest/ spectrum]&amp;amp;nbsp;tools to estimate Power Spectral Densities based on Fourier transform, parametric methods or eigenvalues analysis   &lt;br /&gt;
*'''Climate specific''' &lt;br /&gt;
**[https://xmhw.readthedocs.io/en/latest/ xmhw]&amp;amp;nbsp;xarray compatible Marine Heatwave Detection &lt;br /&gt;
**[https://argopy.readthedocs.io/en/latest/ argopy]&amp;amp;nbsp;library dedicated to&amp;amp;nbsp;[https://argopy.readthedocs.io/en/latest/what_is_argo.html#what-is-argo Argo]&amp;amp;nbsp;data access, manipulation and visualisation for standard users as well as Argo experts. &lt;br /&gt;
**[https://www.ilamb.org/doc/ ilamb]&amp;amp;nbsp;the International Land Model Benchmarking ([http://www.ilamb.org/ ILAMB]) project is a model-data intercomparison and integration project designed to improve the performance of land models   &lt;br /&gt;
*'''Developer''' &lt;br /&gt;
**'''​​​​​​​'''[https://github.com/lidatong/dataclasses-json dataclasses-json]&amp;amp;nbsp;provides&amp;amp;nbsp;a simple API for encoding and decoding&amp;amp;nbsp;[https://docs.python.org/3/library/dataclasses.html dataclasses]&amp;amp;nbsp;to and from JSON   &lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**'''​​​​​​​'''[https://pysal.org pysal]&amp;amp;nbsp;spatial analysis library for open, cross platform geospatial data science   &lt;br /&gt;
&lt;br /&gt;
=== 21.10 (Unsupported) ===&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://github.com/josuemtzmo/xarrayMannKendall xarraymannkendall] compute linear trends over 2D and 3D arrays &lt;br /&gt;
**[https://hdbscan.readthedocs.io/en/latest/ hdbscan] tools to use unsupervised learning to find clusters, or dense regions, of a dataset   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://github.com/jannikmi/timezonefinder timezonefinder] looking up the corresponding timezone for given coordinates on earth entirely offline &lt;br /&gt;
**[https://iris-grib.readthedocs.io/en/stable/ iris-grib] converting between weather and climate datasets that are stored as GRIB files and Iris cubes &lt;br /&gt;
**[https://github.com/NCAR/intake-thredds intake-thredds] Intake interface to THREDDS data catalogs   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://lftp.yar.ru/ lftp] sophisticated file transfer program supporting a number of network protocols &lt;br /&gt;
**[https://github.com/gorakhargosh/watchdog watchdog] monitor file system events &lt;br /&gt;
**[https://github.com/ml31415/numpy-groupies numpy_groupies] Optimised tools for group-indexing operations: aggregated sum and more &lt;br /&gt;
**[https://anytree.readthedocs.io/en/latest/ anytree] Simple, lightweight and extensible Tree data structure &lt;br /&gt;
**[https://github.com/hansec/fortran-language-server fortran-language-server] Fortran implementation of the Language Server Protocol &lt;br /&gt;
**[https://jupyterbook.org/intro.html jupyter-book] building beautiful, publication-quality books and documents from computational material &lt;br /&gt;
**[https://github.com/fsspec/kerchunk kerchunk] Cloud-friendly access to archival data &lt;br /&gt;
**[https://github.com/ultrajson/ultrajson ujson] ultra fast JSON encoder and decoder   &lt;br /&gt;
&lt;br /&gt;
'''Known Issues'''&lt;br /&gt;
&lt;br /&gt;
*MetPy is incompatible with the Matplotlib version in this environment [https://github.com/Unidata/MetPy/issues/2281 https://github.com/Unidata/MetPy/issues/2281] &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.07&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to version 3.9. See what's new at [https://docs.python.org/3/whatsnew/3.9.html https://docs.python.org/3/whatsnew/3.9.html]&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://www.tensorflow.org/ tensorflow] TensorFlow is an end-to-end open source platform for machine learning &lt;br /&gt;
***Note: You may need to load the NCI modules 'cuda' and 'cudnn' to use tensorflow on GPU nodes   &lt;br /&gt;
**[https://shap.readthedocs.io/en/latest/index.html shap] a game theoretic approach to explain the output of any machine learning model   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://gcm-filters.readthedocs.io/en/latest/ gcm_filters] Diffusion-based Spatial Filtering of Gridded Data from General Circulation Models   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://docs.enthought.com/mayavi/mayavi/ mayavi] 3D scientific data visualization and plotting in Python   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://github.com/danielwhatmuff/gh gh] a tool to open Github projects in a browser from the command line   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.04&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Conda has dropped support for the old operating system version used on the Accessdev VM. It is likely that future versions of analysis3 after 21.04 will not work on Accessdev, consider setting up tasks to run on Gadi if they require the Conda environment.&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics/ML''' &lt;br /&gt;
**[https://www.cvxpy.org/ cvxpy] modeling language for convex optimization problems &lt;br /&gt;
**[https://xgboost.readthedocs.io/en/latest/index.html dask-xgboost] optimized distributed gradient boosting library &lt;br /&gt;
**[https://github.com/mmhs013/pymannkendall pymannkendall] analyze time series data for consistently increasing or decreasing trends   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[https://xarray-spatial.org/ xarray-spatial] common raster analysis functions   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://github.com/jbusecke/xmovie xmovie] simple way of creating beautiful movies from xarray objects   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://www.atlassian.com/git/tutorials/git-subtree git-subtree] subtree extension for Git &lt;br /&gt;
**[https://rechunker.readthedocs.io/en/latest/ rechunker] efficient and scalable manipulation of the chunk structure of chunked array formats such as Zarr and TileDB &lt;br /&gt;
**[https://github.com/spyder-ide/spyder-kernels spyder-kernels] allow conda environment to work with [https://www.spyder-ide.org/ Spyder IDE] &lt;br /&gt;
**[https://github.com/rasbt/watermark watermark] IPython magic extension for printing date and time stamps, version numbers, and hardware information   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;21.01&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The conda environment now uses a conda provided OpenMPI, rather than Gadi's OpenMPI module. This impacts users of mpi4py, esmf, esmpy and xesmf&lt;br /&gt;
&lt;br /&gt;
era5grib, the tool for converting NCI's ERA5 archive to GRIB format for use in UM/WRF limited area runs, now uses the NCI managed ERA5 archive in projects [https://opus.nci.org.au/display/ERA5/ERA5+Community+Home rt52 and zz93]. The new archive has global coverage, allowing limited area models to be run anywhere on the globe. The previously used CLEX archive will be removed on the 28th April to free up disk space, until this happens previous behavior can be accessed using the flag '--source CLEX'.&lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*'''Statistics''' &lt;br /&gt;
**[https://ml.dask.org/index.html dask-ml] Scalable machine learning &lt;br /&gt;
**[https://geostat-framework.readthedocs.io/projects/pykrige/en/stable/ pykrige] Gaussian process regression toolkit &lt;br /&gt;
**[https://nctoolkit.readthedocs.io/en/latest/ nctoolkit] Toolkit for analysing NetCDF data   &lt;br /&gt;
&lt;br /&gt;
*'''Geospatial''' &lt;br /&gt;
**[http://xarray-spatial.org/ xarray-spatial] Raster-based spatial analysis &lt;br /&gt;
**[https://pypi.org/project/Fiona/ fiona] GDAL vector API for Python   &lt;br /&gt;
&lt;br /&gt;
*'''Visualisation''' &lt;br /&gt;
**[https://residentmario.github.io/geoplot/index.html geoplot] Geospatial data visualisation &lt;br /&gt;
**[https://python-visualization.github.io/folium/ folium] Leaflet webpage map manipulation &lt;br /&gt;
**[https://github.com/jwass/mplleaflet mplleaflet] Use matplotlib on Leaflet webpage maps   &lt;br /&gt;
&lt;br /&gt;
*'''Developer Tools''' &lt;br /&gt;
**[https://mamba.readthedocs.io/en/latest/ mamba] Faster conda environment setup &lt;br /&gt;
**[https://github.com/psf/black black] Python code formatter &lt;br /&gt;
**[https://intake-esm.readthedocs.io/en/latest/ intake-esm] Data cataloguing tool   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.10 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to 3.8 ([https://docs.python.org/3.8/whatsnew/3.8.html changes])&lt;br /&gt;
&lt;br /&gt;
There are a small number of packages in analysis3-20.07 that are not compatible with 3.8, these have been disabled until we can get them working&lt;br /&gt;
&lt;br /&gt;
*pynio ([https://github.com/conda-forge/pynio-feedstock/issues/90 https://github.com/conda-forge/pynio-feedstock/issues/90]) &lt;br /&gt;
*&amp;lt;s&amp;gt;cf_units&amp;lt;/s&amp;gt; (was renamed to 'cf-units') &lt;br /&gt;
*&amp;lt;s&amp;gt;pymunge&amp;lt;/s&amp;gt; (fixed) &lt;br /&gt;
*&amp;lt;s&amp;gt;ants&amp;lt;/s&amp;gt; (fixed) &lt;br /&gt;
&lt;br /&gt;
'''Notable new packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/corteva/rioxarray rioxarray] geospatial xarray extension powered by rasterio &lt;br /&gt;
*[https://github.com/cupy/cupy cupy] CUDA accellerated numpy &lt;br /&gt;
*[https://github.com/jwkvam/celluloid celluloid] simplified animations with matplotlib &lt;br /&gt;
*[https://pythonhosted.org/rasterstats/ rasterstats] summarizing geospatial raster datasets based on vector geometries &lt;br /&gt;
*[https://github.com/python-windrose/windrose windrose] manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution &lt;br /&gt;
*[https://pyam-iamc.readthedocs.io/en/stable/ pyam] analysis and visualization of integrated-assessment scenarios &lt;br /&gt;
*[https://github.com/apache/arrow pyarrow] a cross-language development platform for in-memory data &lt;br /&gt;
*[https://github.com/jdowner/gist python-gist] a command line interface for working with github gists &lt;br /&gt;
*[https://sourceforge.net/projects/mcmc-jags/ jags] statistical analysis of Bayesian hierarchical models by Markov Chain Monte Carlo &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.07 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://xesmf.readthedocs.io/en/latest/ xesmf] - regrids xarray data (NOTE: uses Gadi's ESMF install, won't work on VDI) &lt;br /&gt;
*[http://sharp.weather.ou.edu/dev/ sharppy] - sounding and holograph analysis &lt;br /&gt;
*[https://earthpy.readthedocs.io/en/latest/ earthpy] - spatial raster and vector tools (e.g. rasterise shapefiles) &lt;br /&gt;
*[https://pypi.org/project/descartes/ descartes] - plot shapefiles &lt;br /&gt;
*[https://github.com/coecms/era5grib era5grib] - convert data from NCI ERA5 archive to GRIB for use in WRF/UM (beta tool) &lt;br /&gt;
*[https://xmitgcm.readthedocs.io xmitgcm] - read mitgcm binary output &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.04 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Cartopy NaturalEarth source data has been centrally installed, so coastlines etc. can be drawn on compute nodes&lt;br /&gt;
&lt;br /&gt;
Clef has been updated to 1.0, can now find ACCESS model CMIP6 data published by NCI&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*geopy: Locate lat/lon coordinates of places &lt;br /&gt;
*ninja: mom6 build system &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;20.01 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Python has been updated to 3.7&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*xlrd: Read excel files &lt;br /&gt;
*ants: Unified Model Ancillary tools &lt;br /&gt;
*climtas: Dask-aware Xarray timeseries processing &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.10 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
basemap has been removed as it is [https://matplotlib.org/basemap/users/intro.html#deprecation-notice no longer supported] and caused conflicts with other packages&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*addmeta &lt;br /&gt;
*[http://holoviews.org/ holoviews]: Fancy plots &lt;br /&gt;
*[https://jiffyclub.github.io/palettable/ palettable]: Matplotlib colour palettes &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.07 (Unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*pyferret &lt;br /&gt;
*pyngl &lt;br /&gt;
*pynio &lt;br /&gt;
*xgcm &lt;br /&gt;
*xrft &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;19.04 (unsupported)&amp;lt;/s&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Notable Changes'''&lt;br /&gt;
&lt;br /&gt;
*arccssive has been renamed to clef &lt;br /&gt;
*A bug preventing Iris from opening UM files without a date has been fixed &lt;br /&gt;
&lt;br /&gt;
'''Notable New Packages'''&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/kwgoodman/bottleneck bottleneck] Fast rolling operations &lt;br /&gt;
*[https://github.com/ecmwf/cfgrib cfgrib] CF metadata for GRIB files &lt;br /&gt;
*[https://github.com/SciTools/cf-units cfunits] Convert between CF units &lt;br /&gt;
*[https://github.com/shoyer/h5netcdf h5netcdf] Pythonic interface to netCDF4 via h5py &lt;br /&gt;
*[https://github.com/intake/intake intake] Lightweight data catalogues &lt;br /&gt;
*[https://gitlab.com/remikz/nccmp/ nccmp] Compare netcdf files &lt;br /&gt;
*[https://github.com/pydata/sparse sparse] Sparse multi-dimensional arrays &lt;br /&gt;
&lt;br /&gt;
[[Category:NCI]] [[Category:Python]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3501</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3501"/>
		<updated>2022-04-26T23:40:58Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''On 17th May 2022''', NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward.&lt;br /&gt;
&lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*[https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 '''Read''' '''the information'''] provided by NCI &lt;br /&gt;
*'''Clean up /g/data''': delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*'''Clean up /scratch''': delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt'''” for all the projects you are a member. &lt;br /&gt;
*'''Check the output''' of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “'''nci-file-expiry list-warnings'''”&amp;amp;nbsp;: this will catch any file you own in any project you may have forgotten about and decide what to do with anything that appear there. &lt;br /&gt;
*'''Rethink your data pipeline''': do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*'''Manage your data under /g/data regularly''': review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3500</id>
		<title>Scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Scratch_file_expiry&amp;diff=3500"/>
		<updated>2022-04-26T07:00:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: Created page with &amp;quot;On 17th May 2022, NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for tha...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On 17th May 2022, NCI is introducing an automatic system to purge unused data from the scratch filesystem. &amp;amp;nbsp; Below we are giving some steps on how best to prepare for that change. We also give some information on some useful tools to prepare a good data workflow going forward. &lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to start preparing now to avoid having any useful data going into quarantine on the 17th May. Below are the steps we recommend you to follow:&lt;br /&gt;
&lt;br /&gt;
*Read the information provided by NCI: [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436] &lt;br /&gt;
*Clean up /g/data: delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*Clean up /scratch: delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt” for all the projects you are a member. &lt;br /&gt;
*Check the output of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “nci-file-expiry list-warnings” : this will catch any file you own in any project you may have forgotten about. &lt;br /&gt;
*Check the output of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Rethink your data pipeline: do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*Manage your data under /g/data regularly: review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
&lt;br /&gt;
Below is a list of resources you might find useful to prepare for the automatic file expiry and build a good data workflow for the future.&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving data at NCI]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on building a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of the various filesystems at NCI]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=/scratch_file_expiry&amp;diff=3499</id>
		<title>/scratch file expiry</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=/scratch_file_expiry&amp;diff=3499"/>
		<updated>2022-04-26T06:52:21Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: Created page with &amp;quot;On 17th May 2022, NCI is introducing an automatic process to delete files from /scratch that have not been accessed in a long time. &amp;amp;nbsp; In preparation for this, we share he...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On 17th May 2022, NCI is introducing an automatic process to delete files from /scratch that have not been accessed in a long time. &amp;amp;nbsp; In preparation for this, we share here some relevant information. &lt;br /&gt;
= Preparation =&lt;br /&gt;
&lt;br /&gt;
Your best course of action is to prepare before the 17th May so you avoid files you want to keep being placed into quarantine. Below are steps we recommend for you to take:&lt;br /&gt;
&lt;br /&gt;
*Read the information provided by NCI: [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436] &lt;br /&gt;
*Clean up /g/data: delete what you can, archive to tape or outside NCI what you can. &lt;br /&gt;
*Clean up /scratch: delete what you can, move to /g/data or tape or outside NCI if you need long term storage without accessing it. &lt;br /&gt;
*Run “nci-file-expiry list-warnings -p &amp;lt;project&amp;gt; &amp;gt; expiry_warning_&amp;lt;project&amp;gt;.txt” for all the projects you are a member. &lt;br /&gt;
*Check the output of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Run “nci-file-expiry list-warnings” : this will catch any file you own in any project you may have forgotten about. &lt;br /&gt;
*Check the output of nci-file-expiry. If you identify anything here that is important and at risk of deletion, decide if it should be put on /g/data or tape instead. &lt;br /&gt;
*Rethink your data pipeline: do not leave data you are not using anymore in /scratch. Decide what you need to do with it when you stop using it: delete, move to /g/data or outside NCI or archive to tape. &lt;br /&gt;
*Manage your data under /g/data regularly: review your data, archive to tape or outside NCI as necessary. &lt;br /&gt;
&lt;br /&gt;
= Additional resources =&lt;br /&gt;
&lt;br /&gt;
[[Archiving_data|Archiving]]&lt;br /&gt;
&lt;br /&gt;
[https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html Blog on creating a sustainable data workflow]&lt;br /&gt;
&lt;br /&gt;
[[Storage|Description of filesystems at NCI]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3498</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3498"/>
		<updated>2022-04-26T06:38:45Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project. We have [https://climate-cms.org/posts/2022-04-26-storage-where-what-why-how.html a blog post] that can help with identifying the right questions and strategies for your data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3497</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3497"/>
		<updated>2022-04-26T02:08:33Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;See our [[Archiving_data|Archiving Data]] page for more details. Below are a few rules and pointers which are important to know before starting any work.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. Here is [https://docs.google.com/document/d/1do9dtyzTQ5VY3yFC6YEj-fhAW7OnkA5jFzol1vjRu4w/edit?usp=sharing a cheat sheet] for tar. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards.&amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_use_MDSS_tape_storage_at_NCI&amp;diff=3496</id>
		<title>How to use MDSS tape storage at NCI</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_use_MDSS_tape_storage_at_NCI&amp;diff=3496"/>
		<updated>2022-04-26T01:58:28Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;All universities have their own archives where you can store your data, for more information contact your Library or IT department. Here we will focus on archiving data using the NCI archive storage, for all cases where using a university archive is not applicable.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Massdata (Mass Data Storage System, MDSS for short) is the tape storage available at NCI. This kind of storage is intended for long term archiving of large files. Each project has a directory on the MDSS, the amount of storage allocated depends on the project allocation.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;MDSS proper usage&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;MDSS is designed for medium to long-term archive of large files, this means it is optimised for storing big amounts&amp;amp;nbsp;of data, but not for retrieving this data frequently. This means it is most suitable for:&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Files you are required to keep for a long term, like data underlining published datasets, publications, PhD thesis etc.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Files that&amp;amp;nbsp;you or someone else are likely to reuse or analyse again in the future but not in the next few months. For example, restart files or other model output you are not immediately using should be moved from disk to massdata&amp;amp;nbsp;as soon as possible.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;MDSS is suitable for&amp;amp;nbsp;backup of big data projects, like model output which could not be backed up elsewhere.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Preparing your data for mdss&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Organise your files and delete anything which you will not&amp;amp;nbsp;be re-using. Do not transfer data before organising it. It is difficult to get a&amp;amp;nbsp;list&amp;amp;nbsp;of what is stored on massdata,&amp;amp;nbsp;let alone to list what is in a tarred file once it is uploaded.&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Big files: use tools like &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to bundle files together into archive files. Create reasonably big archive files but also think of how you might want to access the data later. There is no point of tarring together two different simulations if you would want to access them separately, as then you would need to transferred back a big amount of data you do not need.&amp;amp;nbsp;Your upload will fail if any of your files are less than 20MB or the average size is less than 250 MB.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
#&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Files should be group readable, with group execute permissions for directories. This helps with long term maintenance, allowing administrators to track the type and size of archived data. You can change the permissions on data you own with the &amp;lt;tt&amp;gt;chmod&amp;lt;/tt&amp;gt; unix utility.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;While you are preparing your data to be moved it is an opportunity to also document it, if you have not done so already. You should document what you are archiving and how you are archiving it. Even a simple readme file added to your main directory can help others and your future self. If you are archiving data underlining a publication or published dataset then it is important to have a summary of what is stored in /massdata. This is part of the [[Data_Management_Plan|dataset management plan]] and/or [[Data_Availability_Statement|data availiability statement]].&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Useful tools:&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;[[TAR_guidelines|TAR- to create archives]] cheatsheet&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;[[NetCDF_Compression_Tools|Compressing tools]]&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Accessing MDSS&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Massdata cannot be accessed directly via a directory path. All access of MDSS is via the command '''&amp;lt;tt&amp;gt;mdss&amp;lt;/tt&amp;gt;.'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Users connected to the project have read, write and execute permissions in the corresponding&amp;amp;nbsp;directory on mdss and so may create their own files in it.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;mdss&amp;lt;/tt&amp;gt; has several sub-commands and options to see all of them use either:&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;  $mdss --help&lt;br /&gt;
or&lt;br /&gt;
  $man mdss&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;If you don't specify a project, it will use your default project. Then you add a sub-command and the path of the files and directories you want to upload, list etc.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;mdss -P &amp;lt;project-id&amp;gt; + &amp;lt;sub-command&amp;gt; + &amp;lt;path&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Most useful sub-commands are:&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;mdss put   - upload files &lt;br /&gt;
mdss get   - retrieve files &lt;br /&gt;
mdss ls    - list directories and files &lt;br /&gt;
mdss dmdu  - get the size of a directory/file &lt;br /&gt;
mdss dmls  - show what is on cache and what is on tape&lt;br /&gt;
&lt;br /&gt;
NB &amp;quot;mdss du&amp;quot; will also work but only return the size of what is still cached, dmdu will give the full size of what is on tape regardless if it is cached or not.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Please note &amp;lt;tt&amp;gt;mdss&amp;lt;/tt&amp;gt; sub-commands work only interactively or on the &amp;lt;tt&amp;gt;copyq &amp;lt;/tt&amp;gt;queue. To use it on &amp;lt;tt&amp;gt;copyq&amp;lt;/tt&amp;gt; remember to set the storage flag as&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;-l storage=massdata/&amp;lt;project_code&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Monitoring MDSS&amp;amp;nbsp;usage&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Unfortunately, there is no command to check the usage by user-id as for /g/data and /scratch. The only way to get this information currently is to ask help&amp;lt;at&amp;gt;nci.org.au. The NCI administrators can access this information for any CI of the group.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Transferring data to and from MDSS&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;NCI also supports the &amp;lt;tt&amp;gt;netmv&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;netcp&amp;lt;/tt&amp;gt; commands to work with MDSS. These commands create a copyq job to transfer multiple files. Files can be automatically tarred and compressed as part of the copy process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;'''Warning: The automatic archiving and compression of these tools can use a lot of storage on /scratch if you're moving lots of data!'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;For more info run `man netmv`&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;The CMS team has also developed a utility called [https://github.com/coecms/mdssdiff mdssdiff] available from [[Conda|our conda environments]]. This utility allows users to compare the contents of the local directory and a directory under /massdata. It will also recursively update the content on the massdata directory to copy the local directory or vice versa.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Modifications to MDSS datasets&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:Arial,Helvetica,sans-serif&amp;quot;&amp;gt;Ask the Lead CI of the project to contact NCI at help@nci.org.au if large metadata operations are needed on massdata, such as changing ownership, project code, permissions etc. of existing datasets&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NCI Guidelines]] [[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3495</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3495"/>
		<updated>2022-04-26T01:42:49Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [http://climate-cms.wikis.unsw.edu.au/Storage#Temporary_storage temporary storage] or your University system. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards: see the [https://drive.google.com/drive/folders/0B1KncyYETiZqNGdHZ0VZSk02cUE 2017 training material] for usage of these commands and acls and tar cheat sheets. For more details see [[Archiving_data|Archiving Data]] &amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3494</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3494"/>
		<updated>2022-04-26T00:56:16Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on Gadi that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nccompress (recommended)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; package is available on Gadi in the [[Conda|CMS conda environment]]. At present it consists of four python programs, &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt;, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. Its two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
The convenience utility &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt; is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nco&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;cdo&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;netcdf&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is &amp;lt;tt&amp;gt;[https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; can compress files and define the chunking using a command line argument (-c). &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
= Identifying files to be compressed =&lt;br /&gt;
&lt;br /&gt;
The Unix utility &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; is installed by default on any Unix operating system. It is used to find files on a filesystem. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you might not be able to use the &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility easily.&lt;br /&gt;
&lt;br /&gt;
In order to find any netcdf file no matter what its name is, Aidan has developed the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility, part of the nccompress package. It will find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy, you can combine this command with other Unix utilities such as &amp;lt;tt&amp;gt;xargs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt; is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility with &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, using a Unix pipe (|). This can be faster than using &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; on its own when it is easy to use a pattern to identify the netcdf files. This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Batch Compressing files: nccompress =&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt;, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Simple workflow&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest way to invoke the program would be with a single file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and compress all uncompressed netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories, if they are not already compressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, though it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On Gadi this may mean you need to submit an interactive job on the compute nodes with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Other options&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; program just sorts out finding files/directories etc, it calls &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; to do the compression. Using the '--nccopy' forces &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to use the &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; program in place of &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, though the netcdf package must already be loaded for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
You can tell &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; takes at least twice as long to compress an equivalent file as &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt;. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension. The chunk dimensions would mirror this and be very large in this direction. If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3493</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3493"/>
		<updated>2022-04-26T00:55:52Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on Gadi that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nccompress (recommended)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; package is available on Gadi in the [[Conda|CMS conda environment]]. At present it consists of four python programs, &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt;, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. Its two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
The convenience utility &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt; is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nco&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;cdo&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;netcdf&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is &amp;lt;tt&amp;gt;[https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; can compress files and define the chunking using a command line argument (-c). &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
= Identifying files to be compressed =&lt;br /&gt;
&lt;br /&gt;
The Unix utility &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; is installed by default on any Unix operating system. It is used to find files on a filesystem. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you might not be able to use the &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility easily.&lt;br /&gt;
&lt;br /&gt;
In order to find any netcdf file no matter what its name is, Aidan has developed the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility, part of the nccompress package. It will find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy, you can combine this command with other Unix utilities such as &amp;lt;tt&amp;gt;xargs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt; is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility with &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, using a Unix pipe (|). This can be faster than using &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; on its own when it is easy to use a pattern to identify the netcdf files. This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Batch Compressing files =&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt;, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Simple workflow&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest way to invoke the program would be with a single file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and compress all uncompressed netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories, if they are not already compressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, though it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On Gadi this may mean you need to submit an interactive job on the compute nodes with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Other options&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; program just sorts out finding files/directories etc, it calls &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; to do the compression. Using the '--nccopy' forces &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to use the &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; program in place of &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, though the netcdf package must already be loaded for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
You can tell &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory.&lt;br /&gt;
&lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; takes at least twice as long to compress an equivalent file as &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt;. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension. The chunk dimensions would mirror this and be very large in this direction. If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3492</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3492"/>
		<updated>2022-04-26T00:55:11Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on Gadi that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nccompress (recommended)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; package is available on Gadi in the [[Conda|CMS conda environment]]. At present it consists of four python programs, &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt;, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. Its two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
The convenience utility &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt; is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nco&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;cdo&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;netcdf&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is &amp;lt;tt&amp;gt;[https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; can compress files and define the chunking using a command line argument (-c). &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
= Identifying files to be compressed =&lt;br /&gt;
&lt;br /&gt;
The Unix utility &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; is installed by default on any Unix operating system. It is used to find files on a filesystem. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you might not be able to use the &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility easily.&lt;br /&gt;
&lt;br /&gt;
In order to find any netcdf file no matter what its name is, Aidan has developed the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility, part of the nccompress package. It will find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy, you can combine this command with other Unix utilities such as &amp;lt;tt&amp;gt;xargs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt; is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility with &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, using a Unix pipe (|). This can be faster than using &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; on its own when it is easy to use a pattern to identify the netcdf files. This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt;, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Simple workflow&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest way to invoke the program would be with a single file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and compress all uncompressed netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories, if they are not already compressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, though it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On Gadi this may mean you need to submit an interactive job on the compute nodes with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Other options&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; program just sorts out finding files/directories etc, it calls &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; to do the compression. Using the '--nccopy' forces &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to use the &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; program in place of &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt;, though the netcdf package must already be loaded for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
You can tell &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; takes at least twice as long to compress an equivalent file as &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt;. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension. The chunk dimensions would mirror this and be very large in this direction. If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3491</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3491"/>
		<updated>2022-04-26T00:39:19Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on Gadi that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nccompress (recommended)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt; package is available on Gadi in the [[Conda|CMS conda environment]]. At present it consists of three python programs, &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;nccompress&amp;lt;/tt&amp;gt;, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. &amp;lt;tt&amp;gt;nc2nc&amp;lt;/tt&amp;gt; can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. Its two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;nco&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;cdo&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;netcdf&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is &amp;lt;tt&amp;gt;[https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; can compress files and define the chunking using a command line argument (-c). &amp;lt;tt&amp;gt;nccopy&amp;lt;/tt&amp;gt; is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;ncvarinfo&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The convenience utility &amp;lt;tt&amp;gt;ncvarinfo&amp;lt;/tt&amp;gt; is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
= Identifying files to be compressed =&lt;br /&gt;
&lt;br /&gt;
The Unix utility &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; is installed by default on any Unix operating system. It is used to find files on a filesystem. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you might not be able to use the &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility easily.&lt;br /&gt;
&lt;br /&gt;
In order to find any netcdf file no matter what its name is, Aidan has developed the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility, part of the nccompress package. It will find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt; utility to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy, you can combine this command with other Unix utilities such as &amp;lt;tt&amp;gt;xargs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;du&amp;lt;/tt&amp;gt; is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system &amp;lt;tt&amp;gt;find&amp;lt;/tt&amp;gt; utility with ncfind, using a Unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to &amp;lt;tt&amp;gt;ncfind&amp;lt;/tt&amp;gt;, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3490</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3490"/>
		<updated>2022-04-26T00:28:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3489</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3489"/>
		<updated>2022-04-26T00:28:12Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;&amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3488</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3488"/>
		<updated>2022-04-26T00:26:52Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Deflate level&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. '''The recommended deflate level is 5.''' This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;big&amp;gt;Shuffle&amp;lt;/big&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Turn shuffle on.''' Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;big&amp;gt;Chunking&amp;lt;/big&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3486</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3486"/>
		<updated>2022-04-26T00:25:37Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Why compress netCDF files? =&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
=== Deflate level ===&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
=== Shuffle ===&lt;br /&gt;
&lt;br /&gt;
Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
=== Chunking ===&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3485</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3485"/>
		<updated>2022-04-26T00:25:10Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Why compress netCDF files? ==&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of its original size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file.&lt;br /&gt;
&lt;br /&gt;
Compression&amp;amp;nbsp;with tools such as gzip is possible but is not recommended except for archival purposes. It has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
=== Deflate level ===&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
=== Shuffle ===&lt;br /&gt;
&lt;br /&gt;
Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
=== Chunking ===&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3479</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3479"/>
		<updated>2022-04-26T00:08:57Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Why compress netCDF files?&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of the size. This is the equivalent of being given three times as much disk space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file. However, if you rely on an old piece of software that you think may not have been compiled with netCDF4 you should test that it can read compressed netCDF4 files before converting all your data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Compression through tools such as gzip is possible but not recommended. This has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;General guidelines&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;more detailed explanation&amp;amp;lt;/a&amp;amp;gt; if you wish to understand more, but briefly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Deflate level&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Shuffle&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Chunking&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library writes the data to disk in &amp;amp;quot;chunks&amp;amp;quot;. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;very good description of chunking and how it works&amp;amp;lt;/a&amp;amp;gt;. All you really have to know is that in order to use netCDF compression &amp;lt;b&amp;gt;your data must be chunked&amp;lt;/b&amp;gt;.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;largely determined by the structure of your data and how you will access it&amp;amp;lt;/a&amp;amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Compression tools&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are some software packages available on raijin that can be used to compress netCDF data:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nco&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;netCDF Operator (NCO) program suite&amp;amp;lt;/a&amp;amp;gt; can compress netCDF files and has recently &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;included some ability to choose different chunking strategies&amp;amp;lt;/a&amp;amp;gt;. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;cdo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;Climate Data Operators&amp;amp;lt;/a&amp;amp;gt; (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;mw-empty-elt&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;netcdf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;One of the standard tools included in a netCDF installation is &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;nccopy&amp;amp;lt;/a&amp;amp;gt;. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nccompress&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;Aidan&amp;amp;lt;/a&amp;amp;gt;. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;ncvarinfo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Identifying files to be compressed&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;amp;quot;directoryname&amp;amp;quot; which end in &amp;amp;quot;.nc&amp;amp;quot;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;amp;amp;quot;*.nc&amp;amp;amp;amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;However, if your netCDF files do not use the convention of ending in &amp;amp;quot;.nc&amp;amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can refine the search further by requesting to return only those files that are uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;du is the disk usage utility. The output looks something like this:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;amp;quot;.nc&amp;amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;amp;amp;quot;*.nc&amp;amp;amp;amp;amp;quot; | ncfind -u&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Batch Compressing files&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check&amp;amp;amp;amp;nbsp;: run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The simplest way to invoke the program would be with a single file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or using a wildcard expression:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite):&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won&amp;amp;rsquo;t try to compress the files again. It also won&amp;amp;rsquo;t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, by default, nccompress &amp;lt;b&amp;gt;does not overwrite the original files&amp;lt;/b&amp;gt;. If you invoke it without the &amp;amp;#39;-o&amp;amp;#39; option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With large variables, which usually means large files (&amp;amp;gt; 1GB) it is a good idea to specify a larger buffer size with the &amp;amp;#39;-b&amp;amp;#39; option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;amp;gt; 5000 (1-&amp;amp;gt;5 GB).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is also possible to use wildcards type operations, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the &amp;amp;#39;--nccopy&amp;amp;#39; forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the &amp;amp;#39;-pa&amp;amp;#39; option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with &amp;amp;#39;-np&amp;amp;#39;, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;nc2nc&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can use nc2nc &amp;amp;ldquo;stand alone&amp;amp;rdquo;. It has a couple of extra features that can only be accessed by calling it directly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the &amp;amp;#39;-c&amp;amp;#39; option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;ncvarinfo&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify more than one file it will print the information for each file in turn&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also just request variables you are interested in to be output:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;amp;quot;text&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;fck_mw_category&amp;quot;&amp;gt;Data induction&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3478</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3478"/>
		<updated>2022-04-25T23:37:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Why compress netCDF files?&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of the size. This is the equivalent of being given three times as much disk space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file. However, if you rely on an old piece of software that you think may not have been compiled with netCDF4 you should test that it can read compressed netCDF4 files before converting all your data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Compression through tools such as gzip is possible but not recommended. This has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;General guidelines&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;more detailed explanation&amp;amp;lt;/a&amp;amp;gt; if you wish to understand more, but briefly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Deflate level&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Shuffle&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Chunking&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library writes the data to disk in &amp;amp;quot;chunks&amp;amp;quot;. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;very good description of chunking and how it works&amp;amp;lt;/a&amp;amp;gt;. All you really have to know is that in order to use netCDF compression &amp;lt;b&amp;gt;your data must be chunked&amp;lt;/b&amp;gt;.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;largely determined by the structure of your data and how you will access it&amp;amp;lt;/a&amp;amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Compression tools&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are some software packages available on raijin that can be used to compress netCDF data:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nco&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;netCDF Operator (NCO) program suite&amp;amp;lt;/a&amp;amp;gt; can compress netCDF files and has recently &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;included some ability to choose different chunking strategies&amp;amp;lt;/a&amp;amp;gt;. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;cdo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;Climate Data Operators&amp;amp;lt;/a&amp;amp;gt; (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;mw-empty-elt&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;netcdf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;One of the standard tools included in a netCDF installation is &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;nccopy&amp;amp;lt;/a&amp;amp;gt;. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nccompress&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by &amp;amp;lt;a alt=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;lt;/a&amp;amp;gt;&amp;amp;quot;&amp;amp;gt;Aidan&amp;amp;lt;/a&amp;amp;gt;. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;ncvarinfo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Identifying files to be compressed&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;amp;quot;directoryname&amp;amp;quot; which end in &amp;amp;quot;.nc&amp;amp;quot;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;amp;quot;*.nc&amp;amp;amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;However, if your netCDF files do not use the convention of ending in &amp;amp;quot;.nc&amp;amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can refine the search further by requesting to return only those files that are uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;du is the disk usage utility. The output looks something like this:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;amp;quot;.nc&amp;amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;amp;quot;*.nc&amp;amp;amp;amp;quot; | ncfind -u&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Batch Compressing files&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check&amp;amp;amp;nbsp;: run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The simplest way to invoke the program would be with a single file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or using a wildcard expression:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite):&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won&amp;amp;rsquo;t try to compress the files again. It also won&amp;amp;rsquo;t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, by default, nccompress &amp;lt;b&amp;gt;does not overwrite the original files&amp;lt;/b&amp;gt;. If you invoke it without the &amp;amp;#39;-o&amp;amp;#39; option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With large variables, which usually means large files (&amp;amp;gt; 1GB) it is a good idea to specify a larger buffer size with the &amp;amp;#39;-b&amp;amp;#39; option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;amp;gt; 5000 (1-&amp;amp;gt;5 GB).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is also possible to use wildcards type operations, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the &amp;amp;#39;--nccopy&amp;amp;#39; forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the &amp;amp;#39;-pa&amp;amp;#39; option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with &amp;amp;#39;-np&amp;amp;#39;, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;nc2nc&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can use nc2nc &amp;amp;ldquo;stand alone&amp;amp;rdquo;. It has a couple of extra features that can only be accessed by calling it directly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the &amp;amp;#39;-c&amp;amp;#39; option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;ncvarinfo&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify more than one file it will print the information for each file in turn&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)     &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;amp;nbsp;:: (1080, 1440)      &amp;amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also just request variables you are interested in to be output:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;amp;lt;syntaxhighlight lang=&amp;amp;amp;quot;text&amp;amp;amp;quot;&amp;amp;amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;amp;amp;lt;/syntaxhighlight&amp;amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;fck_mw_category&amp;quot;&amp;gt;Data induction&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3477</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3477"/>
		<updated>2022-04-25T23:36:22Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-parser-output&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Why compress netCDF files?&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of the size. This is the equivalent of being given three times as much disk space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file. However, if you rely on an old piece of software that you think may not have been compiled with netCDF4 you should test that it can read compressed netCDF4 files before converting all your data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Compression through tools such as gzip is possible but not recommended. This has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;General guidelines&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;more detailed explanation&amp;amp;lt;/a&amp;amp;gt; if you wish to understand more, but briefly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Deflate level&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Shuffle&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Chunking&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The netCDF library writes the data to disk in &amp;amp;quot;chunks&amp;amp;quot;. There is a &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;very good description of chunking and how it works&amp;amp;lt;/a&amp;amp;gt;. All you really have to know is that in order to use netCDF compression &amp;lt;b&amp;gt;your data must be chunked&amp;lt;/b&amp;gt;.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; href=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot; title=&amp;quot;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;quot;&amp;gt;http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;largely determined by the structure of your data and how you will access it&amp;amp;lt;/a&amp;amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Compression tools&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are some software packages available on raijin that can be used to compress netCDF data:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nco&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net&amp;quot; href=&amp;quot;http://nco.sourceforge.net&amp;quot; title=&amp;quot;http://nco.sourceforge.net&amp;quot;&amp;gt;http://nco.sourceforge.net&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;netCDF Operator (NCO) program suite&amp;amp;lt;/a&amp;amp;gt; can compress netCDF files and has recently &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; href=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot; title=&amp;quot;http://nco.sourceforge.net/nco.html#Compression&amp;quot;&amp;gt;http://nco.sourceforge.net/nco.html#Compression&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;included some ability to choose different chunking strategies&amp;amp;lt;/a&amp;amp;gt;. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;cdo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;&amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; href=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot; title=&amp;quot;https://code.zmaw.de/projects/cdo&amp;quot;&amp;gt;https://code.zmaw.de/projects/cdo&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;Climate Data Operators&amp;amp;lt;/a&amp;amp;gt; (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;mw-empty-elt&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;netcdf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;One of the standard tools included in a netCDF installation is &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; href=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot; title=&amp;quot;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;quot;&amp;gt;https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;nccopy&amp;amp;lt;/a&amp;amp;gt;. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;nccompress&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by &amp;amp;lt;a alt=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; href=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot; title=&amp;amp;quot;&amp;lt;a alt=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; href=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot; title=&amp;quot;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;quot;&amp;gt;http://www.climatescience.org.au/staff/profile/AHeerdegen&amp;lt;/a&amp;gt;&amp;amp;quot;&amp;amp;gt;Aidan&amp;amp;lt;/a&amp;amp;gt;. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;ncvarinfo&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Identifying files to be compressed&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;amp;quot;directoryname&amp;amp;quot; which end in &amp;amp;quot;.nc&amp;amp;quot;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;quot;*.nc&amp;amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;However, if your netCDF files do not use the convention of ending in &amp;amp;quot;.nc&amp;amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can refine the search further by requesting to return only those files that are uncompressed:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;du is the disk usage utility. The output looks something like this:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;amp;quot;.nc&amp;amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
find directoryname -iname &amp;amp;amp;quot;*.nc&amp;amp;amp;quot; | ncfind -u&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Batch Compressing files&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check&amp;amp;nbsp;: run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The simplest way to invoke the program would be with a single file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or using a wildcard expression:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite):&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won&amp;amp;rsquo;t try to compress the files again. It also won&amp;amp;rsquo;t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, by default, nccompress &amp;lt;b&amp;gt;does not overwrite the original files&amp;lt;/b&amp;gt;. If you invoke it without the &amp;amp;#39;-o&amp;amp;#39; option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With large variables, which usually means large files (&amp;amp;gt; 1GB) it is a good idea to specify a larger buffer size with the &amp;amp;#39;-b&amp;amp;#39; option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;amp;gt; 5000 (1-&amp;amp;gt;5 GB).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is also possible to use wildcards type operations, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the &amp;amp;#39;--nccopy&amp;amp;#39; forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the &amp;amp;#39;-pa&amp;amp;#39; option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with &amp;amp;#39;-np&amp;amp;#39;, e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;nc2nc&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can use nc2nc &amp;amp;ldquo;stand alone&amp;amp;rdquo;. It has a couple of extra features that can only be accessed by calling it directly:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don&amp;amp;amp;#39;t shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the &amp;amp;#39;-c&amp;amp;#39; option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;ncvarinfo&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify more than one file it will print the information for each file in turn&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)     &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x   &amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y   &amp;amp;nbsp;:: (1460, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t&amp;amp;nbsp;:: (1080, 1440)      &amp;amp;nbsp;:: tracer longitude&lt;br /&gt;
geolat_t&amp;amp;nbsp;:: (1080, 1440)      &amp;amp;nbsp;:: tracer latitude&lt;br /&gt;
geolon_c&amp;amp;nbsp;:: (1080, 1440)      &amp;amp;nbsp;:: uv longitude&lt;br /&gt;
geolat_c&amp;amp;nbsp;:: (1080, 1440)      &amp;amp;nbsp;:: uv latitude&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also just request variables you are interested in to be output:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;fck_mw_syntaxhighlight&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;syntaxhighlight lang=&amp;amp;quot;text&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y&amp;amp;nbsp;:: (365, 1080, 1440)&amp;amp;nbsp;:: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;fck_mw_category&amp;quot;&amp;gt;Data induction&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3476</id>
		<title>NetCDF Compression Tools</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=NetCDF_Compression_Tools&amp;diff=3476"/>
		<updated>2022-04-25T23:26:50Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Why compress netCDF files? ==&lt;br /&gt;
&lt;br /&gt;
Space. You are likely to store your netCDF files on a shared filesystem either at NCI or at your University, as such, it is your responsibility to manage your space correctly and avoid wasting storage space. Compressing your netCDF data files can shrink your data files to one third of the size. This is the equivalent of being given three times as much disk space.&lt;br /&gt;
&lt;br /&gt;
NetCDF compression is lossless: the data is exactly as it was when read from disk. It can still be read using the same programming interface. As long as the program reading the data has been compiled with the latest netCDF library (version 4) then the task of decompressing the data is handled by the library and as far as the programs are concerned there is no difference in the data. The usual tools, such as ncdump, can be used to examine the variables contained within the netCDF file. However, if you rely on an old piece of software that you think may not have been compiled with netCDF4 you should test that it can read compressed netCDF4 files before converting all your data.&lt;br /&gt;
&lt;br /&gt;
Compression through tools such as gzip is possible but not recommended. This has the disadvantage that the file must be decompressed to be read and then recompressed again when you have finished, which can be time consuming and degrade your productivity, not to mention the data in question will take up much more room while it is being analysed.&lt;br /&gt;
&lt;br /&gt;
= General guidelines =&lt;br /&gt;
&lt;br /&gt;
The netCDF library has several options for compressing data, which all compression programs will use, as they all use the underlying library to perform the compression. There is a [http://www.unidata.ucar.edu/blogs/developer/en/entry/netcdf_compression more detailed explanation] if you wish to understand more, but briefly:&lt;br /&gt;
&lt;br /&gt;
=== Deflate level ===&lt;br /&gt;
&lt;br /&gt;
This is an integer value from ranging from 0 to 9. A value of 0 means no compression, and 9 is the highest level of compression possible. The higher this value the smaller your file will be once compressed. However, there is a trade-off, the higher the deflate level, the longer it will take to compress, particularly so with very high deflate levels. At deflate level 9 it can take six times longer to compress the data, with only a few percent improvement in compression. The recommended deflate level is 5. This combines good compression with a small increase in compression time.&lt;br /&gt;
&lt;br /&gt;
=== Shuffle ===&lt;br /&gt;
&lt;br /&gt;
Turn shuffle on. Simple. It usually results in a smaller compressed file with little performance overhead.&lt;br /&gt;
&lt;br /&gt;
=== Chunking ===&lt;br /&gt;
&lt;br /&gt;
The netCDF library writes the data to disk in &amp;quot;chunks&amp;quot;. There is a [http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_why_it_matters very good description of chunking and how it works]. All you really have to know is that in order to use netCDF compression '''your data must be chunked'''.The question then is, do I care how the program I use chooses the size of my data chunks? The answer is almost certainly yes, but maybe not a lot. An optimal chunking strategy is [http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes largely determined by the structure of your data and how you will access it].&lt;br /&gt;
&lt;br /&gt;
Specific details about chunking strategies are largely dependent on the tool used to compress your data, and will be covered in more detail in the next section. However, all tools still utilise the underlying netCDF4 library, and so can implement the default chunking strategy, which has changed over time. For many versions the default strategy has been to create chunks that are simply the same size as the dimensions of the variable, which can be a disastrous choice in terms of performance if the data is also compressed. The entire variable must be read into memory to be uncompressed even if only a single slice is required.&lt;br /&gt;
&lt;br /&gt;
= Compression tools =&lt;br /&gt;
&lt;br /&gt;
There are some software packages available on raijin that can be used to compress netCDF data:&lt;br /&gt;
&lt;br /&gt;
=== nco ===&lt;br /&gt;
&lt;br /&gt;
The [http://nco.sourceforge.net netCDF Operator (NCO) program suite] can compress netCDF files and has recently [http://nco.sourceforge.net/nco.html#Compression included some ability to choose different chunking strategies]. It may be that for some cases this is a reasonable solution based on the available options, but a weakness is the inability to use their optimised chunking strategy for variables with four dimensions or more.&lt;br /&gt;
&lt;br /&gt;
=== cdo ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;cmsl-10&amp;quot;&amp;gt;[https://code.zmaw.de/projects/cdo Climate Data Operators] (cdo) can also compress netCDF and offers limited chunking options: &amp;lt;/span&amp;gt;auto, grid or lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== netcdf ===&lt;br /&gt;
&lt;br /&gt;
One of the standard tools included in a netCDF installation is [https://docs.unidata.ucar.edu/nug/current/netcdf_utilities_guide.html#guide_nccopy nccopy]. nccopy can compress files and define the chunking using a command line argument (-c). nccopy is a good option if your data file structure changes little, so a chunking scheme can be decided upon and hard coded into scripts. It is not so useful if the dimensions and variables change. Another major limitation is that the chunking is defined by dimensions, not variables. If your data file has variables that share dimensions, but have different combinations or numbers of dimensions it is not possible to determine an optimal chunking strategy for each variable.&lt;br /&gt;
&lt;br /&gt;
=== nccompress ===&lt;br /&gt;
&lt;br /&gt;
The nccompress package is available on gadi&amp;amp;nbsp;in the CMS conda environment. At present it consists of three python programs, ncfind, nc2nc and nccompress, written and supported by [http://www.climatescience.org.au/staff/profile/AHeerdegen Aidan]. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. This two main limitations: it is slower than the other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.&lt;br /&gt;
&lt;br /&gt;
=== ncvarinfo ===&lt;br /&gt;
&lt;br /&gt;
The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&lt;br /&gt;
== Identifying files to be compressed ==&lt;br /&gt;
&lt;br /&gt;
ncfind, part of the nccompress package, can be used to find netCDF files and discriminate between compressed and uncompressed:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ncfind -h&lt;br /&gt;
usage: ncfind [-h] [-r] [-u | -c] [inputs [inputs ...]]&lt;br /&gt;
&lt;br /&gt;
Find netCDF files. Can discriminate by compression&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs              netCDF files or directories (-r must be specified to&lt;br /&gt;
                      recursively descend directories). Can accept piped&lt;br /&gt;
                      arguments.&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help          show this help message and exit&lt;br /&gt;
  -r, --recursive     Recursively descend directories to find netCDF&lt;br /&gt;
                      files (default False)&lt;br /&gt;
  -u, --uncompressed  Find only uncompressed netCDF files (default False)&lt;br /&gt;
  -c, --compressed    Find only compressed netCDF files (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There are other methods for finding files, namely the unix utility find utility. For example, to find all files in the directory &amp;quot;directoryname&amp;quot; which end in &amp;quot;.nc&amp;quot;: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, if your netCDF files do not use the convention of ending in &amp;quot;.nc&amp;quot; or cannot be systematically found based on filename, you can use the ncfind to recursively descend into a directory structure looking for netCDF files: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can refine the search further by requesting to return only those files that are uncompressed: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to find out how much space these uncompressed files occupy you can combine this command with other unix utilities such as xargs and du: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncfind -r -u directoryname | xargs du -h&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
du is the disk usage utility. The output looks something like this: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
67M     output212/ice__212_223.nc&lt;br /&gt;
1003M   output212/ocean__212_223.nc&lt;br /&gt;
1.1G    total&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It is even possible to combine the system find utility with ncfind, using a unix pipe (|). This command will find all files ending in &amp;quot;.nc&amp;quot;, pipe the results to ncfind, and only those that are uncompressed will be printed to the screen: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
find directoryname -iname &amp;quot;*.nc&amp;quot; | ncfind -u&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Compressing files ==&lt;br /&gt;
&lt;br /&gt;
Having identified where the netCDF files you wish to compress are located, there is a convenience program, nccompress, which can be used to easily step through and compress each file in turn:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nccompress -h&lt;br /&gt;
usage: nccompress [-h] [-d {1-9}] [-n] [-b BUFFERSIZE] [-t TMPDIR] [-v] [-r]&lt;br /&gt;
                   [-o] [-m MAXCOMPRESS] [-p] [-f] [-c] [-pa] [-np NUMPROC]&lt;br /&gt;
                   [--nccopy]&lt;br /&gt;
                   inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Run nc2nc (or nccopy) on a number of netCDF files&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files or directories (-r must be specified to&lt;br /&gt;
                        recursively descend directories)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -t TMPDIR, --tmpdir TMPDIR&lt;br /&gt;
                        Specify temporary directory to save compressed files&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -r, --recursive       Recursively descend directories compressing all netCDF&lt;br /&gt;
                        files (default False)&lt;br /&gt;
  -o, --overwrite       Overwrite original files with compressed versions&lt;br /&gt;
                        (default is to not overwrite)&lt;br /&gt;
  -m MAXCOMPRESS, --maxcompress MAXCOMPRESS&lt;br /&gt;
                        Set a maximum compression as a paranoid check on&lt;br /&gt;
                        success of nccopy (default is 10, set to zero for no&lt;br /&gt;
                        check)&lt;br /&gt;
  -p, --paranoid        Paranoid check : run nco ndiff on the resulting file&lt;br /&gt;
                        ensure no data has been altered&lt;br /&gt;
  -f, --force           Force compression, even if input file is already&lt;br /&gt;
                        compressed (default False)&lt;br /&gt;
  -c, --clean           Clean tmpdir by removing existing compressed files&lt;br /&gt;
                        before starting (default False)&lt;br /&gt;
  -pa, --parallel       Compress files in parallel&lt;br /&gt;
  -np NUMPROC, --numproc NUMPROC&lt;br /&gt;
                        Specify the number of processes to use in parallel&lt;br /&gt;
                        operation&lt;br /&gt;
  --nccopy              Use nccopy instead of nc2nc (default False)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The simplest way to invoke the program would be with a single file: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice_daily_0001.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or using a wildcard expression: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also specify one or more directory names in combination with the recursive flag (-r) and the program will recursively descend into those directories and find all netCDF files contained therein. For example, a directory listing might look like so: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ ls data/&lt;br /&gt;
output001  output003  output005  output007  output009  restart001  restart003  restart005  restart007  restart009&lt;br /&gt;
output002  output004  output006  output008  output010  restart002  restart004  restart006  restart008  restart010&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with a number of sub-directories, all containing netCDF files. It is a good idea to do a trial run and make sure it functions properly. For example, this will compress the netCDF files in just one of the directories: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -p -r data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once completed there will be a new subdirectory called tmp.nc_compress inside the directory output001. It will contain compressed copies of all the netCDF files from the directory above. You can check the compressed copies to make sure they are correct. The paranoid option (-p) calls an nco command to check that the variables contained in the two files are the same. You can use the paranoid option routinely, thought it will make the process more time consuming. It is a good idea to use it in the testing phase. You should also check the compressed copies manually to make sure they look ok, and if so, re-run the command with the -o option (overwrite): &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o data/output001&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it will find the already compressed files, copy them over the originals and delete the temporary directory tmp.nc_compress. It won’t try to compress the files again. It also won’t compress already compressed files, so, for example, if you were happy that the compression was working well you could compress the entire data directory, and the already compressed files in output001 will not be re-compressed.&lt;br /&gt;
&lt;br /&gt;
So, by default, nccompress '''does not overwrite the original files'''. If you invoke it without the '-o' option it will create compressed copies in the tmp.nc_compress subdirectory and leave them there, which will consume more disk space! This is a feature, not a bug, but you need to be aware that this is how it functions.&lt;br /&gt;
&lt;br /&gt;
With large variables, which usually means large files (&amp;gt; 1GB) it is a good idea to specify a larger buffer size with the '-b' option, as it will run faster. On raijin this may mean you need to run interactively with a higher memory (~10GB) or submit it as a copyq job. A typical buffer size might be 1000 -&amp;gt; 5000 (1-&amp;gt;5 GB).&lt;br /&gt;
&lt;br /&gt;
It is also possible to use wildcards type operations, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o output*&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o output00[1-5]&lt;br /&gt;
&lt;br /&gt;
nccompress -r -o run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The nccompress program just sorts out finding files/directories etc, it calls nc2nc to do the compression. Using the '--nccopy' forces nccompress to use the nccopy program in place of nc2nc, though the netcdf package must already be loaded for this to work. You can tell nccompress to work on multple files simultaneously with the '-pa' option. By default this will use all the physical processors on the machine, or you can specify how many simultaneous processes you want to with '-np', e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nccompress -r -o -np 16 run[1-5]/output*/ocean*.nc random.nc ice*.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will compress 16 netCDF files at a time (the -np option implies parallel option). As each directory is processed before beginning on a new directory there will be little reduction in execution time if there are few netCDF files in each directory. &lt;br /&gt;
== nc2nc ==&lt;br /&gt;
&lt;br /&gt;
The nc2nc program was written because no existing tool had a generalised per variable chunking algorithm. The total chunk size is defined to be the file system block size (4096KB). The dimensions of the chunk are sized to be as close as possible to the same ratio as the dimensions of the data, with the limits that no dimension can be less than 1. This chunking scheme performs well for a wide range of data, but there will always be cases for certain types of access, or variable shape that this is not optimal. In those cases a different approach may be required.&lt;br /&gt;
&lt;br /&gt;
Be aware that nc2nc takes at least twice as long to compress an equivalent file as nccopy. In some cases with large files containing many variables it can be up to five times slower.&lt;br /&gt;
&lt;br /&gt;
You can use nc2nc “stand alone”. It has a couple of extra features that can only be accessed by calling it directly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$ nc2nc -h&lt;br /&gt;
usage: nc2nc [-h] [-d {1-9}] [-m MINDIM] [-b BUFFERSIZE] [-n] [-v] [-c] [-f]&lt;br /&gt;
             [-va VARS] [-q QUANTIZE] [-o]&lt;br /&gt;
             origin destination&lt;br /&gt;
&lt;br /&gt;
Make a copy of a netCDF file with automatic chunk sizing&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  origin                netCDF file to be compressed&lt;br /&gt;
  destination           netCDF output file&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -d {1-9}, --dlevel {1-9}&lt;br /&gt;
                        Set deflate level. Valid values 0-9 (default=5)&lt;br /&gt;
  -m MINDIM, --mindim MINDIM&lt;br /&gt;
                        Minimum dimension of chunk. Valid values 1-dimsize&lt;br /&gt;
  -b BUFFERSIZE, --buffersize BUFFERSIZE&lt;br /&gt;
                        Set size of copy buffer in MB (default=50)&lt;br /&gt;
  -n, --noshuffle       Don't shuffle on deflation (default is to shuffle)&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -c, --classic         use NETCDF4_CLASSIC output instead of NETCDF4 (default&lt;br /&gt;
                        true)&lt;br /&gt;
  -f, --fletcher32      Activate Fletcher32 checksum&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Specify variables to copy (default is to copy all)&lt;br /&gt;
  -q QUANTIZE, --quantize QUANTIZE&lt;br /&gt;
                        Truncate data in variable to a given decimal&lt;br /&gt;
                        precision, e.g. -q speed=2 -q temp=0 causes variable&lt;br /&gt;
                        speed to be truncated to a precision of 0.01 and temp&lt;br /&gt;
                        to a precision of 1&lt;br /&gt;
  -o, --overwrite       Write output file even if already it exists (default&lt;br /&gt;
                        is to not overwrite)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the vars option (-va) it is possible to select out only a subset of variables to be copied to the destination file. By default the output file is netCDf4 classic, but this can be changed to netCDF4 using the '-c' option. It is also possible to specify a minimum dimension size for the chunks (-m). This may be desirable for a dataset that has one particularly long dimension,. The chunk dimensions would mirror this and be very large in this direction . If fast access is required from slices orthogonal to this direction performance might be improved setting this option to a number greater than 1. &lt;br /&gt;
== ncvarinfo ==&lt;br /&gt;
&lt;br /&gt;
ncvarinfo is a convenient way to get a summary of the contents of a netCDF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
./ncvarinfo -h&lt;br /&gt;
usage: ncvarinfo [-h] [-v] [-t] [-d] [-a] [-va VARS] inputs [inputs ...]&lt;br /&gt;
&lt;br /&gt;
Output summary information about a netCDF file&lt;br /&gt;
&lt;br /&gt;
positional arguments:&lt;br /&gt;
  inputs                netCDF files&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  -v, --verbose         Verbose output&lt;br /&gt;
  -t, --time            Show time variables&lt;br /&gt;
  -d, --dims            Show dimensions&lt;br /&gt;
  -a, --aggregate       Aggregate multiple netCDF files into one dataset&lt;br /&gt;
  -va VARS, --vars VARS&lt;br /&gt;
                        Show info for only specify variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default it prints out a simple summary of the variables in a netCDF file, but omitting dimensions and time related variables. e.g. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output096/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you specify more than one file it will print the information for each file in turn &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x    :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)      :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)      :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)      :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)      :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the files have the same structure it is possible to aggregate the data and display it as if it were contained in a single dataset: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -a output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
Time steps:  1460  x  1.0 days&lt;br /&gt;
tau_x    :: (1460, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y    :: (1460, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
geolon_t :: (1080, 1440)       :: tracer longitude&lt;br /&gt;
geolat_t :: (1080, 1440)       :: tracer latitude&lt;br /&gt;
geolon_c :: (1080, 1440)       :: uv longitude&lt;br /&gt;
geolat_c :: (1080, 1440)       :: uv latitude&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can also just request variables you are interested in to be output: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ncvarinfo -va tau_x -va tau_y output09?/ocean_daily.nc&lt;br /&gt;
&lt;br /&gt;
output096/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output097/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output098/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&lt;br /&gt;
output099/ocean_daily.nc&lt;br /&gt;
Time steps:  365  x  1.0 days&lt;br /&gt;
tau_x :: (365, 1080, 1440) :: i-directed wind stress forcing u-velocity&lt;br /&gt;
tau_y :: (365, 1080, 1440) :: j-directed wind stress forcing v-velocity&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3475</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3475"/>
		<updated>2022-04-25T23:21:17Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [[Storage#temporary|temporary storage]] or your [[Storage#local|University system]]. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Tape mdss&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /mdss. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Temporary storage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:x-large&amp;quot;&amp;gt;Request access&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards: see the [https://drive.google.com/drive/folders/0B1KncyYETiZqNGdHZ0VZSk02cUE 2017 training material] for usage of these commands and acls and tar cheat sheets. For more details see [[Archiving_data|Archiving Data]] &amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3474</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3474"/>
		<updated>2022-04-25T23:18:21Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This means you need to implement a data management workflow that is compatible with the filesystems specifications, your scientific project and the management of your NCI's project.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [[Storage#temporary|temporary storage]] or your [[Storage#local|University system]]. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape at NCI&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== '''Temporary storage''' ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Request access ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards: see the [https://drive.google.com/drive/folders/0B1KncyYETiZqNGdHZ0VZSk02cUE 2017 training material] for usage of these commands and acls and tar cheat sheets. For more details see [[Archiving_data|Archiving Data]] &amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3473</id>
		<title>Storage</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Storage&amp;diff=3473"/>
		<updated>2022-04-22T00:58:17Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;During your work at the Centre, you are likely to produce, use and share data on different systems. You will probably have access to two different systems: your University system and NCI.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Storage on Gadi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;On Gadi, NCI has four different filesystems: $HOME, /scratch, /g/data and mdss. mdss is a tape-based filesystem while $HOME, /scratch and /g/data are disk-based.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are also specific filesystems linked to the Open On Demand system which are less used. On this page, we will only talk about the storage available from Gadi.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hierarchy of filesystems ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The different filesystems are best thought of as a hierarchy, each with a specific usecase:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;$HOME:&amp;lt;/span&amp;gt; this is a small disk space that is backed up by NCI. It is best suited for important, hard to reproduce files, e.g. data analysis codes.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt;: this is a temporary disk space. Files are automatically deleted on some condition. It is best suited for raw output from climate models.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;: this is a permanent disk space. It is best suited for data that is used over a long time, e.g. climate models inputs, climate models outputs that is being analysed, climate models source code that needs to be compiled.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#8e44ad&amp;quot;&amp;gt;mdss&amp;lt;/span&amp;gt;: this is a tape space. It is best suited as a backup of important files or an archiving system.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;$HOME&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This is your home directory on Gadi.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;This space is strictly limited at 10GB for each user but it is backed up by NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;It is most suitable for storing source code rather than model outputs or observation datasets. We still encourage you to also use Git to manage your source code and to save it to Github.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You can monitor your use on home with the &amp;quot;quota&amp;quot; command. You may have errors at log in when your home directory is full.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/scratch&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height: 50px;  width: 800px&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#c0392b&amp;quot;&amp;gt;Warning: this is a temporary space with [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 automatic deletion]. All users are responsible to learn about the deletion process.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;All projects have some storage on /scratch.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The amount of space varies from a project to another.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The total space allocation is shared between all project members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The management of the space is left to the responsibility of the members of each project.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There is [https://opus.nci.org.au/pages/viewpage.action?pageId=156434436 an automated file management system] in place. It will automatically remove any file that has not been accessed in the last 100 days.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;When a project fills its quota on /scratch, the project's members will not be able to use the computing queues except for copyq queues to help with moving data around.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor the overall usage, please use the &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt; command. To monitor the usage per user, please use &amp;lt;tt&amp;gt;nci-files-report -f scratch&amp;lt;/tt&amp;gt;.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Additional storage&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Increasing the quota on /scratch for a project might be possible but is left to the decision of NCI staff. An extension can only be requested by the Lead CI for the project. You can check who the Lead CI is on [https://my.nci.org.au/ my.nci.org.au].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The quota on /g/data is per project with management of the usage the sole responsibility of the project's members.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Accessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;For compute nodes to have read and/or write access to this filesystem, you need to mount the specific area you need with the &amp;quot;-l storage&amp;quot; PBS flag&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To monitor usage, please use &amp;lt;tt&amp;gt;nci_account&amp;lt;/tt&amp;gt;. To see a per-user summary run the command &amp;lt;tt&amp;gt;nci-files-report -f gdata&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;'''Additional storage'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;A project's quota on /g/data cannot be increased with a simple request. There is a review of some of the quotas every year, at which point some projects might be granted an increase. If you need additional storage before then, please consider deleting old or incorrect data, archiving old data to /massdata, using [[Storage#temporary|temporary storage]] or your [[Storage#local|University system]]. If you still want an increase to be considered at review time, please make sure to discuss it with the Lead CI of your project who will be part of the review.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape at NCI&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The tape system at NCI is called /massdata. Please read the [[Archiving_data|archiving data wiki page]]&amp;amp;nbsp;to learn how to use this system.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape access (writing and reading) is slow.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Unaccessible from OOD&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Tape is mostly appropriate for backing up or archiving data.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;You should only store big files on tape. If you want to migrate a lot of small files, you should first archive them together. To learn how to do that please have a look at &amp;quot;File compression and archiving&amp;quot; section below&amp;amp;nbsp;and [mailto:climate_help@nci.org.au| email]&amp;amp;nbsp;your questions to us.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/massdata is only accessible from the login nodes (interactive) or via a script submitted to the copyq queue. It is generally recommended to use the copyq queue as you then have a much longer run time.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;Considering data on /massdata are likely to be unused for a long time it is quite essential to document your data. For example adding a detailed README file to your data folder can help a lot.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== '''Disk at NCI''' ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;There are three different disk filesystems at NCI, each with a slightly different purpose. NCI also has a [http://nci.org.au/user-support/getting-help/filesystem-user-guide/ Users' Guide]. All the disk filesystems are accessible from the login nodes and the compute nodes hence you can read/write to one while currently being in an other filesystem. And all these filesystems have access to massdata either through login nodes connection or sending a script to copyq queue.&amp;lt;/span&amp;gt; &amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== '''Temporary storage''' ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The CMS is also managing two projects on NCI that can be used for temporary storage of data. Both are mounted on /g/data and have the same characteristic as other /g/data storage space as explained above.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;To use any space on these projects''', you need to:'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;request [https://my.nci.org.au/mancini/login?next=/mancini/project/ connection to the project] if you are not yet a member. You can check which projects you are part of with the &amp;quot;groups&amp;quot; command.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;fill a storage request using the&amp;amp;nbsp;[https://clex.dmponline.cloud.edu.au/ CLEX DMPonline tool]. If you do not yet have an account on this tool, please be patient for the account creation. To avoid robots and unauthorised access, the account creation requires human verification on our end. Please [mailto:cws_help@nci.org.au email us] if you have any question about filling in the form. Note this form is principally to enable us to monitor the space used, requested and available. It also enables us to prepare a folder for you with appropriate permissions. The forms are very short and quick to fill and the storage is usually ready for use within a few hours. See [[Storage-request|this page]] for more detailed instructions on how to fill the form. Note:&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;you do not need to email us, please just fill in the form to request the allocation you would like.&amp;lt;/span&amp;gt; &lt;br /&gt;
**&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;also, you can request space for use by a whole group instead of per user, but all users of the group '''must''' request connection to the project.&amp;lt;/span&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;The temporary storage projects are:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/hh5: this project is for short temporary use (~3 months). It could be used for example to print your raw model outputs, then you would save a subset or a reformatted version to your project's space and move the raw outputs to /massdata for safekeeping.&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium&amp;quot;&amp;gt;/g/data/ua8: the main purpose of this project is to store replica of datasets which do not&amp;amp;nbsp;have a specific data&amp;amp;nbsp;project assigned. However, the free space in this project can be used as temporary storage&amp;amp;nbsp;for data that is being processed for&amp;amp;nbsp;publication.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storage at Universities =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 1.5;&amp;quot;&amp;gt;at ANU&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;at Monash&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;at UMelb&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;at UNSW&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;at UTAS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= File compression and archiving =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;For an efficient use of storage, there are a few rules to keep in mind:&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;it is more efficient to store a few larger files than lots of smaller files. It is hard to define large and small but files of several tens of gigabytes are absolutely acceptable. The size of the files should clearly also take into account how you or others are going to use them.&amp;amp;nbsp;File nearing 100 GB become unmanageable and should be produced only if there is no other option. In that case you should read about ...&amp;lt;/span&amp;gt; &lt;br /&gt;
*&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;It is always best practice to compress your data when possible.&amp;amp;nbsp;Netcdf files are now easily compressible, see [[NetCDF_Compression_Tools|this wiki page]]&amp;amp;nbsp;for detailed explanations on tools available at NCI.&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;To store small setup files that define your experiments, think about using the &amp;quot;tar&amp;quot; command. This is a shell command with a manual accessible through&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
man tar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;This command will save many files together in a single archive, it can be used on a directory tree and will restore the directory structure when restoring the files from the archive. This means if you have several experiments you need to save the setup of, the best way might be to create a directory tree containing the setup files of all the experiments then create one single archive file for all. The archive files can also easily be compressed/uncompressed using the gzip utility either at the archive creation time or afterwards: see the [https://drive.google.com/drive/folders/0B1KncyYETiZqNGdHZ0VZSk02cUE 2017 training material] for usage of these commands and acls and tar cheat sheets. For more details see [[Archiving_data|Archiving Data]] &amp;amp;nbsp;&amp;lt;/span&amp;gt; &lt;br /&gt;
[[Category:Data induction]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak_13/04/2022&amp;diff=3471</id>
		<title>CodeBreak 13/04/2022</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak_13/04/2022&amp;diff=3471"/>
		<updated>2022-04-20T00:38:37Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: Created page with &amp;quot; = &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Access files on OOD from remote computer&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Files saved under the home directory on OOD are not accessible except from the OOD, but the requirement was to copy them to a remote (home) computer. The solution is to save the files to a &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;/g/data &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;location, which is accessible from the OOD, but also accessible remotely (using &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;rsync &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;or &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;scp &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;for example).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;To make this even easier, create a symbolic link in your OOD home directory to the location on &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;/g/data&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;, so that it is easy to navigate to that location using the file explorer tools and other methods for accessing the file system in OOD. e.g.&amp;lt;/span&amp;gt; &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#eeeeee;  border:1px solid #cccccc;  padding:5px 10px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;ln -s /g/data/$PROJECT/$USER gdata&amp;lt;/span&amp;gt; &amp;amp;nbsp;&amp;lt;/div&amp;gt; &lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Using hh5 conda environment in OOD jupyterlab&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;There was an issue with loading the CLEX conda environment in OOD JupyterLab. This is &amp;lt;/span&amp;gt;[http://climate-cms.wikis.unsw.edu.au/Conda#Interactive_Analysis_.2F_Jupyter &amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#1155cc;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:underline;  -webkit-text-decoration-skip:none;  text-decoration-skip-ink:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;covered in our wiki&amp;lt;/span&amp;gt;]&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;but the proximate problem was a specific, out-of-date, environment was being specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Convert model longitude to value between 0 and 360 degrees&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;The ACCESS-OM2 model longitude has a minimum of -270 and a maximum of 90 degrees. Using functions from the GSW toolbox for the equation of state of seawater requires longitude values between 0 and 360 degrees. The question revolved around the best way to do this.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;The answer given for this case was to create a small function (e.g. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;lon_360&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;) which will take a value between -270 and 90 and return a value between 0 and 360. The function can then be used in the call to the gsw function directly, e.g.&amp;lt;/span&amp;gt; &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#eeeeee;  border:1px solid #cccccc;  padding:5px 10px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:'Courier New';  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;gsw.some_function(... , lon_360(lon_value), ...)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Interpolate density profiles to new vertical grid&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;Use &amp;lt;/span&amp;gt;[https://xarray.pydata.org/en/v0.12.1/interpolation.html &amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#1155cc;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:underline;  -webkit-text-decoration-skip:none;  text-decoration-skip-ink:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;xarray interpolation&amp;lt;/span&amp;gt;]&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;General Matplotlib Questions&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;The student had questions about the various different ways in which plots are created with matplotlib, especially when searching online and different people suggest different methods.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;We discussed the difference between object oriented plotting and function plotting, and how we usually use the object oriented way as it's easier to take full control of the plot features.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;We compared the figure object to the canvas on which the items are to be drawn, and the axes object the coordinate system inside the figure.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span style=&amp;quot;font-size:13.999999999999998pt;  font-family:Arial;  color:#434343;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;How to run a tested analysis on a bigger dataset in Python&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;The student had an analysis written in a Jupyter Notebook in Python. The problem was that when moving to a bigger dataset, the kernel would die.&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;As the student had no previous knowledge of any parallel programming with Python, we advised them to follow &amp;lt;/span&amp;gt;[https://coecms-training.github.io/parallel/README.html &amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#1155cc;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:underline;  -webkit-text-decoration-skip:none;  text-decoration-skip-ink:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;our latest parallel training&amp;lt;/span&amp;gt;]&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;and then contact us again for follow-up questions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;We also gave information about the &amp;lt;/span&amp;gt;[https://climtas.readthedocs.io/en/latest/ &amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#1155cc;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:underline;  -webkit-text-decoration-skip:none;  text-decoration-skip-ink:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;climtas&amp;lt;/span&amp;gt;]&amp;lt;span style=&amp;quot;font-size:11pt;  font-family:Arial;  color:#000000;  background-color:transparent;  font-weight:400;  font-style:normal;  font-variant:normal;  text-decoration:none;  vertical-align:baseline;  white-space:pre;  white-space:pre-wrap&amp;quot;&amp;gt;package. This package makes it simpler to open a distributed cluster for Dask. Additionally, the student was doing some resampling of data without missing data and always using blocks of the same length. In that specific case, climtas contains a resampling function that will speed up the process compared to the general function from xarray.&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak&amp;diff=3470</id>
		<title>CodeBreak</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak&amp;diff=3470"/>
		<updated>2022-04-20T00:10:31Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The CMS team is running CodeBreak sessions every fortnight.&lt;br /&gt;
&lt;br /&gt;
Those sessions are an opportunity to come and have your questions answered by the CMS team, or to listen in to learn something new. Queries can be on some specific code you are writing, about a training you are trying to understand or broader questions about programming or scientific modelling.&amp;lt;br/&amp;gt; At the start of each session, we will ask you to provide a brief summary of your query so we can organise break-out rooms themed on topics, in order to make it possible to cover as many questions as possible and keep each room focussed on related problems.&amp;lt;br/&amp;gt; When appropriate we will take a few minutes at the beginning of a session to present useful new software or language features, interesting blogs or highlight new developments in modelling. These topics will be announced beforehand as they arise.&lt;br /&gt;
&lt;br /&gt;
= CodeBreak sessions synopsis =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2022 ==&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_13/04/2022|13/04/2022]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Accessing files on OOD from remote computer&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading hh5 conda environment in OOD jupyterlab&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Convert model longitude to value between 0 and 360 degrees&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Interpolate density profiles to new vertical grid&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;General Matplotlib Questions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to apply an analysis to a bigger dataset in Python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_30/03/2022|30/03/2022]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Understanding error in Python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Avoiding repetition in Python through code organisation&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Count the number of elements that follow a given condition&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_16/03/2022|16/03/2022]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Copying global attributes from a NetCDF file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculating differential in xarray&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Regression analysis on spatial data&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_02/03/2022|02/03/2022]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Problem installing the climextRemes Python package&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Understand and use a Fortran program&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_16/02/2022|16/02/2022]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Looping in Python and code organisation&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Memory Consumption and optimisation in Python.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UM Model Crash explanation&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to use [https://github.com/TEOS-10/GSW-Python Gibbs-SeaWater (GSW) Oceanographic Toolbox] to calculate the dynamic height&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code organisation with NCL and more generally.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2021 ==&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_1/9/2021|1/9/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to organise plotting large numbers of plots from heterogenous models in python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Layout of subplots with matplotlib in python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fast percentile calculation in python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_15/9/2021|15/9/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to analyse data weekly and creating weekly climatology&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Curl calculations&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Weighted function in xarray&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to organise calculations dynamically with python data structure (dict) e.g. looping over seasons&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_29/9/2021|29/9/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What to do when variables have coordinates that are not quite equal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate daily means of ERA5 pressure-level data&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conversion of UM outputs between pressure and model levels&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Writing a Xarray DataArray sub-class&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Incompatible datetime and cftime error&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reprojecting data from metres to lat/lon in python&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_13/10/2021|13/10/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Applying land masking to CMIP data&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;netCDF compression&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bathymetry data&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_27/10/2021|27/10/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Panel plot or facet plot along the time axis&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_24/11/2021|24/11/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using dask when calculating Eddy Kinetic Energy for high resolution ocean model&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to calculate antecedent precipitation index efficiently for entire AGCD dataset&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CodeBreak_08/12/2021|08/12/2021]] ===&lt;br /&gt;
&amp;lt;ul style=&amp;quot;margin-top:0;margin-bottom:0;padding-inline-start:48px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Particle trajectory data analysis.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fortran code strange behaviour&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Old Python code crash due to user-installed package needing update&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using ERA5 data as input for the HySplit trajectory model&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ACCESS-OM2 output: selection of time slice&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Understanding xarray, chunking, queue&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Training]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=Training&amp;diff=3468</id>
		<title>Training</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=Training&amp;diff=3468"/>
		<updated>2022-04-12T05:29:34Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Training Needs ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
*[[NCI|Accessing and using NCI]] &lt;br /&gt;
*[[Programming|Programming]] &lt;br /&gt;
*[[ProgrammingTools|ProgrammingTools]] &lt;br /&gt;
&lt;br /&gt;
== CodeBreak ==&lt;br /&gt;
&lt;br /&gt;
CMS runs fortnightly Q&amp;amp;A virtual sessions for the Centre's researchers. We publish a synopsis of those sessions shortly afterwards. You can find all the information on [[CodeBreak|this page]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CMS Presentations ==&lt;br /&gt;
&lt;br /&gt;
CMS used to run weekly training sessions presenting computational and data related topics. Now we run a fortnightly [[CodeBreak|Code Break sessions]].&lt;br /&gt;
&lt;br /&gt;
To get updates on our next training sessions '''[https://mailmanlists.co/mailman/listinfo/training-coe sign up]''' to our email list&lt;br /&gt;
&lt;br /&gt;
All our training videos are available at our '''[https://www.youtube.com/channel/UCSmoK6oWV9O0Hmyt9UdDNsQ Youtube channel]'''&lt;br /&gt;
&lt;br /&gt;
*[https://www.youtube.com/watch?v=aYukDeA-8hE Python Basics] ([https://www.youtube.com/watch?v=-UktTJDh_48 Part 2]) ([https://www.youtube.com/watch?v=pCabwrUa26E Part 3]) &lt;br /&gt;
*[https://www.youtube.com/watch?v=2GmFf9x1qg0 Introduction to NCI] &lt;br /&gt;
*[https://youtu.be/5z75iHJyT8Q Large Dataset Analysis with Jupyter] &lt;br /&gt;
*[https://www.youtube.com/watch?v=aNUe-ukitpU Jupyter Introduction] &lt;br /&gt;
*[https://www.youtube.com/watch?v=pk-UD_4ZAcE WRF at NCI] &lt;br /&gt;
*[https://www.youtube.com/watch?v=DzbtG3UiMUw WRF Q&amp;amp;A] &lt;br /&gt;
*[[Training:NCI_Storage_Monitoring|NCI Storage Monitoring]] 2019-10-02 &lt;br /&gt;
*[https://youtu.be/4tzug0DMZVI Licensing for Data and Software] 2019-07-10 &lt;br /&gt;
*[[Training:_Basic_Python|Basic Python]] 2019-06-05 - 2019-07-03 &lt;br /&gt;
*[[Training:Big_Data|Analysing Big Data]] 2019-05-15 - 2019-05-22 &lt;br /&gt;
*[https://youtu.be/gYKc1mJitEw Data at NCI] 2019-05-08 &lt;br /&gt;
*[[Git_Introduction_old|Git Introduction old]] 2019-04-10 - 2019-04-17 &lt;br /&gt;
*[[Git_Introduction|Git Introduction]] 2020-09-09 - 2020-09-16 &lt;br /&gt;
*[[Bash_Introduction|Bash Introduction]] 2019-03-13 - 2019-04-03 &lt;br /&gt;
*[[WRF_Introduction|WRF Introduction]] 2019-10-23 - 2019-10-30 &lt;br /&gt;
*[http://climate-cms.wikis.unsw.edu.au/Category:Setting_up Setting up]&lt;br /&gt;
&lt;br /&gt;
== Software Carpentry ==&lt;br /&gt;
&lt;br /&gt;
For general programming training we recommend the material from [https://software-carpentry.org/ Software Carpentry], a group whos focus is teaching researchers programming skills. Check with your University if they run Software Carpentry Workshops.&lt;br /&gt;
&lt;br /&gt;
[[Category:Training]]&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak_30/03/2022&amp;diff=3466</id>
		<title>CodeBreak 30/03/2022</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=CodeBreak_30/03/2022&amp;diff=3466"/>
		<updated>2022-04-12T01:04:53Z</updated>

		<summary type="html">&lt;p&gt;C.carouge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Error in Python =&lt;br /&gt;
&lt;br /&gt;
The person was trying to reproduce an example Python program. It output the error:&lt;br /&gt;
&amp;lt;pre&amp;gt;AttributeError: 'function' object has no attribute ‘compute’  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This happened because the person had omitted the parentheses on a previous call to another function. For example, the code below will return the same error:&lt;br /&gt;
&amp;lt;pre&amp;gt;a=xr.DataArray([1,2])&lt;br /&gt;
b=a.mean&lt;br /&gt;
b.mean()&lt;br /&gt;
&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
AttributeError: 'function' object has no attribute 'mean'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the second line, &amp;lt;code&amp;gt;b=a.mean&amp;lt;/code&amp;gt; will return a reference to the meanfunction associated with the DataArray &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt;. In other words, &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; is the mean function, not its result. That is why the error message starts with &amp;lt;code&amp;gt;‘function’ object&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
To get the results from the function, you need to call the function which is done with the &amp;lt;code&amp;gt;()&amp;lt;/code&amp;gt; and any argument you need to give.&lt;br /&gt;
&lt;br /&gt;
= Avoiding repetition in python through code organisation =&lt;br /&gt;
&lt;br /&gt;
It is quite common when starting to write a code to just copy and paste a group of lines if we want, for example, to execute the same calculation on a different variable. If you find that you are doing that a lot, it might be time to go back and re-organise your code. A better organised code is not only more readable but is easier to fix should you find a bug. A well-organised code will limit the number of copied lines so you only have to fix your code in one point.&lt;br /&gt;
&lt;br /&gt;
One simple step is to try to create a function for every block of code you are repeating, using only the variables and parameters that might change between calls as arguments. &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;def myfunction( row, array ):&lt;br /&gt;
&lt;br /&gt;
       param = …  # this doesn’t change no need to use it as an argument for the function&lt;br /&gt;
       … Your calculation …&lt;br /&gt;
&lt;br /&gt;
       return newarray  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case we looked at, one function was applied to each row of a pandas dataframe. To do so we can use the pandas dataframe &amp;lt;code&amp;gt;itterrows()&amp;lt;/code&amp;gt; method and append each result to a list.&amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;results = []&lt;br /&gt;
for index, row in df.iterrows():&lt;br /&gt;
    results.append( myfunction(row, array) )   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Basically &amp;lt;code&amp;gt;&amp;lt;kbd&amp;gt;iterrows()&amp;lt;/kbd&amp;gt;&amp;lt;/code&amp;gt; loops across each row of the dataframe and returns the index and the row itself.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The results list can then be concatenated into one dataArray&lt;br /&gt;
&amp;lt;pre&amp;gt;final = xarray.concat(results, dim='mydim')  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example we looked at was a function to create a subplot, which was then called on different variables, each representing a different region. In such a case, to handle different titles and parameters it can be handy to use a dictionary. &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;regions = {'east': [mslp_east, 1, 'Eastern Australian NRM region'],&lt;br /&gt;
           ‘north’: [mslp_north, 2, 'Northern Australian NRM region'], … }   &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can use the key/values pair to call the same function on each region: &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;for k in regions.keys():&lt;br /&gt;
    fig = subplot(regions[k][0], regions[k][1], regions[k][2])  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dictionary method &amp;lt;code&amp;gt;keys()&amp;lt;/code&amp;gt; here works in a similar way to &amp;lt;code&amp;gt;iterrows()&amp;lt;/code&amp;gt; but returns only the key. Use &amp;lt;code&amp;gt;items() &amp;lt;/code&amp;gt;if you want the key,value pairs and &amp;lt;code&amp;gt;values()&amp;lt;/code&amp;gt; if you want only the values.&lt;br /&gt;
&lt;br /&gt;
= Count the number of elements that follow a given condition =&lt;br /&gt;
&lt;br /&gt;
A question was to count how many events with positive values there are for each grid point given an array like &amp;lt;code&amp;gt;anom(event, lat, lon)&amp;lt;/code&amp;gt;. xarray has a function &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;. This will count the number of valid values along the given dimensions. So we need to filter out the negative values using &amp;lt;code&amp;gt;where()&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt; the number of values left along the &amp;quot;event&amp;quot; dimension.&lt;br /&gt;
&amp;lt;pre&amp;gt;positive_count = anom.where(anom &amp;gt; 0).count(dim=’event’)&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>C.carouge</name></author>
		
	</entry>
</feed>