From f63edb884c9c3866a2b6467d3a0f7ba4d6d03ec0 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Thu, 7 Nov 2024 13:36:20 -0700 Subject: [PATCH 1/3] Adjust demos to include new tides --- crocodileregionalruckus/rm6 | 2 +- demos/minimal_demo_rect.ipynb | 5 +- demos/minimal_demo_subset_global.ipynb | 10 + demos/minimal_demo_three_boundary.ipynb | 507 +++++++++++++++--------- 4 files changed, 327 insertions(+), 197 deletions(-) diff --git a/crocodileregionalruckus/rm6 b/crocodileregionalruckus/rm6 index e019788..df3b1d3 160000 --- a/crocodileregionalruckus/rm6 +++ b/crocodileregionalruckus/rm6 @@ -1 +1 @@ -Subproject commit e019788b9f2e9a35a023e32302f9a9aec5d24bd4 +Subproject commit df3b1d3e0e9b9a9559b02857b2d680e1af51b827 diff --git a/demos/minimal_demo_rect.ipynb b/demos/minimal_demo_rect.ipynb index d3d225c..40e3dd5 100644 --- a/demos/minimal_demo_rect.ipynb +++ b/demos/minimal_demo_rect.ipynb @@ -363,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -378,7 +378,8 @@ } ], "source": [ - "expt.setup_boundary_tides(Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data\"),Path(\"tpxo9.v1.nc\"))" + "# Setup the tides!\n", + "expt.setup_boundary_tides(Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/h_tpxo9.v1.nc\"),Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/u_tpxo9.v1.nc\"), tidal_constituents=[ \"M2\", \"S2\", \"N2\", \"K2\", \"K1\", \"O1\", \"P1\", \"Q1\", \"MM\", \"MF\"])" ] }, { diff --git a/demos/minimal_demo_subset_global.ipynb b/demos/minimal_demo_subset_global.ipynb index 07a7c56..e71ef58 100644 --- a/demos/minimal_demo_subset_global.ipynb +++ b/demos/minimal_demo_subset_global.ipynb @@ -360,6 +360,16 @@ " )" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup the tides!\n", + "expt.setup_boundary_tides(Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/h_tpxo9.v1.nc\"),Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/u_tpxo9.v1.nc\"), tidal_constituents=[ \"M2\", \"S2\", \"N2\", \"K2\", \"K1\", \"O1\", \"P1\", \"Q1\", \"MM\", \"MF\"])" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/demos/minimal_demo_three_boundary.ipynb b/demos/minimal_demo_three_boundary.ipynb index 5523cdc..98ac46b 100644 --- a/demos/minimal_demo_three_boundary.ipynb +++ b/demos/minimal_demo_three_boundary.ipynb @@ -62,11 +62,11 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ - "expt_name = \"nwa-three-boundary-no-tides\"\n", + "expt_name = \"n3b.clean\" # NWA three boundary clean\n", "\n", "# We're taking an already generated grid! Nothing to do here!\n", "latitude_extent = None\n", @@ -100,7 +100,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -110,26 +110,34 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-11-07 08:33:10,204 - crocodileregionalruckus.grid_gen - INFO - Dataset /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/vgrid_75_2m.nc does not contain zl. We need it to regrid the initial condition! I can add it based on dz!\n", + "2024-11-07 08:33:10,204 - crocodileregionalruckus.grid_gen - WARNING - Dataset /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/vgrid_75_2m.nc does not contain zi. Make sure to change ALE_COORDINATE_CONFIG to what your vertical coordinate is called...\n", + "2024-11-07 08:33:10,206 - crocodileregionalruckus.grid_gen - INFO - Added zi to vgrid. Make sure to save this before reading into regional mom!\n", + "2024-11-07 08:33:10,207 - crocodileregionalruckus.grid_gen - INFO - Added zl to vgrid. Make sure to save this before reading into regional mom!\n" + ] + } + ], "source": [ - "# We are reading the Grid from Fred's Work, but just a sample vgrid. ..based on the vgrid_75_2m fred has.\n", + "# We are reading the HGrid from Fred's Work, or we call grid_gen.subset_global_hgrid\n", "\n", "\n", - "# Pick One! For Fred's Work (in verify_and_modify_read_vgrid) we have to add in the mid point for the regridding of the Initial Condition and I added the interface levels because MOM6 was giving me errors.\n", + "# For Fred's Work (in verify_and_modify_read_vgrid) we have to add in the mid point for the regridding of the Initial Condition and I added the interface levels because then we can use regional-mom6 defaults instead of changing the ALE_COORDINATE_CONFIG to DZ and other kind of big changes....\n", "\n", "\n", "# From Fred's Work\n", - "#vgrid = grid_gen_obj.verify_and_modify_read_vgrid(\"/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/nwa-three-boundary/vgrid_75_2m.nc\")\n", - "\n", - "# From RM6\n", - "vgrid = grid_gen_obj.create_vgrid(75, 10,6500, 45)" + "vgrid = grid_gen_obj.verify_and_modify_read_vgrid(\"/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/vgrid_75_2m.nc\")\n" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -146,7 +154,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -166,6 +174,7 @@ " vgrid_type = \"from_file\",\n", " expt_name = expt_name,\n", " boundaries = [\"south\", \"north\", \"east\"],\n", + " tidal_constituents=[ \"M2\", \"S2\", \"N2\", \"K2\", \"K1\", \"O1\", \"P1\", \"Q1\", \"MM\", \"MF\"],\n", "\n", ")" ] @@ -185,7 +194,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -219,11 +228,11 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ - "# Read from Fred's Work\n" + "# We read this from Fred's work or we call grid_gen.subset_global_topo." ] }, { @@ -235,7 +244,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -246,7 +255,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 11, "metadata": { "tags": [ "nbval-ignore-output", @@ -257,10 +266,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 7, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" }, @@ -276,18 +285,19 @@ } ], "source": [ - "expt.bathymetry.depth.plot()" + "expt.bathymetry.depth.plot()\n", + "#You should notice that the Pacific is masked out as well as the bays of Canada." ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ - "# Then mask out parts of the domain we don't want by selecting a point in the ocean domain we do want. Fred already masked it out!!!! \n", + "# If we weren't using Fred's bathy, we would then mask out parts of the domain we don't want by selecting a point in the ocean domain we do want. \n", "\n", - "# grid_gen_obj.mask_disconnected_ocean_areas is the function though\n" + "# Use grid_gen_obj.mask_disconnected_ocean_areas\n" ] }, { @@ -305,21 +315,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 13, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "INITIAL CONDITIONS\n", - "Regridding Velocities... Done.\n", - "Regridding Tracers... Done.\n", - "Regridding Free surface... Done.\n", - "Saving outputs... done setting up initial condition.\n" - ] - } - ], + "outputs": [], "source": [ "# Define a mapping from the GLORYS variables and dimensions to the MOM6 ones\n", "ocean_varnames = {\"time\": \"time\",\n", @@ -330,129 +328,192 @@ " \"u\": \"uo\",\n", " \"v\": \"vo\",\n", " \"tracers\": {\"salt\": \"so\", \"temp\": \"thetao\"}\n", - " }\n", - "\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Set up the initial condition\n", - "expt.setup_initial_condition(\n", - " Path(glorys_path) / \"ic_unprocessed.nc\", # directory where the unprocessed initial condition is stored, as defined earlier\n", - " ocean_varnames,\n", - " arakawa_grid=\"A\"\n", - " ) \n", - "\n", - "# # Set up the THREE boundary conditions. This is a huge domain so if you have enough of a computer do it this way.... I don't, so we do it in parts in the next three cells.\n", - "# expt.setup_ocean_state_boundaries(\n", - "# Path(glorys_path),\n", - "# ocean_varnames,\n", - "# arakawa_grid = \"A\"\n", - "# )" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[########################################] | 100% Completed | 162.25 ms\n", - "Done.\n" - ] - } - ], - "source": [ - "orientation = \"north\"\n", - "expt.setup_single_boundary(Path(\n", - " os.path.join(\n", - " (glorys_path), (orientation + \"_unprocessed.nc\")\n", - " )\n", - " ),\n", - " varnames = ocean_varnames,\n", - " orientation = orientation,\n", - " segment_number = expt.find_MOM6_rectangular_orientation(orientation),)" + " }" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[########################################] | 100% Completed | 115.87 ms\n", - "Done.\n" + "INITIAL CONDITIONS\n", + "Regridding Velocities... Done.\n", + "Regridding Tracers... Done.\n", + "Regridding Free surface... Done.\n", + "Saving outputs... done setting up initial condition.\n" ] } ], "source": [ - "orientation = \"east\"\n", - "expt.setup_single_boundary(Path(\n", - " os.path.join(\n", - " (glorys_path), (orientation + \"_unprocessed.nc\")\n", - " )\n", - " ),\n", - " varnames = ocean_varnames,\n", - " orientation = orientation,\n", - " segment_number = expt.find_MOM6_rectangular_orientation(orientation))" + "# Set up the initial condition\n", + "expt.setup_initial_condition(\n", + " Path(glorys_path) / \"ic_unprocessed.nc\", # directory where the unprocessed initial condition is stored, as defined earlier\n", + " ocean_varnames,\n", + " arakawa_grid=\"A\"\n", + " ) " ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[########################################] | 100% Completed | 115.33 ms\n", + "NOTE: the 'setup_run_directories' method does understand the less than four boundaries but be careful. Please check the MOM_input/override file carefully to reflect the number of boundaries you have, and their orientations. You should be able to find the relevant section in the MOM_input/override file by searching for 'segment_'. Ensure that the segment names match those in your inputdir/forcing folder\n", + "Processing south boundary...2024-11-07 08:56:33,972 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:56:35,210 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:35,321 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:35,378 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:56:35,387 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in salt_segment_001\n", + "2024-11-07 08:56:35,389 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:35,389 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to salt_segment_001\n", + "2024-11-07 08:56:35,393 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in temp_segment_001\n", + "2024-11-07 08:56:35,394 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:35,395 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to temp_segment_001\n", + "2024-11-07 08:56:35,398 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in u_segment_001\n", + "2024-11-07 08:56:35,399 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:35,400 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to u_segment_001\n", + "2024-11-07 08:56:35,404 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in v_segment_001\n", + "2024-11-07 08:56:35,405 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:35,406 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to v_segment_001\n", + "2024-11-07 08:56:35,410 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to eta_segment_001\n", + "2024-11-07 08:56:35,414 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "Done.\n", + "Processing north boundary...2024-11-07 08:56:35,953 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:56:44,964 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:45,075 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:45,135 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:56:45,137 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in salt_segment_002\n", + "2024-11-07 08:56:45,138 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:45,139 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to salt_segment_002\n", + "2024-11-07 08:56:45,142 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in temp_segment_002\n", + "2024-11-07 08:56:45,143 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:45,144 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to temp_segment_002\n", + "2024-11-07 08:56:45,147 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in u_segment_002\n", + "2024-11-07 08:56:45,148 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:45,149 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to u_segment_002\n", + "2024-11-07 08:56:45,152 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in v_segment_002\n", + "2024-11-07 08:56:45,153 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:45,154 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to v_segment_002\n", + "2024-11-07 08:56:45,158 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to eta_segment_002\n", + "2024-11-07 08:56:45,162 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "Done.\n", + "Processing east boundary...2024-11-07 08:56:45,488 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:56:47,599 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:47,690 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:56:47,744 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:56:47,745 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in salt_segment_003\n", + "2024-11-07 08:56:47,746 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:47,747 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to salt_segment_003\n", + "2024-11-07 08:56:47,750 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in temp_segment_003\n", + "2024-11-07 08:56:47,751 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:47,752 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to temp_segment_003\n", + "2024-11-07 08:56:47,755 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in u_segment_003\n", + "2024-11-07 08:56:47,756 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:47,757 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to u_segment_003\n", + "2024-11-07 08:56:47,760 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Renaming vertical coordinate to nz_... in v_segment_003\n", + "2024-11-07 08:56:47,762 - crocodileregionalruckus.rm6.regional_mom6.regridding.vertical_coordinate_encoding - INFO - Replacing old depth coordinates with incremental integers\n", + "2024-11-07 08:56:47,762 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to v_segment_003\n", + "2024-11-07 08:56:47,766 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to eta_segment_003\n", + "2024-11-07 08:56:47,770 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", "Done.\n" ] } ], "source": [ - "orientation = \"south\"\n", - "expt.setup_single_boundary(Path(\n", - " os.path.join(\n", - " (glorys_path), (orientation + \"_unprocessed.nc\")\n", - " )\n", - " ),\n", - " varnames = ocean_varnames,\n", - " orientation = orientation,\n", - " segment_number = expt.find_MOM6_rectangular_orientation(orientation))" + "# Set up the THREE boundary conditions. This is a huge domain so if you have enough of a computer do it this way.... else you can always split it into parts\n", + "expt.setup_ocean_state_boundaries(\n", + " Path(glorys_path),\n", + " ocean_varnames,\n", + " arakawa_grid = \"A\"\n", + " )" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Processing south boundary...Done\n", - "Processing north boundary...Done\n", - "Processing east boundary...Done\n" + "Processing south boundary...2024-11-07 08:58:28,048 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:58:42,747 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:58:42,748 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:58:42,751 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:58:42,754 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zamp_segment_001\n", + "2024-11-07 08:58:42,755 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zphase_segment_001\n", + "2024-11-07 08:58:42,756 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "2024-11-07 08:58:42,764 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:58:57,395 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:59:12,324 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:12,325 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:12,325 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:12,326 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:12,334 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:59:12,336 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:12,340 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uamp_segment_001\n", + "2024-11-07 08:59:12,341 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vamp_segment_001\n", + "2024-11-07 08:59:12,342 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uphase_segment_001\n", + "2024-11-07 08:59:12,343 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vphase_segment_001\n", + "2024-11-07 08:59:12,344 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "Done\n", + "Processing north boundary...2024-11-07 08:59:12,355 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:59:26,892 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:26,894 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:26,897 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:59:26,899 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zamp_segment_002\n", + "2024-11-07 08:59:26,900 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zphase_segment_002\n", + "2024-11-07 08:59:26,901 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "2024-11-07 08:59:26,909 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:59:41,445 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 08:59:55,982 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:55,983 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:55,984 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:55,985 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:55,992 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 08:59:55,995 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 08:59:55,998 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uamp_segment_002\n", + "2024-11-07 08:59:55,999 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vamp_segment_002\n", + "2024-11-07 08:59:56,000 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uphase_segment_002\n", + "2024-11-07 08:59:56,001 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vphase_segment_002\n", + "2024-11-07 08:59:56,002 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "Done\n", + "Processing east boundary...2024-11-07 08:59:56,012 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 09:00:10,470 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:10,472 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:10,475 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 09:00:10,477 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zamp_segment_003\n", + "2024-11-07 09:00:10,478 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to zphase_segment_003\n", + "2024-11-07 09:00:10,479 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "2024-11-07 09:00:10,486 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 09:00:24,886 - crocodileregionalruckus.rm6.regional_mom6.regridding.create_regridder - INFO - Creating Regridder\n", + "2024-11-07 09:00:39,286 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:39,287 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:39,287 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:39,288 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:39,299 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_or_update_time_dim - INFO - Adding time dimension\n", + "2024-11-07 09:00:39,301 - crocodileregionalruckus.rm6.regional_mom6.regridding.fill_missing_data - INFO - Forward filling in missing data along z-dim\n", + "2024-11-07 09:00:39,305 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uamp_segment_003\n", + "2024-11-07 09:00:39,306 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vamp_segment_003\n", + "2024-11-07 09:00:39,307 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to uphase_segment_003\n", + "2024-11-07 09:00:39,308 - crocodileregionalruckus.rm6.regional_mom6.regridding.add_secondary_dimension - INFO - Adding perpendicular dimension to vphase_segment_003\n", + "2024-11-07 09:00:39,309 - crocodileregionalruckus.rm6.regional_mom6.regridding.generate_encoding - INFO - Generating encoding dictionary\n", + "Done\n" ] } ], "source": [ - "expt.setup_boundary_tides(Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data\"),Path(\"tpxo9.v1.nc\")\n", - ")" + "# Setup the tides!\n", + "expt.setup_boundary_tides(Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/h_tpxo9.v1.nc\"),Path(\"/glade/u/home/manishrv/manish_scratch_symlink/inputs_rm6/tidal_data/u_tpxo9.v1.nc\"), tidal_constituents=[ \"M2\", \"S2\", \"N2\", \"K2\", \"K1\", \"O1\", \"P1\", \"Q1\", \"MM\", \"MF\"])" ] }, { @@ -468,7 +529,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -498,24 +559,29 @@ "Added BRUSHCUTTER_MODE to MOM_override with value {'value': 'True', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_001 to MOM_override with value {'value': '\"J=0,I=0:N,FLATHER,ORLANSKI,NUDGED,ORLANSKI_TAN,NUDGED_TAN\"', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES to MOM_override with value {'value': '0.3, 360.0', 'override': True, 'comment': None}\n", - "Added OBC_SEGMENT_001_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_001.nc(u),V=file:forcing_obc_segment_001.nc(v),SSH=file:forcing_obc_segment_001.nc(eta),TEMP=file:forcing_obc_segment_001.nc(temp),SALT=file:forcing_obc_segment_001.nc(salt)\"', 'override': True, 'comment': None}\n", + "Added OBC_SEGMENT_001_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_001.nc(u),V=file:forcing_obc_segment_001.nc(v),SSH=file:forcing_obc_segment_001.nc(eta),TEMP=file:forcing_obc_segment_001.nc(temp),SALT=file:forcing_obc_segment_001.nc(salt),Uamp=file:tu_segment_001.nc(uamp),Uphase=file:tu_segment_001.nc(uphase),Vamp=file:tu_segment_001.nc(vamp),Vphase=file:tu_segment_001.nc(vphase),SSHamp=file:tz_segment_001.nc(zamp),SSHphase=file:tz_segment_001.nc(zphase)\"', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_002 to MOM_override with value {'value': '\"J=N,I=N:0,FLATHER,ORLANSKI,NUDGED,ORLANSKI_TAN,NUDGED_TAN\"', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES to MOM_override with value {'value': '0.3, 360.0', 'override': True, 'comment': None}\n", - "Added OBC_SEGMENT_002_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_002.nc(u),V=file:forcing_obc_segment_002.nc(v),SSH=file:forcing_obc_segment_002.nc(eta),TEMP=file:forcing_obc_segment_002.nc(temp),SALT=file:forcing_obc_segment_002.nc(salt)\"', 'override': True, 'comment': None}\n", + "Added OBC_SEGMENT_002_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_002.nc(u),V=file:forcing_obc_segment_002.nc(v),SSH=file:forcing_obc_segment_002.nc(eta),TEMP=file:forcing_obc_segment_002.nc(temp),SALT=file:forcing_obc_segment_002.nc(salt),Uamp=file:tu_segment_002.nc(uamp),Uphase=file:tu_segment_002.nc(uphase),Vamp=file:tu_segment_002.nc(vamp),Vphase=file:tu_segment_002.nc(vphase),SSHamp=file:tz_segment_002.nc(zamp),SSHphase=file:tz_segment_002.nc(zphase)\"', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_003 to MOM_override with value {'value': '\"I=N,J=0:N,FLATHER,ORLANSKI,NUDGED,ORLANSKI_TAN,NUDGED_TAN\"', 'override': True, 'comment': None}\n", "Added OBC_SEGMENT_003_VELOCITY_NUDGING_TIMESCALES to MOM_override with value {'value': '0.3, 360.0', 'override': True, 'comment': None}\n", - "Added OBC_SEGMENT_003_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_003.nc(u),V=file:forcing_obc_segment_003.nc(v),SSH=file:forcing_obc_segment_003.nc(eta),TEMP=file:forcing_obc_segment_003.nc(temp),SALT=file:forcing_obc_segment_003.nc(salt)\"', 'override': True, 'comment': None}\n" + "Added OBC_SEGMENT_003_DATA to MOM_override with value {'value': '\"U=file:forcing_obc_segment_003.nc(u),V=file:forcing_obc_segment_003.nc(v),SSH=file:forcing_obc_segment_003.nc(eta),TEMP=file:forcing_obc_segment_003.nc(temp),SALT=file:forcing_obc_segment_003.nc(salt),Uamp=file:tu_segment_003.nc(uamp),Uphase=file:tu_segment_003.nc(uphase),Vamp=file:tu_segment_003.nc(vamp),Vphase=file:tu_segment_003.nc(vphase),SSHamp=file:tz_segment_003.nc(zamp),SSHphase=file:tz_segment_003.nc(zphase)\"', 'override': True, 'comment': None}\n", + "Added TIDES to MOM_override with value {'value': 'True', 'override': True, 'comment': None}\n", + "Added OBC_TIDE_ADD_EQ_PHASE to MOM_override with value {'value': 'True', 'override': True, 'comment': None}\n", + "Added OBC_TIDE_N_CONSTITUENTS to MOM_override with value {'value': 10, 'override': True, 'comment': None}\n", + "Added OBC_TIDE_CONSTITUENTS to MOM_override with value {'value': '\"M2, S2, N2, K2, K1, O1, P1, Q1, MM, MF\"', 'override': True, 'comment': None}\n", + "Added OBC_TIDE_REF_DATE to MOM_override with value {'value': '2005, 1, 1', 'override': True, 'comment': None}\n" ] } ], "source": [ - "expt.minimum_depth = 9.95\n", - "expt.setup_run_directory(surface_forcing = \"jra\", overwrite = True)" + "expt.minimum_depth = 9.95 # Fred bathy is this\n", + "expt.setup_run_directory(surface_forcing = \"jra\", with_tides = True)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -531,7 +597,7 @@ "'9.95'" ] }, - "execution_count": 8, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -542,36 +608,7 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "This parameter ALE_COORDINATE_CONFIG is being replaced from \"FILE:vcoord.nc,dz\" to \"FILE:vcoord.nc,dz\" in MOM_override\n", - "Added DIAG_COORD_DEF_Z to MOM_override with value {'value': '\"FILE:vcoord.nc,dz\"', 'override': True, 'comment': None}\n" - ] - }, - { - "data": { - "text/plain": [ - "'No original val'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# expt.change_MOM_parameter(\"ALE_COORDINATE_CONFIG\",'\"FILE:vcoord.nc,dz\"', override = True) # Fred's Vertical Coordinate uses dz.\n", - "# expt.change_MOM_parameter(\"DIAG_COORD_DEF_Z\",'\"FILE:vcoord.nc,dz\"', override = True) # Fred's Vertical Coordinate uses dz.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 9, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -587,7 +624,7 @@ "'No original val'" ] }, - "execution_count": 9, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -604,17 +641,17 @@ "\n", "So far I've used Alper's [GUI](https://github.com/ESMCI/visualCaseGen?tab=readme-ov-file) branch of CESM. Clone respective branch of CESM and then run the generate case command. Below is the command I used to generate a global, MOM6 only run forced with JRA data atmosphere\n", "\n", - "`/glade/u/home/abarnes/cesm-runs/visualCaseGen/cesm2_3_beta17_gui/cime/scripts/create_newcase --compset 1850_DATM%JRA_SLND_SICE_MOM6_SROF_SGLC_SWAV --res TL319_t232 --case /glade/u/home/manishrv/cases/nwa-three-boundary-new-v --machine derecho --run-unsupported --project p93300012 --non-local`" + "`/glade/u/home/abarnes/cesm-runs/visualCaseGen/cesm2_3_beta17_gui/cime/scripts/create_newcase --compset 1850_DATM%JRA_SLND_SICE_MOM6_SROF_SGLC_SWAV --res TL319_t232 --case /glade/u/home/manishrv/cases/n3b.clean --machine derecho --run-unsupported --project p93300012 --non-local`" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "# Save the path where the new CESM config lives\n", - "CESM_path = Path(f\"/glade/u/home/manishrv/cases/nwa-three-boundary\")" + "CESM_path = Path(f\"/glade/u/home/manishrv/cases/n3b.clean\")" ] }, { @@ -626,44 +663,37 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Copying input.nml, diag_table, MOM_input_and MOM_override to /glade/u/home/manishrv/cases/nwa-three-boundary/SourceMods/src.mom\n", - "Adding NIGLOBAL = 740, NJGLOBAL = 780, and INPUTDIR = /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/nwa-three-boundary-no-tides to MOM_override\n", - "Removing references to MOM_layout in input.nml\n", - "Add MOM_override to parameter_filename in input.nml\n", - "Move all of the forcing files out of the forcing directory to the main inputdir\n", - "Find and replace instances of forcing/ with nothing in the MOM_input file\n", - "Find and replace instances of forcing/ with nothing in the MOM_input file\n", - "Make ESMF grid and save to inputdir\n", - "Make xml changes. Setting OCN_NX=740, OCN_NY=780\n", - "MOM6_MEMORY_MODE=dynamic_symmetric\n", - "OCN_DOMAIN_MESH, ICE_DOMAIN_MESH, MASK_MESH, MASK_GRID, OCN_GRID, ICE_GRID =/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/nwa-three-boundary-no-tides/esmf_mesh.nc\n", - "RUN_REFDATE, RUN_STARTDATE = 2005-01-01\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "For your changes to take effect, run:\n", - "./case.build --clean-all\n", - "./case.build\n", - "Make symlinks from the CESM directory to the mom input directory and the CESM run directory\n" + "2024-11-07 09:01:37,299 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Copying input.nml, diag_table, MOM_input_and MOM_override to /glade/u/home/manishrv/cases/n3b.clean/SourceMods/src.mom\n", + "2024-11-07 09:01:37,312 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Adding NIGLOBAL = 740, NJGLOBAL = 780, and INPUTDIR = /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean to MOM_override\n", + "2024-11-07 09:01:37,313 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Add MOM_override to parameter_filename in input.nml\n", + "2024-11-07 09:01:37,313 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Removing reference to MOM_layout in input.nml and add MOM_override to parameter_filename in input.nml\n", + "2024-11-07 09:01:37,314 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - \n", + "2024-11-07 09:01:37,314 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Modifying line: parameter_filename = 'MOM_input', 'MOM_layout', 'MOM_override'\n", + "2024-11-07 09:01:37,315 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Modifying line: parameter_filename = 'SIS_input', 'MOM_layout'\n", + "2024-11-07 09:01:37,315 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Move all of the forcing files out of the forcing directory to the main inputdir\n", + "2024-11-07 09:01:37,320 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Find and replace instances of forcing/ with nothing in the MOM_input file\n", + "2024-11-07 09:01:37,321 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Make ESMF grid and save to inputdir\n", + "2024-11-07 09:01:39,465 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: ROOTPE_OCN to 128!\n", + "2024-11-07 09:01:40,284 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: NTASKS_OCN to 768!\n", + "2024-11-07 09:01:40,772 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: OCN_NX to 740!\n", + "2024-11-07 09:01:41,255 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: OCN_NY to 780!\n", + "2024-11-07 09:01:41,737 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: MOM6_MEMORY_MODE to dynamic_symmetric!\n", + "2024-11-07 09:01:42,216 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: OCN_DOMAIN_MESH to /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/esmf_mesh.nc!\n", + "2024-11-07 09:01:42,705 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: ICE_DOMAIN_MESH to /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/esmf_mesh.nc!\n", + "2024-11-07 09:01:43,206 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: MASK_MESH to /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/esmf_mesh.nc!\n", + "2024-11-07 09:01:43,691 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: OCN_GRID to RegCaseGen!\n", + "2024-11-07 09:01:44,189 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: RUN_REFDATE to 2005-01-01!\n", + "2024-11-07 09:01:44,676 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: RUN_STARTDATE to 2005-01-01!\n", + "2024-11-07 09:01:45,169 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: PROJECT to p93300612!\n", + "2024-11-07 09:01:45,667 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - XML Change: CHARGE_ACCOUNT to p93300612!\n", + "2024-11-07 09:01:46,159 - crocodileregionalruckus.regional_casegen.cesm_tools - INFO - Make symlinks from the CESM directory to the mom input directory and the CESM run directory\n" ] } ], @@ -688,13 +718,102 @@ "\n", "should at least run. Of course from here you'll have a lot of other things to fiddle around with to make it run *well!* " ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-11-07 09:04:13,746 - crocodileregionalruckus.driver - INFO - Writing Config File.....\n", + "2024-11-07 09:04:13,747 - crocodileregionalruckus.driver - INFO - Searching /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean for bathymetry, hgrid, vgrid\n", + "2024-11-07 09:04:13,747 - crocodileregionalruckus.driver - INFO - Searching /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean for initial conditions\n", + "2024-11-07 09:04:13,748 - crocodileregionalruckus.driver - INFO - Searching /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean for ocean_state conditions\n", + "2024-11-07 09:04:13,749 - crocodileregionalruckus.driver - INFO - Searching /glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean for tides\n", + "2024-11-07 09:04:13,750 - crocodileregionalruckus.driver - INFO - Searching /glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean for run files\n", + "2024-11-07 09:04:13,752 - crocodileregionalruckus.driver - INFO - Done.\n" + ] + }, + { + "data": { + "text/plain": [ + "{'expt_name': 'n3b.clean',\n", + " 'date_range': ['2005-01-01 00:00:00', '2005-04-01 00:00:00'],\n", + " 'latitude_extent': (5.201175132990646, 58.375120887727846),\n", + " 'longitude_extent': (-98.74996846773888, -36.33333333333326),\n", + " 'resolution': 0.05,\n", + " 'number_vertical_layers': None,\n", + " 'layer_thickness_ratio': None,\n", + " 'depth': None,\n", + " 'hgrid_type': 'from_file',\n", + " 'repeat_year_forcing': False,\n", + " 'ocean_mask': None,\n", + " 'layout': None,\n", + " 'minimum_depth': 9.95,\n", + " 'tidal_constituents': ['M2',\n", + " 'S2',\n", + " 'N2',\n", + " 'K2',\n", + " 'K1',\n", + " 'O1',\n", + " 'P1',\n", + " 'Q1',\n", + " 'MM',\n", + " 'MF'],\n", + " 'boundaries': ['south', 'north', 'east'],\n", + " 'mom_input_dir': '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean',\n", + " 'mom_run_dir': '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean',\n", + " 'bathymetry': '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/bathymetry.nc',\n", + " 'hgrid': '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/hgrid.nc',\n", + " 'vgrid': '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/vcoord.nc',\n", + " 'initial_conditions': ['/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/init_vel.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/init_eta.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/init_tracers.nc'],\n", + " 'ocean_state': ['/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/forcing_obc_segment_003.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/forcing_obc_segment_001.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/forcing_obc_segment_002.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/weights/bilinear_velocity_weights_east.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/weights/bilinear_velocity_weights_north.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/weights/bilinear_velocity_weights_south.nc'],\n", + " 'tides': ['/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/regrid_segment_003_tidal_elev.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/regrid_segment_001_tidal_elev.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/regrid_segment_002_tidal_elev.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tu_segment_002.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tu_segment_001.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tu_segment_003.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tz_segment_003.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tz_segment_002.nc',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_input/n3b.clean/tz_segment_001.nc'],\n", + " 'run_files': ['/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/MOM_input',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/MOM_override',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/MOM_layout',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/SIS_input',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/field_table',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/input.nml',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/diag_table',\n", + " '/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/data_table']}" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Save the experiment\n", + "\n", + "crr.driver.crr_driver.write_config_file(expt, \"/glade/u/home/manishrv/documents/nwa12_0.1/mom_run/n3b.clean/n3b.clean_config.json\")" + ] } ], "metadata": { "kernelspec": { - "display_name": "crr_dev", + "display_name": "Python [conda env:crr_dev]", "language": "python", - "name": "python3" + "name": "conda-env-crr_dev-py" }, "language_info": { "codemirror_mode": { From 526184b9f44e73687b56d8b80c44b34e4d6f0f21 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Thu, 7 Nov 2024 13:37:00 -0700 Subject: [PATCH 2/3] Rename with_crr to indicate not supported --- demos/{with_crr_demo.ipynb => unsupported_with_crr_demo.ipynb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename demos/{with_crr_demo.ipynb => unsupported_with_crr_demo.ipynb} (100%) diff --git a/demos/with_crr_demo.ipynb b/demos/unsupported_with_crr_demo.ipynb similarity index 100% rename from demos/with_crr_demo.ipynb rename to demos/unsupported_with_crr_demo.ipynb From 8fba8f5a292a8595b2007685124cc15f6df809f1 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Wed, 13 Nov 2024 16:21:36 -0700 Subject: [PATCH 3/3] rand --- crocodileregionalruckus/regional_casegen | 2 +- crocodileregionalruckus/rm6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crocodileregionalruckus/regional_casegen b/crocodileregionalruckus/regional_casegen index ceb6048..300fbc1 160000 --- a/crocodileregionalruckus/regional_casegen +++ b/crocodileregionalruckus/regional_casegen @@ -1 +1 @@ -Subproject commit ceb60488fe97a605b9c79c17840da026ba993cd8 +Subproject commit 300fbc1c87d022389ef11c67a8a54a5c9183da10 diff --git a/crocodileregionalruckus/rm6 b/crocodileregionalruckus/rm6 index df3b1d3..798a9f4 160000 --- a/crocodileregionalruckus/rm6 +++ b/crocodileregionalruckus/rm6 @@ -1 +1 @@ -Subproject commit df3b1d3e0e9b9a9559b02857b2d680e1af51b827 +Subproject commit 798a9f42cd225ecaa024a5e4a5425cacb35efbca