Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/mjh/tools #66

Merged
merged 11 commits into from
Oct 6, 2014
Merged

User/mjh/tools #66

merged 11 commits into from
Oct 6, 2014

Conversation

MJHarrison-GFDL
Copy link
Contributor

No description provided.

MJHarrison-GFDL and others added 3 commits October 2, 2014 12:48
8f55a7c46809950c7bdf2cb02a73bfd479a067dd
- Old version of nco was adding global attributes to files which
  is different behavior than we had before.
- Likely that the default version of nco was changed so we are
  now specifying the nco version in the Makefile.
@adcroft
Copy link
Collaborator

adcroft commented Oct 2, 2014

I got further into the test than in #65 but now this. Has supergrid been removed?

Traceback (most recent call last):
File "make_basin_mask.py", line 170, in
sgrid=supergrid(file='ocean_hgrid.nc',cyclic_x=True,tripolar_n=True)
NameError: name 'supergrid' is not defined
make: *** [basin_codes.nc] Error 1

@MJHarrison-GFDL
Copy link
Contributor Author

Needs

  • from midas import *
  • from midas.rectgrid import *

On Thursday, October 2, 2014, Alistair Adcroft (GFDL) <
notifications@github.com> wrote:

I got further into the test than in #65 but now this. Has supergrid been
removed?

Traceback (most recent call last):
File "make_basin_mask.py", line 170, in
sgrid=supergrid(file='ocean_hgrid.nc',cyclic_x=True,tripolar_n=True)
NameError: name 'supergrid' is not defined
make: *** [basin_codes.nc] Error 1


Reply to this email directly or view it on GitHub.<
https://ci6.googleusercontent.com/proxy/h3IpxiGXR1Xnb0y7LR-ek1STpiy6xEt4-EtJIN0FF7R2npeDQTakxO7Hdw6JoSoJZEM7vYxgtV-9sjJ3hQlkrzYVeWYmU0SVjRhAOzWFs3Y0jw9iltbMDjSY91izt-EYoc4KgaDpbZiLBqhfuXk_404w9vQs7tV5Ysw3HewBfOxdVTlU4OAB-lpArAQjIcooG-RitTrX2zPNtkkt3smciqu2a2XNC3SYTcUmZQJwe1G11oIRHJLPR0igtm71-XDg7qkf92vDcZyChjwMz8dp4s6MCIDHkQ=s0-d-e1-ft#https://github.com/notifications/beacon/6618352__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNzg5NTczNSwiZGF0YSI6eyJpZCI6NDQ1OTE0OTd9fQ==--3b670226eaa670ef96a5b74b05ea9a2a3351da88.gif

@adcroft
Copy link
Collaborator

adcroft commented Oct 2, 2014

Actually, to get past the error I had to do

-from midas import *
+from midas.rectgrid_gen import *

but then I got

Traceback (most recent call last):
  File "make_basin_mask.py", line 171, in <module>
    grid=rectgrid(supergrid=sgrid)
NameError: name 'rectgrid' is not defined
make: *** [basin_codes.nc] Error 1

I tried changing rectgrid to quadmesh and after also changin nc. and np. to netCDF4. and numpy. I get this:

Traceback (most recent call last):
  File "make_basin_mask.py", line 198, in <module>
    S.write_nc('basin_codes.nc',['basin'])
  File "/vftmp/Alistair.Adcroft/NOAA-GFDL-MOM6/tools/python/025gridGeneration/local/lib/python/midas/rectgrid.py", line 3996, in write_nc
    if self.var_dict[field]['Ztype'] in ['Generalized','Isopycnal','Fixed'] and write_interfaces is False:
KeyError: 'Ztype'
make: *** [basin_codes.nc] Error 1

BTW, I've pushed the Makefile change up to this branch. Do a git pull before fixing things on your end.

@MJHarrison-GFDL
Copy link
Contributor Author

I updated the MIDAS package to get past the error in make_basin_codes.py.

- replaced rectgrid with quadmesh
- import netCDF4 and numpy
- all: target now does a md5sum -c md5sums.txt
- to regenerate md5sums use make md5sums.txt
@adcroft
Copy link
Collaborator

adcroft commented Oct 3, 2014

Almost there! I've pushed two more commits on this branch to make things work (you need a git pull) and so now I think we have only one last issue to fix:

Traceback (most recent call last):
  File "interpWOA05.py", line 46, in <module>
    OM.write_nc('WOA05_ptemp_salt_monthly.nc',['ptemp','salt'],append=False,writ
e_interface_positions=True)
  File "/vftmp/Alistair.Adcroft/NOAA-GFDL-MOM6/tools/python/025gridGeneration/lo
cal/lib/python/midas/rectgrid.py", line 4006, in write_nc
    ifield=self.interfaces
AttributeError: 'state' object has no attribute 'interfaces'
make: *** [WOA05_ptemp_salt_monthly.nc] Error 1

@adcroft adcroft merged commit e81b3ff into dev/master Oct 6, 2014
@adcroft adcroft deleted the user/mjh/tools branch October 10, 2015 17:15
nikizadehgfdl pushed a commit to nikizadehgfdl/MOM6 that referenced this pull request Oct 9, 2017
gustavo-marques pushed a commit to gustavo-marques/MOM6 that referenced this pull request Jun 7, 2018
…-candidate-2018-06-03

Merge dev master candidate 2018 06 03
Hallberg-NOAA pushed a commit to Hallberg-NOAA/MOM6 that referenced this pull request Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants