Skip to content

Commit

Permalink
Merge pull request #205 from nusbaume/pop_diag_updates
Browse files Browse the repository at this point in the history
Fix some strings in POP diagnostics (better to use f-strings).
  • Loading branch information
nusbaume authored Jul 1, 2024
2 parents 330ff68 + c5ff3ef commit 0883c16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions notebooks/diagnostics/pop/advanced_pop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"casename = 'b.day2.1'\n",
"\n",
"# Here we point to the archive directory from your b.day2.1 simulation\n",
"pth = f\"/glade/derecho/scratch/{username}/archive/' + casename + '/ocn/hist/\"\n",
"pth = f\"/glade/derecho/scratch/{username}/archive/{casename}/ocn/hist/\"\n",
"\n",
"# If you were unable to successfully run the b.day2.1 simulation, then feel free to use\n",
"# this provided simulation data instead:\n",
"#pth = '/glade/campaign/cesm/tutorial/tutorial_2023_archive/' + casename + '/ocn/hist/'\n",
"#pth = f'/glade/campaign/cesm/tutorial/tutorial_2023_archive/{casename}/ocn/hist/'\n",
"\n",
"# Print path to screen\n",
"pth\n",
Expand Down Expand Up @@ -312,9 +312,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "NPL 2022b",
"display_name": "NPL 2023b",
"language": "python",
"name": "npl-2022b"
"name": "npl-2023b"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -326,7 +326,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
15 changes: 8 additions & 7 deletions notebooks/diagnostics/pop/basics_pop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@
"metadata": {},
"outputs": [],
"source": [
"# Set your username here:\n",
"username = \"PUT_USER_NAME_HERE\"\n",
"\n",
"if \"client\" in locals():\n",
" client.close()\n",
" del client\n",
Expand All @@ -201,11 +204,10 @@
" memory=\"8GB\", # Amount of memory\n",
" processes=1, # How many processes\n",
" queue=\"casper\", # The type of queue to utilize (/glade/u/apps/dav/opt/usr/bin/execcasper)\n",
" log_directory=\"/glade/derecho/scratch/$USER/dask/\", # Use your local directory\n",
" log_directory=f\"/glade/derecho/scratch/{username}/dask/\", # Use your local directory\n",
" resource_spec=\"select=1:ncpus=1:mem=8GB\", # Specify resources\n",
" project=\"UESM00??\", # Input your project ID here\n",
" project=\"UESM00??\", # Input your project ID here\n",
" walltime=\"02:00:00\", # Amount of wall time\n",
" # interface=\"ib0\", # Interface to use\n",
")\n",
"# cluster.adapt(maximum_jobs=24, minimum_jobs=2) # If you want to force everything to be quicker, increase the number of minimum jobs, \n",
"# # but sometimes then it will take a while until you get them assigned, so it's a trade-off\n",
Expand All @@ -231,16 +233,15 @@
"metadata": {},
"outputs": [],
"source": [
"# Set your username here:\n",
"username = \"PUT_USER_NAME_HERE\"\n",
"# Set your casename here:\n",
"casename = 'b.day2.1'\n",
"\n",
"# Here we point to the archive directory from your b.day2.1 simulation\n",
"pth = f\"/glade/derecho/scratch/{username}/archive/\" + casename + \"/ocn/hist/\"\n",
"pth = f\"/glade/derecho/scratch/{username}/archive/{casename}/ocn/hist/\"\n",
"\n",
"# If you were unable to successfully run the b.day2.1 simulation, then feel free to use\n",
"# this provided simulation data instead:\n",
"#pth = '/glade/campaign/cesm/tutorial/tutorial_2023_archive/' + casename + '/ocn/hist/'\n",
"#pth = f'/glade/campaign/cesm/tutorial/tutorial_2023_archive/{casename}/ocn/hist/'\n",
"\n",
"# Print path to screen\n",
"pth"
Expand Down

0 comments on commit 0883c16

Please sign in to comment.