anchor.diff:              varid(13)=temp_id
   
               call check( nf90_def_var(ncid, "z",  NF90_REAL, dimtwo, temp_id), trim(err)//"z" )
  -            call check( nf90_put_att(ncid,temp_id,"standard_name","height"))
  -            call check( nf90_put_att(ncid,temp_id,"long_name","Model level height (AGL)"))
  +            call check( nf90_put_att(ncid,temp_id,"standard_name","height_above_reference_ellipsoid"))
  +            call check( nf90_put_att(ncid,temp_id,"long_name","Model level height (ASL)"))
               call check( nf90_put_att(ncid,temp_id,"units","m"))
               call check( nf90_put_att(ncid,temp_id,"coordinates","lon lat"))
               varid(20)=temp_id
  
positive.code:         call check( nf90_put_att(ncid,time_id,"standard_name","time"))
          call check( nf90_put_att(ncid,time_id,"UTCoffset","0"))
  
          ! call check( nf90_def_var(ncid, "z_agl", NF90_REAL, dimtwo, lat_id), trim(err)//"z_agl" )
          ! call check( nf90_put_att(ncid,lat_id,"standard_name","latitude"))
          ! call check( nf90_put_att(ncid,lat_id,"long_name","latitude"))
          ! call check( nf90_put_att(ncid,lat_id,"units","degrees_north"))
          ! call check( nf90_put_att(ncid,lat_id,"axis","Y"))
  
          if (calendar==GREGORIAN) then
              call check( nf90_put_att(ncid,time_id,"long_name","modified Julian Day"))
  
negative.code:             ! and write constant (in time) variables
              call check( nf90_put_var(ncid, lat_id,    domain%lat), trim(filename)//":Latitude" )
              call check( nf90_put_var(ncid, lon_id,    domain%lon), trim(filename)//":Longitude" )
              call check( nf90_put_var(ncid, lev_id,    domain%z(1,:,1)-domain%terrain(1,1)), trim(filename)//":Level" )
  
              if (.not.surface_io_only) then
                  call check( nf90_put_var(ncid, varid(20), reshape(domain%z, output_shape, order=zlast)) , trim(filename)//":Z")
              else
                  call check( nf90_put_var(ncid, varid(20), domain%z(:,1,:)) , trim(filename)//":Z")
              endif
          endif
  
          ! write the actual data
  