anchor.diff:                  varid(38)=temp_id
                   call check( nf90_inq_varid(ncid, "nsnow", temp_id), trim(err)//"nsnow" )
                   varid(39)=temp_id
  +            elseif (options%physics%microphysics==kMP_WSM6) then
  +                call check( nf90_inq_varid(ncid, "qg", temp_id), trim(err)//"qg" )
  +                varid(6)=temp_id
               endif
               call check( nf90_inq_varid(ncid, "w",  temp_id), trim(err)//"w" )
               varid(11)=temp_id
  
positive.code:                 call check( nf90_put_att(ncid,temp_id,"long_name","Snow number concentration"))
                  call check( nf90_put_att(ncid,temp_id,"units","cm-3"))
                  varid(39)=temp_id
              endif
              ! need to modify dimids for staggered grids. 
              dimids(1)=xu_id
  
negative.code:         varid(32)=temp_id
          call check( nf90_inq_varid(ncid, "snow",temp_id), trim(err)//"snow" )
          varid(15)=temp_id
          
          if ((options%physics%microphysics==kMP_THOMPSON)    &
          .or.(options%physics%microphysics==kMP_MORRISON)    &
          .or.(options%physics%microphysics==kMP_WSM6))       then
              call check( nf90_inq_varid(ncid, "graupel", temp_id), trim(err)//"graupel" )
              varid(16)=temp_id
          endif
  