Skip to content

Updates to the USNAEC60to30cr10 mesh and coastal_tools.py - #90

Merged
pwolfram merged 2 commits into
MPAS-Dev:ocean/developfrom
sbrus89:USNAEC60to30cr8
Oct 6, 2018
Merged

pwolfram merged 2 commits into
MPAS-Dev:ocean/developfrom
sbrus89:USNAEC60to30cr8

Conversation

@sbrus89

@sbrus89 sbrus89 commented Oct 5, 2018 •

Copy link
Copy Markdown
  • USNAEC60to30cr10 mesh:

    • Reduce coastal resolution to 8km
    • Rename to USNAEC60to30cr8
    • Compute the cell width function in stages.
    • Add the Caribbean and Bering Sea
    • Add Hawaii
    • Remove resolution in Northern Alaska
    • Remove resolution in St. Lawence Bay
    • Prevent high resolution from crossing into the Pacific in near
      Panama
  • coastal_tools.py

    • Bug fix for computing distance across antimeridian line
    • Add exclude boxes for regions to not apply the cell width function

 - USNAEC60to30cr10 mesh:

   * Reduce coastal resolution to 8km
   * Rename to USNAEC60to30cr8
   * Compute the cell width function in stages.
   * Add the Caribbean and Bering Sea
   * Add Hawaii
   * Remove resolution in Northern Alaska
   * Remove resolution in St. Lawence Bay
   * Prevent high resolution from crossing into the Pacific in near
     Panama

 - coastal_tools.py

   * Bug fix for computing distance across antimeridian line
   * Add exclude boxes for regions to not apply the cell width function
@pwolfram

pwolfram commented Oct 5, 2018 •

Copy link
Copy Markdown
Contributor

@sbrus89, does this error look familiar?

Step 1. Build cellWidth array as function of latitude and longitude
***Gulf Coast***
Background grid dimensions: 1800 3600
Regional bathymetry data shape: (1681, 4321)
Extracting coastline
Done
Regional bathymetry data shape: (961, 721)
Extracting coastline
Done
Regional bathymetry data shape: (481, 1201)
Extracting coastline
Done
Traceback (most recent call last):
  File "./build_mesh.py", line 28, in <module>
    cellWidth, lon, lat = define_base_mesh.cellWidthVsLatLon()
  File "./define_base_mesh.py", line 35, in cellWidthVsLatLon
    cell_width,lon,lat = ct.coastal_refined_mesh(params,cell_width,lon,lat)
  File "/lustre/scratch4/turquoise/.mdt1/pwolfram/PR_tests/MPAS-Model/testing_and_setup/compass/ocean/jigsaw_to_MPAS/coastal_tools.py", line 245, in coastal_refined_mesh
    call_count)
  File "/lustre/scratch4/turquoise/.mdt1/pwolfram/PR_tests/MPAS-Model/testing_and_setup/compass/ocean/jigsaw_to_MPAS/coastal_tools.py", line 388, in extract_coastlines
    lon, lat, zdata, plot_box)
  File "/lustre/scratch4/turquoise/.mdt1/pwolfram/PR_tests/MPAS-Model/testing_and_setup/compass/ocean/jigsaw_to_MPAS/coastal_tools.py", line 639, in get_data_inside_box
    z_region = data[lat_idx, lon_idx]
  File "netCDF4/_netCDF4.pyx", line 3999, in netCDF4._netCDF4.Variable.__getitem__
  File "netCDF4/_netCDF4.pyx", line 4072, in netCDF4._netCDF4.Variable._toma
  File "netCDF4/_netCDF4.pyx", line 4258, in netCDF4._netCDF4.Variable._check_safecast
  File "/usr/projects/climate/pwolfram/anaconda2/e3sm_unified_1.1.2_py2_nox/lib/python2.7/site-packages/netCDF4/utils.py", line 23, in _safecast
    def _safecast(a,b):
KeyboardInterrupt
Finding distance
Done
6.12098789215  seconds

***East Coast***
Regional bathymetry data shape: (4656, 4657)
Extracting coastline
Done
Finding distance
Done
9.15724515915  seconds

***Caribbean***
Regional bathymetry data shape: (2762, 7229)
Extracting coastline
Done
Finding distance
Done
6.24799489975  seconds

