anchor.diff:  		call check( nf90_put_var(ncid, varid(3),  domain%ice) )
   		call check( nf90_put_var(ncid, varid(4),  domain%qrain) )
   		call check( nf90_put_var(ncid, varid(5),  domain%qsnow) )
  -		call check( nf90_put_var(ncid, varid(6),  domain%qgrau) )
  -		call check( nf90_put_var(ncid, varid(7),  domain%nrain) )
  -		call check( nf90_put_var(ncid, varid(8),  domain%nice) )
  +		! these should only be output for thompson microphysics
  +		if (options%physics%microphysics==1) then
  +			call check( nf90_put_var(ncid, varid(6),  domain%qgrau) )
  +			call check( nf90_put_var(ncid, varid(7),  domain%nrain) )
  +			call check( nf90_put_var(ncid, varid(8),  domain%nice) )
  +		endif
   		call check( nf90_put_var(ncid, varid(9),  domain%u) )
   		call check( nf90_put_var(ncid, varid(10), domain%v) )
   		call check( nf90_put_var(ncid, varid(11), domain%w) )
  
positive.code: 		call check( nf90_put_att(ncid,temp_id,"units","kg m-3"))
  		varid(21)=temp_id
  		
  		call check( nf90_def_var(ncid, "clt", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","cloud_area_fraction"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Fractional cloud cover"))
  		call check( nf90_put_att(ncid,temp_id,"units","[0-1]"))
  		varid(22)=temp_id
  		
  		call check( nf90_def_var(ncid, "shs", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","sensible_heat_flux"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Sensible heat flux"))
  		call check( nf90_put_att(ncid,temp_id,"positive","up"))
  		call check( nf90_put_att(ncid,temp_id,"units","W m-2"))
  		varid(23)=temp_id
  		
  		call check( nf90_def_var(ncid, "hfls", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","surface_upward_latent_heat_flux"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Latent Heat Flux"))
  		call check( nf90_put_att(ncid,temp_id,"positive","up"))
  		call check( nf90_put_att(ncid,temp_id,"units","W m-2"))
  		varid(24)=temp_id
  		
  		call check( nf90_def_var(ncid, "hfgs", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","upward_heat_flux_at_ground_level_in_soil"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Ground Heat Flux"))
  		call check( nf90_put_att(ncid,temp_id,"positive","up"))
  		call check( nf90_put_att(ncid,temp_id,"units","W m-2"))
  		varid(25)=temp_id
  		
  		dimids(2)=soil_id
  		call check( nf90_def_var(ncid, "soil_w", NF90_REAL, dimids, temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","soil_moisture_content"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Column Soil Moisture"))
  		call check( nf90_put_att(ncid,temp_id,"units","kg m-2"))
  		varid(26)=temp_id
  		
  		call check( nf90_def_var(ncid, "soil_t", NF90_REAL, dimids, temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","soil_temperature"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Column Soil Temperature"))
  		call check( nf90_put_att(ncid,temp_id,"units","K"))
  		varid(27)=temp_id
  		
  		call check( nf90_def_var(ncid, "ts", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","surface_temperature"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Land surface skin temperature"))
  		call check( nf90_put_att(ncid,temp_id,"units","K"))
  		varid(28)=temp_id
  		
  		call check( nf90_def_var(ncid, "rlus", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","surface_upwelling_longwave_flux_in_air"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Longwave upward radiative energy flux from the surface"))
  		call check( nf90_put_att(ncid,temp_id,"positive","up"))
  		call check( nf90_put_att(ncid,temp_id,"units","W m-2"))
  		varid(29)=temp_id
  		
  		call check( nf90_def_var(ncid, "snw", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","surface_snow_amount"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Snow water equivalent"))
  		call check( nf90_put_att(ncid,temp_id,"units","kg m-2"))
  		varid(30)=temp_id
  
  		call check( nf90_def_var(ncid, "canwat", NF90_REAL, dimids(1:3:2), temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","canopy_water_amount"))
  		call check( nf90_put_att(ncid,temp_id,"long_name","Canopy water content"))
  		call check( nf90_put_att(ncid,temp_id,"units","kg m-2"))
  		varid(31)=temp_id
  
  		
  		! End define mode. This tells netCDF we are done defining metadata.
  
negative.code: 		call check( nf90_put_att(ncid,temp_id,"units","kg m-2"))
  		varid(16)=temp_id
  		
  		if (options%physics%convection>0) then
  			call check( nf90_def_var(ncid, "crain", NF90_REAL, dimids(1:3:2), temp_id) )
  			call check( nf90_put_att(ncid,temp_id,"standard_name","convective_rainfall_amount"))
  			call check( nf90_put_att(ncid,temp_id,"long_name","Convective rain (accumulated)"))
  			call check( nf90_put_att(ncid,temp_id,"units","kg m-2"))
  			varid(17)=temp_id
  		endif
  		
  		call check( nf90_def_var(ncid, "z",  NF90_REAL, dimids, temp_id) )
  		call check( nf90_put_att(ncid,temp_id,"standard_name","height"))
  