Changeset 6622


Ignore:
Timestamp:
2016-05-25T16:24:04+02:00 (5 years ago)
Author:
davestorkey
Message:

Bug fix for icb_combrest.py. See ticket #1708.

Location:
trunk/NEMOGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90

    r6140 r6622  
    9494           &     ij .GE. nldj+njmpp-1 .AND. ij .LE. nlej+njmpp-1 ) THEN            
    9595 
    96                CALL iom_get( ncid, jpdom_unknown, 'number'       , zdata(:) , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) 
     96               CALL iom_get( ncid, jpdom_unknown, 'number'       , zdata , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) 
    9797               localberg%number(:) = INT(zdata(:)) 
    9898               CALL iom_get( ncid, 'mass_scaling' , localberg%mass_scaling, ktime=jn ) 
     
    126126      CALL iom_get( ncid, jpdom_autoglo_xy, 'stored_ice'  , berg_grid%stored_ice, kstart=(/1,1,1/), kcount=(/1,1,nclasses/) ) 
    127127       
    128       CALL iom_get( ncid, jpdom_unknown, 'kount' , zdata(:) ) 
     128      CALL iom_get( ncid, jpdom_unknown, 'kount' , zdata ) 
    129129      num_bergs(:) = INT(zdata(:)) 
    130130 
  • trunk/NEMOGCM/TOOLS/REBUILD_NEMO/icb_combrest.py

    r6447 r6622  
    169169    sys.exit(15) 
    170170  fo = Dataset(pathout, 'w') 
    171   for dim in ['x','y','c']: 
     171  for dim in ['x','y','c','k']: 
    172172    indim = fi.dimensions[dim] 
    173173    fo.createDimension(dim, len(indim)) 
    174   for var in ['calving','calving_hflx','stored_ice','stored_heat']: 
     174  for var in ['kount','calving','calving_hflx','stored_ice','stored_heat']: 
    175175    invar = fi.variables[var] 
    176176    fo.createVariable(var, invar.datatype, invar.dimensions) 
    177177    fo.variables[var][:] = invar[:] 
    178     fo.variables[var].long_name = invar.long_name 
    179     fo.variables[var].units = invar.units 
     178    if "long_name" in invar.ncattrs(): 
     179        fo.variables[var].long_name = invar.long_name 
     180    if "units" in invar.ncattrs(): 
     181        fo.variables[var].units = invar.units 
    180182  os.remove(pathout.replace('.nc','_WORK.nc')) 
    181183# 
Note: See TracChangeset for help on using the changeset viewer.