Any advice you have on this error would be appreciated. My branch is https://github.com/pwolfram/MPAS-Model/tree/PRmergeCandidate.

@pwolfram

pwolfram commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

@sbrus89, the error disappears with an update of netCDF4, please ignore the previous comment.

@sbrus89

sbrus89 commented Oct 5, 2018

Copy link
Copy Markdown
Author

Whew. I was just looking into it.

@pwolfram

pwolfram commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

Sorry for the false alarm... it seemed pretty strange but I'm glad it wasn't real. This is the one downside to conda-- sometimes the libraries get corrupted and need reinstalled.

@pwolfram

pwolfram commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

We may want to do something about this, however:

/usr/projects/climate/pwolfram/anaconda2/e3sm_unified_1.1.2_py2_nox/lib/python2.7/site-packages/matplotlib/pyplot.py:537: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).

A lot of figures are being built but not closed. Thoughts? In the worst case we can fix this in a clean-up PR, but I think this is related to just this mesh generation case USNAEC60to30cr8. It is probably best to clean it up now, however.

@sbrus89

sbrus89 commented Oct 5, 2018

Copy link
Copy Markdown
Author

Probably better to take care of it right now.

@pwolfram

pwolfram commented Oct 6, 2018

Copy link
Copy Markdown
Contributor

Thanks @sbrus89!

@pwolfram
pwolfram merged commit 1e86587 into MPAS-Dev:ocean/develop Oct 6, 2018
pwolfram added a commit that referenced this pull request Oct 6, 2018
Updates to the USNAEC60to30cr10 mesh and coastal_tools.py:

- USNAEC60to30cr8 mesh:
  * Reduce coastal resolution to 8km
  * Rename to USNAEC60to30cr8
  * Compute the cell width function in stages.
  * Add the Caribbean and Bering Sea
  * Add Hawaii
  * Remove resolution in Northern Alaska
  * Remove resolution in St. Lawence Bay
  * Prevent high resolution from crossing into the
  * Pacific in near Panama

- coastal_tools.py
  * Bug fix for computing distance across
  * antimeridian line
  * Add exclude boxes for regions to
  * not apply the cell width function
matthewhoffman added a commit that referenced this pull request Oct 25, 2018
This commit matches bit-for-bit MPAS-O stand alone nightly regression
test with previous e3sm/develop commit.  Parent-branch merges into
ocean/develop in this merge include:
* 6e57d28 Merge branch 'ocean/add_iceberg_fluxes' into ocean/develop
* 95042e2 Merge branch 'ocean/bgc_fesedflux_bug' into ocean/develop
* 9ff33c6 Merge PR #90 'ocean/USNAEC60to30cr8'
* 0f713df Merge PR #74 'ocean/jigsaw_mesh_creation' into ocean/develop
@sbrus89
sbrus89 deleted the USNAEC60to30cr8 branch March 8, 2019 23:12
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
Updates to the USNAEC60to30cr10 mesh and coastal_tools.py:

- USNAEC60to30cr8 mesh:
  * Reduce coastal resolution to 8km
  * Rename to USNAEC60to30cr8
  * Compute the cell width function in stages.
  * Add the Caribbean and Bering Sea
  * Add Hawaii
  * Remove resolution in Northern Alaska
  * Remove resolution in St. Lawence Bay
  * Prevent high resolution from crossing into the
  * Pacific in near Panama

- coastal_tools.py
  * Bug fix for computing distance across
  * antimeridian line
  * Add exclude boxes for regions to
  * not apply the cell width function
ywangwof pushed a commit to ywangwof/frdd-MPAS-Model that referenced this pull request Mar 11, 2025
…e with CMake (MPAS-Dev#90)

* update CMakeLists.txt to make the CMake system work

* compile both init_atmosphere and atmosphere cores by default

* revert the change on default MPAS_CORES

* revert unnessary change on mpas_init_atm_cases.F

* add the new file mpas_atmphys_sfc_diagnostics.F to CMake

* update version to 8.2.2-2.6

* revert some changes based on Mike's review

* remove module_sf_ruclsm.F based on Tanya's review

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants